Off Color
by in CodeSOD on 2025-07-08Carolyn inherited a somewhat old project that had been initiated by a "rockstar" developer, and then passed to developer after developer over the years. They burned through rockstars faster than Spinal Tap goes through drummers. The result is gems like this:
private void init(){
ResourceHelper rh = new ResourceHelper();
for ( int i = 0; i < 12; i++) {
months[i] = rh.getResource("calendar."+monthkeys[i]+".long");
months_s[i] = rh.getResource("calendar."+monthkeys[i]+".short");
}
StaticData data = SomeService.current().getStaticData();
this.bankHolidayList = data.getBankHolidayList();
colors.put("#dddddd", "#dddddd");
colors.put("#cccccc", "#cccccc");
colors.put("#e6e6e6", "#e6e6e6");
colors.put("#ff0000", "#ffcccc");
colors.put("#ffff00", "#ffffcc");
colors.put("#00ff00", "#ccffcc");
colors.put("#5050ff", "#ccccff");
colors.put("#aa0000", "#ff9999");
colors.put("#ff8000", "#ffcc99");
colors.put("#99ff99", "#ccffcc");
colors.put("#ffcc99", "#ffffcc");
colors.put("#ff9966", "#ffcc99");
colors.put("#00c040", "#99cc99");
colors.put("#aadddd", "#ccffff");
colors.put("#e0e040", "#ffff99");
colors.put("#6699ff", "#99ccff");
}