Valhalla Legends Forums Archive | General Discussion | Maintaining Code

AuthorMessageTime
iago
Since I've been working at a job, I have a huge pile of code to maintain. It was written over the course of four months by a pair of fellow students who aren't there anymore (they finished their term and went back to school).

Anyway, there is a lot of terribly written code there. A lot of it is at the point that I want to rewrite it. If I make one change, everything falls apart.

There is a class for uploading files.. basically, the file is passed to a remote computer as an array of bytes. The problem is, when the remote class is initialized, the user's id and base path are stored there, and read from there all over a different part of the program which has very little to do with that class. I spent about 5 hours today trying to get rid of storing the basepath in the class,and I gave up and restored my backup.

It pains me to have code like that, but it would take me days to rewrite it. What do others who have this task normally do?
January 29, 2004, 3:33 AM
Thing
I hire a programmer to do it for me.
January 29, 2004, 3:40 AM
Null
Iago , i am in the EXACT same situation as you are my friend , i thought about this for a little while then came to the conclusiong that it would be a waste of my time to try and re-code the whole achitechture so i just go along with my pre-desessor's crappy code / modyfying / deleting it accordingly.

there is a threshold where there code becomes to obsolete to build on then u find yourself in a pickle of a dickle. Either finding something that WILL work with their code or like i said re-do the whole achitechture.
January 29, 2004, 5:30 AM
Adron
I agree with NuLL. Do whichever is most efficient for you. Estimate how long it would take to recode/reimplement it in a better way. Estimate how much time you could save on maintenance having it reimplemented like that. If it's mostly an issue of the way it looks, leave it. You should consider the risk of bugs though.
January 29, 2004, 9:51 AM
iago
I'm thinking.. they have a 600 line file which does all sorts of file stuff, plus lots of other stuff. If we can make a seperate class for file i/o, we can probably cut that file in half and clean it up a lot. I'm going to look into that one today :/


Thing - That's what they did. And that's who I am :)
January 29, 2004, 12:46 PM

Search