A racing bike with training wheels (3/5)

A racing bike with training wheels (3/5)
Marlon is the rookie at Tweede golf, joining us a few months back. He started out with Rust not too long ago and is therefore the guy to talk to about his learning experience with Rust.

This is part 3 of 5 of our series "Why we love Rust". Check out the complete series here

Can you tell us about your introduction to Rust?
Coming from a high-level language background, I wanted to properly learn a systems language. Preferably a language without a layer of “magic” to obscure stuff I’m not allowed to worry about. At first, I started learning C, which got me quite far, but I was never confident enough about actually understanding the underlying concepts well enough to write robust code and being productive at it. Along came Rust. It is actively forbidding me to make mistakes that in C or Java would have led to pesky runtime errors. It also explains politely why and it does it all at compile time.

Are you working on Rust projects at Tweede golf right now?
As a pet project, I’m building a “self-driving car” (it’s actually more like a bumper car), using an STM32F3 Discovery board. It’s my very first introduction to embedded programming. It’s really cool how Rust’s ownership system can prevent you from frying your components. It’s also an absolute joy to work on a new subject with expert-level co-workers.

Marlon's takeaway
When I replaced a data-wrangling microservice written in Java with Rust, it outperformed it in every aspect. The base memory footprint was tiny, CPU speeds blazingly fast and start-up time became instant.

What about private projects?
I’m trying to create a 2D platformer game in Rust, using as few external libraries as possible inspired by Handmade Hero. It’s not meant to be ever finished, it’s more like a perpetual learning project. I started out in C, which taught me a great deal about pointers and memory management, but I kept getting stuck on errors that I couldn’t solve because I didn’t understand the underlying concepts thoroughly. With Rust, I can just try to “please the compiler”, make it run, and come back later to actually try to understand those concepts when I feel like I’m ready for it. The longer I’m programming in Rust, the more I’m naturally avoiding these bad concepts.

What about the steep learning curve?
Rust is a system language and has a more steep learning curve by nature than, say, TypeScript. Even so, Rust feels like it does anything in its power to flatten that curve. The installation process with rustup for example is an absolute breeze and gets you up and running in a matter of minutes. Cargo takes care of your dependencies, generates docs, manages builds, performs benchmarks, tests, and many more. All configured in a single TOML file. So, steep? Yes, but doable. The feeling is like learning how to ride a bike. Fearlessly starting on a pro racing bike straight away, with Rust's compiler acting as training wheels keeping me from tumbling over.

Where will Rust be in 5 years?
I’m quite optimistic about Rust’s future. Languages come and go, but seeing the big corporates like Microsoft, Amazon, and Facebook starting to adopt Rust tells me it’s here to stay. I think it has the potential to take over some industries as the de facto standard language. I’ve never been so excited about a programming language before and I really hope it’s love will continue for 5 more years to come!

Stay up-to-date

Stay up-to-date with our work and blog posts?

Related articles

If one person at Tweede golf is a Rustacean, it’s definitely Wouter. Whether it’s about web, embedded, or even games: he tried it. And probably not just tried it, but prototyped, created, documented, presented, and nailed it. Just take a look at Wouter’s GitHub page[1]. He’s also engaged in the Rust community as an organizer of RustFest, member of the Dutch Rust foundation, and as maintainer of several open-source crates. He believes that Rust is well on its way to perfection.

August 14, 2020

Functional Rust? (4/5)

Lars started at Tweede golf about a year ago. We lured him in with the prospect of working on a cool embedded project in Rust. Since then he clocked a lot of Rust hours on it and on a research project we are running. Still, he manages to astound us with critical notes on Rust. Rightly so? Let's just say interviewing a functional programming purist like Lars gives us a lot of new perspectives around Rust.
The number of data centers worldwide is constantly increasing, and so is their electricity consumption. One way to become more power-efficient is certainly the constant development of better hardware, but we as developers should do our share. This post shows how coding in Rust can help to use existing resources more efficiently, to help preserve our planet — at least a little bit.