3 ms·
There are too many articles that preach dumb code, KISS, etc. I think the issue is overemphasized, especially in the modern age of bootcamps and whatnot. Who is
by LudwigNagasena 3y ago
There are too many articles that preach dumb code, KISS, etc. I think the issue is overemphasized, especially in the modern age of bootcamps and whatnot. Who is writing all that "smart code" people are complaining about? If code seems too smart for you, maybe PEBCAK. That seems far more realistic nowadays than ever before.
> Look! I replaced this recursive function with a for loop and it still does everything that we need it to. I know it’s not as clever, but I noticed that the interns were having trouble with it and I thought that this change might help.
Recursion is not clever, it is not a trick. It's a basic technique kids learn in high school in Advanced Placement CompSci A. I do not want to work with people who know less about their professional field of choice compared to kids. And if the educational system has failed interns, at least let them learn what recursion is on the job! Isn't that what internship is for anyway?
Honestly, I don't even get the sentiment. Many problems are naturally formulated in terms of recursion. And rewriting them as loops would be considered an optimization technique that obfuscates the reasoning.
- verinus 3y agoto me it seem you have bad experience and I agree that this kind of simple may be the wrong kind of simple ;) but: for me simple is to have a short and concise solution of a problem/ requirement that does exactly what is required and not more.
- 10000truths 3y ago> Honestly, I don't even get the sentiment. Many problems are naturally formulated in terms of recursion. And rewriting them as loops would be considered an optimization technique that obfuscates the reasoning. It's not an optimization so much as it is non-pessimization. You have a lot less control over how your runtime's call stack behaves, which means that basic things like error handling, memory usage, observing intermediate state, etc. all become much more inconvenient (if possible at all).