Tag Archives: koans

Functional Programming and Scala Koans: upcoming talks

On Saturday, May 5, 2012, I will be presenting “Functional Programming for the Masses” at the Great Lakes Functional Programming Conference. This one-day event is developer organized and will be held at Washtenaw Community College. You can register at http://glfpc.eventbrite.com/. Tickets have been selling quickly for the event. Here’s an abstract for my talk:

Have you heard about functional programming but aren’t sure what should be your next step toward adoption? Are you looking for ways to introduce functional programming without scaring your coworkers and your boss? How can you convince others than the paradigm shift is worthwhile? That it will provide business value while making the programmers and customers happy?

You will come out of this talk with the techniques to bring functional programming to your organization with minimal stress. Whether you use Java, C#, or are gunning for Scala, this talk is for you. We’ll show examples of how to weave in functional, starting with how to talk about functional and ending with real code examples, showing that functional programming can be … well … functional.

The Scala Koans in Detroit will be rescheduled for a later date, through Detroit Dev Days. On Thursday, May 31, I will be delivering the Scala Koans with Bruce Eckel in Detroit, at the Madison Building. Organized by Detroit Dev Days, this will be the first full day Scala koans event ever. Join us. More information and registration available at eventbrite. Lunch will be provided.

On Monday, July 16, I will again be delivering the Scala Koans with Daniel Hinojosa in Portland, OR, at OSCON. Monday is the Tutorials Day, and requires a separate registration. You can get more information about our session here and register for the conference here. Daniel and I have teamed up several times in the past (both at CodeMash and StrangeLoop) to deliver the koans, and we have given them individually as well. The koans continue to grow, and we think it’s a great way to learn!

Presenting the Scala Koans with Bruce Eckel in Detroit

I was thrilled when David McKinnon of the Detroit Java User Group invited me to present the Scala Koans in Detroit on May 31. The timing worked out perfectly for Bruce Eckel to be in town, so I asked him to join me. Bruce and I are working on an introductory Scala book together, and the Koans are a great way to learn Scala as well. The koans are self-paced exercises. You can do them from home, but in our experience in presenting them at StrangeLoop, CodeMash, and 1DevDay, the group atmosphere offers an additional facet for learning. Other participants ask questions and contribute ideas, providing a unique experience at each event.

Join us on the 5th floor of the newly renovated Madison Building, 1555 Broadway, in Detroit on May 31 from 9 am – 4 pm (lunch provided).

You can register at http://detroitscala.eventbrite.com/. Early bird pricing is in effect until April 30 and regular registration runs through May 25. Hope to see you there!

 

Scala koans in Ann Arbor on October 5 (full day workshop)

SRT Solutions will be presenting the Scala Koans in a full-day workshop on Wednesday, October 5, from 9 am – 4:30 pm. The Scala Koans provide an interactive and fun way to learn the language.

Koans, as referenced in wikipedia, “may consist of a perplexing element or a concise but critical word or phrase (話頭 huàtóu) extracted from the story”. This is the case with the Scala koans as well. Students of the koans use a simple test-driven process to insert missing information from an exercise to make a test pass, before moving onto the next exercise. The cumulative knowledge from working on each koan builds to provide an in-depth understanding of a particular language feature that can later be applied in the context of solving a software problem.

The Scala Koans were conceived at CodeMash 2010 and have been growing ever since. The Scala Koans have previously been presented as half-day workshops at CodeMash, the Java Posse Roundup, and Strange Loop. Koans are available in many other languages, such as Ruby, Javascript, and Clojure.

Cost for the full day Scala Koans workshop is $100 (early bird, until 9/30) or $125 (10/1-10/4). Lunch and snacks will be provided.

The workshop will be held at SPARK Central, 330 E. Liberty, Lower Level, Ann Arbor, MI 48104. For more information or to register, go to http://srtscalakoans.eventbrite.com/. Please call Lisa Zuber at SRT Solutions (734-929-3211) if you have any problems or questions with respect to registration.

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!

4 More Weeks of Six Weeks of Scala

There are still 4 weeks left of our Six Weeks of Scala series.  There’s still plenty of time to join in, particularly since this has been organized as independent sessions to allow people to come and go, as it fits their schedules.

We will meet at SRT Solutions on Monday evenings (11/1, 11/8, 11/15, and 11/22), sometime after 5 pm (most people seem to be arriving at around 6), and work on Scala for about 2-2.5 hrs.  The first few weeks, we worked on a variety of things, getting used to the language.  We played around with collections in the first week, and pattern matching & functional decomposition of problems last week.

On Monday, November 1, we are going to start working with the Scala Koans, modeled after the Ruby Koans.  We’ll be working with Dick Wall’s fork of the Koans, and hopefully contributing to them.  Please join us.

SRT Solutions is at 206 S. Fifth Ave., Suite 200 in Ann Arbor.  This is at the intersection of Washington and Fifth Avenue.  The entrance is from Fifth Avenue.  Metered parking is free in Ann Arbor after 6 pm, so if you can find a space, feed the meter til 6.   Alternatively, the closest parking structure is at Fourth Avenue and Washington.