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!
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.
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!
Do you want to get 250+ concise and applicable Python tips in an ebook that will cost you less than 10 bucks (future updates included), check it out here.
"The discussions are succinct yet thorough enough to give you a solid grasp of the particular problem. I just wish I would have had this book when I started learning Python." - Daniel H
"Bob and Julian are the masters at aggregating these small snippets of code that can really make certain aspects of coding easier." - Jesse B
"This is now my favourite first Python go-to reference." - Anthony L
"Do you ever go on one of those cooking websites for a recipe and have to scroll for what feels like an eternity to get to the ingredients and the 4 steps the recipe actually takes? This is the opposite of that." - Sergio S