How to suck at programming #FEFE23 donate your day to a bug


It’s a holiday, everyone is partying but you got better things to do. Up early in the morning, you power on your vehicle and head to the office like the model employee you know you are. The wife queries, “Isn’t it a holiday?” to which you mumble, “I gotz deadlinez!” The looming release date of the project you’ve been working on for the past couple of months is beginning to weigh on you like last Thanksgiving’s turkey and yams. Hi, I’m Cliff. You’re here because you suck at time management. On with our story… The air around your shoulders now feels like lead and you can almost make out the text of the actual delivery date as you watch its molecules adhere to one another with each passing hour. Today will be different! You have the entire office to yourself and you will be Mr. Super Productive Programmer Guy ready to close out the 12 top Jira items in 1 heroic effort!

You arrive bright and early, and only dabble on Social media for an hour because, “hey, it’s the holiday and you gotta have some enjoyment!” Finally dismissing further distractions you power up your IDE and go to work! You finally restore the memories tucked away in the soft tissue inside your skull which originated last Friday when you came up with the terrific idea to finish your work over the holiday. “Yes, this is the issue I needed to resolve!”, you verbalize audibly knowing that nobody is in the office to witness your late morning schizophrenia.20 minutes into your effort you hit a snag which sends you off in a whirlwind of meta-problem resolution, also known as yak-shaving. Undeterred you press on, confident because you weird the most powerful IDE on the planet and no amount of yak hair will keep you from making your deadline.

Finally it bites you. The one bug that makes absolutely no sense because the source code was working entirely different just prior to your recent changes. The changes you introduced are the absolute logical equivalent of the original version of the source code. There is no way in the world the behavior should be altered. You have made what is the textbook definition of a safe refactoring yet things have dramatically stopped working! You refuse to use your debugger because everything is TDD on this project. Unit test failure after unit test failure eventually causes you to break down and add log statements, then finally use the debugger. The debugging session leaves you even more puzzled as you Google random log output and red-herring type error codes. You glance briefly out the window and the sun has grown several shades darker and you start to feel your heroic day slip into night. Hour after hour leaves you more stranded, frustrated, and confused as you throw different possible solutions into your IDE, practically reauthorizing the entire project along the way. The emulator that your app runs on mocks you with scorn, the internet feels like its laughing at your pain, you have no other recourse but to throw in the towel but you refuse to give up.

Finally you begin a round of rubber-duck (or teddy bear) debugging speaking aloud each line of source code as you step through your logic mentally. Three minutes into the ducky-debugging it becomes painfully obvious where the problem is originating! The most obvious oversight of a relative URL which should have been absolute! How could you be so blind? Why did you go through all the chaos of rewriting your entire project??? 7 extra characters is all it takes to make the original version of your modifications green bar!

Alas, the day is old and the curtain call has begun on your life as the credits begin to roll announcing the tail end of your holiday. You look at your progress and realize that you have fixed one minor insignificant bug in an area of the app that only you and the night time janitor know exists. (The janitor only know because you spend nights discussing your problems and have been stuck on this issue for months.) Hooray for you! You have devoted your entire holiday towards fixing the only feature in the entire app that does’t actually get used anymore. So if you wanna suck at programming, skip a holiday, go to work, and obsess over that one unused feature. You’ll learn more about the edge cases of the web browser in your emulator and never live to appreciate those precious 24 hours again in your life.

How to suck at programming #441


You’re outside on a sunny day tethered to your mobile phone hotspot and limited data plan writing code using an editor that isn’t your main tool. Maybe you’re an Eclipse die-hard or maybe you live on Xcode for your day job. Whatever the case, you find yourself in something like a SublimeText, Notepad++, or TextMate for something you are prototyping. You’re mostly familiar with the hotkeys but again this is not your day job editor so you’re prone to get one or two of the sequences from your main tool mixed in on occasion. You go to quickly comment out a section of code when muscle memory kicks in and the next keystrokes invoke Ruby integration. Hi, I’m Cliff. You’re here because your Macbook is currently downloading an unknown Ruby package (or packages) over a limited mobile carrier connection and you won’t know how much is left in your monthly allotment until you finish reading this article. I’m here to share a similar experience that just happened moments prior to my writing.

Welcome to my How to suck at programming series. There’s no particular reason why I’d been listing these tips in random order, however feel free to peruse what I’d posted in the past if you really enjoy the merits of being an awful programmer. I write todays post with hesitation because I’ve been going through a low point in my career and I have been doubting my abilities. Still, this is a must-post topic and I enjoy making others feel enlightened on how to be dumber than usual.

So what happens when the stars align in a perfect arrangement capable of ruining your day/week/month? What do you do when you’ve accidentally invoked an unknown feature in a tool that you only use on occasion? What do you do when that tool spawns an unknown external process designed to gulp down potential gigabytes of data over a limited mobile data connection? Why do we even have limits on our mobile data connections??? (Curse you AT&T!!! I condemn you and your penalties per excess gigabyte!!!) Don’t they have something way better overseas?

My story actually begins in a hospital building somewhere in Mt. Holly N.J. where I shed my first tears but I’ll spare you the extra drama including the part where I finally realized I was too old to still try to bring toys to school (6th grade) and give you the abbreviated version… that is, if you’re still interested.

So there I was stuck in an unanticipated initialization sequence spawned from TextMate. “Initializing Ruby 1.8” is what the pop up window said. It was scary. Mostly because I wasn’t sure what “initializing Ruby 1.8” meant, but partly because there wasn’t a functional close/cancel button on the popup window. I know most Ruby programs usually use Ruby Gems. I know Ruby gems can be a separate download/install and I know that Ruby Gems can potentially download other Gems. I didn’t know if any of this would be part of the initialization.

What was this mean initialization dialog doing to my Mac? What was it doing to my data cap??? What was I doing downloading Ruby??? In an extreme exercise of yak-shaving, I set out to teach my daughter some more Javascript stuff. The lesson ended with my trying to recode Khan academy’s interactive design page in roughly 20 lines of vanilla Javascript because, you know, I thought it’d be cool to show her how things worked on the page where she learned to draw a turkey dinner with the line, ellipse, and image functions.

My reasoning went something like, “I’ll teach her this cool trick and ignore the fact that there is multiple layers of indirection involved. Afterwards she’ll realize how cool the code and her Dad is then we’ll finish the project this week and sell the product to eBay for $500m!” This is because everyone who is anyone knows to sell a Javascript side-project to companies like eBay, it’s just common sense. At any rate, I’m failing at recreating Khan academy, failing as a super programmer, and failing as a father when I realize my daughter has lost all interest in the twist of logic I tried to confidently demonstrate. I also realize she has to leave for a sleepover. Undeterred in my efforts as a script ninja I took my operation to the Cupertino Library where I could concentrate sans distractions.

I finally succeed at hacking together something horrible looking enough to pass as a Frankenstein Khorn-Alch-tradgedy. Proud of my tardy solution, I test it a few times while mumbling how simple the source code behind the more professional Javascript editor should actually be. Who needs You-Tube interactive voice coaching anywayz? This is when I decide to simplify my logic and comment out a few lines of code triggering the unknown consequences of a Ruby initialization.
So if you want to suck at programming, teach your child Javascript. Then get sidetracked on a complicated unrelated demonstration of irrelevance while persisting until you can actually smell your child’s lack of confidence and trust in the air. Ignore all signs of boredom from the little one and continue until they roll credits between you and your keyboard.

How To Suck At Programming- Use your IM as a password prompt


Don’t act like it’s just me! You’ve been there! You’re hacking away feeling uber productive (I hate the word “uber” because it sounds so geeky) in a Tuesday morning. You got about 15 windows open that you meticulously manage bouncing back and forth between your email and your calendar verifying meetings at 10:30 and 2pm, your IDE and your web browser triple checking the last second Javascript patches that you made to the company site, your command line and your multiple IM sessions as you secure shell your way through the company’s most secure networks while chatting with your neighbor, your buddy from Illinois, and some sys-admins in a totally different time zone. Of course the probability for error is high but you are a trained professional. You pay careful attention to every keystroke you make. You have hot keys to every critical system function memorized and you know how to whiz from the current totally confusing multi-window multi-desktop information overload to a single window focused environment and the click of a button. (The click of the Shift+Ctrl+Home, Escape sequence you custom programmed using a mixture of Groovy, and python over the weekend during the Giant’s Triumph over the New England.) You are completely in control of your multiplexed-multitasked-multi-desktopped universe!

The day continues with a Mac, and two desktops all running side by side using a software KVM your single keyboard and a mouse empowering you with the might of a dictator running a small nation. Check in that source code patch there, respond the Elgin who’s inquiring about when your team’s next release will go live, swing the mouse to the far left (into the connected Mac) to make sure you’re not late for your daily stand up, swing your mouse back to the right (across the WinXP desktop) into Linux land where focus follows your mouse cursor and begin the login process to the production system. What’s that blinking slightly behind your terminal window? Oh that’s your chat window where all of your buddies are hanging out discussing which bar they’re going to hit this weekend! ignore that for now as you sip from your coffee mug and delicately place it back on the desk only slightly nudging your high precision optical mouse. Lets type the old password for the production server, which also happens to be the same password for your email, your online bank account, your employee payroll access center, and about half a dozen other highly sensitive places that you don’t care to be banned from simply because your memory has the capacity of an old 386 machine from the late eighties after an install of Doom. We type fast because we’re professional and we know what we’re doing. We quickly mash the enter key as a reflex to the muscles trained habit of typing the same password 647 times per day. We only realize after the chat window comes to life that the slight nudge from our coffee mug was just enough to move the cursor off of the terminal window and onto the chat window where “focus follows mouse pointer” (because you’re such a clever KDE desktop nut). We have now given the secret keys to our bank account, email, company secured servers, and plenty of other secured locations to the rowdy bunch of compadres on the other end of your connected ICQ Instant Messenger Network.

Well done genius! You not only have the joy of tracking down and remembering all of the servers and websites that your now exposed user credentials belong to. You also have the honor of resetting various browser and other software for the next 27 days and tracing bugs due to authentication failures where these same credentials were hard coded in local text files among other places. So if you wanna suck at software, use the single user id password system. Exposing it to the world over an IM or an email goof only hurts twice as much as leaving your gas oven on during a vacation to Tahiti.

How To Suck At Programming #2 – Prank the wrong PC


HTSAP my acronym for the soon to be ignored serious How To Suck At Programming. Welcome to listing number 2. (Listing 1 was a couple of weeks ago.) Don’t get comfortable because I’m inconsistent with my blog posts.

You’ve been planning this prank for weeks. Your buddy, the guy that works on the database team, is notorious for doing crazy stuff. Just last week he covered the optical eye on your mouse with clear tape and scribbled it with a black sharpee. Just enough to let a minimum of laser through thereby giving you the painfully frustrating user experience of a slow, barely responsive on screen pointer. No matter how far you drag up down left or right the thing only moves a few pixels. As you struggled for hours losing productivity that day, surfing the web, installing new drivers, and plugging into different USB ports, and rebooting not truely knowing the source of the problem it was this guy, barely containing random snickers, that was completely responsible! You’re going to get him back! You’ve watched his every move, waiting for him to leave his workstation unlocked so you can meticulously deploy you rouge program. You know the one pr0n site that the company’s filter’s don’t block, it’s complete with audio and full motion video. You’ve delicately crafted a Visual Basic program that will popup dozens of windows to this site playing the audio at full blast while re-spawning on a reboot. Your team has been held up in the basement of the IT wing of the company where nobody but the cleaning lady visits and you’ve cleverly calculated everyone’s work schedule so that your time-bomb will detonate early in the morning just before the dev team’s daily stand up meeting but before any of the executives arrive as to mitigate the overall collateral damage and avoid getting him or anyone else fired. This will be too good you exclaim mentally as you complete the installation of the devilish COM object along with the hidden Windows registry entry. It’s too perfect as he never leaves his workstation unlocked you think to yourself.

Unbeknownst to you he intentionally left his workstation unsecure after backing up and clearing his hard drive for the 6pm hardware guy to swap the box with an upgrade. You were too into your plot to even notice the default Windows wallpaper or that he was logged in as Administrator instead of his user account. The swap is made promptly at 6pm after everyone including you, has left for the day. His desktop is replaced with an identically looking Dell with extra RAM, HD, and a souped processor. Meanwhile his old Dell goes to the nice always church going Christian lady down in pricing who had recently suffered from losing her husband to internet foul play on the Chris Hansen show visiting chat rooms in that very same site that leaks through the corporate proxy servers. Well done genius! Your carefully attack is about to become a painful re-enactment of a tragic event for an innocent bystander! Of course you have no knowledge of how badly your prank is about to backfire, especially since you’ve left your signature all over the later to be discovered malicious app. You come in the next day fully expecting to be entertained while your buddy opens up Internet explorer as he is predicted to do just before the stand up. To your amazement nothing happens! He logs into the project management tool from his browser and on goes the rest of your day… completely eventless and void of laughter. As you ponder how your payload could have failed to execute (you registered the COM object and carefully placed the registry entry) you begin to hear screams from the pricing office upstairs. These screams are coupled with all too familiar audio of not so innocent grunts and moans played over a pair of Logitec speakers. So if you wanna suck at programming prank the wrong PC. You may never be able to explain your true intentions to the woman who lost her husband and now her final strands of mental stability but the memories of how good that prank could have been should be more than enough to compensate.

How to suck at programming – Announce a feature hot-deployed to a live server without testing


(Loosely based on a true story… as a tribute to a new WordPress blog that I find very amusing… The idea here is NOT original and I can never be that witty!)

You’re the master of your domain. The one person responsible for making sure the build/deploy system is operational. Also, you’re the only developer who actually knows what’s going on in that tangled mass of technology that nobody else in the company uses but you. Sure it’s different and complicated… but that’s only because the rest of your company co-workers are weenies and don’t have what it takes to sit through 532 pages of text describing the ins and outs of Agile Software through the build system. All they know is their fancy wizards for compile and deploy, but you… yes you, the REAL software engineer know everything that goes on underneath. You can describe each tool involved in the build lifecycle down to the byte code level. That NullPointerException, that wasn’t a programming flaw! That was the team’s resistance towards your efforts externalizing the dependencies! They always assumed that they could reference a member variable directly without calling through the getter method.

At any rate, you’ve become professional. You’ve done hot deploys in your sleep while dreaming of sugar plums and dancing daisies. You once did a hot deploy remotely over dialup with a keyboard that was missing the enter key and space bar! Your expertise is matched only by the sheer number of both cold and hot deploy’s you’ve performed over the years! Why should this one be any different? Besides, the code has been tested on your development server hasn’t it? Forget about that staging area specifically set up for Quality Assurance which mirrors the hardware and configuration of the production machines! Completely bypass policies and procedures checks, and balances set up to protect the company from failure. You know better your your methods are fool proof. Just one command and you’re off and running! deployment never felt so sweet.

You draft an email to the project manager as well as the product owner as you watch the text whiz by in your command window while the hot deploy carries on. “New feature rolled out!”, goes the subject line as you inform all of a successful update completely leaving out the fact that it is still in progress as you type. The deployment completes only seconds after you hit send in Outlook. Time for an early lunch your stomach craves reminding you that you have absolutely no work left on your plate between 11:30 and 12pm while the rest of the company marvels at the new features you’ve unleashed into production.

You high five your buddy that sits across from you bragging about how awesome you both are for totally beating the deadline. You crack a joke about some of the corners that were cut and how nobody will ever notice the easter egg you snuck in as an added bonus. Alls yuh hafta do is enter the Contra code during the splash screen in your Swing based app and a mini Super Mario jumps out. This was included as an insider’s joke on the other hermit developer who actually called out “Mario” in the Olive Garden restaurant the company dined at last year thinking he saw his long lost cousin from Italy. You are totally unaware that your hot deploy only went to one of the 25 production machines situated behind the load balancer that your deployment tool talked to and that you have no security to manually update the others. You are also unaware of the impact this will have to the Fortune500 client that accesses your software remotely… totally unaware of the financial loss that is soon to come from the next seven hours of down time spent diagnosing and finally fixing the problem.

The phone call comes in just as you grab your shades ready to head out in the summer light on your way to an 11:30 dine in at the local buffet. It’s your manager on a call with the director that just got chewed by the CEO. Clueless and unaware that the director is on the line, you answer with arrogance because you two have this understanding from way back when you managed to fix a problem by remotely rebooting twelve Linux machines while on vacation in Jamaica. However the era of you saving the day have long passed (it’s all about what have you done for me lately) and he sounds unamused by the joke you mumble over the phone to him while his boss listens in… a rather serious man who has already begun paper work to hire an assistant manager who will likely assume a direct management over your department. Your manager was unaware of your plans to run the update and only found out about the fiasco after receiving a barrage of phone calls and emails which over took his inbox like angry Persians fighting the Spartans in the final scenes of 300. It’s too late to claim ignorance of the event as you’ve already sent the email company wide. It’s times like this you wish you knew more about automated integration testing. So if you wanna suck at programming, hot deploy to a production box at the same time as you claim success. You’ll only spend the next nine weeks looking for employment before taking a gig at reduced pay but the lesson will last a lifetime!