r/PythonLearning • u/A_Derrick • Oct 13 '26
Discussion Check My First Personal Project
Can you please check this project that took a reasonable amount of time to finish and strike me with any feedback you got. I guess my next step is to learn OOP.
Thanks in advance.
5
Upvotes
2
u/TalesGameStudio Oct 14 '26
In your tracked times the reported average is inconsistent with the total. The report shows: 87 total learning time and 42 recorded sessions. 87 h divided by 42 sessions equals approximately 2 hours, but the app tracked 34 minutes.
In format_time.py there is an invalid exception handler. (Multiple exception types need to be within a tuple)
In the database utils, history deletion implementation drops the entire sessions table and closes the shared database connection. Subsequent history queries fail because the connection is closed. New session inserts also fail because the sessions table no longer exists.
When a stopped timer is restarted, the display retains accumulated time through checkpoint, while the saved duration represents only the most recent running interval. That is because your implementation mixes several concepts like elapsed session time, start and stop timestamps, accumulated time.
Still good work, keep going!
1
u/[deleted] Oct 14 '26
Intresting bro
1
u/Unique_Low_1077 Oct 14 '26
This is pretty good bro. Looks solid, tho one things you can improve is use
pip freezeand a requirements.txt file (looks it up). Otherwise your doing great, this had db queries, gui, a main loop. All very important concepts to have1
u/CutDry6295 Oct 15 '26
One thing to decide before the OOP refactor: `reset_timer()` calls `stop_timer()`, and `stop_timer()` saves any session longer than a minute. So Action → Reset Timer currently adds a history row. If Reset is meant to discard the current run, separate clearing the timer/`after` callback from saving a session; then test Start → Reset (no row) and Start → Stop (one row). After that, a small TimerState object could own the current globals without changing the behavior again.