sloc
code-complexity
Our great sponsors
sloc | code-complexity | |
---|---|---|
2 | 1 | |
940 | 274 | |
- | - | |
6.5 | 0.0 | |
3 months ago | about 1 month ago | |
CoffeeScript | TypeScript | |
MIT License | 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.
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.
code-complexity
-
The #1 tip to familiarize with new JavaScript codebases
In my years as a software engineer, I have probably looked at hundreds of codebases. Too many to count. I struggled a lot with understanding where the relevant code is most of the time. Normally, asking for help what I should look for and guidance in tickets will bring me forward. Slowly and surely I will understand what the code is doing. And you will too. Some people are better at this and some people will be slow. No shame. Most code is complex. But I found a simple tool that will make it easier for you. It is called code-complexity and you can use it as the following code snippet shows:
What are some alternatives?
code-maat - A command line tool to mine and analyze data from version-control systems
NVIDIA-vBIOS-VFIO-Patcher - A Python script to patch NVIDIA vBIOS dumps into a format compatible with VFIO passthrough
phpinsights - 🔰 Instant PHP quality checks from your console
Blitz - ⚡️ The Missing Fullstack Toolkit for Next.js
scc - Sloc, Cloc and Code: scc is a very fast accurate code counter with complexity calculations and COCOMO estimates written in pure Go
linuxconsole - http://sourceforge.net/projects/linuxconsole/
jscpd - Copy/paste detector for programming source code.
Statsd - Daemon for easy but powerful stats aggregation
switch-vs-object - 🤓 compares the cognitive complexity between two ways of mapping values to keys
sematext-agent-express - Express.js Monitoring and Logging Agent by Sematext
xml2js - XML to JavaScript object converter.