Hacker News new | past | comments | ask | show | jobs | submit login
We Forgot Front End Basics (stackademic.com)
3 points by tipiirai 4 months ago | hide | past | favorite | 4 comments



DRY seems to be taken as gospel in web dev these days. I'm not really sure why. For some reason, repeating 10 lines of code in even one more file is a sacred violation that requires abstracting away the offender. The irony is that the solution ends up being 100 lines and involves bizarre logical jumps and magic methods.

Also I love nothing more when a couple lines of vanilla CSS replaces a monstrosity of Javascript code


I think anything that takes 10 lines instead of 100 is better. Easier to read, use, and scale. I cannot think of any exception to this.


What about something that takes 10 lines, repeated 3 times across a codebase; versus a single implementation that takes 100 lines but is only used once?

This appears to be the breaking point in web dev. I wish someone could properly articulate why the first option is so bad, without invoking DRY (Don’t Repeat Yourself) or some bastardization of SOLID Principles.


I think the 100-line version is better in the above case




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

Search: