Welcome to the inaugural post of The State Machine.  My name is Bob Steagall, and lately I’ve been in the pipeline filling in time (sorry, I couldn’t resist). I created this blog to put down some thoughts about C++, software engineering, and other tangentially-related areas of interest. I expect to cover a wide variety of topics related to C++ – tips, techniques, tutorials, tools, news, algorithms, and perhaps even some noteworthy applications. I may also pen the occasional opinion (or rant, depending on your perspective) regarding the current state of software engineering and processes that claim to improve software quality.

I first encountered C++ in the early 90’s while working as a research assistant for the CWRU Department of Physics and the Radiology Department at University Hospitals in Cleveland. I had taught myself C a couple of years earlier and used it to write code for my Masters thesis.  After receiving my degree, my academic advisor hired me on as a research assistant, and I continued to use C on a daily basis to support his cardiac MRI image processing research.  I bumped into the The C++ Programming Language (2nd edition) one day in the university book store and bought it on a whim.  At first reading, it seemed like madness. Coming from a physics background where I had used Fortran, Pascal, and C to do numerical computing for simulations, I didn’t immediately grok the “inside-out” nature of the language’s syntax or recognize the importance of its defining principles, so I put the book away.

A few months later, I was working on a C-based project to display multiple MRI images simultaneously on a Sun SPARCstation, and found myself wanting to reuse some doubly-linked list code for several different element types.  While contemplating the pain of cutting and pasting the same code several times and trying to make it all work correctly, it occurred to me that a strange C++ language feature I had read about called “templates” might allow me write the linked list code only one time.  Excited at the prospect of future laziness, I dove back into Bjarne’s book.  On second reading, I learned that destructors could help me resolve the annoying problem of memory leaks.  Bonus!  Around the same time, a colleague at UH introduced me to the nascent Internet, where I soon discovered GCC, the original GNU C++ class libraries, NIHCL, and Rogue Wave’s Tools.h++.  I ended up writing my own list class template for that project, using the GCC and NIHCL implementations as examples, and was impressed by how much better my code looked and the fact that memory management was vastly improved.

I continued experimenting with C++, NIHCL, and the GNU class libraries for the next year or so, and began following the language in the comp.lang.c++ and comp.std.c++ Usenet newsgroups.  Then in 1994 the first version of the STL was released, and everything changed for me.  I downloaded it, dissected it, read everything I could find about it, attempted to understand it, and tried to use it.  (I say “tried” here because compiler support for templates was pretty weak at the time.)  I became fascinated with the underlying ideas and potential applications of generic programming, especially with regard to containers, an interest that continues to this day.

In the quarter century since then, the evolution of the language and its libraries has been nothing short of astounding.  Sure, there was a period of slow progress, some might say stagnation, in the first years of the new millennium, but those days are long gone.  Guided by a group of very smart and dedicated people, the C++ language is evolving now at a rapid pace, and mostly for the better.  The changes in C++11/14/17 have brought a paradigm shift in the way we write C++, and if adopted, many of the new language and library features proposed for C++20 will do so again. This is perhaps the most exciting time to be a C++ programmer, at least it is for me.

One downside to all the great improvements, past and planned, is the difficulty in keeping up with them. Finding the time to learn about the latest language and library features can be a real challenge, especially when you have deadlines to meet, products to deliver, and a reasonable desire to have a life outside of work.  I intend to write about some of these topics, and it is my fond hope that visitors to this tiny corner of the Internet may find something useful that saves time at work and increases time with loved ones.

Thanks for stopping by.


Leave a Reply

Your email address will not be published. Required fields are marked *