Another Pomodoro Timer, and a calculator to spice things up

Another Pomodoro Timer, and a calculator to spice things up
0

#1

I spent much longer than I thought I was going to on this timer, and learned a few new tricks. I’m somewhat happy with how it turned out, although the code is a little sloppy and the styling could use some polish.

I noticed a bug at one point I haven’t been able to recreate and am not sure how it happened but my ‘Restart Pomodoro’ button turned into a ‘Start New Set button’

I had the durations set to: pomodoro 25-50 minutes, short-break 2-5 minutes, long break 15-30 minutes but lowered the minimum to 1 minute for testing purposes.

Please let me know what you think of the timer and any pointers you could give me are greatly appreciated.

Project Link - Pomodoro Timer

And here is the promised calculator if you’re interested in that as well, I didn’t spend as much time on this and it shows. I have some bugs I know of that I should probable tackle and I’m sure you guys will let me know of more.

Project Link - Calculator

P.S. Is it convention to link to the full page view so you can experience it first or the editor view so you can see the code?


#2

Calculator Issue #1 - If I enter 1 / 7 = and then enter * 7 =, I expect to see 1 and not 0.9999999999999


#3

Yeah, I tried adding a buffer to help with cases like that but now I’m getting a strange behavior in my evaluate function. If I enter 1 / 7 = * 7 = +15 = /.2 = I get a syntax error. Same thing for 9 * 5 / 4 *3. Pretty much any time I’m using divide or multiply more than twice it gets mad.

I think I tried to take the easy way out using eval() and I’m going to start the logic from scratch.

Any thoughts on the pomodoro timer?


#4

Alright I reworked the calculator and I think I have it functioning how I want it to now!

Anything else anyone can find? Or any comments on the timer?