I noticed that my weather userbar was broken and decided to not only fix it, but move it to my main site. I’ll write a more in depth article later, but the short of it is Google made a change to their API.
I fixed a bug I uncovered earlier this week where articles were sorted wrong when displaying their tag. I thought Id set the sorting up correctly, but found that I didnt change the compare option. Perl is a bit picky when using <=> vs. cmp. One is for numbers, one is for text, and I used the wrong one. Fixed!
Today, I added in a couple of statistics to my race tracking page that Id been looking to add. Specifically, Ive added in the a total race count, along with the personal records (bests) and counts for the top race types. Note that these are for races in the pastfuture races wont count yet.
I actually have stats for the any race type entered, but chose to limit it to keep the list manageable. I probably should add filters to exclude races, although an easy way to do that is to add a letter to the time. The counts and PRs must be parsable times in hours:minutes:seconds.fractions, or some portion of that. Adding any letters, or leaving the time blank, will not increment that races count.
Two changes for tonight. I fixed the sort when displaying the articles written. This took a bit longer due to the way the code has to search for the author.
The other change is to display a badge for races that need timesassuming you are logged in and have created races. Id forgotten to update a race earlier this week, so it seemed fitting to have a reminder. Plus, I already had the code open from yesterdays change.
As a side note, all these changes are just screaming at me to optimize the code. If the task wasnt so large, and the fun Im having adding features, I would have already made progress.
Okay, Im on a roll today. I wanted a way to highlight when changes were made, so I reused the badge code for IMs to display changes within the last 7 days. Given that I dont track if you view a change, the hard cutoff was easiest. I might increase the number later if I find the changes are rolling off too quickly.