Introducing tumblr4s: A Scala Library For The Tumblr API
Back in February of this year I stumbled upon an amazing article on HighScalability.com about Tumblr’s infrastructure. It’s a great read for many reasons (go read it). One of the greatest take-aways I had from this article, was this “new” programming language called Scala. I had never heard of Scala before, and was immediately intrigued. Also, after doing a lot of PHP back at the time – which I hate – I wanted something new, fresh and fun.
I started reading “Programming in Scala 2nd Ed” by Martin Odersky – creator of Scala – and was completely blown away by the language’s beauty, design and powers. I became obsessed with it, reading dozens of articles and tutorials, going thru many open source projects and watching conference talks. I even started listening to The Scala Types podcast. To top it off I attended the Coursera course given by Odersky himself called “Functional Programming Principles in Scala” (which attracted over 50,000 developers).
Every coder knows that the best way to really learn a new programming language is to dive right in – start writing code and doing your first project. Seeing as I had Tumblr to thank for introducing me to Scala, I figured it was only appropriate I do something with it’s API for my first project. Unfortunately I couldn’t find any Scala library for the Tumblr API, so I figured I’d write it myself.
And so tumblr4s is my first Scala project. It’s supposed to be a simple, elegant and idiomatic Scala implementation for Tumblr’s API. The GitHub repository has some examples on how to start using it. It’s pretty straight forward, and implements all the functionality of the Tumblr API.
I have put a lot of effort in to this, attempting to make it as “Scalaty” as possible. It took me a while to change my way of thinking from imperative/mutable to functional/immutable. In my code I tried to follow these concepts meticulously:
- Functional programming – everything is an expression, no side-effects
- Immutability – no use of vars and only immutable collections
- Use the appropriate Scala tool in the appropriate place
- Not write Java code in Scala
17 Notes/ Hide
- andre3k1 likes this
- shaneguiter likes this
- jeremyjohnstone likes this
- bennett likes this
- mintyfloss likes this
- nerdy-but-cool likes this
- ckalima likes this
- tinfoilparachute likes this
- mwunsch likes this
- paul-yamamoto likes this
- romeojulietsierra likes this
- dreamworldvaporeon reblogged this from engineering
- dreamworldvaporeon likes this
- hackedy likes this
- r2articles likes this
- engineering reblogged this from orrsella and added:
- orrsella posted this