: New: Scala, part of the new gig

Bumped into @kberg and @adamsah yestere'en. We talked about work. They said interesting things which I won't repeat because oh man what if one of them accidentally let slip some confidential information? But they were curious to know what I thought of Twitter a few months in. So here's part of that: Scala.

I'm having a blast. Twitter is fun. Scala is part of the fun.

I've been learning the Scala programming language. And I've been teaching it. It's a nice language. When I told the Googlers we were using Scala, they kind of rolled their eyes. But Scala is pretty good for Twitter. Twitter had tons of Ruby on Rails code. Twitter still has a ton of Ruby on Rails code—but a lot of the old Ruby code has been ported to Scala. Yay, those services can now run on 1/N servers than they used to, and faster. Twitter has tons of Ruby on Rails coders who want to write efficient services that only need 1/N servers to run. Scala's a pretty good path for them.

You could say "They should use Go!" Oh man, I wish. But Twitter's escape-the-rail effort started way before Go came along. You could say, "They should use C++!" But a lot of Ruby programmers became such because they were trying to get away from things like C++. You could say, "They should learn Java!" but Scala is better than Java: since Scala compiles to the JVM, you can use Java APIs without putting up with Java syntax. Yes, "better than Java" is a back-handed compliment, but for a company of Ruby nerds trying to figure out how to dig out from under a bad situation, it's relevant. Some ways in which Scala is better than Java are analogous to ways in which Ruby is better than Perl. The Ruby fans can step over to the new language without feeling like they're giving up everything.

But first they have to learn it. Twitter has a live Scala class that engineers can take. But what if you want something self-paced? Or what if you haven't officially started at Twitter yet, but want a head start? Then there's Scala School, a nice online tutorial. Except, uhm, it wasn't always so nice. When I hadn't started at Twitter yet, I tried reading Scala School. It was the notes that had gone with a live class. But the live class was long-gone. The notes didn't have everything—there were gaps; in the live class, the instructor had filled in those gaps. When I tried to read it on my own, Scala School lost me. But then I came to Twitter, and there were humans to tell me how to fill in the gaps. I had a fun time writing that material up for Scala School. I think I could learn the basics of Scala from it now. Maybe. I dunno, I might know too much now to be able to "see" the gaps. (If you're used to programming in one of those other programming languages, I think you should go read Scala School right now and file issues when you run into gaps. You get to learn a new programming language; I get some useful feedback. Maybe that only sounds like a good trade if you enjoy learning a new programming language. Anyhow.)

I like to learn a new programming language once every couple of years. So I was pretty glad to have a chance to learn Scala. And because I'm kind of a know-it-all explain-y kind of guy, I got a thrill out of writing down documentation so that later folks could have an easier time writing Scala. So: wacky fun times, depending on what you think of as being wacky fun.

Tags: programming languages writing

web+comment@lahosken.san-francisco.ca.us
blog comments powered by Disqus

Updates:

Tags