5 ms·
It is not about tabs, spaces and variable names. The main difference is how long your functions are, how many functions they call, how deep control structures w
by ycmbntrthrwaway 9y ago
It is not about tabs, spaces and variable names. The main difference is how long your functions are, how many functions they call, how deep control structures within functions are etc.
- lucb1e 9y agoWould be interesting to tie that to ratings. Have a diverse set of people read lots of code (samples from projects large and small, in different languages, etc.) and rate it on things like "easy to understand" and "easily extendible", then correlate that with styles. I'd be very interested in how I score and what I can improve.
- hathawsh 9y agoIt sounds like you're talking about cyclomatic complexity. https://en.wikipedia.org/wiki/Cyclomatic_complexity https://en.wikipedia.org/wiki/Cyclomatic_complexity There are tools out there for most major programming languages for measuring cyclomatic complexity. They can tell you whether typical coders will be able to help you work on your program at its current complexity level.
- lucb1e 9y agoI heard of this but haven't seen it used anywhere outside of school. Do you have any experience whether this correlates with how readable people find code to be?
- WalterBright 9y agoMy style changes over time.
- staunch 9y agoAs long as it changes gradually, or partially, that might not matter.