Today's Monday Motivation comes from this exclusive interview we were lucky enough to gain from OVO Energy Software Engineer, Chris Birchall. Chris has spoken at many different conferences and contributes a lot to the community, therefore, it is great to get an insight into his journey and thoughts on the Scala language.
Tell us about your background what was it that sparked your interest in engineering?
My dad was an engineer so we always had computers around the house when I was growing up. I think the first computer I touched was an Apple Macintosh Plus that he brought home from work.
After that I got my very own Amiga 500 (later adding the all-important 512KB RAM upgrade!) and I never looked back. I taught myself BASIC programming and spent many enjoyable hours making games and other silly programs.
What was it that made you take the step into using Scala as functional programming language?
I used Java professionally for a long time but I became increasingly frustrated with it for a couple of reasons. Firstly that it was excessively verbose and secondly that I felt, perhaps with a little too much hubris, that there was nothing left to learn in object-oriented programming. I wanted to try something a bit more fun and adventurous, and gain experience with both a new language and a whole new programming paradigm to contrast with OOP.
This was around 2009. I tried Ruby and Python, and enjoyed them both, but their lack of static types meant that I couldn't imagine myself writing large, complex programs with them without getting into a lot of difficulty. I also tried Clojure, but the lispy syntax and conventions were just too alien to me at the time.
Then I stumbled across this new and exciting language called Scala. Twitter had just started using it, which is probably how I heard about it. As soon as I started using it, I felt like this was the language I'd been looking for.
Because Scala can interoperate with Java, I managed to sneak some (poorly written) Scala code into the Java software that I was working on at my company at the time, so we started running Scala in production in 2009. I don't think many companies can claim that!
How do you feel Scala benefits the work you do?
I think Scala has benefited me in different ways as I have progressed as a developer.
At first I used it as a "better Java", so it started providing value immediately. I was able to write in an OOP style like I did with Java, but with much less code. Simple features that most Scala developers take for granted, like case classes or the collections library, made my code much easier to read, write and reason about.
Later, as I explored more of Scala's powerful type system, I learned how types can help to make your software safer by making illegal states unrepresentable. For example, Scala's path-dependent types can be a useful tool here.
Scala's type system, combined with traits and objects, also open up new ways to structure and modularise your software, which can be both a blessing and a curse. There's so much power at your disposal and so many different ways to achieve the same thing, it can be overwhelming. I spent quite a long time trying a lot of different options and flip-flopping between them before I found my natural style. Even now, I'm always experimenting with new ways to combine Scala's features and structure my programs effectively.
Finally, I found that Scala was a gateway for me to get into functional programming. I'd done a course in FP at university, but at the time I was pretty confused and couldn't see the benefit. But when I came back to it a decade or so later, with some real-world OOP experience under my belt and Scala acting as my guide, it all made a lot more sense. I think the language does a great job of nudging people towards an FP style, e.g. making data immutable by default, but not forcing people to fully commit to FP from day one like Haskell does.
Is there anything which you feel helped you learn and progress your career in terms of the community e.g. meet-ups, conferences, courses?
The first Scala meetups I went to were in Tokyo. I really enjoyed those - the Scala community in Japan is so passionate about the language. I would definitely recommend going to meetups. It's a good chance to put faces to the names you see on GitHub and Twitter, and of course to learn new things and share your own knowledge.
I'd also recommend giving talks at meetups. You don't need to be an expert to give a talk, and you don't need to build some fancy library and show it off to people. I've seen plenty of useful talks along the lines of: here's a cool library I found, this is what it does, here are some examples of how to use it.
Preparing a talk is a great way to test and improve your own knowledge. Actually, I try to propose conference talks on topics that I'm interested in but don't know much about. If my talk gets accepted, I'm then forced into learning about that subject in enough detail to give a talk about it!
Are there any resources you would recommend?
Not a very original answer, but the red book (Functional Programming in Scala) is essential reading. Read it all, and do as many of the exercises as you can. If you struggle with it, try and find some likeminded people and start a reading group so you can help each other out.
What made you decide you wanted to start speaking at conferences on Functional Programming?
The first full-length conference talk I did was at the first Scala World conference. A speaker had dropped out and Jon Pretty invited me to step in as a replacement at quite short notice. I had no idea what was expected of me, but I ended up giving a completely ridiculous talk about the internals of the Scala compiler and it went down quite well. Based on that I decided I want to carry on speaking at conferences.
An honest answer to the question would be that speaking is a great way to get free tickets to conferences. And if my ticket is free, that usually means my employer will pay for my flights and hotel, so thanks to Scala I get to jet off to exciting places and meet like-minded enthusiasts several times a year. I'm very lucky to be in this situation.
Is there any advice you would give to someone starting a career in engineering?
Making contributions to open source projects is a great way to learn, and to build up a portfolio of work to show to potential employers. Maintainers are always happy to receive contributions, even if it's fixing a typo in the documentation, and they'll be able to help you out if you're struggling with a PR.
What do you see for Scala in the future?
There's been a bit of drama recently about Kotlin "overtaking" Scala, people leaving the community, and so on, but I think it's all over-hyped. I think Scala has a bright future.
Keep up to date with Chris on his Twitter page here.