3 ms·
Line budgets sounds like an awful idea. Code golf! I'd rather have 20 lines of clear simple code then, 5 lines of dense complicated code. Budgets will just ma
by UK-Al05 6y ago
Line budgets sounds like an awful idea. Code golf!
I'd rather have 20 lines of clear simple code then, 5 lines of dense complicated code.
Budgets will just make people write dense code.
- KronisLV 6y agoThink there would be another metric that would be better? E.g. a readability score for the code, one that could be composed of analyzing the cyclomatic complexity ( https://en.wikipedia.org/wiki/Cyclomatic_complexity https://en.wikipedia.org/wiki/Cyclomatic_complexity ) and other factors that affect how easy/hard it is to read and understand it? Or would most such attempts be deemed to fail because of how abstract code is and how hard to evaluate automatically it can be?
- bobthepanda 6y agoLots of reasonable metrics become bad once you make them a target.
- BenoitP 6y agoWhat we want could be a complexity metric corresponding to a set of lines. I'd say that's something that could be ML-learnable with the right dataset. Given an answer from stackoverflow, ask an average developer to identify what was the question from a set of say 5. The average time taken to provide a right answer would be the complexity score. You could use a transformer trained on code, and make it transfer-learn a function approximating that score.