| Imagine that the intern didn't dare to ask such questions. a - he could've gone out thinking that performance doesn't matter. but it certainly does in a piece of code being used daily by thousands of devs. b - he could've thought that the simple implementation is faster but missed the fact that skip is implemented in assembly. c - he could've realized both but missed the why. and these failure scenarios are likely to happen because this is an intern we're speaking about. One or two tricks up your sleeve do not matter but repeat this a 100 times which one do you think would be a better programmer? I think the willingness to challenge authority figures and to be (often) proven wrong and to learn from it is an essential part of becoming better. Maybe Tim was understanding because he himself challenged people older than him and in-process learned form them. Advice like "don't reinvent the wheel", "avoid premature optimization", "write boring code" promote exploitation.
which is the optimal strategy for older agents. but for newer agents, a higher level of exploration is needed otherwise they would converge into a suboptimal strategy |
It’s not; the compiler is just fairly decent at transforming string manipulation routines.