3 ms·
> As in Maslow's pyramid, each layer requires the previous one. It is useless for code that is charging the wrong customer to be readable. Now would you rather
by heisenbit 6y ago
> As in Maslow's pyramid, each layer requires the previous one. It is useless for code that is charging the wrong customer to be readable.
Now would you rather have code that is having a bug but is readable or having code that is incomprehensible but afaik. was giving the right answer when last run? The latter is unfortunately just literally a bit away from being wrong and incomprehensible and a total write-off.
- the_af 6y ago> Now would you rather have code that is having a bug but is readable or having code that is incomprehensible but afaik I don't know the answer myself, but the "Practical C Programming" book argues that clear code that doesn't work is preferable to unclear code which works but is hard to understand (because of its messiness). This is because you understand what's wrong about the clear but non-working code and therefore you can fix it. I don't know if this maxim works for every situation, but as a general rule it seems ok.
- itsdrewmiller 6y agoI'd rather code review the former but by the end of the code review I'd rather end up with the latter, with really good comments.