go back  52 - Create your own Pomodoro Timer




This challenge write-up first appeared on PyBites.

It's not that I'm so smart, it's just that I stay with problems longer. - A. Einstein

Hey Pythonistas,

It's TIME for another Code Challenge! (Pun totally intended!)

We're keeping it simple this week. Create your own Pomodoro Timer!

Pomodoro?

What's a Pomodoro Timer? We're glad you asked! (If you didn't ask, you can read anyway!)

A Pomodoro Timer is a countdown timer that enables you to focus on a given task. You set the timer for a specific duration, 20 minutes for example, and for that duration you are completely offline and focused. No email, no phone, no texts, no kids (a man can dream!)... no interruptions. Just pure, focus. This is the Pomodoro Technique.

At the end of the timer, you're back online.

The idea is that the minutes of focus time allow you to achieve more than you otherwise would given the usual swathe of interruptions we all suffer.

The real fanatics will do a set period of the Pomodoro Technique followed by a short break, then another Pomodoro set and repeat.

The Challenge

Now for the challenge:

  • At its simplest, create a timer for a set duration (eg 20 minutes) that "alarms" or notifies you at completion.

  • Go a step further and allow the user to specify the amount of time the Pomodoro Timer goes for.

  • Again, further develop the app by allowing it to loop. That is, Pomodoro Time > break time > Pomodoro Time > break time. Just like the pros!

  • Create a user interface if you have the time! PyGame or argparse perhaps? Maybe even make it web based with Flask or your other favourite web framework.

Here's an example: Tomato Timer!

It doesn't matter how complex or simple you make your app - just that you get coding.

If you need help getting ready with Github, see our new instruction video.

PyBites Community

A few more things before we take off:

  • Do you want to discuss this challenge and share your Pythonic journey with other passionate Pythonistas? Confirm your email on our platform then request access to our Slack via settings.

  • PyBites is here to challenge you because becoming a better Pythonista requires practice, a lot of it. For any feedback, issues or ideas use GH Issues, tweet us or ping us on our Slack.


>>> from pybites import Bob, Julian

Keep Calm and Code in Python!