Total Pageviews

Monday, 13 June 2016

scala school


Scala school started as a series of lectures at Twitter to prepare experienced engineers to be productive Scala programmers. Scala is a relatively new language, but draws on many familiar concepts. Thus, these lectures assumed the audience knew the concepts and showed how to use them in Scala. We found this an effective way of getting new engineers up to speed quickly. This is the written material that accompanied those lectures. We have found that these are useful in their own right.


We think it makes the most sense to approach teaching Scala not as if it were an improved Java but instead as a new language. Experience in Java is not expected. Focus will be on the interpreter and the object-functional style as well as the style of programming we do here. An emphasis will be placed on maintainability, clarity of expression, and leveraging the type system.
Most of the lessons require no software other than a Scala REPL. The reader is encouraged to follow along, but also to go further! Use these lessons as a starting point to explore the language.


You can learn more elsewhere:


Values, functions, classes, methods, inheritance, try-catch-finally. Expression-oriented programming
Basics continued
Case classes, objects, packages, apply, update, Functions are Objects (uniform access principle), pattern matching.
Lists, Maps, functional combinators (map, foreach, filter, zip, folds)
Pattern matching & functional composition
More functions! PartialFunctions, more Pattern Matching
Type & polymorphism basics
Basic Types and type polymorphism, type inference, variance, bounds, quantification
Advanced types
Advanced Types, view bounds, higher-kinded types, recursive types, structural types
Simple Build Tool
All about SBT, the standard Scala build tool
More collections
Tour of the Scala Collections library
Testing with specs

Concurrency in Scala
Runnable, Callable, threads, Futures
Java + Scala
Java interop: Using Scala from Java
An introduction to Finagle
Finagle primitives: Future, Service, Filter, Builder
Building a distributed search engine using Finagle
This is Scala School - a set of lessons covering the Scala programming language.
We use jekyll to generate the site. In order to build it, you must first install it:
$ gem install jekyll
should do. Now, build the site with make. This will create a copy of the lessons in the web.out folder.
For development, you'll also need to install RedCloth.
$ gem install RedCloth
Then make serve will launch jekyll in serving mode: a web server will be launched on port 4000, and changing files will automatically rebuild the site.
To publish to
$ make publish