Friday, February 27, 2009

Item 1: Rmvng vwls frm vrbl nms svs spc. Wh crs bt rdblty?

That's right you read it. Well probably not. That is the point.

Dave was a firm believer and enforcer of the idea that saving
disk space was paramount - and removing vowels from variable and function
names saves space (disk space). And that gives us the title. The reality was
that you removed vowels (except in a few cases) and some constanents.

Ingenious idea, right? Who really cares about readability ("Wh crs bt rdblty" for
those that haven't figured it out yet), right? Everyone except a Dave. Why?
Dave wrote, and remembers it. He doesn't need to read it. If someone else
needs to understand it, ask Dave!

But we digress...

Let's look a little closer at this. At first glance, there's some logic here -flawed
as it may be - but there is logic. Technically each character taken out of a file
saves one byte of space on a hard drive. Therefore you saved one byte for each
vowel removed from a variable of function name.

So how much space do we really save? Lets look at a simple example. Let take
a function that is supposed to return the current time zone. Insisting on readability
we would call this function getCurrentTimeZone(). Dave would insist (and sometimes
change the name for us in our specialized version of a shared source repository(but thats another story)) to GtCrrntTmZn(). By our calculations Dave managed
to save us a grand total of SEVEN bytes!

Here are some other examples of variable names:

Level => lvl saves two bytes
Name => nm saves two bytes
LevelName => lvlNm saves four bytes
PlayBack => plyBk saves three bytes
comPort => CmPrt saves two bytes and confuses everyone...

Disk space hasn't really been an issue for some time. Bear in mind Dave didn't
say this in the early eighties - he was enforcing this practice in the early 21st
century. Ok at that time, terabyte hard drives were only available in a programmer's
dreams. But even then 4, 6, 8 GB hard drives really existed!

In the end lets learn from this. Saving a byte (approximately .0000000125% of an 8GB
hard drive) does not help as much as the reduced readability hurts.

Don't Be a Dave!

Wednesday, February 25, 2009

What does it mean to be a Dave?

It’s a term that we coined to refer to someone who is incredibly intelligent but disregards good practices because he thinks they don’t apply to him or just thinks they are a waste of time. In our case it is specific to IT or more specifically software engineering.

To understand where the phrase came from one must understand a little background and some of the supporting characters or at least the main character. Dave was a guy we worked with some time ago. He was incredibly intelligent in many ways but lacked formality in software development. He could crank stuff out, but it was very unreadable and undocumented. It was all good if he had to support it, but if anyone else had to touch it – pray for their souls.

All the points or items we mention are real world events. Names have been changed for anonymity, but they were done by real people. Most were committed by Dave, but not all. When appropriate we will take a few sentences to explain the supporting character. In the end the lesson is the same – Don’t Be a Dave!

In other words, a Dave is a nice, friendly, intelligent, hard working and productive co-worker. At the same time his lack of formality and hard headedness make life difficult for the rest of us. So... Don't Be a Dave!