code-maat
sloc
code-maat | sloc | |
---|---|---|
7 | 2 | |
2,320 | 941 | |
- | - | |
3.1 | 6.5 | |
11 months ago | 3 months ago | |
Clojure | CoffeeScript | |
- | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
code-maat
-
Ask HN: Measurements of Code Quality?
Get a copy of "Your code as a crime scene", then check out two GitHub repos
https://github.com/adamtornhill/code-maat
https://github.com/smontanari/code-forensics
-
Code Red: The Business Impact of Code Quality
He also wrote Your Code as a Crime Scene and authored the open source tool, Code Maat. I've found both extremely useful in my current job where I took over a code base with immense technical debt.
https://github.com/adamtornhill/code-maat
-
Why I Write Dirty Code: Code Quality in Context
It's not as neat as that unfortunately. You use this to extract different data from the version control history: https://github.com/adamtornhill/code-maat
Then visualize it however. I have some d3 scripts that came with the book that I've modified and you can track down somewhere on github I'm pretty sure. I mostly use those for demoing it to devs unfamiliar with the techniques though, since it looks cool and is immediately obvious what it's for.
For serious use I dump it into sqlite and use a mix of different scripts and techniques to figure it out. It's been kind of a language playground for me over the years so is in a lot of different languages and is "learning code" in most of them. Cleaning them up and sharing is one of those "maybe some day" things though.
-
Find files which change together frequently
After searching a bit more, it seems like https://github.com/adamtornhill/code-maat is a great tool
- adamtornhill/code-maat: A command line tool to mine and analyze data from version-control systems
-
The #1 tip to familiarize with new JavaScript codebases
The tool code-complexity is closely coupled to JavaScript and TypeScript-based codebases. For other languages like Java, C#, Python, or PHP there are other tools, but one tool that is generic and works for most of the codebases is code-maat. It is a tool created by the author of the book mentioned in the chapter before.
-
Emacs as your code-compass: how stable is my code?
https://github.com/adamtornhill/code-maat#Usage
sloc
-
The #1 tip to familiarize with new JavaScript codebases
With long functions normally there comes large files as well. People tend to put everything into one file if they also put a lot into one function. So in theory we could take the lines of code as a measurement as well. There are a lot of utility packages out there that solve this problem. One of these tools is called sloc. It will output the number of lines of code within a file. But do not use it directly. The tool I mentioned before includes this by default.
-
“Hello, World ” in zero lines of code
The title of the stackexchange discussion is a little misleading. It really is: '"Hello, World" in what sloc thinks is zero lines of source code'
Most of the top solutions seem to take advantage of bugs in the way sloc tries to parse commented lines. e.g. many are ////
And I'm surprised I don't see a related bug issue in the git repo: https://github.com/flosse/sloc/issues
Still this is a fun read. I'm curious to see what other tricks are out there.
What are some alternatives?
code-complexity - Measure the churn/complexity ratio. Higher values mean hotspots where refactorings should happen.
NVIDIA-vBIOS-VFIO-Patcher - A Python script to patch NVIDIA vBIOS dumps into a format compatible with VFIO passthrough
code-compass - A set of code analyses that assist you in tackling software complexity
Blitz - ⚡️ The Missing Fullstack Toolkit for Next.js
temporal-coupling - Explores git repositories to find files that are commonly changed together
linuxconsole - http://sourceforge.net/projects/linuxconsole/
Compiler
code-forensics - A toolset for code analysis and report visualisation
Statsd - Daemon for easy but powerful stats aggregation
LGV_MeetingSDK - A Connector for Various Regular Recovery Meetings
sematext-agent-express - Express.js Monitoring and Logging Agent by Sematext