Archives for the month of: May, 2010

Over the last couple of weeks I have been trying to formulate a law based on my experiences over the last 8 or so years writing software for companies.  I think I have almost nailed it.

The Keyboard Law
(or The New Keyboard Law):

The total amount of unnecessary time elapsed between a developer requesting a new keyboard, to the time when it arrives in their hands, is directly proportional to the amount of bureaucracy within the department or organization he/she works for. As a corollary, this time is inversely proportional to the amount of influence software engineering experience has within the upper management of said company.

[Warning, below I go on a long rant explaining this law, feel free to skip it and just use this law in practice and give me credit,fame and fortune in the future. Also skip to the end and add your comments too ;P]

 

Read the rest of this entry »

In this post I’ll outline how to setup and connect a thrift client in PHP. If you’d like to learn how to setup and run a thrift server please see my friend Mike Cvet’s post here on setting up a C++ thrift server.

You’re in a meeting and some Sr. Dev from the systems or backend team says: “Great! just connect to my service via thrift, we already handle all the db connections and most of the caching. You guys use Ruby right? oh..  PHP? that’s cool too, sweet! *looks over to the PM* We should be done in a week…”. Oh snap! A week? What is this thrift thing? And what is this Ruby thing all those young whipper snappers keep talking about!?”. (Yes this is the use case I wish to satisfy with my post)

Apache Thrift is a great RPC framework originally developed and released by Facebook (added to the Apache incubator back in 2008).  I’ve used thrift for the last few years as a simple / efficient way to exchange data across machines, applications, and languages.  A coworker and I thought it’d be cool to do another Thrift tutorial, because at the time of this post, the official tutorials are being developed.  Following the nature of thrift, we also thought it’d be cool (we are nerds) to split the tutorial across 2 different blogs, I will explain the client, he will explain the server.   As a quick warning, this tutorial is rather verbose, I like hearing myself talk… Feel free to skim through the code if you want to skip my life story.  Warning #2, I wrote this tutorial after drinking an entire bottle of wine, you have been warned.

Download Source from GitHub – Client and Server

Read the rest of this entry »

I find myself using delicious.com more and more (yes, I was a very late joiner).  I read so many random blogs and articles and always feel bad when I forget where I got an idea from.  I have been using delicious as a reference to my brain, the tagging system makes things really easy to recall.  But the thing that always gets in my way is their tagging system, space delimited.  Since delicious only accepts “spaces” rather than commas, I was frustrated one day to find duplicates of some of my tags:

And no, there is no such thing as "ui,"

I couldn’t imagine myself being the only one with this issue, 5 seconds of Googling uncovered this 3 year old thread about the problem.  My usual greasemonkey disclaimer applies (I love delicious, and I allowed 3 years for this to be fixed, so I will make a patch if people choose to use it).  So, better late than never, this one is for you @stowboyd!

Install the GreaseMonkey Script Here

I must assume that all airplanes run Windows2000

Inspiration behind this comic, I recently flew from Detroit to Toronto and the plane refused to take off because the kid beside me was writing an SMS.  2 different stewards began arguing with him to turn off his iPhone until he finally did.  Meanwhile I was *sleeping* beside him with my iPhone on listening to music.  Fortunately for me, I had my hood on and they didn’t care notice.

“Phones and Mp3 players can cause electrical interference that can disrupt our plane’s equipment.”  I don’t like being treated like a child, the reality is they need your full attention during takeoff/landing so that you are alert, since these are the times most likely an accident could occur.  Just say that.  You can’t seriously expect me to fly on a plane if some idiot’s Walkman (that idiot was me in my previous story) was accidentally left on, and can take down a 747.  Why do you rigorously measure the amount of hair gel in my carry on, and force me to put it into a baggie, yet seemingly ignore the 3 electronic devices in my front pocket.

Incidentally, while drawing this comic, this news article about an NFL player going through this exact debacle appeared in my news reader.  I might be over reacting, but perhaps you (the FAA) should worry more about your pilots making $17,000 a year and being on food stamps [warning, link to Michael Moore] than me listening to Miley Cyrus on my flight home.