Tuesday, November 30, 2010

Technological Peaves

I'm not OCD!  I'm really not.  But I have my OCD moments, just like everyone else does.  Mine tend to occur in phases of several hours at a time.  Other people have theirs in minutes, even seconds, or days and weeks.  And some just live their entire lives in the wonderful world of OCD.  But one thing that can trigger my OCD symptoms is looking at shitty code.  Scripting code.  Programming code. Any code.  Technicians dressed like they're heading to the Star Wars club meet-up.  Hair that hasn't seen a comb or shampoo in eons.  And I can't even remember how long an "eon" is anymore.

These are things that piss me off to no end.  I bottle it up while in the office, but once I'm around more casual surroundings it flows out of me like digested Mexican food after 4 back-to-back Starbucks Doppio Espresso's.  It ain't purdy.  And you might want to just casually walk away while Uncle CrazyNutBrain goes apeshit on his silly blog for a moment.  Ugh…

  • Consistency - Yes.  It matters.  Be consistent.  I beg you.  If you bother to capitalize a variable (sentence case, word case, Pascal-case, head-case, whatever) do it everywhere.  If you don't, it says to everyone else: "I am too f-ing lazy to push my tired arm against the heavy mouse long enough to click the brick-sized 'Search-Replace' button".  It also says: "If I don't care enough about being consistent with my OWN work, guess what the **** else I don't care about?"  Suck it up - drink a few of your stupid 5 hour energy drinks and eat another bag of Skittles, whatever it takes to make you code consistently.  I bet you'd prefer your surgeon be consistent with his hands all up inside your body, wouldn't you?
      
  • STOP HARD-CODING! - You spend hours writing some shitty piece of code and now you're so proud over the results you need a tissue to blow your nose from the tears of joy rolling down your face.  Awesome.  Good for you.  Now since you're so proud that you're posting it online or telling the other half-asleep idiots in the office kitchen about it, maybe you should have taken TWO more seconds to change-out your First-Grade hard-coded variables with something a little more dynamic and adaptable? Why, yes, you should.  Thank you.

    Instead of this ridiculous crap:  dn = "dc=contoso,dc=com"

    Try this, and don't even open your mouth to complain about the extra typing, just shut up and swallow that Mountain Dew you started on…

    Set objRootDSE = GetObject("LDAP://rootDSE")
    dn = objRootDSE.Get("defaultNamingContext")
      
  • Use a Standard Document Header - Put a simple banner section at the top of all your code files that says what your stupid script or program "module" (I say that with a long, obnoxious mocking pronunciation: "maaaaahhh-dyeeeeeewweelll") is supposed to do.  Include your name and the date you were concious and sober enough to write this piece of crap, and maybe a comment about why you were able to stay sober long enough to bother writing it.  Here's an example:

    File: genius_module_001.cs
    Dweeb:  Dexter McFartsalot
    Date: 2423.23 (star date, of course)
    Comment:  I wrote this to calculate how much cloth I will need to buy to make a Darth Vader costume for my cat, Darth.  That's his real name.  No, seriously, I'm not kidding.
     
  • Make it Readable - You may think you're the most super-genius of genius expert phenomenal masterpiece uberkind programmers, so you prefer to go Spartan with your documenting bad-ass self, but that's wrong.  Job security isn't locking people up with code they can't read.  Job security is making people WANT to use your code in the first place.
     
    If you call in sick and shit breaks, and they can't reach you, AND your code that broke can't be read by anyone that doesn't know Klingon, well guess what happens?  They start gathering in rooms to discuss how to replace your uncooperative ass, that's what.  "That friggin Joe.  Thinks his shitty code don't stink so he doesn't document it.  Leaves us dragging under the moving bus.  Well **** him! Let's start looking for a replacement that wants to work WITH us, instead of behind our backs!"

    In the time it takes you to go outside and smoke, as if you're "taking a break" from doing REAL work, while debating the virtues and vices of the next Tron movie with the other nerds, you could have documented your code like it was a James A. Michener novel.
     
  • Keep it in Perspective - It's easy to get full of ourselves about technology and our amazing magical skills and the impact WE (as humans) have on it.  The reality is that while it helps, it's nowhere near as "amazing" as what other people do every day.  The truth is we simply arrange bits on a disk.  That's right.  We punch keys and click a mouse and move bits on a disk that cause other bits to move.  Here's a list of what we DON'T do:
       
    • Save lives with our own hands
    • Build physical things that outlive us
    • Comfort the sick and dying (literally)
    • Cure Cancer and end world hunger
    • Entertain thousands of people packed into an arena or concert hall
    • Entertain thousands watching on TV around the world
       
      We move bits around.  And you know what else?  You may not want to read the next line, as it may cause you to go looking for your gun and bottle of liquor:
        
      Everything we do, as computer programmers, developers, administrators, even networking technicians and engineers, will be gone before the rocking chair your dad built ever goes away.  We are in the business of the ever-changing.  The ever-evolving.  The ever-replacing.  We draw pictures in the sand.  Keep this in mind when you start pumping up the value of what you do.
       
  • Context - Software, computers, routers, switches, operating systems, platforms, protocols, languages, compilers, schemas, models, are all tools.  TOOLS. They are NOT religions!  Stop debating their qualities as if they are to be worshipped.  Stop debating their characteristics as if they are truly organic and grow from nature.  "It does this",  "It does that", "It can do this" and all that.  There is no "It", all there is is "I/You/We/Us". People write code.  It doesn't grow from a tree.  I hate it when some geeky asswipe starts in with that snobbish whiny "Weeeelllll, [Windows/Linux/UNIX/OSX/BeOS/NeXtStep/DOS/Eniac] is superior because it can ___"  Shut up.  Just STFU.  Thank you.  And please, take off that stupid nerd t-shirt and go wipe the smudges off those half-inch-thick lenses, it's annoying.  Want to know why the suits don't take you serious?  Go look in the mirror.  Dress for the job and act like you earned an education.

Sorry.  I vented a bit.

No comments: