Category Archives: Uncategorized

Greetings from the Strange Loop Conference in St. Louis

Strange Loop is a conference held in St. Louis, MO, started by Alex Miller. Much like CodeMash, Strange Loop is a developer-organized conference, and is offered at a price (around $250 for 2 days) that attracts those who self-pay and those who work for small companies. I’ve found that the self-motivated individuals are engaged attendees! I decided last winter that I wanted to branch out to attend other regional conferences beyond CodeMash and Strange Loop was top on my list. I was thrilled when Alex asked me to present the Scala Koans at Strange Loop as a 3-hour workshop on Sunday.

The koans approach to learning computer languages offers small exercises, in a test-driven manner, so that people can learn a language by through small steps and self-discovery. Offering a koans workshop is an effective way to encourage people to work on the exercises, since they can ask questions and stay engaged. Particularly while the koans are being developed, any gaps in our “lessons” can be addressed by the instructors, on site. Strange Loop targets 30-40 attendees for workshops, so I asked Joel Neely and Daniel Hinojosa, both who have experience with the koans, to co-present at Strange Loop. This offered a 10:1 student to instructor ratio, which ensured that people were able to make good progress in the 3 hours. (Having 3 presenters also allowed one of us to slip out and order some pizzas for our hungry students, since our session ran 11:30-2:30 and hungry brains don’t focus well! And no, we didn’t plan to order pizza ahead of time!). Our session was well-attended and we got some great feedback. Hallway rumblings and tweets seem to indicate it was well-received. For those who are interested in learning more about the koans, I’m in the process of bringing up a website to provide resources, code, and other hints at ScalaKoans.org. It’s not live yet, so I’ll let you know when it’s up (expecting in the next week or so, depending on how much time I can find to get the content there). In the meantime, you can access the student exercises at our bitbucket site.

Back to Strange Loop. The workshop day was an optional day. The first full day of the conference was on Monday. I attended some interesting sessions, including:

I also attended a purely fun session, “Learn to play Go” by Rich Hickey, creator of Clojure. Finally, I may be able to figure out what to do with the Go board that’s been sitting in my basement for a very long time! I was able to play a game with another newbie and we were very evenly matched!

The Scala talks were interesting. I tend to focus on the simplicity of Scala, as a better language than Java for the JVM. These talks were focused on getting the most out of the functional aspects of Scala. As the industry sees momentum toward using functional for what it does best, this will be very relevant. Strange Loop, in general, has a fairly functional bent to it, and that’s quite fun!

I’ll fill in about day 2 of Strange Loop later. But there are more talks to attend!

CodeMash Recap: Scala Koans Precompiler

Was it just last year that I attended Joe O’Brien’s Ruby Koans precompiler at CodeMash?  Koans are little exercises, designed to provide tidbits of knowledge that when bundled together provide an in-depth understanding.  What an awesome way to learn a programming language!

Last year at CodeMash (January 2010), Dick Wall and a few other people got together to work on koans for other languages.  This year, there was some interest in a Scala precompiler.  Since Dick wasn’t able to make the precompiler, I started looking for folks to help.  I hosted “Six Weeks of Scala” at the SRT offices in October and November, and many koans were written there, with the help of several attendees (notably Jeff Hoover).  Nilanjan Raychaudhuri and Daniel Hinojosa, both selected as CodeMash speakers, agreed to pitch in as well.

The idea of koans is that the student has to make only a very small, seemingly insignificant change to make each koan work.  By crafting koans around language features, students gain focused knowledge around the individual features.  The Ruby Koans set the bar REALLY high.  The EdgeCase folks have made their koans fun, even amusing.  Those who have done either set will agree with the inside joke that the Scala koans are still on their journey toward the path to enlightenment.

On the other hand, the koans were well-received.  We had a half-day precompiler session and we seemed able to keep 20 or 30 people amused and interested.  Many others tweeted after the fact that they too were doing the Scala Koans.  The best compliment we could have ever gotten was the guy who came up to me afterward and said that our koans had changed his opinion of Scala.  That he had thought he hated the language, but that he know thinks it’s “not that bad”.  He said that was quite a change in his thinking.  I’ll attribute it to his open mind, and the mantra of CodeMash, which is “Free Your Mind”.

If you want to try the koans, they currently live in 2 places.  We’ll ultimately consolidate them with the Functional Koans on GitHub, but for now you can find the “solutions set” at https://bitbucket.org/dickwall/scala-koans and the student exercises at https://bitbucket.org/dmarsh/scalakoansexercises.

The Ruby Koans have a script that generate the exercises from the working solutions set, but we’re not there yet.

To run the koans, you just need a JDK (1.6+).  We provided the precompiler attendees with sbt and a script that packaged everything that they needed to get started.

Just run:

sbt

~test-quick org.functionalkoans.forscala.PathToEnlightenment

From that point on, you will be able to edit the Scala files and make appropriate changes to get the tests to work. sbt will run the tests when you make changes.  Scroll back through the messages to the first error and make the change to fix the error.

The wiki includes a list of changes that we’re working on, as well as instructions of how to run the koans.

Enjoy!