OMG wow I need to learn how to use classes! I’ve been working on the time_track app and it’s getting so out of hand. I took the advice of Ben regarding the time formatting (see advice here) and I’ve also added reading/writing to a yaml file. At this point it’s incredibly bloated and needs some work, so that is the next step.
So far the application prompts the user to hit “enter” to being time tracking and then “enter” again to stop time tracking. When the user stops the tracking the two times are subtracted and the resulting time is stored in a yaml file. In addition, all of the times in that yaml file are added together and the running total is stored in another yaml file.
Yes, this is still a very simple little application. But I have delusions of grandeur for this app, so let me tell you all about its distant future! I want to create an open-source time tracking application that requires as little user input/maintenance as possible and has built-in fault systems to detect possible user error (in case the user leaves and forgets to stop the timer). I believe this would be incredibly useful to programmers that do a lot of client work and whose clients demand very accurate time logs.
Here is how it would run: When you open the application it sits unobtrusively in your menu bar (think Caffiene). When you click its icon with your mouse of choice (I prefer the Razer Lachesis; great for coding and gaming fun) it starts time tracking. You go about your work, writing beautiful code. When you want to stop tracking time you simply click the icon again in your menu bar. The total time is stored. You can click it again to start tracking time when you are ready to work some more.
The app will have a nice functionality that detects when there hasn’t been key strokes or mouse movement over a certain period of time and it will prompt the user for input to determine if they are still there. If it gets no response it will create a ticker at that very point in time (but won’t stop tracking) so that when the user returns (if they were ever really away) they can choose to look back and find out where they should have stopped the timer.
The app will of course calculate the time logged for any date range so that a programmer can keep very accurate time logs of his work on projects. There will also be a quick way to change between time tracking for different clients in case you end up working on multiple client projects a day. I’m very excited about it and I know it’s going to take a long time to write and will probably be quite impossible. But the delusion is there and I’m going to follow it!
So here’s the gross code I’ve written thus far and my next step will be to compact this all into a nifty little class:

Friday, 28. November 2008
Hi Renae,
sounds like a great idea, one that a few people could learn things from. I’m planning a game timer with scoring for a Frisbee tournament. The only bit I’m stuck on how to implement is the GUI & timer/count down part of it. So I’ll be keeping a watching eye on the project
Good luck with it
Dan