Our choice of programming language has the ability to change the way we view a problem and how we interact with it. Different languages provide different ways of modelling real-world scenarios, and can have a massive impact on the speed at which a product can iterate and scale. In this blog, Canva engineer Josh Leeb-du Toit explains why he’s looking into Rust, and how exploring new languages can benefit you in the long run.
Onboarding session for new Canva engineers
We’ve needed to adapt our tech stack in the past, and we may have to change parts of it again in the future. There will always be isolated problems that our current tech stack can’t solve, and blind spots in the conceptual models that our current languages offer.
For all of these reasons, it’s important for us to keep exploring new languages, so we have the knowledge that will help us adapt. In this article, I’ll talk about developing a culture of exploration around new languages and technologies, and the benefits that this brings.
Developing a culture of exploration and knowledge sharing
Before anything else, it’s important to encourage everyone to adopt a culture of exploration. By exploration, we mean tinkering with ideas and concepts that may, or may not, make an impact to the company’s bottom line. By investing the time to explore new options and technologies, we are exercising diversity of thought, which may potentially reap huge rewards down the line.
As well as the languages we use every day at Canva, we’re exploring many new languages on the side. There is a strong interest around Canva in many of these nascent languages and we seldom explore them in isolation. Clubs have been forming around these younger languages, like Go and Elixir.
There are Slack channels for those interested in functional programming, and we have groups meeting after work to explore these languages together. Canva’s engineering culture values constant learning, and these clubs, regular frontend and backend forums, and hosted tech talks are all part of a culture of exploration and constantly improving engineering.
I’ve been looking after Canva’s Rust club for a while now. It started in the first months of 2018 with only 4 people. Now we’re up to 24 on Slack and have been holding weekly sessions after work to talk and do all things Rust.
Rust Club Weekly Meetup
We’ve worked on a decentralized chat program, an NES emulator, and now we’re looking at embedded projects, fonts, and tooling to 10x our developer efficiency.
While there are plenty of languages that we’re looking at, I’m not expecting all, if any, to be used everyday for mission critical software. Some haven’t been battle tested and others are still young and changing.
But the act of exploring and knowledge sharing has some very immediate benefits, which I’ll delve into below.
1. The ability to use the right tool from an expanding toolbox
It can be useful to think of programming languages as tools, like a hammer or a wrench. It’s what we use to develop, maintain, and extend software programs.
To continue with this analogy, if you’re about to start putting together some furniture it makes sense to have a good idea of the tools available. You don’t want to go into it only knowing one or two because when you encounter a screw… I imagine it would be quite a challenge to screw it in with a wrench.
This applies to software development as well. If you need to store some data it’s necessary to know what databases are out there. With this in mind, when writing a program it’s important to do the same analysis. If your program needs to be built quickly and easily maintained then you may go with one language, and if it needs to scale super well and have an uptime of 99.99999% there might be an alternative, better choice to consider.
At Canva, we tend to work with Java and Typescript, but that’s not the only code committed to our repos. We are writing everything from Python and PHP, to Scala and Swift. Each language is carefully selected to help us develop solutions for a specific area of the product.
There’s no silver bullet. A language will never be the best at everything. There are some more general purpose languages like Java and C++, but you can be certain they have their drawbacks as well. It is important to know your programming toolbox, and by having experience with many languages you are immediately in a better position to select the best language to solve your problem.
2. The ability to change the way you think, for the better
There’s another benefit to exploring new languages. The act of learning and thinking in a different way will make you a better problem solver.
Programming languages are how we represent real world problems to computers. To do so we need to break down the problem into smaller pieces and then figure out how best to join them together for the computer to understand.
Depending on the language and the problem, the pieces and the way they look can be very different. Let’s use the example of a car and how we could represent that in two different ways.
If we want to represent the car in a language like Java we would likely break it down into its object parts: into its engine, wheels, and pedals. Then each of these would be an object and we could perform actions on them to change their data. For example, if the engine is turned on, we will record that within the engine object.
Now for a language like Haskell, rather than focusing on the objects we focus on the actions. We would have an action for turning on the car, pushing in the accelerator pedal, and stepping on the brakes. Then these actions get given some data to act on and they respond with new data, such as how far the pedals are pushed in.
These are two different ways of solving the same problem. If you only knew the former representation, then everything may appear to be an object. But if you only knew the latter then everything is an action.
These representations go further than telling a computer what something is - they point to completely different paths for arriving at the same solution.
By learning to break down problems and think of solutions in different ways, you expand your problem-solving mind. I often find myself thinking about how I would solve a problem in a completely different language, even though I’m coding in Java. And I’m certain it has made me a better problem solver.
There are definitely trade offs when deciding to explore and learn a new language. It doesn’t happen overnight - in fact, it can take many weeks to progress beyond beginner level. However, at Canva it is clear the benefits are understood. Constantly exploring new languages and expanding our toolbox allows us to think about problems in new ways, and even adapt our core technology when we need to. So we’ll continue looking at new technologies and applying them to big problems and crazy new goals as we grow.
For more details on our current job openings, visit Canva’s careers page here . Know someone who would benefit from reading this article? Why don’t you share it with them here:
or, share via email