Why C++



I'm a year and month into a Perl job at a fantastic company and my C.V. was online waiting for C++ jobs. The company I work for is great. Great money, I'm in a great, very Agile and very positive team with high morale shared by all. I feel respected by my peers. We work well, we can deliver things we're proud of. The company supports us Open Sourcing our software, writing Blogs and expressing ourselves creatively. I have enough responsibility, there are hack days and tech talks. We host user group meetings too. Damian Conway, a respected Perl community member and author of "Perl Best Practices" has been in to train us with regards to writing better APIs. This e-commerce company knows its development team is an important asset and we feel respected. On top of that the company has a wealth of other benefits, such as free drinks once a month, great summer and winter parties, a 50% discount on their own site, plenty of holiday, flexitime. Life is good. To the point where I question why I would leave this company. There is still plenty to learn, contribute and career paths within the company.

I've enjoyed working there and I even see a remarkable character ark in my own personality, losing my "small company mentality" of "pushing people to deliver" to this company's "Be Agile, treat others well, work together in defining tasks, be patient in sharing understanding and watch them exceed the quality you'd expect to deliver". The soft touch really works and in combination with Dale Carnegie's book "How to win friends and influence people", I really feel like a better person that I used to be. I've always been self-motivated but now my motivation is reinforced by working with equally motivated people. It takes a great company to make you a better person.

However as I shake off what I perceive to be small company mentality that all must know what I do and be as disciplined in good OO design and debugging as me (or as I perceive myself at least), I can't get over the fact that your choice of language is important. That as different languages are suitable for different types of program, it's also suitable for different types of programmers. Think real programming is about delivering features? Think real programming is mastering the Zen between hardware limitation and scalability? Maybe you slightly idolise the power one language gives over another, in terms of speed of development or control over memory? I do.

For some reason I'm fixated on C++. In a few days I'll begin my first C++ job and become a "professional C++ developer" for a company who maintains a pretty old MFC application that's been around since the 90's. So why C++? What's the pull and need to write it?

I think it comes down to the amount of discipline required to write it and, as a result of that discipline, how it rewards you with extremely high quality software. It compiles to really quick machine code, requiring a programmer to understand the hardware rather than to be someone who only deals in expressing business logic. I've always been fascinated with Operating Systems and the crucial services they provide. My post regarding my toy OS Farmix may convince you of this. I think that is the final career goal for me. To be a kernel developer.

Further to requiring you to understand the hardware it also requires you to understand data structures and algorithms and when you use those skills C++ rewards you with high quality software you can be proud of. C++11 and shared pointers actually allow your code to look like Java, where you "new" things at the top of a function and don't concern yourself with deleting them at the end. A little bit of portability fore-thought and an eye for undefined behaviour and you write software that mitigates the need for the JVM and overtakes a language created to cure it of its own flaws. A language that provides rich enough Object Orientation that it is no further from expressing business logic than Java, Perl or Python.

A year of commercial Perl experience and two and half of professional Python experience have taught me one of the benefits of those languages, especially in terms of writing it quickly, is how people uses hashes as lightweight objects. You always seem to see it a lot. C++'s new "Initialiser List" feature makes creating hashes in C++ just as simple. You can have Python style Tuples as well, and Lambdas and Closures too, even though I'll admit I find the syntax for those last ones are bit more complex.

I mean no disrespect to Perl what so ever. It's a great language. It works and the company I've come from prove it. Forgive me if I feel the need the need to be defensive. The developers I've met in the Perl community are excellent too. We're all different and my "fixation" isn't the one true vision of the world. It's only mine and I'd never look down on someone who doesn't have the crazy viewpoint I can't seem to let go of. I consider the developers I've met as friends and excellent at their job and I'm just following my own path. This post is not even designed to encourage people to take the same stance as me, only really to highlight in the broader sense that we're all different and we all see the world in different ways. Maybe I'm an idiot for leaving this job and only time will tell.