Five Resources for Learning Scala

By Mike Marr on May 01, 2015

Scala is quickly growing in popularity. Some of its appeal is the ease of transition from Java and other object-oriented programming languages. Although Scala is object-oriented and runs on the JVM, transition into a mature Scala project is far from easy. For example, even an experienced programmer might find it difficult to follow complex Scala code snippets:

def interp(t: Term, e: Environment): M[Value] = t match {
  case Var(x) => lookup(x, e)
  case Con(n) => unitM(Num(n))
  case Add(l, r) => for (val a <- interp(l, e);
			 val b <- interp(r, e);
			 val c <- add(a, b))
		    yield c
  case Lam(x, t) => unitM(Fun(a => interp(t, Pair(x, a) :: e)))
  case App(f, t) => for (val a <- interp(f, e);
			 val b <- interp(t, e);
			 val c <- apply(a, b))
		    yield c
  case Ccc(x, t) => callCC(k => interp(t, Pair(x, Fun(k)) :: e))

Although tuples and pattern matching are not unique to Scala, the combination of their strong use and their accompanying syntax makes Scala code, like the above, difficult for even an experienced programmer to follow. What happened to the easy transition?

So, what is the best way to figure out Scala? Practice! During my ongoing transition into the world of Scala, here are some resources I’ve found that got me a quick start into practing, and subsequently understanding, the basics of common Scala-y things.

  1. Official Scala Documentation
    Scala’s official documentation seeks to help demystify some of its uniqueness. There are also great introductions for Scala programmers coming from Java. Leveraging these tutorials alongside the Scala console give you a solid foundation of learning.

  2. Simply Scala
    Much like Scala’s offical documentation, Simply Scala provides great introductary tutorials into the basic types and objects available in Scala. As a bonus, Simply Scala provides an in-browser console to compile and run your own Scala code. Alongside the provided tutorials on the site, you can quickly tackle a myriad of Scala syntax and patterns.

  3. Learning Scala in small bites
    Computer Science Professor Matt Might provides a great resource for his students, whom he encourages to use Scala for some of his courses, to learn some of the basic features of the Scala language. He is generous enough to share these snackable code snippets with the rest of us. Take one or more bites at a time to digest Scala features at a comfortable pace.

  4. Twitter’s Scala School
    One of the many companies switching to Scala includes Twitter. To help with their existing engineer base transition, Twitter has compiled a great collection of Scala resources. Although some of this material is specific to the libraries and patterns used by Twitter, there is still plenty of generic, yet strong, introductary material.

  5. Functional Programming Principles in Scala - Cousera
    Martin Odersky, the creator of Scala, teaches a free online course on Cousera to introduce functional programming. Although the objective of the class is functional programming, the class is taught in Scala, and working through the class introduces you to various Scala features and functions. The course is only offered intermitteningly, so be sure to make time for this when its available.

Hitting all of these resources is only the beginning of your Scala journey, and many of these resources overlap in what they cover. However, having a solid understanding of the features of the Scala lanaguage, and their accompanying syntax, goes a long way in helping you learn the more advanced and powerful aspects of this exciting and powerful language.

Still Writing SQL in a Terminal?

Beekeeper is a free and full featured SQL IDE with query autocomplete, error detection, dataset previews, and result visualization. We support SparkSQL, Hive, Postgres and more!

Create your account »

Mike Marr bio photo

Mike Marr

Software Engineer. Potato chip snob.

Twitter Github Stackoverflow