Visiting my old self

01 : Countdown Timer — One Application Everyday


My first project.

Aug 2, 2014 — For today’s project I decided to re-visit my old project — countdown timer. This was my very first project when I started to dive into javascript. Started off with simple setInterval() sample on console and eventually user interface was added.

Old Version.

As I was obsessed with applying new things I learnt, project kept getting new features. I added arrow buttons, keyboard control, jQquey UI sliders, timer log saved to MySQL…(back then it was called kitchen timer)

I remember refactoring the code many times, and was pretty proud. Re-reading it again after 2 years — even though I would still give myself pat in the shoulder for this being first project — there were many things to be improved.

As a new feature, I decided to add “edit in place” (You click a field and the field turns into input field) and ditch the entire input fields with arrows and sliders.

Much simpler now.

I wanted to add SQLight database so the logs are saved locally and I can have this as tiny application on my phone. I spend many time reading food label about cooking time. I use same products (like pasta) over and over but never remember how long I should cook. I would be great if I can log it right in my kitchen timer — this will be another project.

I’ve also cleaned up redundant jQuery calls. After 2 years, I have better understanding of chaining.

You can check the working app on JSFiddle here and source code on Github here.

Email me when One Application Everyday publishes stories