5 ms·
That's sort of what I'm getting at. There are two kinds of smart programmers: Those who look for every opportunity to be clever, and those who are satisfied to
by kstenerud 11y ago
That's sort of what I'm getting at. There are two kinds of smart programmers: Those who look for every opportunity to be clever, and those who are satisfied to build pedestrian solutions until clever code is called for.
If you're going to build a clever solution (which almost by definition increases cognitive load on anyone reading or maintaining the code), you'd better be able to defend your actions. Performance is never a problem until it's demonstrated to be a problem.
- wtetzner 11y agoYeah, I'd say only go for a non-obvious solution if the result is at least as readable and maintainable as the obvious solution.
- JoeAltmaier 11y agoThis wasn't a case of work-for-hire. This was an interview situation, where its exactly your cleverness that is being examined. What do you do then? Pretend to be dumb?