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

> You never add abstractions until you can’t avoid them.

What would be a case where you would _have_ to add an abstraction? I'd say you probably never have to, but things will get start getting complex.






I would abstract a holiday calculator service. I’d abstract a base class with “created_at” and similar for your data models in a traditional OOP sort of thing along with the audit table. I’d probably abstract something like an e-mail validation mixin.

Basically things which will never change, and when they do, you really don’t want them to change in a million things.

Otherwise I’d probably never add abstractions. Sometimes it makes sense to build a service which owns a domain on a business which is then consumed by others, but you have to make sure the consumption can be stopped when that domain is no longer relevant without it causing issues.

I’m not sure what my personal stance is on frontend components. Probably as low reuse as possible.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

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

Search: