This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Scala Ladybug

No replies
Samuel Robert Reid
Joined: 2008-12-17,
User offline. Last seen 1 year 22 weeks ago.
Scala Community,

My name is Sam Reid, I develop open source educational software with the PhET Interactive Science Simulations group at the University of Colorado at Boulder.

Until now, all our development has been in Java and Flash.  This week I started investigating the possibility of using Scala, and have written my first program in Scala.  This simulation is meant to help educate about 2D motion, regarding position, velocity and acceleration.  It's a very rough draft, only 5 days old, and we haven't tested it with any users yet.  You can launch it in web start here:
http://www.colorado.edu/physics/phet/dev/moving-man/1.20.17/ladybug-2d.jnlp

Or download an executable JAR file here (have to select the Ladybug sim in the GUI on startup):
http://www.colorado.edu/physics/phet/dev/moving-man/1.20.17/moving-man.jar

I was hoping someone would give constructive criticism about how to improve my Scala style; some of my code feels like it's a bit like Java in Scala syntax.  Also, I'm not sure I'm taking advantage of all of Scala's abilities to help me produce concise, robust, legible code (or whether I'm abusing any of the language features).  I posted my code here with a syntax highlighter:
http://www.colorado.edu/physics/phet/dev/moving-man/1.20.17/source/

Please let me know if you have any questions, comments or constructive criticism for this source code.

Thanks,
Sam Reid

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland