The one thing I learned from building a Pomodoro timer.

Alvis Ng
DotDotDot
Published in
4 min readFeb 28, 2016
Keep learning to prove that you’re living. — Alvis | Photo via unsplash

I’ve been a part-time web developer while serving as a digital marketing project lead in a startup for the past 12 months. Though my career has been progressing, but I’ve always thought that I can do a little bit more, or something that beyond what I currently equipped.

So I decided to challenge the title of true “front-ender” and picked up JavaScript, a programming language that I’ve been scratching at the surface but never dive deep into making it one of my strengths. In November 2015, I signed up to FreeCodeCamp, a platform created to teach anyone to code and help nonprofits. I progressed swiftly initially, as HTML and CSS are really nothing fancy for one who have been putting websites to live.

via unsplash

The real challenge surfaces when I reached to the point where I need to build a Pomodoro Timer (AKA Tomato Timer), a productivity timer to keep you in the zone. A friend of mine who graduated as a Software Engineer solved the task effortlessly using AngularJS, a framework that he is not even familiar with. In contrast, that took me literally 1 good week. It eventually turned out to be one of the best weeks of my life. So what did I learned in from building a Pomodoro Timer?

The one thing: Think simple, end the loop.

The secret of getting things done: Stop thinking, start doing.

Often in life when we face problems, we tend to begin thinking way beyond than where we should be. We want to know what is the ideal solution to our problem. What is the “BEST” framework or method to apply? How to DRY or prettify the code? Besides Googling for the “BEST”, we start a thread in Quora and StackOverflow to seek for the “BEST” way. This is where the danger starts, overwhelmed by opinions and articles, at the of the day we only realize that not even a single line of code was written.

Pomodoro Timer was the first task that requires me to decide which API should be used to get the task checked. Angular or jQuery or just plain JavaScript? The trend is on AngularJS or ReactJS… FreeCodeCamp is on the mission to get our hands on MEAN stack, it makes total sense to use AngularJS…but where should I put the ng-app directive again? I decided to use plain JavaScript eventually after a tiresome decision-making session including trials and rewriting. 5 days have passed and I managed to only get the click functions working. Frustrating enough to conclude that I am stuck! At this point, I know I need some help to get out from this loop, so I scheduled a meetup with the Software Engineering friend. He is one of the kindest pros that I know out there, he was very patient with me even when I was asking too many obvious questions. He insisted on not spoon-feeding me to get things done, instead, he guided me through a series of questions to correct my mindset.

My friend, what you’re trying to achieve is to provide a solution using a programming language, and what constructs this language is the computer. So you gotta think like how a computer thinks. Don’t think like human, human is complicated.— that awesome friend

After that 2–hour session, I managed to go out of that exhaustive loop and that timer started to count down as expected. What I took home was the simplicity approach, which can be applied to simplify things in life. Start from the things you have or the knowledge that you have, stop trying to be fancy, stop complicating stuff. Face it, nothing is the best! The best thing to do is stop thinking, start doing.

The demo of my Pomodoro Timer can be found in the pen below. Feel free to comment and suggest a better workaround if you have one.

Thank you for reading my story, it’s my very first post at medium by the way. If you enjoyed this post, please do recommend 💚 and share it to the world.

You can also find me here: Twitter, LinkedIn

--

--

Alvis Ng
DotDotDot

Senior Software Engineer at YOPESO and Creator of Hyoogoo.com, I pursue a life of greatness, living every moment to my fullest potential, beyond mere existence.