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)

gnothi seauton

7. June 2008 | Kategorie General Comment

I am trying to finish up a degree in computer science. With working full time and a family of eight to take care of, this is proving challenging to say the least! I am currently taking twelve credits.

I am coming to the conviction that the best way to learn to hate what you love is to formalize it with a college education. Not that I am against education or discipline (we home educate our six children), just the college system. I am fully convinced that apprenticeship is the best route. Yes, it is much more difficult to verify the education that way, but then so is quantifying the true validity of a college education.

weiter lesen …

Comments (2)

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)

Shutdown or reboot, you choose.

17. November 2007 | Kategorie Apple

I recently started working for a company that is, what I am calling, an “apple cart”. Almost all but two machines are Macs. I used an iBook about five years ago shortly after the release of 10.0. I hated Apple up to that time, but OS X was a whole new animal. Being a lover of everything Linux, the FreeBSD (yes, I know, its Unix) backend was, in IMHO a step up. I was in love. With much regret I had to give back the iBook when I moved to another company. Since then all my development has been on Windows (hey, it was where the money was), while using Linux for my personal stuff.

Shoot forward in time to the present. I can say with a certain amount of conviction that I am a bit saddened by what I see. Granted, we are using Tiger on our server and I am sure Leopard makes a ton of improvements, but still, one must have to be extremely dedicated to continue using OS X and PAYING FOR IT!

What I mean is this: I use Linux a lot, including at my current job. I have been using Linux for quite a few years (the kernel version had just turned a whole number when I started). Linux can be temperamental, and that is putting it mildly. It still is a power user’s operating system. But it has one thing going for it that other OS’s don’t: it’s free. That is a big plus for many of us who are financially challenged.

So finding Apple crashing or not booting or doing stupid things that no OS should ever do is nothing new or daunting for me. What really has got me flummoxed is that people actually go out and pay good, hard earned money for the thing. And a lot of it. Gobs of it when you compare it to Linux (O.k., that’s unfair, but it’s still a lot of money).

One of the weirdest things I have ever seen (which is saying a lot considering I have six kids) occurred when I, being new to the server OS, told it to run through and do the updates. Hey, I update Linux all the time. I thought, “This is really FreeBSD underneath. I’ll just do updates and then get on with the rest of my day.” Wasn’t I surprised when, after the updates had been downloaded and installed, I was presented with a message box that asked me to reboot or shut down. At first I thought “shut down” meant shut down the updater. Yeah, right. It’s a server for Pete’s sake! I couldn’t shut it down! At least not at the time I did the updates.

In all fairness I hear it rumoured that Vista has pulled the same stunt, but that sure doesn’t make it right. Why would a sysad want to be forced into rebooting? Who wrote the code for that thing anyway? Obviously not someone who has ever administered a server in a production environment.

The interesting part is I googled for this issue and it would appear to me that most Apple users don’t find this much of a problem. Maybe they don’t even know this isn’t normal.

Of course, when I rebooted, the machine froze and I had to actually press the no-no button, and then had to reboot when the server kept disconnecting all the network shares every two minutes. And then there was the problem with the sshd locking up…but I digress.

I am not saying the OS X is bad or that it has any more problems then, say, Linux. But if the only thing that Apple has to show for all its hard work is a fancy GUI then I might as well stick with Windows (which is almost always less expensive when it come preinstalled on the machine) or Linux.

Now that Apple has switched to Intel for its hardware and Free (as in beer AND freedom) BSD for its OS, I have to ask the question everyone seems afraid to ask: Why switch? Both Windows and Linux are less expensive and, as far as I can tell, at least just as stable (or lack thereof). Yes, I know, I am an infidel. But as a programmer in an extremely competitive market I have little room for cultic devotion. I have to work.

Comments (3)

Hello World!

17. November 2007 | Kategorie General Comment

Finally, I have found the time to start writing…how long will it last? To find out a bit more about the cbm go to pribis.com and read my bio. It may be more then you wanted to know, so don’t say I didn’t warn you.

Oh, and yes, some of this site is in Deutsch. I only discovered this after installing the theme. The theme was created by a Deutschlander, and apparently there is no English translation. I could have translated it myself but a) Ich liebe Deutsch und b) It will filter out certain folk that don’t want to take the time to think. Is the cbm a meanee? No, not really. Just having fun.

Comments (4)