New blog post: Metrics
Over the years I’ve used a number of different ways of measuring software. The following is a roughly chronological account. [...]
New blog post: Metrics
Over the years I’ve used a number of different ways of measuring software. The following is a roughly chronological account. [...]
So I've created a #wily report for one thousand Black (the Python formatter) commits.
You can see that there was a huge (and complex), 7k lines __init__.py that got broken up around May 2021.
There's a trend of increasing LOC and complexity.
This report shows me there's a lot to improve in wily's code. Hopefully I'm back at that.
#Python #Black #formatter #CodeStyle #Cyclomatic #Complexity #Halstead #codequality #codemetrics
Mike Driscoll: Learning About Code Metrics in #Python with Radon
Nice introduction to #radon:
"""
You can use Radon to help you find complex code in your code base.
[...]
Here are the four commands that radon currently can use:
cc: compute #Cyclomatic #Complexity
raw: compute raw metrics
mi: compute #Maintainability Index
hal: compute #Halstead complexity metrics
[...]
"""
https://www.blog.pythonlibrary.org/2023/09/20/learning-about-code-metrics-in-python-with-radon/