4 ms·
This is a great “engineering assessment” type question (as opposed to general problem solving or system design). I like it because the solution is simple (add
by jumploops 3y ago
This is a great “engineering assessment” type question (as opposed to general problem solving or system design).
I like it because the solution is simple (add an op code via find/replace), but quickly shows how a candidate approaches a new codebase.
Testing how one deals with existing code and perceived technical debt (i.e. Chesterton’s Fence) is hard to do otherwise.
Can they dive into the weeds?
Do they get stuck refactoring until realizing why some code path is the way that it is?
Praise aside, I’d hope most shops could craft an exercise that takes less than an hour!
- xw31099 3y agoActually, I'd probably get stuck at: if it's only three hours of work to add mult to memcached, why isn't it already there?
- bpicolo 3y agoProbably because it’s not a particularly common real world need. Have you ever found yourself grasping for a multiply command in a cache?
- xw31099 3y agoNo. But I don't often work on databases so I don't find myself grasping for any commands in a cache. It's hard to imagine that if there's a use case for adding a delta there's not also a use case for multiply by constant. But I'm not familiar with the market so maybe I'm wrong.
- jstanley 3y agoYou add a delta in any situation where you want to track "how many" of something. (Page views, for example). I can't immediately imagine when you would want to multiply.
- bpicolo 3y agoThe one I can think of is tuning circuit breakers so that failures are additive but successes decrease more multiplicatively/exponentially, which helps with fast recovery. That’s more dividing than multiplying though