4 ms·
It is not made up but different people can have different opinions on what's readable and what's not. If the metric is supposed to be objective, then number of
by generichuman 5y ago
It is not made up but different people can have different opinions on what's readable and what's not.
If the metric is supposed to be objective, then number of CPU cycles used is probably the simplest metric there is for computers.
- meheleventyone 5y agoRight it’s a communication problem because calling code simple conjures different ideas in people heads. Code that is simple for computers (principle of least work) is not necessarily simple (principle of comprehension?) for humans.
- flohofwoe 5y agoThere is a high overlap though, it's often harder to understand how highly abstracted code actually works than 'unrolled' verbose code composed from simple operations (which is closer to machine code - thus the 'overlap'). It might be easier to understand the 'intent' of highly abstracted code, but this doesn't mean the code behaves as intended, and IMHO 'readability' is about understanding what the code actually does, not what it is supposed to do.
- meheleventyone 5y agoI think all these things are aspects that are interrelated. A principle of abstraction is another good one. Others I can think of are principle of least surprise and principle of least work done by the compiler (lol “zero cost” abstractions).