Scala Koans

Daniel Hinojosa (evolutionnext.com), Dianne Marsh (Netflix)
Java & JVM
Location: D137-138
Presentation: Scala Koans Presentation [PDF]
Average rating: **...
(2.56, 9 ratings)

Attendee prerequisites for this tutorial are listed below.

Koans are small Zen lessons, Scala Koans are small Zen lessons — in Scala! Koans as little exercises are designed to provide tidbits of knowledge that when bundled together provide an in-depth understanding, Each Koan comes complete with their own little epiphanies of joy. Scala Koans have been a favorite for developers helping them make their path to Scala Nirvana.

Scala Koans have been presented at various conferences around the country, by Dianne Marsh and myself to help people learn and understand Scala. Each Scala Koan is simple with a small lesson, which is done for the purpose of focus and clarity.

https://bitbucket.org/dmarsh/scalakoansexercises

An example of a Scala Koan looks like the following:

koan(“For loops can be simple”) {
val someNumbers = Range(0, 10)
var sum = 0
for (i <- someNumbers)
sum += i

sum should equal(__)
}

Each Koan has a __ where they fill in the answer, and it is encouraged that when successfully passing a Koan to reflect on koan and how it worked. They are encouraged to raise any question about the Koan at any time.

When many developers have the same question about a Koan, an organic and spontaneous discussion or presentation is started to offer more insight into that lesson of the language.

Koans have been greatly received from developers across the country.

TUTORIAL PREREQUISITES
Please download and install JDK 1.6+ from http://www.oracle.com/technetwork/java/javase/downloads/jdk6-downloads-1637591.html

QUESTIONS for the speaker?: Use the “Leave a Comment or Question” section at the bottom to address them.

Photo of Daniel Hinojosa

Daniel Hinojosa

evolutionnext.com

Daniel Hinojosa has been a self-employed developer, teacher and speaker for private business, education, and government since 1999. He also currently teaches programming at the University of New Mexico Continuing Education. His business is revolved around the Java ecosystem, encompassing multiple languages and frameworks. Daniel is a Pomodoro Technique practitioner and is co-founder of the Albuquerque Java User’s Group in Albuquerque, New Mexico.

Photo of Dianne Marsh

Dianne Marsh

Netflix

Dianne Marsh, co-founder of SRT Solutions, has deeply rooted expertise in software programming and technology, including manufacturing, genomics decision support and real-time processing applications. Dianne works with Unix, Windows, Java, C#, and C++ in enterprise-level applications, and has deep experience with a variety of graphical user interface libraries. A member of Women Presidents Organization, Dianne is also active in CodeMash and various Java user groups. She earned her Master of Science degree in computer science from Michigan Technological University.

Comments on this page are now closed.

Comments

Picture of Dianne Marsh
Dianne Marsh
07/23/2012 6:55am PDT

That’s good feedback, Bert. The koans were intended to be a tutorial on how to use the language. We didn’t consider adding in a component to motivate its use (the “why to learn Scala part”). I do think that showing the advantage of a case class over a regular class or match expressions over if statements would be good additions to the koans. Thanks!

Picture of Bert  Porter
Bert Porter
07/22/2012 1:36pm PDT

I like the overall concept of the KoanSuite, but I found it to be pretty limited as a learning tool. I needed some interpretation, explanation of motivation, etc. Why would someone want to learn and use Scala? What is the benefit of, for instance, a case class? etc.

Sponsors

For information on exhibition and sponsorship opportunities at the conference, contact Sharon Cordesse at (707) 827-7065 or scordesse@oreilly.com.

View a complete list of OSCON contacts