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

E.g. I rarely abstract http calls or endpoints, because APIs tend to have nuances and to account for them I have to add more parameters than is worth. So I have a full-blown snippet from which I delete irrelevant parts.

Another example is little utilities like a promise as a semaphore (by lifting resolve() to the scope). It could go as a utility function without parameters, but then I’d have to maintain that utility module across projects, which makes it extremely fragile, and force other people to deal with it.



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

Search: