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

He was talking about writing short methods to begin with, not fixing the already borked ones.


Yeah, great advice. Programmers should also stop writing bugs, too. How hard is it to GET IT RIGHT THE FIRST TIME?! All this bug hunting (and fixing) is a time waster.

(Sarcasm alert.)


Heh, but fact is that not adding the bug in the first place is better than spending time fixing it later. So you must catch problems quickly and attack them swiftly.

There is a nice self-regulation principle at work here: If you make software with a lot of bugs, you also spend time fixing those bugs. This hampers your ability to make more crap software. If you on the other hand produce quality software, much less time is spent at maintenance so you become more productive overall.

I think it is a fallacy to expect bugs to creep into your code. Eradicate them before writing the code lines. But what makes this hard for most people is that you don't think you need that amount of quality in your software.


You're kidding right? It's pretty simple to write small methods from the start, trivial in fact. If you think small methods come from lot's of cutting up of larger methods then you're doing it wrong. Writing well factored code isn't some magic trick that requires doing it wrong first and then refactoring to get it right.

Your sarcasm is misplaced and presumes bad code always comes before good code, it doesn't.


I'm saying that it's easy to always try to do something, it's not always easy to succeed the first time.

You should always make it easy for yourself to fix mistakes, even if you shouldn't have made them in the first place.




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

Search: