01-05-2007, 04:03 AM | #1 (permalink) |
Junkie
Location: Melbourne, Australia
|
What shoddy programming have you encountered?
I'm thinking that short descriptions are enough. Just the story, not the actual source.
For example... A bunch of 'consulting grads' were implementing a system for a major retailer. Their 'tried and tested best practice' UNIX shell routines would log entries to a database table which had a primary key of type "date" (Oracle) - resolution to the second. On the first occasion that multiple events occurred in rapid succession, the logging routine returned an error. This led to a call to the logging routine to log the error, which failed, which caused another call and so on. They were fairly unhappy about being laughed at. |
01-05-2007, 07:31 AM | #2 (permalink) |
Adequate
Location: In my angry-dome.
|
Not nearly as good as your example but primary key selection is often a great indicator. I recall Joker.com (domain registrar) uses your email address as primary for your entire account. Choose wisely. Should you ever need to change it (that never happens, does it?) you'll need to sign up for another account and go through multiple physical "letterhead" mailings to transfer each domain from your old email address/account to the new. Oh, and they're in Germany so the turn-around is glacial.
Hopefully they've changed by now, but I also recall unhappy responses to my WTF/freshman programming/alternate primary key suggestions. Too many stories... But one of my favorite incidents was caused when our team shared code with a nameless large company to help their guys get beyond some really inane race conditions generated by their in-house compiler. These were large project on both sides yet the code share was done without the usual legal/management filters. Thus nobody properly sterilized the code comments which after a couple years were littered with our project lead's (a colorful guy by any measure) vociferous rants about why we had to special-case for said software company's products, their team's certain inbreeding, you name it. Team members past and present had responded in other comments and by creative variable name choices, making the source code an entertaining if almost Lampoon-ish read. From our perspective anyway. I was very happy the transfer and fallout happened while I was on vacation.
__________________
There are a vast number of people who are uninformed and heavily propagandized, but fundamentally decent. The propaganda that inundates them is effective when unchallenged, but much of it goes only skin deep. If they can be brought to raise questions and apply their decent instincts and basic intelligence, many people quickly escape the confines of the doctrinal system and are willing to do something to help others who are really suffering and oppressed." -Manufacturing Consent: Noam Chomsky and the Media, p. 195 |
01-05-2007, 09:58 AM | #3 (permalink) |
Sky Piercer
Location: Ireland
|
The Daily WTF is a website devoted to collecting anecdotes such as these. Pretty funny stuff at times!
__________________
|
01-15-2007, 11:15 PM | #5 (permalink) |
Crazy
Location: Salt Town, UT
|
I was working for a local company, brought in to do some consulting work in PHP. Now, the guy that was there was the lone programmer in a group of graphic designers, so his code was never seen beyond him. Source control was FTP, comments were nil, and of course there was no documentation at all (not even a database diagram).
This guy had gone and implemented a CMS system that half worked, and ran it through a template engine that he wrote that barely worked. This system was slow, glacially slow. As a sole user on a pretty peppy dual proc 1ghz machine (extremely fast at the time), every page would take 6 seconds to build. I worked there for a while, and put in my time on developing some new modules for their system. A few months after that, I saw the developer of that project, and he said he found out why it was taking so long, it was running a loop, and going through about 7 million iterations parse the template file, he said that he got it down to about 2 million, and was pretty happy with that. I still can't comprehend 2 million iterations of a loop to parse through a 20-30k file. My other story is during the dot-com boom. It was a new team that had never worked together before. We were building an e-commerce system and associated website for a banner ad company. I had built some cool scripts in GIMP that used the very under utilized daemon mode that would allow users to click around on a webpage and build their banners. Well, the problem was one of the other team members, building some other part of the site. We were on a death march to finish this project, and were months behind schedule. So one day, I needed a piece of his code to work a little bit differently, so I went ahead on in and tried to make the change on my own. I was completely shocked to find the whole code littered with labels and GOTO's. GOTO's were pretty much the only method of error handling, and did a lot of the logic. The second tragedy I found in the code was the use of strcpy() to copy the CGI arguments directly in to the buffers he was using. No strlen() checks, just a direct copy into statically sized buffers. During the next team meeting, I brought this up (not mentioning the poor programmer's name, whom had a salary of just about double mine), and that programmer replied: "I didn't think we were supposed to be writing production quality code." Five months into the project, two weeks from delivery, and "I didn't think we were supposed to be writing production quality code." It really made all of those nights I got home at 5am, just to be back in to work the next morning at 9am seem worth it. |
01-21-2007, 12:43 PM | #6 (permalink) |
Psycho
|
When I was 18 my dad got me a job for a drilling company who had their own in-house software. The original programmer was actually a mud engineer with no formal education who had wanted to learn to program. He had lied to the owner of the company, saying he could write software. Once he was assigned the project of designing this particular application (cost analysis + well planning + daily reporting), he began taking night classes and buying tutorial software and books and such to learn how to code (all on the company's tab).
$275k and 5 years later, they had a barely-running piece of software written in Visual Basic with literally no GUI consistency, and a completely unintuitive method of user input and organization. The application required 14 separately-purchased ActiveX controls, the database was an MsSQL database filtered through Access, and it was network-less software, so the database had to be detached to be transferred from system to system (usually by mailing the files on a CD-ROM back and forth). Also, the source code had been destroyed because the guy was terrified about job security. I was hired to take the software and make it web-based so that they didn't have to do all the database attach/detach crap anymore. When I discovered the source code was deleted from the development system the guy had used, I had to approach the owner and my supervisor and inform them that there was no way for me to edit the existing software, and that we'd have to start anew. I finished the project in 5 months. |
01-28-2007, 03:52 PM | #9 (permalink) | |
Addict
Location: under a rock
|
Quote:
__________________
There's no justice. There's just us. |
|
01-28-2007, 03:57 PM | #10 (permalink) | |
Adequate
Location: In my angry-dome.
|
Quote:
__________________
There are a vast number of people who are uninformed and heavily propagandized, but fundamentally decent. The propaganda that inundates them is effective when unchallenged, but much of it goes only skin deep. If they can be brought to raise questions and apply their decent instincts and basic intelligence, many people quickly escape the confines of the doctrinal system and are willing to do something to help others who are really suffering and oppressed." -Manufacturing Consent: Noam Chomsky and the Media, p. 195 |
|
Tags |
encountered, programming, shoddy |
|
|