- on Mon 07 January 2013
This is the “secret slide” from my recent talk Learning Functional Programming without Growing a Neckbeard, with links to the sources I used to put the talk together and some suggestions for ways to get started writing Scala code.
Functional programming in general
- What is Functional Programming? by Christopher Bennage
A practical overview of some common functional concepts, with examples in F#.
- Functional Programming For the Rest of Us by Slava Akhmechet
A bit of a ramble through the history and benefits of functional programming, with key concepts illustrated in Java.
- Functional Programming by Victor Nicollet
Solid explanation of the meaning of a pure function and the implications of functions as first-class objects.
- Functional programs rarely rot by Michael O. Church
Fantastic article about the maintainability of functional code.
- “Minimize Mutability” (excerpt) from Effective Java by Josh Bloch
A chapter outlining the benefits of making your objects & data immutable in Java (and a reminder that the concept isn’t new or unique to functional programming)
- Functional programming: immutability etc on StackOverflow
A discussion on StackOverflow about immutable data in practice
- Scala Collections for the Easily Bored Part 1: A Tale of Two Flavors by Daniel Spiewak
If you were wondering how immutable data can be used for anything without slowing the JVM down to a crawl, Daniel Spiewak explains how persistent data structures work.
Map, flatmap, and for-yield:
- Scala Collections for the Easily Bored Part 2: One at a Time and Scala Collections for the Easily Bored Part 3: All at Once by Daniel Spiewak
In the second and third parts of the series, Spiewak goes over the higher order functions defined on Scala collections.
- Map, map and flatMap in Scala by Michael Brunton-Spall
Walk-through of map and flatmap as they apply to Option and Map types, with plenty of examples.
- Chapter 10: For-Comprehensions from Scala By Example by Martin Odersky
A comprehensive explanation of the for-yield notation.
Option and other monads
- Best explanation for Languages without Null on StackOverflow
Some great answers to why the Option monad is useful
- Free Yourself from the Tyranny of Null Part 1 and Part 2 by Doug Rapp
An explanation of null-free programming from a Java perspective by my coworker Doug
- scala.Option Cheat Sheet by Tony Morris
A cheat sheet for Option’s higher-order functions
- Monads Are Not Metaphors by Daniel Spiewak
In my opinion, the clearest explanation out there of what a monad is and why it’s useful
- Functors, Monads, Applicatives – can be so simple by Dirk Detering
A more technical (but still clear) description of monads and some related structures
- Rubyists Already Use Monadic Patterns by Dave Fayram
An illuminating post showing that monadic concepts are more commonly used than you might realize. See also the same author’s excellent FizzBuzz, A Deep Navel to Gaze Into, about functional patterns as applied to everyone’s favorite weed-out interview question
Other cool Scala stuff
- Problems Scala Fixes by Will Sargent
A tour of some of Scala’s useful (mostly) non-functional features
- What is ‘Pattern Matching’ in functional languages? on StackOverflow
A non-Scala specific break down of what pattern matching does and what it’s good for
- The Neophyte’s Guide to Scala by Daniel Westheide
A 7-part tutorial that begins with pattern matching and case classes
- Pimp my Library by Martin Odersky
A short illustration of a common pattern in Scala that uses implicit conversions
Getting started in Scala
- Scala for Java Refugees by Daniel Spiewak
Great starting point for Java programmers looking to explore Scala
- Scala School and Effective Scala from Twitter
An introduction to Scala and a Scala style guide used by the engineering team at Twitter
- Functional Programming Principles in Scala at Coursera
A free online course led by Martin Odersky, the creator of Scala
A lightweight web framework that’s a great place to start building web apps & APIs in Scala
- Lift and Play
Two more heavy-duty Scala web frameworks that are widely used
If you’re interested in using Scala for concurrent & distributed applications, the Akka toolkit is an Actor model framework with really accessible documentation & tutorials
- This Week in
Finally, keep up with what’s going on in the Scala world by following This Week in Scala, compiled each week by Chris Cundill