Hello. Welcome to the first “in the community” posts spotlighting members of the C++ and/or developer community. Today we meet Kenny Kerr and a Microsoft MVP who graciously agreed to “go first”
Kenny is a computer programmer with a bias toward Windows and C++. He enjoys writing and teaching developers how to get the most out of Windows with C++. Kenny has published numerous articles about the Windows operating system, network security, and C++ for MSDN Magazine as well as other publications. He currently writes the monthly Windows with C++ column for the magazine. Microsoft has recognized Kenny’s expertise in network and operating system security with the Microsoft MVP Award for security. He has also held the Microsoft MVP Award since 2007 for his contributions to the C++ development community. He recently published Direct2D Fundamentals on Pluralsight and is currently working on a second installment that will add coverage of Direct3D and XAML, animation, app and game performance optimizations, and much more.
C++ in 140 characters or less?
C++ is about power. It’s the raw performance of C with the productivity of a modern language, making it easier to write large-scale apps.
I love power tools. Drills, routers, and circular saws. I also like hand tools. Chisels, planes, and screwdrivers. That’s a bit like C++. It has power tools like regular expressions and hash-based maps and there are hand tools like stack semantics, algorithms, and smart pointers. The C++ language allows you to pick the right tool for the job, whether it’s a vector of shared_ptr types on Windows or a hand-rolled heap allocator for a tiny embedded system. The language doesn’t prohibit you from switching paradigms or breaking out of abstractions, and it lets you use or create abstractions quite naturally.
What do you like most about C++?
Honestly, I love the reality that I can use or create abstractions that don’t cost anything at run time. I can write clear and robust code without compromising performance. Classes, templates, and more recently things like perfect forwarding, move semantics, and many more all work together to allow increasingly complex systems to be written efficiently and far more simply.
I don’t really have a problem with any particular part of C++. I realize there are less desirable aspects of C++ but they have their footnotes in history and it is what it is.
What advice would you give new C++ developers?
Don’t use features you don’t understand. The beauty of C++ is that you can use as much or as little of the language as you desire. As your understanding of C++ grows, you will naturally begin to adopt new techniques and language features but don’t rush it. Master the fundamentals. C and C++ are such valuable languages for the new developer because they sit so very close to the machine that you get a good sense for how everything really works. Once you wrap your head around the fundamentals of the machine and the OS, if any, you will be in a good position to improve your capabilities as a programmer by further and continued study of the C++ language.
Do you have any favorite C++ authors or books?
I tend to enjoy Stroustrup’s books. I know his style is not for everyone and his books tend to be quite theoretical and exhaustive but that’s what I look for in a textbook. If you are serious about learning C++ but really don’t know anything about it then I would suggest you pick up a copy of Programming: Principles and Practice Using C++. Once you’re off the ground pick up Scott Meyers’ Effective C++ and More Effective C++ to stretch your understanding of the fundamental concepts of C++. Finally, as your use of C++ matures I would suggest skimming through C++ Coding Standards written by Herb Sutter and Andrei Alexandrescu. The latter wrote a fun book entitled Modern C++ Design that, while not so modern anymore, is still well worth reading.
What do you think of the Visual C++ compiler in particular?
I know that Microsoft can sometimes appears to be slow to implement the very latest standards but I would just remind folks that there is a lot more that goes into a compiler than parsing the latest and greatest revision of rvalue references. All of the optimizations and microprocessor-specific code generation that goes into the backend is so often overlooked by critics. I have spent a lot of time working with ARM microcontrollers on tiny embedded systems where I don’t have the luxury of using Windows let alone Visual C++. I code everything on the metal (no OS) with ARM’s own compiler. Their focus is on the backend to produce the best possible machine code, but as far as I can tell ARM hasn’t even heard of C++11 yet. Sure, I could use GCC to get all the fancy C++11 features but my code generation would suffer and when you’re coding on the metal you really can’t afford to fool around with poor code generation. How does this relate to Visual C++? Microsoft provides a good balance of modern C++ language and library features with excellent backend code generators. I am always happy when I come back to Windows and get to use Visual C++ again.
If you want to be featured or want to recommend someone we should feature, drop us a hint on Facebook! Thanks!