Quote:
Out of curiosity, does the application show other signs of being sloppily written?
Oh, it's horrible. No documentation. Several methods over 1,000 lines. Poor comments. No bug tracking. No testing of any kind. Global variables. Inconsistent variable naming, including a SQL call called "stupid2". Inconsistent formatting. No constraints in the database. Repeated data across several tables in the database. And to top it all off, has a nice for-switch loop. I laughed when I saw that post on thedailywtf. I cried when I saw the same construct in the code for real.

The process for this was that the users said what they wanted, the programmer coded it, they deployed it, realized it wasn't quite right and went back to the programmer with a new request. Lather, rinse, repeat. The funny thing is that the business partner proudly proclaimed this as an intelligent way of developing software. I informed him that that was NOT the way I developed software and that the code showed sloppy marks all over it. I actually printed out one of the methods and showed it to him and explained why it was so bad. He seemed convinced by the end of our conversation.

I knew the code was bad going into the job- they hired me to rewrite it, and for good reason. We are going to use a full SDLC this time around- I won't do it otherwise, with proper requirements, documentation, code reviews, and unit testing. Of course, the business partner insisted we fix a few bugs in the existing application first, which was not unexpected. I'm a realist and know how these things go. Though if we don't get to the re-write in the next six months I'm moving on.

The events of this week will change things dramatically, however. I will NOT make changes to the wrong source code without some way of verifying what the real behavior is supposed to be before deployment. And that means having regression tests. It'll take months to create those and a significant amount of user time- even then we'll have to modify whatever code we have to make it work right. Tthe business partners will not be plesaed with that timetable so I'm hoping that the they will see the light and greenlight the rewrite instead of spinning our wheels on this awful code.
_________________________
-Jeff
Rome did not create a great empire by having meetings; they did it by killing all those who opposed them.