< Back
May 11, 2020

How I worked my way into Scala programming

From Java NMR to Scala: yet another career changing story
programmingscalasoftwaredevelopment

Written by:

Ivo Saraiva

A little over two years ago I was working with NMR. No, NMR is not some obscure language or framework, it stands for Nuclear Magnetic Resonance, and I was using it to do research on the molecular structure and dynamics of proteins in a biochemistry lab. After almost eight years of doing research I realized: “This scientist thing isn’t going anywhere, I better get a job”. So it came the hard part of deciding what to do and I thought “Oh, maybe the computer stuff”.

Bitten by a radioactive spider

Some years before, one fine day of sciencing in the lab my PhD supervisor came to me and said:

– “Remember those old FORTRAN routines we use to fit the data to the reaction models? They were written by Professor So-And-So and I don’t want to have him in our papers anymore. Here’s a MatLab CD, rewrite them.”

– “But I don’t know how.”

– “There’s a manual.”

So I picked up the CD, installed MatLab and started to “write” some “code”. After a few weeks, I pressed “run” and there it was, all the data fit nicely. There were pretty graphs and we manage to characterize the new biochemical reactions. “Suck it, Professor So-And-So!” I have written something that worked, and it felt pretty great. All of the sudden I was the guy that handled the data fitting. All of my colleagues that needed some calculation or data handling came to me for help. It even got my name in some extra research papers. I had been bitten by a MatLab infested spider and I was given super powers. I could pick up a file with thousands of lines of data and in a fraction of a second I was able to make sense of it, to retrieve the information I wanted, to change it as I saw fit. I was Cytochrome-Redox-Reaction-And-Heme-Structural-Data-Fitting-Man.

Fast forward a few years, I graduated and changed labs. I was analysing NMR structural data from a protein. This just means I had tons of data, which means we needed computers to process them. However, my protein wasn’t a simple protein. It had a drug molecule shoved into it. It turned out the program I was using could not handle the drug data. I had to dig into the code.

Learning to use my powers

The program was written in Python, so I started to read about it. Some concepts started to pop up: DRY, SRP, OO… What?! DRY? There was no moist in my scripts. Objects? No idea what these were. As I continued to soak some more information I went back to my old MatLab programs. What a piece of shit those were. Don’t Repeat Yourself? I had written the same intricate pieces of code three, four times in the same file. Objects? I had no form of organization in the code. There was one file with one long and redundant routine. I had no super powers. I had a pair of spider-man pyjamas. Cool pyjamas, though. Got me those extra papers.

Getting a real hero costume

As I said, I needed a job so “Oh, maybe the computer stuff”. I realized I needed help so I looked for an expert. A cousin. He worked in software development so I asked:

– “Master, do you think someone like me can get a job in software development?”

– “Yes, my young padawan. Companies are constantly slap fighting for developers, because there’s a shortage of people. But you need to show you are committed to change and that you have some knowledge; that the Force is strong in you.”

– “So how do I get the Force strong in me”?

– “Get… a JAVA CERTIFICATION!”

So I did. Java was and still is the most sought after language skill in Portugal. It seemed reasonable. Between pipetting and NMRing in the lab, I studied Java and got a Java 8 SE Oracle Certified Associate certification followed by Java 8 SE Oracle Certified Professional certification. I had a new super hero costume. Was I a computer programmer? A software developer? Still not sure. Coming from biochemistry to software development, it’s hard for imposter syndrome not to creep in. I started looking for a job.

A glimmer of light in the darkness

I learned Java. I dug deep into OO world. There were classes and objects and inheritance and “is-a” and “has-a”. There were pretty boxes with fields defining some state and methods that did stuff. However, the Java 8 costume had these new tools in its utility belt. It had lazy Streams, Lambda functions, Functional Programming stuff; something that was now popular in other languages and was brought into Java. It looked cool and shiny so I kept studying Java EE as I looked for a job.

After some dead end interviews, I got to Growin:

– “Can I get a job please? I have a PhD in biochemistry.”

– “That sounds great. We feel the force in you. But we are afraid you might fall to the dark side. Drop that Java EE nonsense and learn Scala. We’ll teach you.”

I had a job. At 33 and with one 2 year old, I had my first job. “Suck it, Professor So-And-So!”

Towards the light

I knew Java. I never got to use it in a professional environment but I got cozy to it and to Object Oriented Programming. Then there was also the new Java 8 feature: functions as first-class-citizens. As I studied for the Java 8 certifications a name popped up: Scala. As it says in its website: “Scala combines object-oriented and functional programming”. So what is this Functional Programming stuff, and why is it so good? I heard talks about code purity, and about how “my code is more pure than yours”. People with PhDs were saying that FP is clearly the way. I have one of those. Maybe I should follow. I had never had a job programming before and if non-FP code is impure, I was a virgin. Either way, Growin was paying me to learn Scala.

Growin up Scala

I attended the Growin Scala Academy. They first took me through the basics and then gave me a project to work on. I was reborn and Growin up Scala. For six months, I learned practicing on something real, supported by a team of mentors. I was provided with a new shiny tool belt and trained on how to use it. After the academy I started using it on an actual production team. I was solving real problems for people and, in the end, that’s what software developers do.

If you’re interested in learning more about Growin Scala Academy, you can check our Careers page or download the Scala Academy brochure here.

About the Author

Ivo Saraiva

A little more than two and a half years ago I was working on a biochemistry lab doing research and decided to get a job as a software developer. Since then, I’ve been learning and working on Scala and functional programming. I keep learning and improving my abilities to solve problems in software development.

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –