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

A heuristic we use at work is to not introduce an abstraction layer until there are at least two different implementations required.

That is if you think you'll probably need multiple implications, delay introducing an abstraction until you actually do.

Also, there are different ways of providing abstraction.

Perhaps you don't need to abstract the entire implementation but, as an example, rather change one parameter from passing a value to passing a function returning a value.




That touches on a couple related principles:

- not doing extra work now if it's not necessary yet and if it's as cheap to do later

- delaying building a thing till you know what that thing should be




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: