views:

100

answers:

7

I was looking over some of my friend’s HTML and CSS, and I was speechless (in a bad way). If I had to work with that, such as putting AJAX into it, then it would have been a lot of work. I would have to rebuild a lot of the HTML aspects, otherwise it wouldn't work well with the AJAX.

What would you do in a situation like so? Would you:

  • Just edit at the minimum?
  • Do an overhaul and redo the whole HTML aspect?
  • Go back to the client and ask for more money because it was a lot more work than expected?

I’m interested in strategies and approaches, and how it’s done out in the field.

A: 

You could put up a requirement for what the files should look like, and not look like. It is impossible for you to do your job if the files you are working at are terrible..

I would suggest making an offer to redo it, so that both you and your client could be happy.

Don't put your name on someone else's bad work!

Edit: So yes, you should ask for money to redo at least parts of it

code-zoop
+3  A: 

Interesting question. Its hard to say really, as a general rule I'd want to rewrite it so it was valid/worked properly and was well ordered and logical.

However, if I was being paid to update a page, then I'd update the page, and recommend to the client that the HTML should really be rewritten.

9 time out of 10 though, they'll ignore that suggestion anyway, but at least I would have tried!

thebluefox
A: 

If you are going to work on an already existing code base, you cannot set the price forward, you have to analyze the thing a bit before coming to a money arrangement.

Or on the other hand you can charge hourly :)

Francisco Soto
A: 

I've had this issue crop up before - my relationship with a friend was good enough for me to tell him the truth, "your code sucks, here's why...".

Obviously you might not be able to get away with that - I'm guessing his code would not be W3C compliant, in which case pass it throught the W3C validator and show him that the HTML is not properly formatted - its a neutral point this way and a fair argument (Web Standards).

This would also help you show the client that you would need more time to reformat the HTML.

Dal
+1  A: 

I have had this problem numerous times as I am a freelance Front End Developer. What I have done in the past is, like other people have mentioned, simply made a recommendation to the client. However if it is simply untidy and not properly indented etc, I just simply use a html beautifier such as this one. Other then that there really is not much you can do.

If you are extremely pedantic about it, then well just recode it. :)

Russell Dias
+1  A: 

Depends what the client’s asked for.

I’d look to do the minimum necessary to achieve the specific functionality they’ve asked for (i.e. I wouldn’t re-write the whole thing just to satisfy my code cleanliness neuroses), but I’d try to leave whatever section of the code I worked on as maintainable as possible.

If, alternatively, the client was committed to developing and maintaining the site for a reasonably long time (I’m thinking over a year), spending a few weeks up front rewriting it would probably save time in the long run.

Paul D. Waite
+1  A: 

The answer to this really depends on your working arrangement with your client and your friend.

The temptation is really to rewrite it and also put forth a few rules for your friend to work to in setting out and structuring their HTML.

If you and your friend are working together for the client then you can't really go to the client and admit that you need more money due to the mess that your friend had made.

At best you would have to get them to agree to the work on some other pretext - such as compliance with some new standards or to allow for inclusion on some new technology or even to allow for easier expansion later - anything but "we mucked up and need more money to correct it".

At worst you'll have to take the hit and do the work.

If your friend had produced this some time ago and you are working separately then you could try to get more money, by admitting that your initial estimate was incorrect.

I would just do what changes have minimal impact on your time, but allow you to implement the changes necessary.

This is usually the case with legacy software anyway.

Just remember next time to factor in a little leeway to allow for this type of thing when estimating work.

ChrisBD