![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
Join Date: Jun 2007
Posts: 93
Rep Power: 2
![]() |
Messy Code - To refactor or not to refactor
I'm in a sticky situation right now,
A new project I took on recently has some really, really bad code.. which is saying something since this is only html. There is so much mess it would take me about a week to completely refactor the webpage from the ground up. The other option is to add to the messy code - and make it even more messier. I know it's bad practice to add to bad code but if i have to refactor the code I'll probably loose my client.. Is it acceptable to add patches to the code to band-aid the situation and later on refactor the site when I have time? |
|
|
|
|
|
#2 |
|
Hobbyist Programmer
Join Date: May 2006
Location: West Jordan, Utah, United States
Posts: 176
Rep Power: 3
![]() |
Re: Messy Code - To refactor or not to refactor
It's up to your client. You work for them, so you can explain the situation. They pay you, so if they don't want you to refactor, you shouldn't. When I disagree with my boss/client/teacher, I mention in the comments what I intended to do. That way, the next programmer doesn't think ill of me. In the end though, the client decides the best use of their money.
|
|
|
|
|
|
#3 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Re: Messy Code - To refactor or not to refactor
If you're going to lose your client over a weeks worth of work, lose him. Next time pick a client who wants good work, not one who wants to pay you less than a McDonald's burger-flipper.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#4 |
|
11 years old
Join Date: Nov 2007
Posts: 79
Rep Power: 1
![]() |
Re: Messy Code - To refactor or not to refactor
Refactoring is a good thing; get into the use of it.
__________________
iload_0 iconst_1 ishl or iload_0 iconst_2 idiv or iload_0 iconst_2 iconst_1 imul idiv [1] & [2] use the smallest stack size |
|
|
|
|
|
#5 |
|
Programmer
Join Date: Jun 2007
Posts: 93
Rep Power: 2
![]() |
Re: Messy Code - To refactor or not to refactor
I took DaWei's advice and detailed the problem I had, they didn't want to hear about it so I've ditched them.
Probably better off I dropped them anyway. Thanks for the help. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Viewing VB's Automated code | john Wesley | Visual Basic .NET | 3 | Jun 8th, 2006 5:37 AM |
| FTP and return code fetching | Serinth | C | 2 | May 28th, 2006 11:05 PM |
| String to Morse Code - Copying from string to string | Xenon | C | 29 | Nov 10th, 2005 2:30 PM |
| Code Reading Tips | linuxpimp20 | Other Programming Languages | 4 | Sep 8th, 2005 3:53 PM |
| Code suggestions | Mad_guy | Perl | 0 | Feb 18th, 2005 10:31 PM |