3 ms·
> I've become cautious when people caution about guru's with an air of authority. Don't get me wrong, I would like to have a similar discussion with an actual
by moring 4y ago
> I've become cautious when people caution about guru's with an air of authority.
Don't get me wrong, I would like to have a similar discussion with an actual subject expert, just most "gurus" aren't experts but just cargo-culters.
> Who here believes you asked that of someone and they couldn't give you an answer involving the words "simplicity", "readable", "understandable", etc?
I never claimed that they didn't give such an answer. What they did is give an answer that involved all these words, but without even the ability to define them except through the very same metrics that were supposed to measure them, i.e. circular reasoning.
The particular case of "readability" was the claim that breaking a long method into short ones increased readability, based on a vague idea (not a definition) of readability. I literally showed the code to a dev not involved in the project who was able to read and understand the long-method version better. While admitting the sample size of two (repeated that experiment once), I could give a very clear definition of readability.
I cannot give a similar example for "simplicity" and "understandable" since they were even less able to pinpoint those terms. I would have liked to argue at least on the basis of SOLID principles, but we never reached that point because method length (in lines) was more important to them.
- chillfox 4y agoI think the metric should be branching, so functions with fewer branches are better than functions with more branches. And the reason is that it’s easier to write tests for functions with few branches without overlooking paths through the function. Same goes for reasoning, it’s easier to consider all paths through a function if there’s fewer. I see number of lines as an imperfect proxy for complexity.
- 082349872349872 4y agoGenerally a good metric, but be aware that overapplication would ultimately result in linear searches: https://news.ycombinator.com/item?id=32507510 https://news.ycombinator.com/item?id=32507510
- P5fRxh5kUvp2th 4y agoThis smacks of an argument over a PR. subjective reasons are still reasons, and they can still be valid reasons.