Hacker News new | ask | show | jobs
by jat850 3446 days ago
I agree. We were lucky (not smart, I'd say, just lucky) in the sense that we turned on PMD as a CI portion prior to a lot of major code being written. To share one experience of my own, I wrote an entire application - not a major one, probably < 2000 LOC altogether - right when we were midstream.

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.