Custom Attributes are Fast, Good, and Cheap

After years working with HTML and CSS, we have come to a surprising conclusion.

Avoid using CSS classes and className and classList when deriving styles based on some “state.” Instead, prefer HTML element attributes, and CSS attribute selectors.
— Me, this week, all the time

Continue reading “Custom Attributes are Fast, Good, and Cheap”


Events Are Changes That May Or May Not Matter

This is kind of a programming essay, focused on understanding events and actions. All mistakes herein are mine.

Systems are abstractions of our understanding of {x}.

Understanding is never entirely consistent nor entirely complete. We receive new information (an event) and may update our understanding – we may accept or reject the new information, and take any resulting action.

We can choose to ignore information, but we cannot choose to be “clueless” – that is our given state from which we grow.

Within any system, then…

Continue reading “Events Are Changes That May Or May Not Matter”

Two object definition refactorings from 2017

Original gist for this post

Earlier this year a colleague was tasked with modifying an application that defined a very large object (i.e., containing 20+ properties). The troubling part was that the object was entirely defined twice, first in an if-block, then in an else-block, all 20+ properties spelled out in each. That made the differences between the definitions difficult to detect just by scanning.

Continue reading “Two object definition refactorings from 2017”

Using only Month and Year in jQueryUI Datepickers

User interface components in general are built with an expected user behavior. We used the jQuery-UI datepicker, to save time, but in an unusual way, which cost us a lot of time discovering what we’d missed. We re-learned a key insight, namely, month and year are navigation, not selection controls.

Continue reading “Using only Month and Year in jQueryUI Datepickers”