Despite a host of up-and-coming alternatives, C++ is still a force to be reckoned with, certainly in the legacy-fraught high-tech industry. Drawing from almost 25 years of experience, computer programming enthusiast Kris van Rens introduces coding rookies to the language basics and essential best practices in his new C++ Fundamentals training at High Tech Institute.

 

Over the years, a long list of programming languages has been put forward to supplant C++. D, Rust, Apple’s Swift, recent Google addition Carbon and lesser-known alternatives like Nim and Vale, to name a few – they all have their merits and their specific application areas. Nonetheless, C++ is still very much alive and kicking, contends computer programming enthusiast Kris van Rens.

“There’s this widely held view that you shouldn’t use C++ because it’s outdated,” says Van Rens. “But it’s actually this view that’s outdated. It’s based on old-style C++. Ever since modern C++ was born in 2011, the language has kept moving with the times. With the right provisions, it’s no less relevant than up-and-coming alternatives like Rust.”

In the new 4-day training course “C++ fundamentals,” organized by High Tech Institute in the last two weeks of March, Van Rens introduces participants to the language basics and essential best practices. “I aim to impart a positive vibe about C++. I want participants to leave feeling that they can really do something with it and knowing how to put it to good use.”

 

Bread and butter

Van Rens has been captivated by the wonderful world of programming ever since he first laid his hands on his dad’s ZX Spectrum home computer. “It was a machine from 1983, the year I was born. When I was 7 or 8, I started tinkering with it, using the Basic programming language. In high school, in an extracurricular activity, a fellow student taught me X86 real-time assembly, followed by C and then C++. In the past few years, I’ve been delving into Rust as well.”

After a bachelor’s in mechatronics at Niederrhein University of Applied Sciences in Krefeld, Germany, Van Rens did a master’s in electrical engineering at Eindhoven University of Technology (TUE), specializing in video coding and architectures under the supervision of professor Peter de With. “The university is where I became a software engineer and had my first taste of teaching. In parallel to my graduation project, which was about converting MPEG-2 into H.264 video streams, I created an image and video coding tutorial – for my own understanding but also just for the fun of it and to convey that fun to others. Spreading my enthusiasm has always been an important driver for me.”

 
C++ training Kris van Rens

In 2009, Van Rens started his professional career at his current employer, the smart surveillance specialist Vinotion. At the time, this TUE spinoff was still a startup, working from an office space belonging to De With’s research group. “From coding image analysis algorithms in C++, my focus slowly shifted to the development platform as a whole, including the language itself, the programming interfaces and the tooling. That became my bread and butter: enabling the creation of robust, high-performance, high-quality code using solid software architecture.”

Van Rens’ career in training got a leg up when he was asked to speak at one of the informal 040coders meetings for computer programmers in the Eindhoven region. “The meeting was hosted by Philips Image Guided Therapy and I did a skit about introducing kids to C++. Afterward, IGT invited me to give a serious presentation to their engineers. So I did a tryout on an in-depth C++ topic. They liked it so much that it’s grown into a quarterly event – so far all online, due to Covid, with me presenting from my attic to crowds as big as 150 people.”

 

Encounters with legacy

The new C++ classroom training at High Tech Institute is targeted at much smaller groups of max a dozen software engineers with basic programming skills – any language will do. It’s also much more hands-on, with practical exercises drawn from Van Rens’ 10+ years of industrial experience. “These exercises aren’t theoretical and made-up like I’ve seen in so many other courses. They’re real industrial cases, inspired by the problems I encounter in my daily work.”

A key concept addressed by Van Rens is the craft of systems programming. “When you’re writing embedded software for a high-tech system, you’re much closer to the hardware than when you’re creating a web application,” he points out. “In Javascript, for example, you generally don’t have to concern yourself with things like memory management; the interpreter takes care of that for you. In an embedded system, you do have to worry about the often limited resources and how to use them wisely. Systems programming is all about being aware of the intricacies on all levels and having the flexibility to act accordingly. The training provides the handles for that. This knowledge applies to any systems programming language.”

''A lot of legacy is written in some older version of C++.''

The omnipresence of legacy code in the high-tech industry is another reason why C++ and his training are so relevant, notes Van Rens. “A lot of that legacy is written in some older version of C++. Sooner or later, you’ll come across this code. Rewriting it or programming against it in Rust or another language is almost never a viable option; you’ll have to deal with it in C++, and my training will help you do that.”

To be prepared for legacy code, participants obviously need to know a thing or two about old-style C++, but the emphasis is on the safe, modern aspects. “After the first standardization in 1998, the language didn’t change much for a long time. It wasn’t until 2011 that C++ underwent a true metamorphosis with the introduction of modern concepts like smart pointers for safer memory usage. Since then, the language is regularly updated, and so are the best practices,” explains Van Rens. “My primary focus is on the state of the art. Later on in the training, I also equip the participants for their inevitable encounters with old-style C++ by going into the evolution of the language and providing exercises in which pieces of legacy code have to be rewritten using modern constructs.”

 
C++ training by Kris van Rens

 

Supercharged learning

The fundamentals taught by Van Rens in the upcoming training are more than enough for participants to get off to a flying start, but they’re only a fraction of what there is to tell about C++. “It’s a huge language. I use the book “Beginning C++20” by Ivor Horton and Peter Van Weert as a reference during the course. It’s comprehensive, almost a thousand pages long, but even that’s not nearly enough to cover everything, not by a long shot. In four days, I aim to lay a solid foundation, showing participants the ropes and where to go if they want to dive deeper.”

''Nothing beats learning by doing.''

Books and online tutorials only get you so far. Nothing beats learning by doing, maintains Van Rens, pointing to the added value of classroom teaching. “Working with C++ since 1998, I’ve built up almost 25 years of experience that I’m amply sharing in class. I’m not just explaining the language; I know where to put the right emphasis, supporting my story with relevant best practices, examples and exercises from industry. It’s supercharged learning.”

 
This article is written by Nieke Roos, tech editor of Bits&Chips.

Kris van Rens' training is available twice a year.