Jake Vinson

Oct 2008

One In 3.4*10^38

by in CodeSOD on

Jonathan did a double-take when he glanced over this function:

Public Sub KillTheChildren()
   Dim objIntegrationAccount As IntegrationAccount

   For Each objIntegrationAccount In mcolItems
      Set objIntegrationAccount = Nothing
   Next

   Set objIntegrationAccount = Nothing
End Sub

Persistence is Key and The Nightmare Dream Job

by in Tales from the Interview on

Persistence is Key

After two years, Thomas B. had become somewhat bored with his job. He was the first developer the small TV station had ever hired, and while he enjoyed building a PHP-based CMS that they'd use internally, over time his job had essentially been reduced to babysitting the web site. He accepted another offer and told his boss about his plans to leave.

Since the CMS had been built from the ground up and Thomas was the only one who knew everything about the system, he was an integral part of the interviewing and hiring process. His boss delivered him six résumés and told him that all six of those candidates would be in that day. Thomas hadn't been given much time to review the résumés, so he just had an opportunity to skim them before the first candidate arrived.


Where'd param3 Go?

by in CodeSOD on

When I'm creating a function, I try to make sure it passes two simple tests:

  1. Using the function should require less code than just duplicating what the function does, and
  2. whatever the function does shouldn't be the same as a built-in operator

That said, this code that Paul G. sent in doesn't meet my criteria.


The Ralph Code

by in Feature Articles on

Ralph's rage was the stuff of legend – and it was equaled only by his anal-retentiveness.

Ben had heard horror stories about Ralph and shrugged them off as exaggerations fostered by years of oral tradition. If the rumors were to be believed, Ralph could breathe fire and was the height of three men. Probably the stereotypical Nick Burns-esque IT guy, he reasoned.


No Peas for Me, Thanks

by in Error'd on

Matt K., I really hope you didn't eat these.


Extensive Date Parsing

by in CodeSOD on

If I had a dollar for every time I've seen someone doing custom date and time parsing, I'd have somewhere between eight and ten dollars. It's just not something you see much of these days. All major programming languages have built-in support for parsing dates, times, currency, etc., and programmers are pretty good about using them.

When I have to parse a date, I take the simplest approach I can – something like Date.Parse(dateString). This is because I am a programmer and not an engineer. An engineer on Benjamin B.'s team uses a different approach. It works incredibly well! It says so right in the snippet below!


The Receptionist Test

by in Tales from the Interview on

"When you work in computing services for a university, you spend about as much time on high-minded development as you do un-jamming printers and resetting passwords for faculty," Ed G. writes. "It's not ideal, but it's a living." It was time to get some new staff, and after being burned by some previous employees that could talk the talk, but not walk the walk, they devised a new litmus test for potential hires, called "The Receptionist Test."

It's quite simple, really. When an applicant arrives for an interview, (s)he spends at least five minutes waiting in reception. During this time, the receptionist stages a minor tech support problem and asks for the applicant's help.


Math.Min(x, x - 0) = ?

by in CodeSOD on

Call it confirmation bias, call it superstition, but as developers and human beings, we're all susceptible to it. Say you're working on a particularly tricky bit of code, so you've fallen back on the "try all kinds of crazy crap until it passes the specific test case" method, an invaluable tool for all developers. You find an approach that works, and while you're not sure exactly why it worked, you keep it in mind for the future.

In Robert L.'s case, he found the snippet below:


The Blight

by in Feature Articles on

Photo Credit: sparktography @ Flickr It was 11:30 in the morning, and Dante (as we'll call him) was more than ready for lunch. His stomach let out a low growl to remind him that he'd skipped breakfast and had a light dinner the previous night. Embarrassed, he leaned forward to stifle the growl. Just 30 more minutes. Dante wished he could go to lunch right then, but his colleague that he was going with was in a meeting until noon. He tried to keep his thoughts on other things, but couldn't stay focused. His pencil cup looked like it was full of pretzels, his wall clock looked like a cake, and the nearby receptionist looked like ham. His hallucinations were interrupted by the phone.

"Yeah, Dante, this is *SNORT* Earl. Gonna need you to *HACK* come down by my office for a bit." His caller then spit what could only be described as a phlegmy disaster. The kind of horror that defies otomotopeia.


Yo Ho, Yo Ho, A Pirate's Life for Lee

by in Feature Articles on

Survey Time! Please take a few moments to fill out the brief The Daily WTF Reader Survey. Thanks!


On Steve J.'s second day on the job, he wasn't quite sure what to make of Lee. Steve had only briefly met Lee the day before while he was getting his first day rites of humiliation — awkward introductions to all sorts of people with the typical mutual feigned interest. Lee was different, though. Lee's back was to them, he had a pair of headphones on and was nodding his head to the beat, gently drumming his fingers on the keyboard.


Anatomii of a Hack

by in Feature Articles on

In the 1980's we loved Nintendo. And even better, in the 1980's Nintendo loved us. They gave us games, we played them. They gave us cereal that was basically Kix with fun Nintendo-themed boxes, and we ate it and pretended to like it. They gave us movies like Super Mario Bros., widely considered the greatest film in the history of filmmakingcitation needed. We watched the cartoons, learned how to Do the Mario (ideal if the Macarena is too complex for you), slept in the sheets, memorized the codes, subscribed to Nintendo Power, and hooked up all manner of ridiculous equipment to our TVs.

Lately, though, Nintendo has all but turned its back on us. Mainstream acceptance of the Wii has resulted in less core games like Pikmin and F-Zero, and more casual games like Big Brain Academy, WiiFit, Babyz Party, and Bob Ross Painting. And seriously, who wants those? I'm pretty sure the Big Brain Academy isn't accredited, we're not 40 year old women, parties attended only by babies are just awkward, and Bob Ross... actually, that game sounds pretty rad. Still, Nintendo hasn't been servicing the core gamer as much as they did in the SNES days, so many of us have moved on to the Xbox 360 and the PStriple. Hector Martin, however, is more ambitious, and set out to do what any real geek would. Try to hack the thing!


A Low-(null) Diet

by in Error'd on

Eric Lizotte's wife bought some granola from Wild Oats because it fits in to their low-null diet.


Won't Somebody Please Think of the Children?

by in CodeSOD on

I can't imagine a world without content filtering. Just think of all innocent children, parents, and grandparents that would be irreparably harmed from seeing those certain vile combinations of letters that we call "swear words." While I've been forever changed by seeing such words, I long for the days when I thought that "f...ing" was just a short way of writing floccinaucinihilipilificating. And I truly believe that it's my duty to protect the innocent from being exposed to those dastardly words and let them believe that an f-bomb simply refers to a friendly-bomb, as in, a shower of hugs and kisses.

Paul G. is in a similar position. When their application was moving to a new architecture, he was in charge of migrating the content filtering code. Since he hadn't had to look at that code in a while, he searched the entire codebase for the regular expression "f..king." OK, fine, he searched for the actual word; I'm just pulling it out for those of you with content filters at work. Anyway, his search led him to the following:


Routers, Routers, Everywhere

by in Tales from the Interview on

CommQuack hires like crazy. They hire in good times, they hire in bad times. They hire before, during, and after periods of massive layouts. Only one department was sheltered from the endless churn of hirings and layoffs — HR. For a company of ten thousand people, the fact that one thousand of them worked in HR should tell you something.

And the HR staff was busy. Résumés came in by the hundreds, and those that weren't referrals from existing employees were fiercely fought over so that the first person to grab it could claim the bounty. The HR staff were paid near-minimum wage rates, and like time-share salesmen, they were paid primarily on commission. Each referred employee that turned into a hire netted the referrer a cool $5,000.00. The upshot of this is that this meant that if you were qualified but not referred by someone in HR, you didn't get hired. The upshot of this is that a lot of unqualified boobs got hired. After interviews from HR, the candidates would be sent to the departments they hoped to work for, which meant that Grig L. had to conduct many of the interviews.

The Applicants


Out of All the Possible Answers...

by in CodeSOD on

 

"When we interview people," cablecar wrote on the Sidebar, "we give them simple programming tasks to test their ability. The below code was an attempt to solve a problem I found on Project Euler. It's from a candidate for a senior development position with '10 years of PHP' experience.


Code Dendrochronology

by in CodeSOD on

As the seasons change and years pass, trees accumulate rings that can be used to determine the age of the tree. This is a result of seasonal growth — the inner section of each ring is formed in the early part of the rapid growth season; this wood is called "early wood" (*snicker*). Then as the temperature changes and growth slows, the darker outer portion of the ring forms ("late wood"). And who can forget the classic scene from Vertigo in which Kim Novak's character hints at a passion for dendrochronology as she finds the years of her birth and death on the rings of a tree. Why do I bring this up? Because seeing bits of the past frozen in time is fascinating.

Nathan B. was called for help when an internal Access application was hanging. After some tinkering, he found that it wasn't hanging, as three reports had successfully printed and the fourth was on its way — it was just taking three times longer than it usually did. Sadly, the reports had to be done that day, and at this pace, they'd still be printing until 6:00 the next morning.


A Completely Different Game

by in CodeSOD on

For several years, Clint's company has been working on a game that's undergone several engine and tool changes. And I'll stop you right there- it's not Duke Nukem Forever because this game exists, and has been released.

If you've ever seen or worked in a codebase that has seen significant change, you know that the replaced component is seldom completely exorcised. Little hooks from it remain in some random function that need to stay there or else everything breaks. To give you an idea of some of the changes this game's codebase has seen, have a look at this:


Meet Burt

by in Feature Articles on

"Root beer guy." That's what Dale had always called Burt in his internal monologue. He occupied a similar space in Dale's mind with "Too much makeup" lady, "I always go tanning" guy, and "I always talk about horses" lady. Burt was one of the ever-present background characters of the office, his only differentiating trait a bottle of root beer. And even though he was a net-admin and Dale worked helpdesk, their paths had never really crossed.

That all changed one day when groups from the two departments went out together for lunch. This moniker Dale had assigned to Burt was reinforced when the both lined up when they were about to buy their tacos. "Anything to drink?" the taco-hawking seductress asked.


The Substandard Standard

by in CodeSOD on

Michael F. arrived to an ugly sight — an inbox full of messages with the same subject line. "ERROR: Invalid data near '<Carrier '" And that could only mean one thing. The shipping software company had released a patch to their web service. Having suffered through updates of ClearPath Logistics' software before, he knew exactly how this was going to go.

First, he typed up his usual message that boils down to (and I'm paraphrasing here) "WTF?" He had a contact, Dogan, that he usually alerted when their patches broke things.