Your second programming language
No, you’re not starting from square one!
So, you’ve started learning one programming language, maybe Ruby, JavaScript or Python and now you would like to move onto your second. There are lots of reasons you might want to do this.
Maybe there is a job or a bootcamp you would like to apply for and you need a particular language for it. Maybe you want to try something new just for fun. For whatever reason, I would like to reassure you that you are most definitely not starting from square one!
All of the learning you have done in your first programming language are very likely transferable to your next. Learning about objects, classes, methods, data types and operators for example are transferable.
In addition, there are skills that cut across all programming languages like getting acquainted to your terminal, Git, GitHub, using an IDE, CI/CD tools, raising and merging a PR, that you don’t need to learn again!
I recently got my first developer job at the Guardian after teaching myself how to code in Ruby. Whilst I was allowed to do my technical test in Ruby, I will need to learn other languages, amongst them Scala, for my job.
When I received the job offer and it finally dawned on me that I might be better off leaving Ruby and starting with Scala, I suddenly felt quite sad and very nervous.
Sad because I felt like I was leaving behind a family member.
Over the preceding months I had coded Ruby almost everyday, made fantastic relationships with loads of Ruby developers who formed my core support group and I had attended several Ruby conferences. I felt like I was leaving a secure home that I had built myself. Now I had to leave to venture into the unknown.
I felt scared that I would be starting all over again after months of hard work. Whilst the allure of becoming an engineer so that I could constantly learn new things seemed attractive before, suddenly the reality felt quite different.
I spent some time explaining my feelings to several mentors and receiving their advice. Here is what worked for me:
Get started
Soon after I started learning my second programming language, Scala, I realised that I was using the skills I had learnt in Ruby. It was a completely different experience compared to teaching myself how to code for the first time.
One key difference was that I started Scala using Test Driven Development (TDD), because this discipline had become so natural to me in Ruby that I couldn’t help but take it with me when learning Scala. When I asked for a code review from a new Scala mentor, he noted that he didn’t write his first test until two years after starting to learn Scala. This showed me that indeed, I was not starting Scala as a complete beginner.
Your learning methodology
Having learnt one programming language, you may have an idea of the learning style that works best for you. For example, do you prefer learning with YouTube videos, tutorials, buildings things, with other people at meetups? Ask yourself this question to understand how best you learn and apply this to your second programming language.
For example, I learnt Ruby by pairing with senior developers, completing technical tests and doing kata like exercises such as Exercism and Codewars. Given I knew this was how I learnt best, I applied the same method to learning Scala which really helped.
Find others who have done the same
It’s likely that there are other developers who have walked the same path as you and can translate the second language you are learning in ways that would make sense to you given your first language.
I googled “Scala for Rubyists” for example to learn how I could approach Scala as a Ruby developer. It really helps to get advice from people who have made the same leap.
I also attended a Scala meetup where I found other people who were new to functional programming, so we could relate to and support one another. For example, I paired with a lady who had learnt Python and we often had the same questions when learning Scala.
Don’t worry
Overall, don’t worry and relax! Enjoy learning your second language because I’m pretty sure you’ve done a lot of the hard work already in getting started with programming.
Yes, it may feel a little emotional leaving the language you first started with, but you can always go back to it and the community that has supported you will still be there.
Learning a second programming language is an amazing way to experience different ways of solving a problem. I’m really grateful that I have been introduced to functional programming, a completely different paradigm. What has your experience been like learning your second programming language? Please share in the comments below or on Twitter!