{"id":1873,"date":"2013-01-07T11:07:00","date_gmt":"2013-01-07T11:07:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/vcblog\/2013\/01\/07\/in-the-community-meet-james-mcnellis\/"},"modified":"2019-02-18T18:41:19","modified_gmt":"2019-02-18T18:41:19","slug":"in-the-community-meet-james-mcnellis","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cppblog\/in-the-community-meet-james-mcnellis\/","title":{"rendered":"In The Community: Meet James McNellis"},"content":{"rendered":"<p><strong><em>This is the second installment in the &#8220;In The Community&#8221; series spotlighting members of the C++ \/ developer community. Today we meet James McNellis, a developer on the Visual C++ team and community guy. <\/em><\/strong><\/p>\n<p>James is a developer on the Visual C++ team, which he joined this past July.&nbsp; As a member of this team, he builds awesome C++ libraries and is currently doing work on the C Runtime Libraries (CRT).&nbsp; Prior to joining the Visual C++ team, he was a developer on the Blend for Visual Studio team where he worked on the XAML designer for Windows Store apps.&nbsp; James has been programming in C++ for 15 years and has worked on a wide variety of projects, from embedded robotics software to 3-D simulation.<\/p>\n<p>In his &#8220;free&#8221; time, James is <a href=\"http:\/\/stackoverflow.com\/users\/151292\/james-mcnellis\">a prolific contributor<\/a> on Stack Overflow and is working on an open-source native reflection library for the Windows Runtime, implemented in modern C++, called <a href=\"http:\/\/cxxreflect.codeplex.com\/\">CxxReflect<\/a>.&nbsp; He tweets at <a href=\"https:\/\/twitter.com\/JamesMcNellis\">@JamesMcNellis<\/a>.<\/p>\n<p><strong>Why C++? <\/strong><\/p>\n<p>I love C++ because it makes it easy to build large software systems that are correct, maintainable, extensible, and high-quality.&nbsp; It enables high levels of abstraction without sacrificing performance.&nbsp; It has one of the most magnificent language features ever&mdash;templates&mdash;which, among many other wonderful uses, allow us to build generic components that are as efficient as any type-specific components that we might consider building instead.&nbsp; It has first rate support for value semantics, which make programs easier to reason about.&nbsp; There are C++ toolchains for most major platforms, and with a bit of work it&#8217;s possible to build libraries that will run practically anywhere.&nbsp; Flexibility, performance, and portability are all extremely important.<\/p>\n<p><strong>What do you like most about C++? <\/strong><\/p>\n<p>Object lifetimes are deterministic, there are rules specifying exactly when objects are created and destroyed, and those rules apply consistently to all objects of all types.&nbsp; I think these fundamental language rules are largely the reason why C++ is so awesome.&nbsp; They enable resources to be managed uniformly (via RAII) and make it possible to build complex systems easily by aggregating small, composable parts.&nbsp; They make it easier to build programs that exhibit correct behavior, in both nominal and error cases.<\/p>\n<p>I took the C++ object model for granted until I spent time working on a large system implemented in C#, which does not have deterministic object lifetimes.&nbsp; C++ has many splendid features, but the object model with deterministic object lifetimes was the thing I missed most.<\/p>\n<p><strong>Least? <\/strong><\/p>\n<p>The syntax of the language.&nbsp; C++ inherits a bucket of syntactic oddities from C (e.g., the declarator syntax), then adds some quirky syntax &#8220;features&#8221; of its own (e.g. the most vexing parse).&nbsp; None of these issues are particularly horrible on their own, but it&#8217;s aggravating because there are so many quirks and corner cases.&nbsp; C++ with a simpler, cleaner, easier to learn and teach, and more consistent syntax would be a truly wonderful language.&nbsp; But then, of course, such a language wouldn&#8217;t be C++ <span style=\"font-family: Wingdings\">&#61514;<\/span>.<\/p>\n<p><strong>What advice would you give new C++ developers? <\/strong><\/p>\n<p>Don&#8217;t make the mistake of assuming that C++ is just like [insert language with which you are already experienced].&nbsp; Idiomatic, correct, well-written C++ is quite different from similarly high-quality code written in other popular languages, including Java and C#.&nbsp; C++ best practices are quite different from best practices in other languages.&nbsp; The best way to learn to program in C++ is to obtain a good book and learn how to write idiomatic C++ from the start.&nbsp; You&#8217;ll save a lot of time and avoid much pain and suffering.<\/p>\n<p><strong>Do you have any favorite C++ favorite authors or books? <\/strong><\/p>\n<p>I recommend <em>C++ Primer 5<sup>th<\/sup> ed.<\/em> by Lippman, Lajoie, and Moo as both an introductory text and a reference text for C++.&nbsp; It presents C++ with an emphasis on modern C++ style, covers much of C++11, and discusses many best practices.&nbsp; (Of particular note:&nbsp; dynamic allocation using &#8216;new&#8217; isn&#8217;t discussed until page 449, and one of the first statements is that it is &#8220;notoriously tricky.&#8221;)<\/p>\n<p>There are many other very good C++ books.&nbsp; <a href=\"http:\/\/stackoverflow.com\/questions\/388242\/the-definitive-c-book-guide-and-list\">The Definitive C++ Book Guide and List<\/a> on Stack Overflow lists the best of them.<\/p>\n<p><strong>Where are your favorite technical places on the Web? <\/strong><\/p>\n<p><a href=\"http:\/\/stackoverflow.com\/\">Stack Overflow<\/a>, of course!&nbsp; Stack Overflow isn&#8217;t just a great place to find answers when you&#8217;re trying to solve a problem.&nbsp; Reading through answers to C++ questions, even if those questions aren&#8217;t immediately relevant to what you&#8217;re currently working on, is a great way to learn about parts of the language with which you&#8217;re not familiar.&nbsp; There are many C++ experts and enthusiasts who contribute on Stack Overflow and there&#8217;s a ton of very useful, very readable information.&nbsp; You&#8217;d have a hard time finding a better community of friendly, helpful experts.&nbsp; As a starting point, consider perusing the <a href=\"http:\/\/stackoverflow.com\/questions\/tagged\/c%2b%2b-faq\">C++ FAQ<\/a>, containing frequently asked questions with great answers.<\/p>\n<p>I also encourage everyone to contribute answers.&nbsp; I&#8217;ve been using C++ for a while, but I didn&#8217;t really, truly start learning the language until I started contributing on Stack Overflow.&nbsp; There&#8217;s a big difference between being able to write code in a language and being able to explain clearly and concisely how and why that code works (or doesn&#8217;t work).&nbsp; Helping others by helping to answer their questions is quite rewarding and is a great learning experience.<\/p>\n<p><strong>What question should I have asked? <\/strong><\/p>\n<p>What is your favorite color?<\/p>\n<p><strong>And the answer? <\/strong><\/p>\n<p>Chartreuse (#7fff00)<\/p>\n<p><strong><em>Thanks James!<\/em><\/strong><\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is the second installment in the &#8220;In The Community&#8221; series spotlighting members of the C++ \/ developer community. Today we meet James McNellis, a developer on the Visual C++ team and community guy. James is a developer on the Visual C++ team, which he joined this past July.&nbsp; As a member of this team, [&hellip;]<\/p>\n","protected":false},"author":264,"featured_media":35994,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[140,182],"class_list":["post-1873","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cplusplus","tag-c","tag-inthecommunity"],"acf":[],"blog_post_summary":"<p>This is the second installment in the &#8220;In The Community&#8221; series spotlighting members of the C++ \/ developer community. Today we meet James McNellis, a developer on the Visual C++ team and community guy. James is a developer on the Visual C++ team, which he joined this past July.&nbsp; As a member of this team, [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/1873","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/users\/264"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/comments?post=1873"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/1873\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media\/35994"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media?parent=1873"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/categories?post=1873"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/tags?post=1873"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}