It's not that I'm so smart, it's just that I stay with problems longer. - A. Einstein
It's TIME for another Code Challenge! (Pun totally intended!)
We're keeping it simple this week. Create your own Pomodoro Timer!
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.
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!
argparseperhaps? 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.
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.
>>> from pybites import Bob, Julian Keep Calm and Code in Python!
See an error in this post? Please submit a pull request on Github.