Disk Clock latest 2.0

The first stage of the massive Disk Clock refactoring project is complete. Features and disks have been slowly coalesced and excised into separate files. The change is so thorough I’m starting to call it 2.0, even though it isn’t a publicized release. This implies that the public release will be some 2.n, but so it goes.

From around 2200 lines, the main Javascript file is down to 700, though framing ceremony and modularity handling have undoubtedly increased the total size. In fact zip file size has gone from 147kB to 184kB, which says something about modern software engineering practice and the disappearance of small applications. The next stage is to get a switchable runtime/compiletime require mechanism working so I don’t need the great litany of script tags in the html document.

Finally, though I put it off during the refactoring, I had to make a feature change. I had noticed that the day disk with it’s day and night was easier to read then most disks, with their four colored sections. So I switched to a half colored presentation. After looking at it a bit, I decided that having color on the root side worked better, although it was sort of opposite the day/night pattern. However, I found that reading the 4-hour disk became harder, because it had been easy to pick out the hour sections. So I restored gradients for small-count disks, but shifted the colors over so the dark section is roughly the same as the other disks.