Dilettante dev wrote rubbish, left no logs, and had no idea why his app wasn't working
Self-taught coders who work in HR and have a doctorate in English tend to do that
On Call Bosses often ask IT pros to clean up messes made by amateurs, and in this week's On Call – The Register's reader-contributed tech support column – we have just such a tale to tell.
We'll Regomize the source of this story as "Bryce," who told us about an experience in the late 1980s when he scored a job working as a developer on Pick OS, a hybrid OS/database that had a decent following in the minicomputer age.
Just three weeks into his new job, Bryce was sent from his home in Toronto, Canada, to fix a client's system in Vancouver – thousands of kilometers away on the other side of the country.
"The client's data reporting system wasn't working, but it was required by the Canadian government," he told On Call. Bryce was given a week to sort things out, as the customer was threatening to invoke penalty clauses and cancel contracts if a fix was not found. Fast.
No pressure then.
Before leaving, Bryce tracked down the developer who wrote the broken app and asked for some troubleshooting advice.
"If I knew what was wrong, I'd have fixed it," was the reply.
Bryce finally got in front of the offending machine on a Monday and found "spaghetti code, no logs, and a disastrous design. Just two tables, one with 220 columns, the other with five."
Why had the developer written such rotten code?
Because he was really an HR consultant with a doctorate in English lit, and had taught himself coding to write this app.
- People find amazing ways to break computers. Cats are even more creative
- Techie solved supposed software problem by waving his arms in the air
- Techie diagnosed hardware fault by checking customer's coffee
- Need a Linux admin? Ask a hair stylist to introduce you to a worried mother
On Tuesday, Bryce found and downloaded documentation (over FTP!) that helped him understand the required data structure and tried to map it to the schema. "Our system's logic was so bad I spent the day trying and tracing with virtually no progress," he admitted.
With the clock ticking, and the consequences of failure never far from his thoughts, Bryce started Wednesday by reviewing the documentation.
Not long into that effort, he noticed it contained an executable, tested it, and found that it produced perfect reports.
By lunchtime, Bryce had written a tool that bypassed his colleague's dreadful code, and it worked so well he showed it to the client.
"They ran a test and got flawless reports," Bryce told On Call. "They were very impressed that I'd fixed the bug and improved the report formatting to perfection."
Bryce didn't explain how he did the job, but did leave an explanation in the code for the next developer who would work on this system.
On Call often ends with contributors going unrewarded.
Not Bryce. "My boss was so happy, he told me to enjoy Vancouver through the weekend," he told On Call.
Who was the least qualified person you've had to clean up after? Click here to send us your story, so we can make it presentable to other Reg readers on a future Friday. ®