3 ms·
Depends what you call smart behaviour I suppose. For the vast majority of projects though I'd assume the following to be smart behaviour: - Is it robust - Is
by zamadatix 6y ago
Depends what you call smart behaviour I suppose. For the vast majority of projects though I'd assume the following to be smart behaviour:
- Is it robust
- Is it fast (enough)
- Is it the simplest way to achieve those levels of robustness and speed
If the answer to the first 2 is largely "yes" and the 3rd is "no" then I'd call it a bad hack. OTOH if the answer to 3 is also "yes" then it's a good hack. If the answer to 1 or 2 is "no" then it's not ready to ship.
In either case a comment saying "this is the simple/safe way, performance opportunity via..." Or "this is the complicated way because <reasons complicated way was needed, usually perf> and it this is why it works..." is good to leave in case performance requirements ever change or someone is trying to figure out why you went the way you did.