5 ms·
The author describes a YAGNI approach. The interviewer and you seem to want a solution that's already generalized and future proof. YAGNI is always the right ap
by emsy 8y ago
The author describes a YAGNI approach. The interviewer and you seem to want a solution that's already generalized and future proof. YAGNI is always the right approach to take at the beginning of a problem. But that's one of the insights that often come with programming experience and reflection. Unfortunately, seniority is an unreliable indicator for either attribute.
- tabtab 8y agoPerhaps one should ask the interviewer whether they want a YAGNI-style solution or a more general/abstract solution. If you can give both, you may really impress the interviewer. Asking first to understand the needs and intention of the application should be a first step anyhow. Diving into the deep-end face first and coding is rarely the correct approach (except maybe a startup racing for market-share).
- nemo846 8y ago> generalized and future proof Reminds me of a blog post I read, https://www.sebastiansylvan.com/post/the-perils-of-future-coding/ https://www.sebastiansylvan.com/post/the-perils-of-future-co... At what point does it become over-engineering?
- AlexCoventry 8y agoYou often can't tell up-front. If you never get back more than what you put into an abstraction, it was probably over-engineered.
- emsy 8y agoI think the article captures the problem even better than a similar one that was recently on the frontpage of HN: https://news.ycombinator.com/item?id=17850836 https://news.ycombinator.com/item?id=17850836 I can't remember a situation where undergeneralized code came back to bite me. I have however seen (and admittedly written some) prematurely generalized code that became messy legacy code.