Monday, 19 November 2007

What does it mean to be a (good) C++ programmer?

I was recently asked this question by someone who is looking to move from a system admin type role into a programming role, specifically in C++.

The first thing that came to my mind was: "You want to be a C++ programmer?" But that was just pure shock as I thought I would be the only person alive besides Bjarne who actually wanted to learn C++. The rest of us obviously committed suicide after having come across one too many non-compliant compilers.

In the world of hired C++ programmers, there are two types: the ones you want to hire and the ones you don't want to hire but do anyway. What follows is a list of characteristics (?), that in my humble opinion, differentiate these two types of programmers. A C++ programmer you would want to hire:


  • Can explain the modern C++ tool chain in excruciating detail, including how templates are compiled and linked. From memory.

  • Is proficient in at least one dynamically typed language that doesn't start with Visual Basic. Java is not dynamically typed.

  • Has read The C++ Programming Language. Twice.

  • Understands functional programming concepts.

  • Is not a patterns freak.

  • Is a minimalist when it comes to coding: the code you don't write, works.


On top of these, there are a few other software engineering related characteristics such as understanding the need for continuous integration, QA, iterative development and developer testing.

None of these have anything to do with being a C++ programmer in particular. So lets rephrase the question a bit: What does it mean to be a good programmer?

A good programmer you would want to hire:

  • Can explain the implementation of the chosen programming language in excruciating detail. Including garbage collection. From memory.

  • Is proficient in at least one other language that requires a paradigm shift.

  • Has read the <Programming language X Bible >. Twice.

  • Understands functional programming concepts.

  • Is not a patterns freak.

  • Is a minimalist when it comes to coding: the code you don't write, works.


The bottom line is: no matter what programming language you choose, you must be the best at it but make sure that you are also proficient in something that can be considered the total opposite of your language of choice. However, that is not all there is to it. You must also be aware of the software life cycle and understand where your language helps you and where it doesn't. There are very few people who get this. And of all 5 of you who will read this post, one of you will get it.

7 comments:

Anonymous said...

I agree to your insistence on reading TC++PL several times. I have done it twice and currently reading it a third time - well, at a relaxed pace - and making notes and highlighting stuff as I go. I plan to compile my notes/markings and questions raised into a book review.

I have read a tad bit about FP mostly using the ISO C++, Boost but not much. I am interested to learn Microsoft F# but I do NOT think that it's necessary for a good C++ programmer to know FP. Just that you need to know several languages - do you really think Stroustrup knew FP before he designed C++? I think a good C++ programmer should be good in Assembly on one side while equally good at designing large systems from a high-level perspective. These are the two qualities that keep attracting me to C++.

Besides, I don't understand why you use the combo "patterns freak". I think it's good to be good at patterns and use the same judiciously. Since, you have insisted on reading TC++PL at least twice, you must know that Stroustrup has presented some pattern code in one or more chapters towards the end of the book.

And, I don't think that nobody wants to learn C++. I think that people are coming back to C++ after having seeing so many other styles in other languages/platforms such as Java, .NET, etc. because of C++'s power and the freedom with which they can implement yet more powerful systems using the same in C++.

Rest is fine.

Asif

Sohail Somani said...

Hi Asif,

Thank you for your comments. I will try and address them as best as I can.

The reason I stated it is necessary for a good C++ programmer to understand FP is that the C++ standard library algorithms (which were not designed by Stroustrup, as far as I know) require understanding of the basic concepts such as higher-order functions. All of the algorithms take in function objects which nicely maps to the concept of higher order functions. Boost Bind/Lambda/Function make the capability almost native to C++ (although not quite enough, at times). I agree with your other statements about high-level and low-level capabilities in C++ being attractive.

I have come across a few patterns freaks in my short lifetime. These are the guys that will make any pattern fit any problem, whether or not it is appropriate to do so. A better phrase might have been "someone who uses patterns judiciously," as you have said.

As for the number of people wanting to learn C++, I'm sure we can ask Microsoft or Sun for the official numbers :-)

What do you use C++ for?

Anonymous said...

I plan to use it big-time to build a software-based service business.

--
Asif

Sohail Somani said...

Do you have a website?

Anonymous said...

No. But I plan to start a blog for posting good articles and everything i m interested in and that can benefits other people as well.

--
Asif

Sohail Somani said...

Well, be sure to leave it here when you start it.

Anonymous said...

SURE,

--
Bye, Asif