In the Community spotlights members of the C++ / developer community. This week, meet PJ Naughter, a C++ MVP and prolific C++ developer. Take it away, PJ…
PJ has been a C++ MVP since 2007. In his spare time, he runs a personal web site at http://www.naughter.com where he publishes open source software and source code of use to Windows C++ developers. There is roughly 250,000 lines of Open Source C++ code available to download. Areas covered include GUI controls, Astronomy, Calendars, Hardware integration, multi-threading, network protocols and databases.
C++ in 140 characters or less?
The Ideal computer language for those who want to control every aspect of their code. Also ideal to shoot yourself in the foot if not careful.
C++ to me is the perfect language where you can express high level abstractions in your code while at the same time you can go right down to the bare metal if you really want to. All this with the performance, flexibility, portability and minimal run time requirements which no other language can come close to matching.
What do you like most about C++?
With C++ you have complete control of the code you produce. I graduated with an Electronics degree from college and have a fondness for C++ and C with its origins in engineering which I do not get from the likes of C# or Web based languages. Because C++ is a mature language there is a plethora of open source libraries you can call upon when you need specific functionality not available out of the box.
The lack of a modern GUI and class framework in Microsoft VC when compared to the likes of C# and the .NET Base Class Libraries is a real bugbear for me. It is one of the reasons which originally drove me to start releasing open source C++ code on my web site. In an ideal world I would love to see a modern UI framework in a future version of Microsoft VC with all the functionality which MFC provides without all the baggage which MFC is saddled with. A standards based XML class library/framework would also be very much appreciated. We also need to improve the Help system in Visual Studio for C++ developers. If you can use Bing or Google to find the documentation or information a developer needs quicker than local help, then the Help System has failed. There are many environments where I develop when I do not have or are not allowed online connectivity. Also the quality of the help content for C++ developers has waned since the time of Microsoft VC 6. There needs to be a better connect between the document creation team for Visual Studio and the creators of the C++ classes and code they are describing.
What advice would you give new C++ developers?
C++ 11 can be a complicated beast to master and I am still grappling with all the new language features it provides. I would suggest someone who wants to learn C++ should start off learning the basic OO concepts and syntax without worrying too much about specific technologies such as Win32, MFC, ATL, WTL, STL or WRT. Then once you know the basics, I would start working through the STL library and perhaps some Win32 specific coding. Then as your experience level increases, start digging into the more advanced use of STL and finally start learning the new features of C++ 11.
Do you have any favorite C++ favorite authors or books?
At the moment the two books on my bedside locker are the second edition of "The C++ Standard Library" by Nicolai Josuttis and "C++ Concurrency in Action" by Anthony Williams. Both books are very much recommended for the C++ developers out there who is getting to grips with the new features of C++ 11 and STL, many of which are now available in VS 2012. I am dipping into both books at the same time, but it would make sense to read the Josuttis book first as it serves as a good primer for C++ 11.
Where are your favorite technical places on the Web?
Other than my own web site which is www.naughter.com<g>, I used to post a lot of my articles to codeproject.com. I still use CodeProject quite a bit for reference purposes but do not actively post their anymore. I also use Stack Overflow quite a lot which researching technical questions. The quality of answers there are always top notch. When I want to catch up on recent news in the IT world and need a bit of a laugh I love "The Register". There's something about that British sense of humor.
What question should I have asked?
What should Microsoft and the Microsoft C++ community do to continue the C++ Renaissance?
And the answer?
That's a tough question to fully answer, but I'm not sure that a complete reliance on pushing C++ 11 is going to produce the C++ renaissance that all C++ developers and particularly those in the Microsoft C++ community want to see happen. C++ is very much alive and kicking in the wider C++ community but not at the same level inside the Microsoft C++ community. I believe the reason why C# was and continues to be so successful is in addition to its clean and simple syntax is the comprehensive libraries and tooling support for it out of the box in each copy of Visual Studio. Microsoft C++ needs to get back to the dizzying heights of Microsoft VC 6. Those really were the days for us C++ developers.
Here's some things which I think we can do:
Thank you, PJ.
What else can we do to continue (and intensify) the C++ renaissance? Share your thoughts in the comments below, on Twitter or on Facebook.
What can you do to continue, nay accelerate the renaissance?
1. Ship the 'Milan' update to the compiler.
2. Get some basic C++ refactoring support into the IDE.
3. Dramatically improve the compiler diagnostics, see Clang and how XCode surfaces this in the UI.
4. While we wait for std:: to catch up, release a Standard Library-esc basic XML library.
5. Unify C++ AMP and the Parallel Patterns Library.
6. Bring the WinRT native XAML and C++ CX language tech to the Desktop. Back-port the same to Windows 7. come March 2014, Windows 7 will take over from 'XP as the defacto downstream, prevalent enterprise OS for some time and the native XAML and C++ CX stuff is too good to leave languishing in Windows 8.
7. Putting up money to get isocpp.org start was amazing, now really, really get behind growing the Standard library.
8. Make sure the Going Native show on Channel 9 comes out regularly ;-)
9. Tell us when Going Native 2013 is going to be.
10. Put a decent Direct2D / XAML example into the default set of Visual Studio C++ Project Templates in the Windows Store App section.
11. Make sure all the code generated by the various wizards and code generators in Visual Studio Next create decent, Modern, C++. This means pervasive and aggressive use of const, no C style casting etc. Herb Sutter et al keep preaching about modern, type safe C++, and yet the generated code is frequently positively harmful as a learning resource and example for say, 20-30 something developers who started their careers with managed and are dipping their toes into the native pool for the first time.
Ye Gods, I could do this all day, there's no shortage of things to be done to make up for lost time and ground.
I see similar opinions among VC++ MVPs about both the strong and week points of C++. Lack of libraries, especially for GUI but also for things like XML (which is ubiquitous), are the week parts, and I hope they will be eventually addressed in a positive way.
What is this "in the community" stuff? I'm not interested in "meeting" anyone. Post some interesting content instead.
"a modern UI framework from Microsoft for desktop development"
A thousand times yes. Now don't get me wrong -- I do love everything they've done for C++ lately. But while they are being kind to the language and its users, they're not doing much for C++ developers who are also Windows developers. Case in point, a modern C++/Windows BCL & UI framework are long, long overdue. One might even say conspicuously absent.
When I read the earliest news of Win8 I was excited. It sounded like the plan was to "unite the clans" as it were, making C++ a first-class citizen of Windows development again -- including, critically, giving us access to the modern UI framework. We all know that C++ has been the redheaded stepchild ever since the introduction of .NET, and finally it seemed they were fixing that.
Only they didn't, because this is only true when the target is app store/Metro. Not everything can be Metro, nor should it. It's not the right solution for everything. For some things you still need real/desktop Windows, and unfortunately native desktop developers still have to come in through the servants' entrance.