Recent Posts

On the HTML 5 “data” attribute

This attribute can not only contain text values, but any arbitrary JavaScript value, including arrays and objects. This is extremely useful for scoping and e...

jQuery: make selection from sub-tree

By default, jQuery selectors operate on all items in the DOM. There is an overloaded search function, however, that allows the creation of selectors based on...

Object-oriented design principles

I recently read Head First Design Patterns, and they had a handy set of Object-Oriented design principles that were repeated throughout the book that I wante...

Python class for TriMet train arrivals

I wanted a Bash alias that would output the time remaining until the next Eastbound train at the stop near my apartment. I created a Python class to get this...

Linus Torvalds on Design

“Don’t ever make the mistake [of thinking] that you can design something better than what you get from ruthless massively parallel trial-and-error with a fee...