Made Tech Blog

Lessons from our Academy: How to teach a new programming language

In this blog post, I’d like to share some advice that I’ve learnt from the Made Tech Academy that might help you teach a new programming language as part of an onboarding process.

As we’ve written in the past, organisations struggle to hire the digital skills they need. Made Tech is no different and that’s why we started our Academy. Before joining Made Tech, I knew C++ and Python. I had to quickly transfer my coding skills over to C# and Ruby. Hopefully, some of my learnings will be useful to you.

1. Dip your toe in with a koan

Where to start? Well, every programming language has its approach to syntax and semantics. Koans are the perfect way to get a taste. 

If you’ve never heard of a koan before, it is a set of exercises to help you learn the features of the language, step by step. For example loop syntax, writing classes, and the standard library of the language. 

The koans will equip you with an awareness of what’s available in the language, and even some interesting edge cases. Most languages have koans that you can find online or on our learning resources

2. Get into exercises quickly

The most effective way to learn a new language is to start coding. Start with simple tasks; add more complexity as you get more comfortable with the language. This will help push your proficiency in the language.

Good exercises will test your ability to address a range of problems – code katas are particularly great for this. Katas are challenges that you solve using code. The bowling kata was the first one I attempted at the Academy. The challenge is to implement the scoring system for a game of bowling. This sounds deceptively simple, however as you progress you learn that the scoring rules are difficult to describe in code.

The great thing about katas is that you can re-attempt them. You can start applying practices such as test-driven development (TDD) and design patterns; along with advanced features of the language. If you want to try a kata you can find plenty online, or see our list of katas

3. Guide your code with principles

Some concepts and practices are transferable between languages, such as design patterns and TDD. These are designed to help you architect your code. Using a set of principles to guide your software development can reduce the fear of the unknown, leaving you with more energy to learn the new language. 

I started practicing TDD when I joined the Academy – at the same time that I started learning Ruby. At first writing test driven code seemed like more work, but over time it has become a useful practice. Working through test-driven exercises will help you to break down a challenge, and to refactor your code iteratively.

Even if you are new to a concept like test-driven development, learning it will then help you in the future.

4. Learn the language, not the framework

It might be tempting to jump straight into a framework, however, this can lead beginners to confuse framework features for the language. Learning the language on its own at first will enable you to know its features and idioms. This will help you develop your problem solving skills, without defaulting to a particular framework. 

My introduction to Ruby didn’t involve the Rails framework at all. This is different from what I hear about a lot of coding boot camps. Instead of building web applications in my first week, I was learning how to make small programs using Ruby. I can now integrate any Ruby framework into my code. 

5. Don’t get bogged down with detail/syntax

When faced with learning a new language there is a balance to be struck between reading the documentation and writing code. It is easy enough to get lost in several hours of reading, only to find that you don’t remember, or don’t know how to implement the thing you read about. 

Do spend time reading about the language, but do this in small chunks and practice as you go. If you’re working on an exercise, read just enough to get through the next step.

When working on my first test-driven Ruby exercises, I could find approximations for expressions I already knew from C++ and Python, and quickly pass a test. Knowing that the test had passed, I could then research more Ruby-ist expressions as part of refactoring.

6. Learn with others 

One of the most effective ways to learn is to pair with someone else or to work in a group. This could involve solving a coding kata together or collaborating on a project. 

During the Academy, I have frequently paired with others or worked in a group to solve a kata. People will use the language in different ways to solve a problem, or they may be aware of methods and tools that you aren’t aware of. On many occasions I have learnt that several lines of Ruby code can be re-written in a single line – using a Ruby expression.

7. Everyone’s learning needs are different

Adapt and mix all of the above to suit individual learning needs. Agree on an appropriate pace; experienced coders are likely to learn a new language faster, leveraging prior knowledge. Less experienced coders may need more time to get familiar with concepts, as well as support when completing exercises. 

An important aspect of the Academy experience has been working out how to collaborate on projects while accommodating our different learning styles. The way through this has been mixing up independent learning with group sessions, and balancing practical work and research time. 

Give it a go

Whether you’re teaching yourself or onboarding a new colleague, give some of these learning tips a go. Is there a learning strategy that you would like to share? Let us know on Twitter!

About the Author

Avatar for Maria Astakhova

Maria Astakhova

Academy Engineer at Made Tech