There’s an old saying that goes something like this – “an awful lot of computer programs are written by someone with an itch they needed to scratch.”
Well, in terms of my tea drinking habits, I did indeed have an irritation that needed seeing to.
For timing gong-fu sessions I was using an app on my phone, one called Simple Timer.
It worked OK, but had a couple of features I wasn’t entirely happy with.
Firstly, once the timer had counted down and set the alarm off, you had to manually switch it off, meaning you either had to delay pouring your tea, or do so with the alarm constantly sounding off until you were done.
Then there was the fact that after each countdown the timer reset itself to zero. Typically during a gong-fu session you want to have your next infusion a certain number of seconds longer than the previous one, meaning that it would make more sense for a gong-fu timer to have an option to bump up the value of the last round rather than having the user manually enter the value all over again.
I didn’t want to spend time trawling through the Google Play Store looking for something better, so decided to cobble together an alternative myself.
An Android app might have been a sensible idea, but that would have meant downloading, installing, and configuring the development environment, something I thought was a bit over-the-top for what was probably going to be a short, relatively simple project.
You could even take it out on the road with you, by copying all the necessary files to a local folder on your device of choice, and simply pointing your web browser at that, rather than the network.
Anyway, after a few hours playing around I have a working prototype, assembled from code fragments *cough* borrowed from w3schools.com, which is a great resource if you enjoy playing around with this kind of technology.
Basically, it all boils down to three buttons – one to add 5 seconds to the current infusion time, another to add 10 seconds to the current infusion time, and a third to start the timer. Two text areas display the currently set time as well as other messages, i.e. time left, and so on. The browser plays a small, short mp3 file once and once only when the countdown has finished.
The timer can be reset simply by refreshing the page, as the default countdown value on starting is zero seconds.
So far I’m really pleased with the results – it’s scratched my two major itches!
No software project’s prefect, however, even one as small and simple as this one, and there’s still a few things left to do.
First and foremost I plan to do an accuracy check. On short infusion times any discrepancies wouldn’t be all that large, but over the course of a multi-minute steeping it might possibly drift a fair bit, so I’m going to do a bit of calibration and amend/tidy up the code if I need to.
I might add extra buttons for +30/60 seconds, as well as a duplicate set of buttons that remove the appropriate number of seconds, too. The need to do this or not will hopefully become more apparent after I’ve used the app for a while.
Then, when everything’s working just right, I might want to tidy the thing up aesthetically.
Another sensible idea would be to test it on other platforms and browsers – just now I’ve only tested it on Google Chrome running on Android.
Finally, if I’m happy enough and not too embarrassed by it, I might just open it up for anyone else who might find a use for it.
Watch this space, etc.