C d C?
My job requires me to work mostly in PHP and JS with a brief foray into Perl. Sometimes I even have to do some Java (but only when pulling out my eyelashes and drinking arsenic laced beverages fail to meet my need for self-mutilation).Lately, however, I’ve had an itch for some C programming. I simply love C. It is dangerous, hard to remember, full of strange idiosyncrasies and beautiful. Many languages today have made programming easier and safer. But I have a growing concern that ease and safety have come with a similar cost that the introduction of television did.
Reading is hard, but very few people can argue against its benefits. Television is easy, but again very few people can argue against its detriments. I am not a great mathematician, I am not even good enough to qualify as a bad mathematician, but I have found picking up a book on math theory has a strange and previously unlooked for benefit to me. If I am having problems with arguing a view point or clarifying an idea, I might pick up my copy of “Introduction To Mathematical Philosophy” by Russell (as an example) and give a chapter a read. Sure, I may not understand it all, but suddenly I find myself able to think…better. I have found a similar thing happen with programming.
PHP is extremely easy to program in (although browsers and the Internet make almost everything harder). And, for me, creativity is pretty much at an all time low. It is simply a tool to get the job done. Grind out code and watch it do its thing. But C! Oh lovely C! (If I was anything of a poet I would break into meter at this point). I am forced to think and to think hard about what I am doing and why I am doing it. What is safe, what is fast, what is clear and unambiguous.
The preprocessor? Oh! I love that too. Heck, you can define a whole new language using that thing (Not that I would…I think…maybe). Yes, we are told it is evil. But even the creators of C# saw the need (and the demand) to put preprocessor directives in. Practical? I suppose so. Cool? Oh yeah! But enough of that, I’m starting to embarrass myself.
I was reminded of the depth of what C was and the problems inherent to the language that faced the unwary coder when I came across a book called, “The CERT C Secure Coding Standard” by Rober Seacord. Over 700 pages (count them, OVER SEVEN HUNDRED!) of coding standards for C. Now lets see C# do that! Yeah, right, why am I so excited about that? Isn’t programming suppose to be just like your typical American idea of freedom: Do what I want, when I want, whenever I want, as much as I want for as long as I want? Only if you are a programmer living in the world of Warcraft (or a Perl programmer). In the real world, the world I work in, standards are the definition of freedom. Freedom from core dumps, security flaws and loss of life and limb when the code you wrote fries the cancer patient receiving the radiation treatment.
So go ahead and tell me how bad and inefficient C is. Sing to me the praises of object oriented programming and try to indoctrinate me with the way of functional programming. I don’t mind. I’ll just
#define YOUR_LANGUAGE “C”
C is simply one of those languages that never seem to go away (as much as we have all tried to make it so), and I suspect it will be around a bit longer. And I am glad. Maybe U C D C 2?