Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Maybe because it's Friday night, you want to go home, there's one more test to fix after a long day of work and you don't have time to pull out the perfect design.

Or the code is already ugly when you start touching it, your manager is assessing your performance based on features. Any time spend on refactoring is time you're no shipping features (worse, you may introduce new bugs). So you add your feature, making the code even uglier.

Or of course, the person who wrote the code was not very skilled.



or you just need to ship something fast but never get time to "make it right"

there isn't a lot of value in clean code beyond making it easier to maintain. it can be argued that clean code over time makes code safer by way of improved maintainability (which is true), but 99% of the time, customers won't buy software because of how clean the internals are.

meaning: if a customer is willing to commit to purchasing your widget or your competitor's for $LOTSOFMONEY if a single feature is created for them, then you can bet your ass developers in both companies will author (be told to author) the shittiest version they can that works to win that customer.

think about the last thing you bought that you REALLY needed. did you care that it was a generic brand that looks crappier but gets the job done? same thing.

disclaimer: i am a huge believer in clean code and TDD.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: