Live data from Hacker News

You Should Write Ugly Code

redotheweb.com

1–10 of 56 posts

Re: You Should Write Ugly Code

#2
You should definitely write ugly code. People pay me and people like me good money to come in and clean up your mess when adding features becomes an endless exercise in breaking things in unexpected ways for the whole team and productivity plummets.

Relevant blogpost: http://swizec.com/blog/my-very-own-daily-wtf/swizec/5829

Relevant website: http://thedailywtf.com/

Re: You Should Write Ugly Code

#3
post #2

You should definitely write ugly code. People pay me and people like me good money to come in and clean up your mess when adding features becomes an endless exercise in breaking things in unexpected ways for the whole team and productivity plummets. Relevant blogpost: http://swizec.com/blog/my-very-own-daily-wtf/swizec/5829 Relevant website: http://thedailywtf.com/

They will only pay you to fix their code after they've released their product and are selling it for a profit.

Re: You Should Write Ugly Code

#4
> the code they wrote for the sake of beauty is crap.

From my understanding, this is the crux of the article. The problem with this is the misunderstanding of why people employ patterns in programming. It's not for the sake of beauty, but because of sound architectural principles.

Maybe that's how he interprets beauty, but then using the word beauty diminishes why the code was written the way it was written. That beauty is subjective.

The reality is good code and good practices have real measurable value that mere "beauty" does not.

Re: You Should Write Ugly Code

#5
post #2

You should definitely write ugly code. People pay me and people like me good money to come in and clean up your mess when adding features becomes an endless exercise in breaking things in unexpected ways for the whole team and productivity plummets. Relevant blogpost: http://swizec.com/blog/my-very-own-daily-wtf/swizec/5829 Relevant website: http://thedailywtf.com/

They will only pay you to fix their code after they've released their product and are selling it for a profit.

Actually, I find that it's usually when the ugly code starts to cost them more. Basically, it's a car without brakes. It will get you where you are going, but it would have cost less all together if you'd installed working breaks from the beginning.

Re: You Should Write Ugly Code

#8
post #2

You should definitely write ugly code. People pay me and people like me good money to come in and clean up your mess when adding features becomes an endless exercise in breaking things in unexpected ways for the whole team and productivity plummets. Relevant blogpost: http://swizec.com/blog/my-very-own-daily-wtf/swizec/5829 Relevant website: http://thedailywtf.com/

They will only pay you to fix their code after they've released their product and are selling it for a profit.

Usually it's when they get their first non-seed round of investment and realise their product doesn't let them grow as fast as they'd like.

Products growing through sales can go without proper cleanup for decades. Friends have told me stories of single SQL queries taking upwards of 15 minutes to run (and then being rewritten in SQL+PHP that does the same in 20 seconds)

Re: You Should Write Ugly Code

#9

> the code they wrote for the sake of beauty is crap. From my understanding, this is the crux of the article. The problem with this is the misunderstanding of why people employ patterns in programming. It's not for the sake of beauty, but because of sound architectural principles. Maybe that's how he interprets beauty, but then using the word beauty diminishes why the code was written the way it was written. That bea…

In my experience, "good" code and "pretty" code are the same thing - and similarly for "bad" and "ugly". Of course, when I say "pretty", I mean well laid-out, properly documented, non-spaghetti code. I've spent far too much of my time tearing out thousands of lines of "bad" code that wasn't written in a way to allow for easy changes.

Re: You Should Write Ugly Code

#10

Earlier quoted context omitted.

They will only pay you to fix their code after they've released their product and are selling it for a profit.

Actually, I find that it's usually when the ugly code starts to cost them more. Basically, it's a car without brakes. It will get you where you are going, but it would have cost less all together if you'd installed working breaks from the beginning.

To use your analogy, is it better to have a car with no brakes now, or to save up for another year to buy a car with brakes? The problem with the analogy is that it's _obvious_ that you should save up another year because of the danger.

But in startup-world, it's not obvious at all. To really abuse your analogy, if you're being chased by wild hungry bears, you don't care whether the car has brakes.

Post reply on HN