pomodoro: the clock stops here

Preparing to turn in my calculator means I can turn my attention to the next project.  Build a Pomodoro Clock. This will require me to learn new things, like time-based anything and how to cause my HTML to emit sound.

But like any other HTML/web project, the first part is figuring out what it will look like. Here is a screenshot of my Pomodoro Clock.Incurably retro.  I got the idea from someone who mentioned they had a seven-segment font they were using for the calculator project and I thought how totally awesome that was for a clock.  Now this font, being truly seven segments has no plus sign or colon.  So the buttons (and the text) are in the Roboto font. which is how the real world deals with seven-segment stuff. Which is to say, they don’t use it except for the actual digital display.  What you can’t notice from the screenshot is everything is in rem not px.  This meant I had some artifacts and issues trying to make the actual clock part of the display work.  I resolved them with Flexbox. You’ll find out more Thursday.

The person who helped me with the flexbox also gave me a link to a stackoverflow discussion about javascript timers.  It’s interesting and relates well to stuff I saw on CSS Tricks.  The key to using anyone else’s code is that you have to understand it and not only how it works but why it works.  If I can’t, I’ll look other places.  The synthesis of the two sites is working for me in understanding that a function that counts time based on milliseconds will drift from the actual time and that you may want to adjust for it by checking against the real time now and then. The main issue seems to be how often do you need to do this to stay on target vs having extra overhead.  I’ll know more Thursday when we meet again.

Leave a Reply

Your email address will not be published. Required fields are marked *