Professional Software Consulting
C / C++
"In C, it's really easy to shoot yourself in the foot. In C++, it's harder to do this, but when you do, you blow your leg off."
- Rob Garvey, Software Developer

The C programming language is probably the oldest programming language still in frequent use today. Created in the early 1970's, its initial claim to fame was that it could be used to write an operating system kernel - something that, until that time, could only be done using assembly language. Because assembly language changed depending on what CPU was being used, C was considered a huge step in software development because it allowed people to write portable software. A program written in assembly has to be re-written for each new CPU the program needs to run on; with C, the compiler ironed out those differences. Not to mention that for the first time, programmers could put down their punch cards and actually write programs using English words like "while", "for", and "if".

Windows Blue Screen Of Death

The promise of portable code didn't work out quite how everyone expected. Various operating systems created special extensions to the language that weren't supported on rival operating systems, so special care had to be made when trying to make truly portable code. Not to mention the Microsoft version of C, which would be barely recognizable to the C programmers of yesterday. Despite the evolution of more advanced programming languages, C is still a powerful language that is the best choice for certain purposes.

When speed and efficiency are required in a situation where the program cannot be allowed to use large amounts of system resources, C is generally the most logical choice. Examples of thise would be kernels (Linux is written in C) and embedded systems like the signature pad that UPS drivers carry. As CPU's get faster and memory gets cheaper, other programming languages (like Java) can be used in the same situation, but C will be holding its own for quite some time to come.

Part of the reason for this is that the C programming language is about as close to the hardware as anyone wants to get anymore (you can still fiddle with ones and zeros if you want, but it takes forever to do anything of significance). This is dangerous ground to be in. Because C programs can directly access memory using something called pointers, there is always the chance that a program can access something that it's not supposed to. Many windows users will recognize the Blue Screen Of Death - so called because when this appears on your screen, your entire system has crashed and the computer must be rebooted. This is often caused by memory corruption from errant C code.

Ironically, for all the advances of modern technology, and despite all the changes over the years, C is still the language to use if you need maximum portablity. Not that the code can simply be dropped on any platform and work (like Java), but if you have C code, then it can be made to work on any platform that has a C compiler, and that is practically all of them. This may not be an easy or cheap task, but for some platforms, writing your program in C is the only option.

C++ was the first serious attempt to introduce programmers to object oriented programming. While it was a laudable attempt, the goal of having programmers consider their problems using object oriented techniques never really took a firm hold, because it was too easy to do things the old way. As a result, most C++ programs ended up being old-style C code with a few classes thrown in. This resulted in monsterously complex code. Microsoft did a good job of forcing programmers to do things the "right" way by use of their Visual C++ IDE, but on average, most C++ programs of any size were very difficult to work on. This, I truly believe, was part of what lead to the decision by Sun to create the Java programming language in such a way that everything is an object. The hope is that this would force programmers to learn how to think in an object oriented manner, and not revert to old-style techniques that resulted in more code being written (thus more chance for errors). Of course, many programmers figured out how to write Java the old way, but it did push the object-oriented bandwagon along quite a ways.

While C++ compilers are still available, and Visual C++ is still a flagship tool in the Microsoft repertoire, the software industry has evolved. In the Microsoft world, C# (pronounced "C-sharp") has supplanted C++ has the preferred language for advanced programming, and in the non-Microsoft world, Java, PHP, Perl, and other languages are often used. For businesses, writing a brand new application in C or C++ is generally a much more expensive option than using a more modern language, both in initial development as well as long term maintenance.

     Contact Us     

Something wrong with this page or this site? Let the webmaster know by clicking HERE
This website designed, implemented, and maintained by Corey Dulecki
© 2009-2012, Corey's Consulting LLC