code-maat
LGV_MeetingSDK
code-maat | LGV_MeetingSDK | |
---|---|---|
7 | 3 | |
2,320 | 1 | |
- | - | |
3.1 | 6.6 | |
11 months ago | 2 months ago | |
Clojure | Swift | |
- | 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
LGV_MeetingSDK
-
The Lone Developer Problem
If there's no default value in either the runtime, or the app defaults, then I use the hardcoded default.
That's actually fairly typical advanced Swift. I used to rail against it, but now, I do it all the time. I also tend to use tail closures a lot (that's when you declare a closure at the end of a function parameter list, so you can simply open the closure as a function result). That's also something I used to rail against.
If someone wants to maintain my code, then they need to have some decent chops. Usually, that's me. I will often revisit code that I wrote, six months ago (or more), and have learned how to read it. I write code that I want to see again; not some junior programmer.
[0] https://github.com/LittleGreenViper/LGV_MeetingSDK/blob/e91b...
-
Code Red: The Business Impact of Code Quality
I write in layers and modules. Each one is well-done, fairly insular, and coupling is as loose as possible. A lot of my refactoring is about reducing coupling, and increasing autonomy.
Bottom layers can often be left alone for years, while top layers can see almost constant change.
Right now, I’m working on the home stretch of an app (backend/native iOS frontend) that has been under development for a couple of years. A lot of the reason for that time, is because the people I’m working with, didn’t really know what they wanted, when we started (sound familiar?). It has undergone several massive pivots during this time, but we have settled on an operational model, and it’s been pretty much pure refinement, for the last three or four months.
I just rewrote a major backend driver[0], to make the server connection smoother and have a simpler asynchronous behavior. It will also make it easier to integrate other types of backends, in the future, but I know better than to think it is “future proof,” but it affords a structure that will be quite amenable to change. The main app is closed-source, but many of its components are open.
It took about a month to write the driver, and it was sort of akin to reconstruction of a bridge, while traffic was going over it. If I hadn’t done the original design, in a modular, API-driven manner, it never could have been done, but I’ve also done exactly this, numerous times. The old design[1] was too restrictive, and is one of my older projects. I wanted to get it out of my app (even though I wrote it).
The big deal about this project, and the key to being able to pivot, is that it has been released through Apple TestFlight, since it was about a month old. I’m coming up on a thousand TestFlight releases. This allows the non-tech stakeholders (the ones that don’t know what they want) to run the app, as a release-quality application, and provide really meaningful feedback (like “gee … I really thought it was a good idea, but you’re right. It sucks.”). Sometimes, there’s no substitute for giving someone what they want, to convince them that it’s not what they want.
Needless to say, a great deal of high-quality work has been binned, but we haven’t been running a brand-destroying lashup MVP. The project has been internal-only, this whole time. I am quite aware that this method of development is not commercially friendly, in today’s development environment, but we have the luxury of the Principal (Yours Trooly) working for free, and knowing full well, what he signed up for, when we started, and designing accordingly.
The end result will be an application that will enjoy almost jaw-dropping Quality, out the door, with many thousands of test runs, on shipping code, for two years. We’re finding the “rough spots,” now that we are in the home stretch, and still have the cosmetics (theme, aesthetic design, interface, etc.) to go before widening to our first test phase (which will also be TestFlight).
Since the “team” doing the lion’s share of the work consists of one person, the Quality is of paramount importance. It’s a pretty big project, and this scope is usually implemented by a much larger team.
When I write something, I can generally leave it alone, until I decide to revisit it, on my terms.
[0] https://github.com/LittleGreenViper/LGV_MeetingSDK
[1] https://github.com/bmlt-enabled/BMLTiOSLib
-
Using a Framework will harm the maintenance of your software
I tend to make it up as I go along ([0], [1]). It works for me (I just finished up a new SDK, using this technique[2]).
However, this would not work for many outfits. It’s just the way that I work.
WFM. YMMV.
[0] https://littlegreenviper.com/miscellany/evolutionary-design-...
[1] https://littlegreenviper.com/miscellany/forensic-design-docu...
[2] https://github.com/LittleGreenViper/LGV_MeetingSDK
What are some alternatives?
code-complexity - Measure the churn/complexity ratio. Higher values mean hotspots where refactorings should happen.
Compiler
sloc - simple tool to count SLOC (source lines of code)
Rector - Instant Upgrades and Automated Refactoring of any PHP 5.3+ code
code-compass - A set of code analyses that assist you in tackling software complexity
berkes - berkes/berkes is a ✨special ✨ repository that you can use to add a README.md to your GitHub profile.
temporal-coupling - Explores git repositories to find files that are commonly changed together
dmd - dmd D Programming Language compiler
ExpansionCards - Reference designs and documentation to create Expansion Cards for the Framework Laptop
code-forensics - A toolset for code analysis and report visualisation
joystick - A full-stack JavaScript framework for building stable, easy-to-maintain apps and websites.