https://jonathanfries.net/code-is-still-harder-to-read-than-...
Been reusing and repeating this one quite a lot, since I saw it mentioned in one of this year's RubyConf keynotes: https://blog.jessitron.com/2019/11/05/keynote-collective-pro...
(There is a blog-post version behind this link as well, in case anybody wanted to skim the contents rather than watch video of the entire talk to find out how it fits in.)
Fascinating thought experiments.
Here’s an introduction on YT [1], though it really only scratches the surface.
It's hard to write a concise example because it really takes a big application to make the point, but consider:
featureFlag(10, false);
processOrder();
What's flag 10? I have to go figure it out, wastes time, oh turns out it was to disable tax, why are we doing that? Okay in the function that called this one we checked if we were processing a subscription order.versus
if(order->isSubscription)
processOrderWithoutTax()I would argue that in order to fully and truly understand some code you have to be able to re-create it from scratch. E.g. to explain weird constants, data structures, design decisions, estimations on complexity. Hence, in my eyes, the intelligence required to perform those tasks are the same.
But, there is a backdoor. Solving problems needs immense creativity. Not everyone that easily grasps a piece of code (a domain expert, savant, MIT wizard) could have written it. To my eyes, that doesn't mean that the savant is necessarily of inferior intelligence, but likely less creative in this area.
Even in math or science it's harder to create something new than it is to merely imitate it.