top | item 46305709

(no title)

dakshgupta | 2 months ago

How would you measure code quality? Would persistence be a good measure?

discuss

order

rsynnott|2 months ago

"It's difficult to come up with a good metric" doesn't imply "we should use a known-bad metric".

I'm kind of baffled that "lines of code" seems to have come back; by the 1980s people were beginning to figure out that it didn't make any sense.

epicureanideal|2 months ago

Bad code can persist because nobody wants to touch it.

Unfortunately I’m not sure there are good metrics.

scuff3d|2 months ago

That question has been baffling product managers, scrum masters, and C-suite assholes for decades. Along with how you measure engineering productivity.

keeda|2 months ago

The folks at Stanford in this video have a somewhat similar dataset, and they account for "code churn" i.e. reworking AI output: https://www.youtube.com/watch?v=tbDDYKRFjhk -- I think they do so by tracking if the same lines of code are changed in subsequent commits. Maybe something to consider.

d-lisp|2 months ago

I don't know if code is literacy but I think measuring code quality is somehow like measuring the quality of a novel.

nhumrich|2 months ago

The way DORA does. Error rate and mean time to recovery.