3 ms·
May be a mild case of https://en.wikipedia.org/wiki/Dunning_kruger_effect https://en.wikipedia.org/wiki/Dunning_kruger_effect -- you think you know the correct
by dexen 11y ago
May be a mild case of https://en.wikipedia.org/wiki/Dunning_kruger_effect https://en.wikipedia.org/wiki/Dunning_kruger_effect -- you think you know the correct solutions, whereas actually there are no single, unique correct solutions for at least some of the questions.
Don't be discouraged, though -- to gather certain kinds of experience you have to go into 'proper' programming. As long as you're open to questioning your assumptions and current state of knowledge, you stand to improve :)
Consider question #4 - there's no single correct way to indicate `underflow' condition. You could raise an exception, return zero, return negative value... it's all about considering and picking trade-offs, knowing convetions and matching client (caller) code.
Consider question #5 - while certainly you can provide your worst FizzBuzz, a programmer with different experience would probably provide a much different, perhaps even worse example [1]. As author notes, the 5th question is about experience with ineffective, brain-damaged, ugly, unmaintainable etc. code.
[1] speaking of some really insidious code: http://underhanded.xcott.com/ http://underhanded.xcott.com/