PHP vs Ruby vs Python vs Perl

Monday January 28, 2008

I am one of those PHP bigots who say that Ruby on Rails does not scale. This is quite a debate amongst web mechanics. My issue with Ruby on Rails is really the IO handling of Rails and the fact that its a middleware framework that hasn’t reached the integration status that PHP has enjoyed with major web engines like Apache.

Sans such integration, everything the framework does has to be encapsulated and virtualized. These are neat words that mean the server has to do more work. Sure its an orderly and secure world where everything is carefully packaged up and encapsulated. Its also slow. I am a security guy at heart, sure, but I’m also old school on frameworks - keep it simple and let it do what it does; cut out as much red tape between the layers as you can. This philosophy has been successful for me in deploying very large web farms that handle very big traffic and even bigger traffic spikes.

However on pure language parsing Ruby is faster than PHP according to this study. This makes sense because Ruby is young and not yet bloated. The bloat will come just like the waistband of middle age. PHP is already there for sure.

I would like to see a study done with the complete frameworks in place. Of course this study was also done using out-of-the-box configs and I have always custom-compiled PHP and Apache in my platforms to keep them as lean and mean as possible.

As you can read in the study, Python outsnakes the competition. Python may be the future for all of us but maybe the reason its so fast is because it doesn’t load libraries etc. until they are called. At the core its a very streamlined language. Almost everything is modularized. If only it wasn’t so snooty and picky.

Y2K38 or The Demise of Your Friend Brian

Saturday January 19, 2008

Today is January 19, 2008 and just when you thought we were safe from Y2K and the horror was all behind us, another computer problem is starting to show itself.

You see Unix-based computers calculate time based on a thing we unix computer people call “the epoch”. The epoch started in January 1970 - just like me. Why they didn’t name it after me I’ll never know, but the way that our computers keep time is by knowing the number of seconds that have passed since January 1970. Its kind of cool to know your age in seconds by typing a command on a computer.

Every time calculation that the computer does relies ultimately on this foundation. So what’s the problem?

Well computers have a limited amount of memory for any one given piece of information. The current generation of computers can handle 32-bits of information. So the highest number that they can count to is 2147483647.

2,147,463,647 seconds from January 1970 is January 19, 2038. When that happens the computer will roll over like an odometer and will show a date of Friday December 13, 1901.

We have 30 years to fix it right? Turns out that we don’t. Computers that do calculations for future dates - such as calculating your 30 year mortgage - will start to have issues today.

There is a nice Wikipedia article that explains this here and even details a problem that cropped up due to this issue in 2006.

I used to think that it would be fitting if I died in January 2038 with the end of the unix epoch - but anyone who knows me will tell you that I’m an 8-bit guy at heart and I should be dead already. They will also tell you that we try get together and celebrate whenever Friday falls on the 13th because we are odd like that.

2038 Bug Web Site

Wikipedia Woe #693

Tuesday January 15, 2008

When describing hiking trails and parks, Wikipedia always has information about Flora but not Fauna.

Case in point:

Uvas Canyon County Park

Hello people - plants can’t eat you, but bears can! Especially black bears, as Dwight can tell you. They just don’t eat beets you know.

Galinburg Photos

Thursday January 3, 2008

We spent New Years in Gatlinburg. Its always nice. The national park there is amazing.

Photo Gallery here: http://www.flickr.com/photos/mediaserf/sets/72157603625975721/

Best Wedding First Dance

Monday December 10, 2007

There’s a video going all around the internet of a couple starting their first dance out and then going into “Baby Got Back”. That’s cool but I think this one is better. If you are one of the half dozen or so people that has called my attention to the first video and I’ve said there’s a better one - this is the one I am talking about:

And if you don’t have the fortune of having everyone you know forward you the same internet crap and haven’t seen the first one, here is a link to that one.