Recent Articles

Nov 2012

Free Magazines!!

by in Error'd on

For Brent, the offer of a free magazine subscription is a pretty good draw. Sadly, he wasn't too thrilled by the number of available choices.


Superhero Wanted

by in Feature Articles on

A curious email arrived in Phil's Inbox. "Windows Support Engineer required. Must have experience of the following:" and then a long list of Microsoft products.

Phil frowned. The location was convenient; the salary was fine, just the list of software seemed somewhat intimidating. Nevertheless, he replied to the agency saying that he was interested in applying for the position.


The New TODO and More

by in Coded Smorgasbord on

While wading through hundreds of disallowed implicit casts and such from turning option strict on for a large project, Tevildo came across this little gem.

Sort of like Visual Studio's comment tasks except potentially visible to the user. Who knows, it might actually get attended to if a user reports it as a bug.


LOGON.EXE

by in Feature Articles on

Companies beyond a certain size all follow the same basic pattern. Where possible, everything gets centralized in the global office- email, web servers, Active Directory, etc. They dictate policy and then leave it to the extremeties to solve their own problems within the corporate boundaries. Al worked at a factory, supporting their production management and chemicals management software- things that couldn’t be centralized.

Each day, when Al logged in, his computer greeted him with the standard warning message. “This computer is private property, and its use is subject to our IT policies (123.6, 216.2, and 551.A), and if you’re caught using it for porn or pirated software we will fire you so fast the unemployment line will be blueshifted.” Each time, he ignored it and clicked “OK”.


IInceptionFactory

by in CodeSOD on

The Factory pattern is an excellent way to solve a variety of programming problems using an object-oriented language. It’s a simple pattern, but for some developers, not quite simple enough. Den found this interface :


            

TestCfg is a Required Field

by in Error'd on

As if trying to navigate HR related websites isn't hard enough, Ned Wheeler was trying to log into his employer's HR website when he was greeted with this.


Classic WTF: Cursed and Re-Cursed

by in Feature Articles on

It's Thanksgiving here in the US, so we're taking the day off! So, here, enjoy a classic. Cursed and Re-Cursed was originally published on May 7, 2009.


Graham K. was working for an atmospheric chemistry research group in a university in Wollongong, New South Wales, Australia. They'd been running a field experiment in sugar cane fields on a government research farm that was roughly 1500km (~932mi) away in Mackay.


Code Comedians

by in Coded Smorgasbord on

When it comes to bad code, everybody thinks they’re a comedian. Heck, look at us! Stupid programmer jokes are a game everyone can play, though, so let’s enjoy an evening at the Improv with some code comedians.

Brian sends us this enum, which I’m sure was very funny back in 2007.


Your Standards Are Too High

by in CodeSOD on

During his interview, Michael was asked what his coding pet peeves were. Things that, as a developer, really got under his skin.

Michael replied with the best answer he could think of. "I hate working inside of sloppy code. I think that it's best to spend time coding up front to save yourself from headaches down the road."


PHPTXTDB

by in Feature Articles on

College radio stations are small, but highly technical organizations. The era of the scruffy stoner spinning disks and mumbling into a microphone have been replaced by software systems that manage the station’s programming around the clock, and play recorded segments of scruffy stoners mumbling into microphones.

Kyle was the “tech-guy” at one station. Like any other small organization, the job involved doing anything from desktop support to server administration and some basic programming on the side. To keep the station’s website up to date, Kyle’s predecessor, Chad, had built a home-grown CMS-like system. Everything done by the station ended up there, in one form or another: photographs of every event, recordings of every interview, calendars and set-lists. As the tech-guy, Kyle put all of the data into that system.


Captcha'd - Beware of OmenCat

by in Error'd on

Sandra wrote, "I love cats, but I don't want any part of this freaky demon cat captcha."


The Overloaded Time Table

by in Feature Articles on

A few years ago, while on a SQL Server data warehousing project, my project manager sent me a request - create a table with all kinds of information based on a given date. You know – given a date, be able to figure out day of the year, day of the week, month, last business day of the week, and so on, making sure the table stores enough dates to keep it maintenance free. Oh, and one more thing, it’s going to be linked off of the already complex star schema that we were developing for. Why? For reporting purposes of course.

Thankfully, I was able to talk my way out of it by explaining how SQL Server has built-in date functions that can do the job on the fly and that if I were to make that table, I’d have to go through the trouble of writing a bunch of date-related code anyway. However, the original developer for the database that Terje Nilima Monsen works on, must not have been as lucky as I was.


But...Anything Can Happen!

by in Feature Articles on

Every developer eventually breaks something in production. Whether by negligence, ignorance, or just plain bad luck, it happens even to the best of us. "Oops" moments like these are the ones we learn and grow from. The broken thing gets fixed, some data may or may not get cleaned up, and everybody moves on a bit for the wiser.

Unfortunately for Matt, he doesn't get to take a mulligan; he works in the industry where bad code might not cost just money and time, but lives as well. His organization has a very good reason for putting in place a strict code review process ahead of every promote.


Excel-lent Design

by in Feature Articles on

The user’s incident report did not contain the most useful description of the problem. “The calculator always outputs zero,” it said. Fortunately for Aram, he had a little bit of an idea of the context, and he knew that the issue was in the Customer/Regulation Administration Processor.

That name was a collective label for a suite of web applications, web services, and client pieces built around managing business process data for dangerous-goods regulation. The original design had been a bit of a mish-mash, and for the past year or so, Aram had heard that the core developers were gradually migrating it to a more SOA implementation.


Battleship Booleans

by in CodeSOD on

Barry’s first problem with the code was the use of magic numbers. If the application state variable held “127”, it then certain buttons would be enabled, but if it were “54”, then they should be disabled.

This led to all sorts of rules about combinations of magic numbers, some of which were more obscure than others. A huge library of methods arose to parse them out and derive simple true/false expressions based on combinations of magic numbers.


Unbox Can't Math

by in Error'd on

"Let's see... 580 GB free, 309MB used by Unbox, and -580 GB used by other files. Sounds about...right!?" writes Geoff.


The Prime Candidate

by in Tales from the Interview on

Some years ago, Phil B. invited a promising looking candidate for a developer role to come in for an in-person interview. The candidate in question, Boris, had a very impressive resume showing plenty of C and embedded systems experience; however, upon his arrival, it was clear that his communication and interpersonal skills left a little to be desired.

It wasn’t that Boris was rude or unprofessional, instead it came down to the fact that he was really, REALLY nervous. Throughout the interview, Boris sweated, fidgeted, stumbled with his answers, and eventually asked to be excused for a moment.


Psychic Code

by in Feature Articles on

Like snakes and mongooses , QA and developers are natural enemies. Through an unfortunate series of events, developer Bridget found herself working on a QA team. She was deep in enemy territory, and not full prepared for the rigors of QA, so she focused on her core developer skills. She helped the testers automate things.

“Well, we already have automated scripts,” her new co-worker, Jim, said. “We just… well, we only use them for really big regressions.”


Wordy Invoice

by in Feature Articles on

The daisy wheel stabbing at green-lined sheets could have been Satan’s fanfare, but Andy was long accustomed to tuning out ambient printer noise. It was 1982, and he spent most of his time before his Commodore PET 4032, churning out useful things in 6502 Assembly. Most of the code was for printing invoices, much like customer invoice currently printing and making all of that racket.

A sudden cloud formed over his desk. Once Andy clued in to the shadow overhead, he glanced up to find the new regional sales manager, Rick, accordion-folded printout in hand.


Truth or Sim

by in Coded Smorgasbord on

A huge number of the bad code submitted to TDWTF is related to dates. This isn’t all that surprising- dates are very complex data structures with a vast number of possible representations and huge cultural variations.

I have no idea what the excuse is for all the bad code relating to booleans. Today, let's take a moment to explore some philosophy, and see if we can understand what truth really is.


Øredev, NLUUG, plus Amsterdam and London Get-togethers!

by in Announcements on

I'll be in a few places in Europe these next two weeks, and would love to meet up with anyone who's available.

Øredev 2012 (Malmö, Sweden)

I feel bad for not mentioning Øredev earlier (so you might actually be able to plan attending), but it's a world-class software developing conference with great speakers including Billy Hollis, Lisa Crispin, and Brian Foote. And, for some reason, I made the list and will be giving a talk on Ugly Code

NLUUG Fall Conference 2012 (Ede, Netherlands)


A preSCRIPTion for Errors

by in Error'd on

Bob P. received this validation error from a Merchant Account application for a company that returns pre-SCRIPT-ion medications for the pharmaceutical industry.


The Frankenserver

by in Feature Articles on

Credit: http://www.flickr.com/photos/tom-margie/1538944466/sizes/s/in/photostream/; twm1340@Flickr "Hey Ryan! Glad I got ahold of you, have a minute to lend a hand?" spoke a surprisingly jovial voice on the other end on the NOC’s emergency support "bat phone". It was the company's email admin, Jeff.

"Sure! Hang on a sec." Ryan panted before frantically stabbing at the phone's mute button as if he had just been caught slacking. After finding his notebook and pen, Ryan unmuted his phone and told Jeff to continue.