A developer returns to a Java project after 3 months to find the codebase in disarray despite good initial intentions. The post proposes two complementary approaches to maintain code quality: a 'WatchDog' role — a dedicated person who continuously monitors for code smells, design violations, duplicate methods, and standards violations — and a 'SpotTheBug' program that incentivizes all team members to identify and propose fixes for bad code weekly. The combination of these human-driven processes with automated tools like PMD, FindBugs, and Sonar is presented as the best way to keep code clean over time.

7m read timeFrom sivalabs.in
Post cover image

Sort: