Saturday, 8 August 2009

Feature: Direct access to public accounts by name

With more than 2500 public accounts, it takes almost forever for the list of public accounts to load. This is very irritating to people who regularly check on their friends' progress. What I'd like to do is add the ability, when viewing a public account, to check a box to make it (or remove it from being) a ``friend''. In the Utilities page, a drop-down list of friends will be displayed, from which you can select a public account to access with a single click. To address the immediate problem, until I manage to put all of this machinery in place, I've added a simple text box and ``View'' button below the ``Browse public user accounts'' item in the Utilities menu. The user can simply enter the name of the public account in the text field and press the button to go directly to the account. This isn't as convenient as a list of friends, but it's a lot better than waiting for the monster form to load. The direct name access form is also included in the Utilities page displayed when viewing a public account, allowing direct transfer from one public account to another.

Sunday, 8 March 2009

Bug: Divide by zero in sparse monthly log trend analysis

If only one weight was present in the most recent log and no entries existed in the previous month's log for the preceding week, the {\tt trendfit::fitSlope()} method would divide by zero because there were insufficient points to fit a linear trend. I added code to the method which reports a zero trend slope when insufficient points are available to fit a slope. Note that while this was discovered testing the new method of computing the trend for the current month, the bug was present prior to the change.

Feature: Trend analysis for current monthly log

When displaying the current (or most recent) monthly log, the trend analysis displayed beneath the chart was based on the data plotted in the chart. At the start of a month, when there were only a few data points, this could result in day-to-day instability in the trend analysis. I added code to test whether the most recent log is being displayed and, if so, a trend for the last seven days is computed using a {\tt history} object, even if that requires retrieving days from the previous month. This also ensures that the trend reported on the monthly log page will always be identical to that shown for the last week in the Trend Analysis page.

Sunday, 8 February 2009

Bug: Race condition in ClusterSync mkdir and rmdir transactions

Due to race conditions (for example, processing cluster synchronisation transactions while a global server synchronisation is underway), it is possible for an {\tt mkdir} or {\tt rmdir} transaction to fail because the directory in question already exists or has already been removed. To avoid a possible loop retrying such transactions, I added tests for these cases which deem the transaction successful if its intended effect has already taken place.

Thursday, 15 January 2009

Bug: Month option for Web badge

Added a ``Month'' option for Web badge generation. This is something intended from the start, but omitted due to scatterbrained developer. (Reported by Kees Huyser.)

Bug: Unicode CGI POST arguments in Perl 5.8.8

A change in the handling of the \verb+decode_utf8+ function between Perl 5.8.5 and 5.8.8 broke decoding of CGI arguments containing ISO-8859 and Unicode characters when received as POST arguments. Whereas before we needed to read POST arguments with ``{\tt :utf8}'', now it appears we need to use ``{\tt :raw}'' unconditionally. How much would you like to bet we'll be changing this back somewhere down the road.

Admin: Production server switch

Updated configuration to accommodate the switch from Server1 to Server0 as the primary production server. We now install test versions on Server1 and production versions on Server0, and permit non-{\tt https} logins to Server1 without the security warning.