views:

503

answers:

10

My company is following a bunch of clients and one of them has a terrible legacy website from another century. We did some updates on it and we are in charge on maintaining it even if we didn't created the website in the first place.

Code sample?

<TABLE bottommargin="0" topmargin="0" rightmargin="0"><tr><td><br><br><table> <tr valign="top">
  <td align="left" width="13%" valign="top" colspan="1"><p>Address&nbsp;&nbsp;</td>
<td align="left" valign="top" colspan="2"><input type="text" name="address" size="20%" class="forms" style="paragraph.css" tabindex="3"></td>
   <td align="left" width="25%" valign="top" colspan="1"><p><font color=RED>*</FONT> Date of Birth(MM/DD/YYYY)</td>
<td align="left" width="39%" valign="top"  colspan="1"><input type="text" name="DateofBirth" size="20%" class="forms" style="paragraph.css" tabindex="9"></td></tr>
</table>
</td></tr>
    </TABLE>

... not fake.

I've seen up to 8 nested tables to handle the simplest design.

The backend is a weirdly design access database connected to a classic ASP application that is really really WET. The database is filled with corrupted data. The dates are not real dates but strings, so the system is parsing them in order to sort!

It's just pure madness.

The client keeps on asking for new features and every time we do it using terrible hacks. Seriously, I'm ashamed of the code I have to write, but there's no other way since the system is not meant to evolve like this.

I do refactor some pages as I go when this is possible, but what the website needs is to be re-done from scratch. And of course I can't spend too much time refactoring since I need to add the functionality as fast as possible.

The problem is that the client don't want to. They rather spend a lot in maintaining this than spend a little more and get a new website. In 5 month they spend like 40% of what a complete redesign would cost.

This is the kind of client that don't want to understand that, even with a website looking ok, the code could be totally wrong and bad. They don't think ahead, and if I keep on having to maintain this website I think my head will explode within 2 months.

We've tried a lot of methods explaining why a redesign is necessary but they just don't listen... Stop to support the website is out of question since the company I work for don't want to lose this client.

Do you have a killer idea that would convince them right away? What would you say/do in such a situation?

+3  A: 

Have you considered turning down business?

As long as you continue to patch it, they'll continue to ask you to patch it. As long as you tell them how bad it is, but keep delivering at the agreed price, it will continue to continue.

You could be better off this way. How successfully do you think you could spec and deliver a new site design at an agreed price? And then continue to be stuck with supporting a great piece of software to a miserable customer?

le dorfier
The CEO wants to keep them as customer for some reason. I guess they are still paying us and saying "no" just for the sake of the developer's brain is not a valid option ^^
marcgg
+1: Since you're clever, you are your own enemy in this. You have to start refusing to do things because "it would break", and "we can't maintain it" and charge fees accordingly. You are making it so that there is no cost to the complexity.
S.Lott
Then the CEO probably needs to accept the fact that it's loss-making business or else have a showdown. Nobody is winning now, not even the client.
le dorfier
These updates do make money, right now, until everything breaks... but this is harder to estimate.
marcgg
Your direct customer is the CEO. Make sure he understands/bears the costs associated. Don't shy away from telling him simple features will take five times longer on this project than normal. Tell him other projects will be delayed while you work on this. When recording your time against the project, spare no detail, etc. If your company feels the pain, they'll pass it on to the customer who in turn will learn to value the quality of their code (or look elsewhere for slave labor).
steamer25
+11  A: 

We had a similar situation with a client asking for lots of innovative features that weren't easy to implement with the existing code base. So after two years of them not doing anything we did a three week sprint (on our own cost, which they then paid for) and built the base to show off all the features they wanted. They have now started a full rewrite of their site.

David McEwing
+1 - Bingo! Embed a rewrite into the cost somehow / somewhere. It's hard to do for some clients, in that case, either turn down the business or clam up.
billb
This is usually the only way to convince them. Very risky though. +1
Spencer Ruport
please check your spelling next time.
Malfist
@Malfist: You are not one to talk at all. Just edit the post, no need to be mean about it.
Geoffrey Chetwood
Malfist: No need to rag on another user because you went and cleaned it up.
TheTXI
+5  A: 

Just show that each time the request a new feature for a horrible mess of a code that it is going to continually take longer and longer to implement until the code is refactored.

Netscape at one point threw out all their code and started again from scratch and it was basically what killed them. I would recommend against throwing everything out and just refactoring A LOT. It will be faster (what the client wants) and probably easier for you (what you want).

Plus when you do the redo, it's always easier to add new features then so make sure the customer knows this so they can get new features in at a prime time.

Businesses are interested in the bottom line. You have to show them that the cost of you refactoring and later implementing new features will be less or nearly less than want it would cost for the increased development time for the current situation. i.e. if it takes 30 hours to reimplement the design and (just throwing out numbers) another 3 hours per feature OR if you don't refactor it will take 6 hours of development time per request plus whatever the time is increased by for added complexity. Then show them where if you request X number of features, it will cost less to do it when refactored than it would when it's not.

Malfist
At this point it's not only a matter of refactoring. If you saw the architecture and code you'd understand why redoing from scratch is required... and imho, faster
marcgg
I have to side with @Malfist here, please check out Joel's article on this very topic: http://www.joelonsoftware.com/articles/fog0000000069.html
Michael La Voie
Then tell them that! Tell them you're wasting X number of contracting hours because you won't let us redo the software and it's costing you Y number of dollars per hour to waste.
Malfist
If redoing it from scratch is faster, then do the analysis and make the argument in terms of hard numbers. Armed with some good ROI analysis this could be a great sales opportunity and a win-win for all.
James Conigliaro
+3  A: 

Just bring out numbers. There is nothing a boss likes more than revenue. Don't show initial expenses. It will always be more on the short time. Try to put together estimates for the next 5 to 10 years. Those numbers will end up showing a reduce on their expenses.

In the end, the only language your superiors or their clients like is $$$$$$$

Maintenance for one year of current < Refactoring expenses for the first year alone

But...

Maintenance for 5-10 years of current >(>>>>>) Refactoring expenses after 5-10 years.

Once again, just talk numbers. All you have to do is prove your case.

Jericho
+15  A: 

It all boils down to ROI to the client. If you can genuinely and objectively illustrate that the cost of maintaining the application in light of the updates that your client wants and or the cost of dealing with potential risk will be more expensive than the cost of performing a rewrite then you can usually get buy in. You do need to present the ROI analysis in a format that is understandable and clearly objective.

Ultimately, the client isn't going to care if you are embarrassed by writing the code or even if performing the work gives you a migraine headache. Your client will care about cost savings, risk mitigation, and time to market.

James Conigliaro
We tried explaning that to them, but it seems that they don't have a long term vision
marcgg
Have you done a formal ROI analysis or have you just tried explaining the issues to them. I've run into this a lot and once we put together some good strong numbers illustrating the expense of continuing down the current path, we were usually able to sway them. We also made sure to have a sales rep leading those discussions because ultimately, this is a sale you are trying to make.
James Conigliaro
If you keep making changes without adding cost, you're defeating any ROI analysis. You need to start charging more money for maintenance as the code gets worse.
S.Lott
@S. Lott I agree but only partially. You start charging more because you will be continually putting in minor improvements in every code you touch ... you shouldn't be the one getting the code worse. That said, the code might already be too messed to make the features being requested in reasonable time, that needs to be considered in the price, I am sure they don't want to charge less for more work.
eglasius
+3  A: 

Good luck with this one.....I don't think you are going to make headway. If you don't want to work on the code, I would walk away. The simple truth is that the code works as far as they are concerened. Rewriting the code is a convenience to you without them getting any benefit. It sucks the position you are in, but I guarantee that is how they see it. ROI really is the only way to approach it, but I am going to guess that you are low in your estimation as to how much money it will cost them (or you if you fix bid it) to rewrite the site. Rewriting something is always a major undertaking.

Playing the devil's advocate. I am not saying this is true in the least, but this is one way they could counter your ROI: The counter argument to your desire to rewrite is that maybe you are charging them too much if they need to pay you to rewrite the site to save them money. Your necessity to rewrite the code shows that maybe they need to find someone with a stronger skill set or you should drop your rates.

Kevin
+3  A: 

From the corporate point of view, you point out that the codebase is deeply flawed by charging more to change it, and offering to clean it up for a reasonable amount of money. That's how to convince the client (or, at least, if the client is not convinced you get a lot of money for unpleasant work).

You may have trouble convincing your higher-ups. Try to quantify the issues as much as possible. Document as accurately as you can how much extra time and effort it is to change this codebase, and provide an accurate an estimate as possible for cleaning it up.

Talk to your boss about your dislike of working on that codebase, if you have any sort of good relationship. Your boss may be able to help in doing the above. In any case, you might get some assistance, so your head will last most of the rest of the year without exploding.

David Thornley
+4  A: 

I agree with the cost approach. Tell them that well-structured markup can reduce bandwidth costs, improve usability and allow their website to reach more customers. Log your hours and let your boss know how much time these enhancements are taking up. Demonstrate for him that if the site was redesigned, you would be able to log less hours and get more done faster.

Show them numbers that prove a redesign is worth their money. If you can't do that, you're just complaining that you have to work with a poor code base, which is irrelevant to them and everyone else more or less.

Money talks.

iddqd
+3  A: 

Make sure they understand (read: bear) the cost of working on the existing code base. I.e., CHARGE them according to how big a migraine it gives you. BILL every second of the five hours* you spend implementing feature X that would only take five minutes if things were well written. Subcontract a high-school kid who's interested in learning code to do whatever menial stuff you can't quickly automate and MARK UP their time 20% (don't forget to to include overhead costs--accounting, facilities, taxes, etc. before the markup).

If the client is convinced, great! If not, they'll either take their monstrosity to some charity or you'll have a new lucrative line of work.

*Some of this time should be spent refactoring the relevant parts into maintainable code.

steamer25
lol, I like the idea of getting a high school kid ^^
marcgg
+2  A: 

ROI tells that if you invest this ammount, you'll get this ammount as payback in this timeline.

If ROI doesn't work... then maybe the calculations of costs of maintaining the current site might convince. So additional reason:

If you don't rewrite the site, the maintenance will cost you this ammount over this timeline.

Cătălin Pitiș