Aaron N. Tubbs bio photo

Aaron N. Tubbs

Dragon chaser.

Twitter Facebook Google+ LinkedIn Github

I drink a lot of tea at work. Often at least a liter or two a day. This means that several times I day I need to be reminded to remove tea from a batch of hot water. There are fancy phone apps and computer apps for this, but the thing that’s always at hand is a web browser.

Thus, I fell in love with steep.it, a simple web based timer. You visit a url like:

… and you get a 5-minute timer.

The problem is, this website uses flash, and that means stuff crashes and hangs, because that’s what happens when you use flash.

So, I decided to implement something that will serve the same purpose for me in JavaScript instead. I’d have to do some domain/redirect magic (including picking a nice short url) to make this work properly, but now I’ve got something that’s somewhat similar:

This does more or less the same thing, just with fewer features and more ugliness. It supports seconds/minutes/hours/days/weeks, but doesn’t do convenience things like “green” and “oolong.” Mostly because that sort of default guidance isn’t particularly useful to me, and I made this for myself.

It also doesn’t play a sound when it finishes because I couldn’t figure out a way to pop up a message box and play a sound without making one or the other happen at the wrong time. On the upside, my sound is usually off at work, so I don’t care.

In the process I learned a little JavaScript, but not much; what I built is still pretty ham fisted at best. I used pegjs to build a parser for the time language and Ugly JS to compress things. Both seem to work relatively well.

JavaScript and writing purely client-side code is sort of weird. I don’t know enough about it to be particularly good at it. But there you go.