Hacker News new | past | comments | ask | show | jobs | submit login

Nah. It's always about 4 layers. Hardware/services/data stores/etc, wrappers/models/components, business logic / application, ops/deploy.

If you nest your models/components deep enough that they're forming new abstraction layers, you're nesting them too deep. Backup and use mixin-style stuff instead.

If your business logic or application are nesting pretty much at all, then you haven't succeeded at making good choices in your models/components.




Agreed, and I’d add that code duplication is hardly a big problem. It’s kind of like if I legitimately see a lot of code duplication, then I have enough data points to do the right thing. On the other hand, abstracting early to avoid code duplication is worse.


Hmm... I think you might be right. Or, at least, that the problem that is and the problems that go with code duplication are easier to resolve than those that show up with shit abstraction.

Maybe... Duplication is a code smell, but shit abstraction is a code problem...?




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

Search: