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

Your argument taken to the extreme leads to code golf.

Sure abstraction is worth it. You get code reusability, better unit testing, and faster understanding of the code.

Maybe a small script doesn't need it, but once something starts growing past a few hundred lines you're better off.



Nobody suggested taking his argument to the extreme.

A larger script might indeed need it, but knowing when you need abstraction and when you don't is key. In this case, YAGNI.


It's worth it for most things you'll end up maintaining. How many of these "one-shot" scripts have stayed and grown to full-size systems, preferably by keeping the same hastily thrown together structure over the years?


> once something starts growing

Is a good time to refactor.




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

Search: