An unconventional way of learning a new programming language

There are more than 500 programming languages, and it’s likely you want to start learning a new one today. You might know C++ and Java, but at work you use Python. Perhaps you’re well- versed in Python but need to pick up some Java for a new project, or maybe you want to learn that cool language to expand your expertise.

Sahil Dua
Booking.com Engineering
5 min readApr 15, 2017

--

So what are some popular options if you want to learn a new programming language?

  • Learn from an online tutorial or
  • Learn from an online course

Some may argue that the best way of learning a new language is:

  • To learn syntax of the new programming language, then
  • Build a personal project using that language

Fair enough! Building a project makes sure that you apply the knowledge you gain from learning the syntax of the language you want to learn.

I have developed more than 20 small projects while learning different languages. When I write code for my personal project, weekend project or even a quick overnight hack, I write code to get something done. All I care about is — “Does my code work?”. I hardly care about the quality of the code while learning.

This is my story about how I took an unconventional way of learning a new language efficiently.

I work at Booking.com as a Graduate Software Developer. As part of my role, I switch teams every four months to get a good understanding of different aspects of the business.

In the office, we mainly work with Java and Perl. However, there are a lot of other languages being used for different purposes, so we use Python for data analysis, Go for micro-services, and so on.

Last year, I got an offer for a full-time job from Booking.com and I knew that I’d be working with Perl. As soon as I finished university, I started learning Perl to prepare myself for the job. I began by learning syntax of Perl and understanding some of the common patterns of the language.

Now, I really wanted to build something using Perl so that I could practice various concepts of the language. While I was looking for ideas, I came across DuckDuckGo’s open source organization on GitHub. I started working on beginner-friendly issues. While doing so, I always used to look at the existing modules. I used to notice the patterns being used in Perl. Slowly, I started picking up good practices in my own code and it helped me in learning how to write good code in Perl.

In December, I moved to a new team in Core Infrastructure, something I’ve always been curious about. One of the best things about the Booking.com graduate program is that you have flexibility in choosing your next team. I was really excited to learn from this opportunity.

Two weeks into my new team, I picked up a task of adding a new feature to one of the services written in Go. This was a conversation I had with my teammate:

Me: I really like this task. I want to work on it. What do you think?
Teammate: Yes, it’s an interesting one. However, it requires knowledge of Go. Do you know Go?
Me: No.
Teammate: Do you want to learn Go?
Me: Yes!
Teammate: smiles There you go!

So there I was , at the verge of learning a new programming language: Go!

I started learning Go’s syntax and found an awesome beginner’s language tour on their official website. It was good enough to get me acquainted with the basic concepts of the language.

That evening, out of curiosity, I started looking for open source projects in Go which had some “beginner” or “easy-fix” issues. I found a project — go-github by Google which is basically a Go wrapper for GitHub’s REST API.

I had my first pull request on that project two days after I started learning Go.

My contribution graph for 2016 — https://github.com/sahildua2305

How Does Open Source Help?

So, now you may be wondering about how open source contributions can help in learning the good practices of a language. Here are the lessons I learned along the way .

Code Quality

Most of the good open source projects have strict coding guidelines you have to adhere to in order to get your code merged. This helped me in adapting to those guidelines and hence learning to write good quality code even though I was just learning the language. Not just that, I had a chance to look at the rest of the code base and see how good code is written in that language.

Code Reviews

The best part about open source contributions is code reviewing. When you push your code, you get feedback from the experts associated with that project. It gives you a chance to improve your understanding of a language. It’s like getting free personal guidance about how to write good code!

Appreciation

First comment on my first pull request in Go Lang

Everyone likes to be appreciated for their work, and the open source community are pretty generous with their praise. In my whole experience with open source contributions, I have never received even a single comment which was insulting or demotivating. Everyone is super encouraging and helpful.

Another comment by MariagraziaAlastra from DuckDuckGo

Even though I was learning a new language to work on some task at work, I managed to enhance my expertise at the same time and contribute to the open source project. A perfect win-win-win situation!

So, next time you want to learn a new language, go ahead and take the plunge! Find an open source project to contribute to and march ahead on the path to learn that language and its nuances.

Would you like to be a Developer at Booking.com? Work with us!

--

--