Getting somewhere with Scala
Ok, so when beginning with Scala, it was hard to figure certain things out. For example, what’s the best way to document my code? How should I go about testing my new programs? Which race in StarCraft best represents the ideals of Scala? Well, to prevent other people from getting stuck on these, I am writing this post to help out.
Writing code
How best to write code? Are there IDEs which support or maybe even encourage Scala? Yes! Yes, there are!
- IDE plugins (Eclipe, NetBeans, IntelliJ)
- Emacs – and a post on how to put many Scala pieces together with Emacs.
Project management
How best to keep track of Scala projects? Well, everyone’s got their favorite way to build stuff (Make and cousins) and those will most likely work fine. However, if you want something a little more specialized there are several tools which can help.
Testing
There is no one way to test Scala, and this is true of most langauges. However, Scala does include a test framework called SUnit. That being said, it’s slated for deprecation as soon as it can be replaced and removed. Also, the current thinking out there seems to be that SUnit sucks. So, you know what, kids? We aren’t going to let that bother us because there are many great frameworks out there which may be used to effectively test Scala. Since Scala compiles to Java bytecode, there shouldn’t be trouble testing Scala from Java or Java from Scala.
- ScalaTest
- Specs
- ScalaCheck (pseudo-clone of Haskell’s QuickCheck)
- JUnit – Oldie-but-goodie still works well from Java or from Scala (helpful list of assertions)
Documentation
Who doesn’t love documentation? I know that I sure do! To help satisfy my deep-seated urge to author code-centric exposition, there is scaladoc. Ever hear of javadoc? Yeah, it’s like that. Read about javadoc here and then check out the scaladoc manpage. If, for some reason you don’t like scaladoc’s output, you’re in luck because there is an alternative generator called vscaladoc.
Notes
This list is most likely incomplete and certainly not exhaustive. If someone would like me to add something, please provide the link and info in the comments.















No comments yet.