PMD meets Git to prioritize technical debt
blog.walkmod.com
blog.walkmod.com
This is an approach I would gladly explore if we did another project that was introducing PMD midstream - I like it much better. One of the biggest difficulties was having people address PMD problems who didn't have a great deal of insight into the code they were fixing, and so it did cause another round of "repair" to code that was inadvertently broken on a functional level. This looks to help avoid that by associating PMD issues with a dev closer to the code.
Plus it is folly to attempt rework while writing features based on the old, broken code.
I began by ignoring PMD's presence (it wasn't blocking my work at the time) and merrily went about writing the code. Right when I was nearly finished the application, PMD went live and I ended up realizing - with PMDs help, code review, input from more experienced devs in the domain - that my code was shit - poorly structured, not very testable, not following great design principles - and as a result I re-wrote the entire thing. It wasn't time-costly but it was an eye-opening lesson - getting some things right off the bat is important and saves a lot of headache later.
If we'd had more code like mine in place at the time PMD went live we'd have spent an order of magnitude more time re-writing so many things, in many cases nearly from the ground up.
Even the initial effort caused a lot of wailing and gnashing of teeth, but in truth it did help us learn and improve more quickly than if we'd kept left to our own devices.
As the Uncle says, if you have tests that's just a minor annoyance.
For example, obtaining the list of the 10 most modified files is as easy as:
git log --name-only --pretty=format: | sort | uniq -c | sort -nr | head -n 10
This is only a simple example but something non much different could be used to get a better indication of actual activity, limit the search to specific timeframes or users, etc...It seems that the app cannot contact mongo.
After I restart the app I am able to login, but never able to add projects.
Can you help?