2
ddephor
7d

Today it took me *five* commits and nearly 2 hours to tidy up a module before doing a tiny 5-minute change.
I could have just done my change but that thing was so messy, I first had to straighten things up.

It's not that I didn't expect that, the module was mainly done by my dearest co-worker who's code usually causes me anaphylactic shocks.
But I'm always amazed how hard it can be to follow a style guide, and ours is really small anyway.

Comments
  • 1
    Doesn't your IDE do that for you?

    I use IntelliJ a lot and it cleans up code and restyles according to our guidelines. It also takes the pain out of most refactoring tasks.
  • 1
    @electric-ghost We're using external tools like AStyle, but they don't help if one doesn't use them.

    They shall be used, and most here do, but even the tools couldn't fully fix the pile of crap.

    Some constructs were so hideous, I didn't know such things are possible.

    And things like wrong naming can't be detected by any tool.

    So there was a lot manual work involved.
  • 1
    @ddephor I don't know how your naming convention works, but you could use SonarQube with a custom rule to detect invalid names. This rule would have to coded in house. CI would trigger Sonar, and it would report any issues.

    Might not be worth the effort, but definitely worth investigating SonarQube for lots of reasons.

    If it were my choice, I would implement the above. It would save a lot of time when reviewing.
  • 1
    @electric-ghost That sound nice, thanks.

    I'd have to talk that over with our jenkins-guys, but for a first glance, it looks promising.
  • 0
    @ddephor if anything, it's really good at static code analysis.
Your Job Suck?
Get a Better Job
Add Comment