Disk Clock 1.10: Watch For Flying Pigs

Disk Clock latest 1.10. Reinvented modes of configuration and interaction – this release *gasp* removes features. Smoothed out transitions. Put a wrapper around subclassing. Tried to pierce the dense cloud of Javascript unit testing frameworks.

Soothing The Pain

I went ahead and made my own subclassing wrapper. Rather than defining a function and then setting it’s prototype, I include the constructor among the new properties. The subclassing function attaches the new ‘class’ object to the constructor and then returns the constructor, to be assigned to the Function name.

Reinventing the Reinvention

The wigglyness has bothered me for a little while. Sometimes auto-show would be in the way, or the clock would jiggle about because the pointer ran across it. I tweaked the settings earlier, but this time I tore most of the settings out. Pointer hover is gone. It will still show the overlay arcs, so you don’t need to use modifier keys to read the values of your main disks.

Disempowered Operators

The operators are gone. The main reason I had them was so that it was possible to make a configuration that combined two disk sets. The old paradigm was normal/hover with operators. The new paradigm is always/toggle. The ‘always’ set is, well, always there. The toggle set can be switched back and forth with a modifier key, or flipped on and off with a mouse click. Auto-show was removed wholesale – it falls under the “run a second copy” doctrine. I switched the modifier keys around so that ‘alt’ shows the alternate view.

Hunting Down Transition Jumps

I was starting to notice that animation was jumping ahead on dashboard’s flipping animations. I delayed the animation start, and also capped the animation rate to avoid problems with the animation skipping because of a long pause. With that in place, I dropped the special case for first-time startup, and was able to eliminate another configuration variable for the startup delay.

Cut Off at the Test

This all happened so quickly and easily that was going to do more in this iteration. However, the next step is filling in some of the extra space I’ve freed up on the configuration panel with disk-specific settings. That means getting into dynamic HTML generation. I could probably get away with storing HTML as Javascript strings, but I’m also looking for tools to build on.

My HTML generation system requires some extension – it handles basic structures easily, but can’t specify ids and classes. For that I’m going to borrow heavily from HAML. The HTML generation is a nicely data-oriented input-ouput module that ought to be amenable to testing. That means I have to figure out how to do unit testing in Javascript.

The main testing candidates are QUnit (JQuery’s testing module, which is pretty to the point.) and Screw.Unit, which derives it’s feel from RSpec, which is the ruby testing framework I’m familiar with. However, it has little documentation, and some notes that indicate it (at one time) didn’t work in IE, and I don’t feel like stepping through the several github branches to try and figure out if any of them have added it. Now, Disk Clock doesn’t run under IE as it is, but if I ever do want to change that, having a working test framework would be a nice place to start.

I got held up trying to work my way through the various JS testing frameworks. It was enough of a tangent – and hinted at the further tangent of learning the framework and developing tests – that I decided I better publish what I’ve got.

Posted Thursday, March 12th, 2009 under Devlog.

Comments are closed.