The Crazy Bearded Man Speaks!

It’s a bird, it’s a plane, oh ick!

C d C?

20. June 2009 | Kategorie C, Programming

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?

Comments (1)

Java (cafeine required)

22. December 2007 | Kategorie Java, Programming

The project I am on uses JSP with Javascript and a lot of CSS. I have always resisted learning Java, mostly for ethical reasons, but also because I had no use for it. I am a practical programmer and not one of those who can just learn a language for the fun of it. I need to do something with it. And no, writing a new word processor in Haskell or a web browser in Ruby is not my idea of actually doing something, that’s just insanity. But being asked to learn it for a new project was all the excuse I needed.

I must admit, Java isn’t that bad. As a language it isn’t too difficult to learn either. Knowing C++ gave me a leg up. But the server pages, oh! the server pages! So many fun things to know about that. Most of it makes sense once you figure it out. It’s the figuring out part that is the killer. As a real life, living, breathing programmer I have to ply my trade in a live environment, not just in theory. So sitting down and reading all the tomes, news groups, forums and web docs on the topic is simply not possible. For me learning a language is a lot like learning to skydive by throwing myself out of an aeroplane and figuring it out as I go. To extend the analogy a bit further would be to describe how I figured out the necessity of a parachute after the first five attempts. But one step at a time.

I have a safari account, but I couldn’t find anything that would really just give me the skinny on JSP. At least, not anything that struck my fancy. However, I did find Servlets and javaServer Pages by Jayson Falkner and Kevin Jones . And its FREE (as in beer)! It contains everything I would ever want to know about JSP, if I only had the time to read it. But I have started looking at various sections. It could use some polishing up, but for the most part it seems to be just what a JSP pro (which I ain’t) would want to read before starting a JSP project. Now, let’s see…does the parachute go on the back or the front? One way to find out…YEEEEHAAAAW!

Comments (3)