Mariel and I, authors of Codecademy's Learn C++ course, recently sat down and video chatted with Simon Brand, a C++ Developer Advocate for Microsoft based in Edinburgh, United Kingdom. Simon is an organizer of #include <C++>, a C++ Standards proposal author, and a frequent conference speaker.
The first question we have for you is... what drew you to C++? 🐣
I kind of fell into C++ by accident. At university, I was doing some compiler work for OpenCL, which is a language for programming accelerators, like GPUs, DSPs, specialized hardware—one programming model for all of them. Working with those compilers, the C++ decision was kind of made for me and I got interested in it and got a job in a very similar kind of field.
I started reading blogs, watching videos of conference talks, and decided I wanted to write my own blogs and get involved in the standard process and start talking at conferences myself. So it just grew from there.
Fantastic. Where do you see C++ heading in the future?
The C++ standardization is the healthiest it's ever been, depending on how you want to define that. The mailing for San Diego, which was the meeting before the most recent one, had like 60% more papers than any other mailing in the history of C++. So the standard has more and more people involved, evolving at a greater rate than ever before. So it's definitely still on its way up. For such an old language, the momentum for the standard is the highest it's ever been.
I think in terms of where it will go in the industry, it will continue to develop in the embedded space, which has pretty much been owned by C for the longest time. But I think as developers in that space try and look elsewhere, or more young people get involved in the community and have context for what's going on in other languages, people will start to look at things like C++ or Rust for embedded development more.
And I think it will still be growing. From the data that I see, it's still growing in adoption across the board as well. So it will continue to be used in the financial industry and in video games and all the places where it's currently a market leader.
Do you have a testing framework that you recommend for beginners to get started with?
I think Catch2 is the best one to get started with. It is very accessible and very easy to integrate into your projects. Very friendly to work with as well, I'd say. The documentation is pretty good, too.
And what IDE (integrated development environment) do you use?
"I think that the topic of a starter project doesn't matter as long as it's something which interests you." - Simon Brand
For this next part, tell us the first thing that pops into your head!
return 0; in the
I don't tend to.
using namespace std;?
Never in a header.
3. Variable naming convention?
I tend to follow the standard library.
snake_case for pretty much everything.
PascalCase for template parameters.
SHOUTY_CASE for macros.
Simon BrandC++ variable naming style:
Small Brain: PascalCase
Larger Brain: camelCase
STL Brain: snake_case
Bjarne Brain: Bjarne_case
Galaxy Brain: sPoNgEbObCaSe18:14 PM - 23 Feb 2019
4. Favorite thing in STL (Standard Template Library)?
optional is kind of my thing at the moment, because I wrote a paper for it. Oh actually, I'll go for
std::vector. It's the go-to workhorse of C++ even if it has some problems as well.
And then one last question. What's a good project for learners to do? Like what's a really solid foundational project?
Yeah, I think the best topic for a foundational project is just something you're interested in. It can be essentially anything. Like if you are into films, come up with something with that works in that space. If you're into sports, think of like some simulation things. I think that the topic of a starter project doesn't matter as long as it's something which interests you.
I think what does matter is making sure that it's well-scoped, so that when you have a "when I get to this, then I'll have something and I'll be able to show it off." That might be like a series of milestones or something like that. But you should have some kind of scope in mind. Because otherwise, with these things, you get started and then feature creep sets in. And then you just lose momentum and you move on to something else.
If you want visible progress, try to have something with scope: clear milestones or something you want to learn and practice. I think that's more important than what the project actually is, for sure.
A huge thank you to Simon Brand for what they’ve brought to the C++ community. Simon gave a thorough review of our Learn C++ course, providing ample feedback to ensure our C++ curriculum is modern and technically accurate. Follow them on Twitter @TartanLlama.