Code History

7/6/24 Change Log 29/2/20 to 1/3/20 was missing from this page. It was on http://www.racemanager.co.uk/changelog.php
7/6/24 Regatta Draw Slight issue - substitutes have caused a clash on Walton's data. But rowertimes shows more - why?
It was due to the draw being done on the 1st Round ONLY. Oops - user error. rowertimes calculates every, regardless of this setting.
7/6/24 Regatta Draw After the Draw is published, the 'Resolve Clashes' MUST be disabled.
7/6/24 PHP Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in C:\RaceManager\php\spiders.php on line 481
Fixed by the Null Coalescing Operator

Warning: Undefined array key "t" in /homepages/12/d467534392/htdocs/rowstats/regatta.php on line 529
Fixed by: if(isset($_REQUEST[QS_TIMESCALE]))

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in C:\RaceManager\php\regatta.php on line 724
This is caused by the middle lane... Fixed

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in C:\RaceManager\php\include\bladeinfo.php on line 9
This is caused by the middle lane... Fixed

5/6/24 Database SeedingInfo is set during the draw itself, and will therefore be earlier than the timetable's RowVersion. This how we can tell...
5/6/24 Database [regatta.PostDraw].[RenameStatusID_Ex] probably needs to update SeedingInfo...
1/6/24 Regatta Draw CheckForMultipleDivisions was not called. Should not be necessary, but Reading moved W.J15.4X+ to the morning division. Incompletely...
9/5/24 ASPX The logic from rowertimes has been moved to a new class. This is called by rower.aspx as well. The jigsaw is complete.
9/5/24 Database [masters].[UpdateAgeGroups] used FISA age groups for J and K. Oops.
This only affected Mr Green of BTC Southampton, but the bug has been fixed.
9/5/24 ASPX Rower Times does not cope with Plate
9/5/24 Draw Mods RaceManager.Controls.Regatta.SpiderViewerEx.RaceSelectionDialog shows races in order of race time. This has been annoying me.
8/5/24 ASPX Finally fixed the menu structure with Server.EncodeURL on the existing QueryString. That was a beast to find...
7/5/24 Import Apart from Race Day, crew names are now calculated for big boats.
4/5/24 Regatta Draw The column for Doubling types has been removed: it was helpful when I developed the UI, but now serves no useful purpose.
4/5/24 ASPX
  • link to Spiders on the menu structure did not work - the names were missing.
  • Various links to entriesbystatus changed to spiders once the Draw has been published.
  • Filters have been added to rowertimes - this is a BIG improvement!
  • Base information has been removed from rowertimes - it was confusing, and serves no useful purpose.
29/4/24 RaceManager Banding shows blade colours - new functionality.
9/4/24 Demo Setup for Maidenhead Junior Regatta
  • Plate Events not shown correctly on Spiders. This turned out to be a bug in GenerateSpider(SpiderInfo, List(Of String), Integer). The bug also affects 3 lane Repechage.
  • Plate Events not shown correctly on Seeding control. Annoying, but it doesn't matter.
  • Statuses defined in a Custom Question. Not sure how to deal with this...
  • Parsing J12AB.4X+ doesn't work, unsurprisingly...
GenerateSpider - Private Matches are obsolete, so remove...
7/4/24 PHP Google Analytics 4 up and running.
24/3/24 Database [Statistics].[Entries] now includes competitor ages.
24/3/24 Masters If handicap is set, show it in Red.
16/3/24 ASPX The VL code has been updated. The competition specific logic did the heavy lifting, but the generic SP is easier to work with.
The next stage is to move the weightings into EventData
13/3/24 Kit
  • 3 Dell laptops
  • 2 HP 6730b laptops
  • 1 HP laptop (battery dead, so mains power only)
  • 5 assorted NUCs
New NUC arrives today
13/3/24 Kit KB5028997 fixes a problem installing a Windows Update - KB5034441 failed to install.
8/3/24 Payments have been a problem for ages. [BROE].[ListNewPayments] has been modified, including [Payment Type] to deal with competitions that accept BROE and BACS payments.
RaceManager.Libraries.BROE.SharedRoutines.CreatePayments has been totally rewritten.
7/3/24 Import Supress web pages if auto import, but show them IF you press UI button regardless. That was tricky!
24/1/24 Database Gavin has a long essay in the Division notes.. Have have not dealt with the apostrophes though.
20/1/24 WebView2 I am now using NuGet. WebView2Loader.dll is located in bin\runtimes\win-x86\native - and it is found correctly...
6/1/24 RaceManager.Libraries.BROE.CreatePayments assumes that all payments downloaded from BROE are Online.
WorkaroundBugs fixes the API and XML issue - online are listed as Manual, and vice versa. This should be done in a SP, should BR fix the bug (which has been reported). This is [BROE.API].[WorkaroundBugs]
6/1/24 .NET All Nuget packages have been updated. The only issue was SpreadsheetDocument.Close, which does not exist in the new version. Using a 'Using' statement solves the problem...
16/12/23 PHP Custom logic has moved into the rar class. so the callee code must change. Writing PHP after a stroke is a bit of a challenge...
16/12/23 PHP SourceSafe label added before the next change - moving the code regarding GDPR to a static class for readability.
16/12/23 PHP The Cookie logic works as intended. Reading Amateur will need to suppress my popup AND the Google script. FILTER_VALIDATE_BOOLEAN is the key...
16/12/23 PHP This the first coding after the stroke.
The code has been updated to use PHP 8.2
  • BUG - mb_http_input('UTF-8') is invalid.
  • 'trim(): Passing null to parameter #1 ($string)' - fixed using Null Coalescing Operator
  • A few undefined variables were found.
RM_ROOT_DIR is used throughout - this seems to have been work in progress.
5/8/23 Stroke. Bugger.
5/8/23 Regatta Draw If we are retiming an entire Draw, we need to be able to alter pitches and/or gaps. We also need to ignore races that have already taken place. TODO
5/8/23 Race Manager Reinstate Collapsed has been removed. It was there for a foulup made by Cambridge Autumn in 2018, and has not been used since.
30/7/23 Database Joy. I'd put this off as it didn't seem to be necessary. But Danson now have EVERY possible event, not just in Rowability, but normal as well.
Time to use character 5 of the Results Order.
30/7/23 BROE Results W.1X Band 1 - both crews had scratched. We needed to delete the band on BROE to get results upload to work.
26/7/23 Database [System].[AnonymiseData] added. This removes all telephone numbers, email addresses and API Keys from a database, allowing me to demo the system without breaking GDPR law.
26/7/23 Database [regatta.RaceDay].[Winners] is an unholy mess, now complicated further by requests from Maidenhead.
  • SponsorName has been added
  • CTE_Qualifying is obsolete, so has been removed.
  • I think that displaying 2nd & 3rd placed crew names is long obsolete, so this has also gone.
  • What on earth is 'OARAStatuses.Active'?
  • CTEEventID has been removed
26/7/23 Database The simplification of [BROE.Results].[ExportRegatta] last month had introduced a bug, whereby Banded events that occured on BOTH days were present in the output file. Oops.
25/7/23 Database The code for the 125% Rule should exclude Band 1. It doesn't. TODO. This sounds easy, until you remember that people can call Bands whatever they like. Wey & Thames, for example.
24/7/23 Twitter API access has become increasingly unreliable in the last couple of months. Today the platform has been rebranded as X. I do not support X.
22/7/23 Winners' Certificates Used by St Neots only, and untested. Oops. PRI_Rowing & PRI_Sculling no longer exist in the underlying query.
Even worse, they used the LONG obsolete DATESTRING property - this has now been done properly by parsing the date, and the erroneous data deleted from the EventData table.
22/7/23 Regatta Control It would be useful to be able to correct the winner of a race without having to remove one crew. A SWAP function, maybe? Also to find a race number, rather than needing to know the Status. TODO.
22/7/23 PHP crew.php was returning too many records as the custom status table was not joined by EventID. Fixed.
22/7/23 MySQL Sponsors.URL should have been defined as nullable.
20/7/23 Regatta Draw At the request of Maidenhead, Cox Doubling & Boat Doubling can be ignored if necessary.
19/7/23 Database [Entries].[ListCompetitorsRacingForMultpleClubs] (note the typo) appears to be obsolete - I can find no record of its usage.
19/7/23 Database [BROE].[LogChange_Scratched] copes with crews that a BROE Admin withdraws after the Draw (they should scratch them, but that's another issue). The problem was that it was using the Scratched flag, which is obviously not set, instead of the Withdrawn flag... So whilst the Alterations table showed they had been scratched, no chnage was actually made. Oops.
19/7/23 ASPX EntryID removed from entriesbystatus. It has no meaning for anyone apart from myself (and even then it is of limited use), and the hyperlink is better served by BR_CrewID.
The same change has been made to notviable, and I will slowly change all pages...
19/7/23 Database Bug fix in [BROE].[Check125PercentRule] - the final SELECT statement was not filtered by DayID. A neater solution is to add CTE_Entries, and do the filtering ONCE.
18/7/23 Maidenhead Well, that's a first. Competitors are allowed to enter TWO events per division. That means we need a new illegal doubling page, and also suppress the 'same division' page. TODO - are these not mutually exclusive?
17/7/23 Race Manager The Regatta Parameters form has been removed, as it was becoming less and less useful - most controls had moved elsewhere already and been hidden here...
16/7/23 BROE The ability to change Band no longer worked. This might have be a software bug, but I doubted that was the case, as it worked perfectly well in May. But it WAS a bug - [Banding].[ListEntries_NotBanded] was not filtering by DayID. BROE returned errors as JSON - I used https://json2csharp.com/ to generate an appropriate class for deserialisation...
14/7/23 BROE NRO & SCR verdicts are not always parsed correctly by BROE's results import logic. Gut feeling tells me that the bug is related to 3 lane competitions, though cannot test out that idea until St Neots runs next weekend.
JE at BR confirms that he's seen the issue, and worked around it in the same way as I did for Kingston, changing NRO to FIN. This, of course, changes points allocation, but since points are so arbitrary anyway, who cares? BR certainly doesn't.
14/7/23 BROE Wonderful. SBR used to be Sabre RC, and is now South Broads RC. The morons at BR have no concept of immutable keys. A bit like the Competition IDs, which I requested a list of, and was denied. Why? Because PC said they could be changed at any point.
British Rowing should be renamed as the Amateurish Rowing Association. It is hardly helping competitions. See next comment.
10/7/23 Regatta Draw MF of Kingston has failed to notice the UI change made a decade ago. He was unaware of the indication of clashes, so I have made it BIG, red and bold. Luckily I had a look before he published...
9/7/23 Regatta Draw 'Load Best' was not working. It turned out that this was calculating it, supposedly, for each division. That set a member variable, which was then overwritten. Composer.GenerateSequence simplified - it no longer does the same operation multiple times for no reason!
5/7/23 ASPX I've also added a page for multiple positions. But crew.aspx shows the duplicate as a Placeholder, which is REALLY confusing. Due to the way the page is constructed, this will be hard to fix.
5/7/23 ASPX Bug found in ajax.Link - it was not using iCmd, which meant that the BR_CrewID field was never populated. Quite how rows were filtered out is beyond me!
5/7/23 ASPX [regatta.RaceDay].[ScratchedCrews] now returns the Lane, so ad hoc SQL in the page is no longer necessary.
4/7/23 Import We now check for crews violating the 125% rule. BROE generates an email to this effect, but does not tell you WHICH crews violated it - utterly useless! A web page has been added as well.
25/6/23 BROE Results BROE did not like a verdict of DNS for the 3rd place crew, if it was not marked as scratched on BROE - I had to do this manually.

It also really did NOT like my results file, complaining that there were too many semi-finals. This was due to Peter moving crews between bands in software, and the SQL for CTE_StatusRaced was joining to Entries, NOT Regatta.Timetable. Oops.

25/6/23 Browser No matter what Microsoft say, ExclusiveUserDataFolderAccess does not work between different programs. I have therefore resorted to using the EXE name in the path.
24/6/23 rowstats ZZZY has been used for Syracuse University - they have been entered into Reading Town without being registered with BR. Naughty, naughty Peter.
21/6/23 Manual Entries If you're going to put them in, enter them at the right status!
20/6/23 Numbers The output of custom printed numbers for the Regatta did not honour the selected sort order. The code is hardcoded - an SP might be beneficial.
19/6/23 Import Superfluous contacts are being created. CreateSingletons has been modified to call [Contacts].[AllocateFromEmail] early on.
19/6/23 Manual Entries If this is a Divisional Regatta, prevent Peter Needham from entering a crew in the wrong division...

The problem was that [regatta.Draw].[ValidEntries] returned 2, but [Entries].[Statuses_ForDay] only returned 1... So the status wasn't in the draw, and errors were thrown.

The code has now been modified to pick the correct division from existing entries. If it is a new Status, then you can pick the division as normal. And the logic now supports Day 2 as well...

19/6/23 Database [regatta.RaceDay].[Winners] is an unholy mess.
19/6/23 Regatta Finish If we are running multiple finish terminals, do not leave the previous race's details visible. Bug reported by an umpire at Bedford Regatta.
18/6/23 Redraw The routine to allocate race times contained the same bug as was found on 22/5/23

We also need to ability to retime divisions.

18/6/23 Redraw There might be thunderstorms this afternoon. In which case, TVP want to get rid of all 1x & 2x races and redraw. He means retime...
18/6/23 rowstats Minor bug - when a crew is scratched, rowstats is not told until its race takes place. It turns out that this is specific to 3 lane racing - what I need to to is just make an update on the requisite row in the Timetable table to FORCE it to be uploaded.
18/6/23 Regatta Finish The Abandon Race button has been removed - don't think it has ever been used.
18/6/23 rowstats I have been puzzled for a while by the software failing to set the EventStage correctly. A comment in the source code states 'If this is a Regatta, and iStage = RaceDay, then check whether any races have taken place. If not, change iStage to DrawPublished.' Well that's a bloody stupid idea, isn't it?

Instead, we need to check whether we are actually on the race weekend...

18/6/23 Sockets The client AutoDiscovery code was not quite right - it was fired repeatedly, as the timer was never stopped. It turns out that a client socket never fires its ConnectionEstablished event...
12/6/23 Database Altered [Contacts].[AddEmailAddress] to prevent multiple email addresses from being created. Then realised that the problem was multiple contacts being created...
9/6/23 RaceManager MAJOR bug found in MoveEntryToCorrectDivision - it was moving ALL crews to the new Division. The code was introduced at T&V 2022, but obviously not fully tested...
3/6/23 RaceManager The taskbar icon, whilst relevant, is not obvious. Going to try the Trophy icon for a while...
3/6/23 RaceManager Finally added a call to ReloadForms to OnImportComplete. This ensures the Banding & Masters tabs are visible after a clean import. Need to do this more efficiently though...
31/5/23 RaceManager I've added a little tweak to allow me to view databases from multiple versions of SQL Server - Twickenham used 2019, whereas I use 2008 R2 for compatibility reasons.
30/5/23 Database Bug fix - [Entries].[fn_IdenticalEntries] was not day specific. Who cares if the same crew races on both days of Reading Amateur?
29/5/23 Feedback 'We used a laptop set to Race Finish for our commentators so that they could then read off the 'official' result from the list at the bottom of the screen. Some complained that this was difficult to read, so it would be useful if that window could be expanded to enlarge the results listings.'

A good point, well made by Walton & Weybridge - a commentator does not need the full UI for finish, so I will expand the grid & make the font larger. New form required...

22/5/23 Regatta Draw TH of Twickenham has found a bug in the Status Combinations logic - the usage of InsertTimeBeforeRace needs to be checked. It turns out that the routine was called AFTER setting the heat's time. Fixed.
Furthermore, this routine was what was incrementing the overall time, since 'tTime(iDivisionID).Add(tDuration)' does nothing - the code chould have been 'tTime(iDivisionID) = tTime(iDivisionID).Add(tDuration)' This bug has been there a LONG time...
19/5/23 Handicaps Whilst the webpages were converted to using a database table, RaceManager was still using the data in 2016.txt This is bonkers, and so has been fixed.

The whole Handicaps control is a mess, being a relic of the hybrid SQL Server/Access solution. [masters].[GetHandicaps] will be used next year, replacing hardcoded SQL

11/5/23 Update Sheets These now have a QR code at the top, pointing to the latest information.
8/5/23 Seeding If the default progression is 'Plate', fix invalid combinations automatically.
8/5/23 Regatta Only one bug found yesterday, and that was in BROE - substitutions had been made so that one person was in the 7 seat AND coxing! My code threw an error - by changing the primary key of the CSV.Competitors table, this is resolved.
6/5/23 ASPX Crew Lists for Control Commission can now be generated.
5/5/23 ASPX Duplicate statuses defined on BROE are now shown during import of entries. This was prompted by Twickenham, where a crew has entered the second of the Mas.G.4+ events, and therefore cannot be imported.
2/5/23 PHP Hmm. I appear to have changed the spider classes, removing the E99 & T99 identifiers. Sponsor & Trophies no longer worked in local code. This has been fixed, and the logic in InsertStatusDetails simplified.
2/5/23 PHP The Sponsors table now has a URL column. This comes from the database (where there is no UI for it, yet).
2/5/23 General Fabulous. My wife has decided that the storage box used for a NUC would be better used for bloody cutlery. 5 days before Bedford Regatta.
2/5/23 Database St Hughs Colleges & St Peters College have had their missing apostrophes added. I am surprised that I had not noticed this error before.
2/5/23 Regatta Draw Previously, completed races were hidden. There is now a checkbox to control this behaviour.
1/5/23 Regatta Draw That's the first time I've used the grid to move a race after the Draw has been published!
30/4/23 ASPX rowertimes added
29/4/23 database After the Draw is published, ValidEntries will include scratched crews, regardless of whether 'Limit to Accepted' is set or not.
23/4/23 Regatta Draw Bug. Do a draw. Save it. Change nomenclature for banded events. Restart program (not sure if this is necesary). Reload Draw. Apparently 'Seeding has changed'.
19/4/23 Trophies I've added a column to the grid to show which Trophies have been allocated.
11/4/23 Regatta Victor Ludora are calculated for T&V and Kingston (and now Walton as well, who wish to use T&V's weightings). The code only differs in the weightings - why not have a generic routine, with each specific SP passing the parameters in? This has now been implemented.
6/4/23 BROE The API is broken, as of yesterday. I have logged a bug report with BR, and have received this reply: 'Starting yesterday would tie up with some major internal updates which should not have caused any problems.'

These ‘major internal updates’ were obviously not very well tested...

6/4/23 Results BROE will not let you finalise a meeting if there are still placeholders (even in crews that did not start). But it doesn't SAY that - it just says 'Error'. Typically unhelpful.

My code now prevents the file from being created.

4/4/23 Regatta.Server The audit logs also show that DeleteStartTimeID and DeleteFinishTimeID are negating the crew number. This is legacy code (a remnant of MS Access) which I had thought I had purged. Obviously not!
4/4/23 Database [Head.Timing.Start].[ListChangesToCrew] and [Head.Timing.Finish].[ListChangesToCrew] created. The person in charge of the Finish Timing computer was a child, who failed to read the instructions provided (his mother, who was scribing, didn't either), and was making corrections during the division. The problem was that he was making many mistakes in so doing...
Crew 104 'finished' at 09:18:20. 5 minutes later, he did an edit, dropping that time to 09:18:19
A minute later, he did a further 2 edits, dropping it to 09:18:17
By checking the written logs at 10:35 (it took me that long to figure out his errors), I dropped it to 09:18:11. This is not good enough, and he will NEVER be used for timing aagin.

For Crew 101 his edits were even worse.

3/4/23 Database Overtaking Statistics were not quite right. [Statistics].[HeadRace] was filtering out DNF crews from the gap logic, but not from overtaking statistics.
27/3/23 Database [BROE].[Check125PercentRule] could probably be simplified by fn_CRI So could [regatta.Draw].[ValidEntries]
27/3/23 Database [head].[Draw_ForDivision] simplified.
27/3/23 ASPX [masters].[ListEntries_IncludingSeniorCrews] was already using fn_CRI - the code has been updated. The SQL JOIN logic has also been simplified.
27/3/23 Database [head].[GenerateRandomDraw] modified to use fn_CRI for consistency & simplified code.
[Entries].[ListAll] simplified as well
[Entries].[CrewRoster] now uses fn_CRI
27/3/23 Head Draw Finally got 'Renumber Everything' functionality working. Should have done this years ago...
26/3/23 RaceManager The code for calculating a crew name when multiple crews have the same Stroke does not work. Masters FGH.4- demonstrates this perfectly. TODO
25/3/23 ASPX Amazingly, entriesbystatus.aspx has never shown TimeOnly!
22/3/23 Database The logic in [Statistics].[NotViable] was wrong - the codes to identify Adaptives did not work, as ResultsOrder was not being parsed correctly. Min 2 clubs & 3 entries does not pick up an event with 3 entries from the same club. I can live with this.
22/3/23 Database Ouch - [payments].[Details] has not been looked at since the original conversion from MS Access. Will need to search for 'TOP (2147483647)' to identify others. [Statistics].[Payments] is the only other one left - this syntax generally suggests that the SQL logic has not had a full review.
22/3/23 ASPX I'd not come across the urlMappings section of web.config This allows a web browser to see an aspx page at top level, but the file structure on the server to have it in a subfolder. Quite useful for keeping pages & class files together.
21/3/23 ASPX A major tidy up is ongoing:
  • All Modules have been converted to static classes.
  • The AJAX pages used to use a class level connection. This is probably redundant.
21/3/23 General Changing a W.Mas.FG.1X crew to W.Mas.F.4X on BROE & importing worked. Rather pleased by that one...
20/3/23 SQL Major functionality added to [head].[Entries_ByStatus], allowing an entry's original status to be displayed by entriesbystatus.aspx It ignores Masters Handicaps, and also ignores banded crews where they started life as the base status. So a crew entered as Op.4+ will be not listed, but a crew that started life as J18.4+ and was subsequently moved to Op.4+ and banded, will. Its not infallible, as it requires that entries were imported before the change was made, but it is still a big improvement...
20/3/23 SQL [masters].[ListEntries] modified to use dbo.fn_CRI - this allows me to make the code simpler.
19/3/23 Banding I have just realised that there is no way in my software to remove a crew from a Band. [Banding].[ListEntries_NotBanded] has therefore been created; this is called by BROE2.CrewBands.Publish
Now to write the editing logic...
19/3/23 Banding One consequence of having unbanded entries and a SINGLE band was that RaceManager.Libraries.BROE.Banding.CheckForBanding was written to deliberately remove the band. That caused all sorts of issues in this scenario...
19/3/23 Banding [Banding].[ListEvents_NotBanded] now ignores Time Only crews. This is because I have a couple of events where a crew is massively overpointed, so I have not inclided them in the banding structure at all.
12/3/23 Event Creation A few bug fixes for Adpatives & ParaRowing. The problem is that the nomenclature has changed regularly over the years, and my logic hadn't caught up. This will need to be tested after the Head.
4/2/23 Payments The payment system is utterly broken. Partial refunds screw it up. Discounted payments for Time Only & BRC crews don't help either. Time for a radical rethink.
11/10/22 Head Control We set a crew to be time only. This does not appear to have taken effect, but I cannot see anything wrong with the code, and when I tried it, all worked.
11/10/22 Timing Several bugs found - sorting on a blade image causes a crash, and ALL crews code also threw an error.
The error was caused by [head].[ApplyReRowInNewDivision], which was negating the CrewID instead of simply deleting the record. This is a throwback to the old MS Access code, and is uneccessary.
11/10/22 ASPX Minor bug fix in substitutions, which did not display scratched crews correctly.
11/10/22 RaceManager A full publish was required in order to get handicaps displayed on rowstats. This is because the main publication logic was looking at the head.handicaps table, which is obviously empty before race day. Bug found by Reading SBH. I've seen it myself, but hadn't figured out what the issue was.
2/10/22 Database [head].[CreateRaceOrder] is not quite right - it does not cope with a Masters Crew that was moved into a Senior Band (BED Mas.C.4+). This has no effect, as the Draw appears to work regardless, but the draw grid is wrong.
It looks as if the logic in [head].[GenerateRandomDraw] is somewhat better. Given that this works, why create RaceOrder at all? We can update the Entries table during the Draw...
2/10/22 Database [Head.Draw].[Initialise] created. This clears test data, truncating the timing tables, and removing entries from the audit log.
24/9/22 Head Timing It was not possible to change a crew number or time for crews that had already raced.

But this throws up a WHOLE can of worms. I have just modified a Finish Time for a crew that raced in the previous division. An unlikely scenario, sure, but the TimesElapsed table is not updated...
[Head.Timing.Start].[ModifyTime] and [Head.Timing.Finish].[ModifyTime] therefore delete from this table.
[Head.Timing.Start].[Problems] and [Head.Timing.Finish].[Problems] now use a DISTINCT Select.
[Head.Timing.Start].[Invalidate] and [Head.Timing.Finish].[Invalidate] are obsolete and have been deleted.
[head].[UpdateDivision] had a totally unecessary CTE, which has been removed. It also no longer performs uneccessary updates.
[head].[Update Crews in Division] also updated so that uneccessary updates are not made.
[head].[UpdateStartFinishFlags] is almost certainly obsolete. The code still calls it, and it does no great harm.

24/9/22 Head Clients A minor annoyance has been fixed - Control did not allow coxed boats to be searched for. The bug has been there since I moved to ASPX... W.IM2.4X is not a useful suggestion either!
11/9/22 General I have been approached by New College, Oxford. They are looking for software to support their bid for running the Autumn Novice Regatta. This can have up to 64 entries, with a repechage. That means 95 races!
10/9/22 Reports CRA Crews are no longer reported in the cover sheets. Not much I can really do with them, as no payment or contact details exist.
9/9/22 General I have finally got rid of my old HP6730b laptop - it had plenty of memory, and ran W10. But the screen has finally packed up, so I've transplanted the drive & memory to a similar, lower spec laptop.
6/9/22 Handicapping The webpage now shows Rule 7-3-4d. This is the current Start Procedure for handicapped races. The verbose wording for 3 lane regattas is displayed if appropriate.
31/7/22 PHP The site is now GDPR compliant, asking the user to accept Google Analytics. I originally used the minified version of a 3rd party script found on the internet - shame that it contained an error!
I still cannot quite work out how to get tracking working immediately after acceptance - my JavaScript has always been poor...
31/7/22 PHP The marshalling page does not show blades, even if the flag is set in the querystring.
31/7/22 PHP The final bit of functionality needed in PHP is the ability to reverse lane order. This is now implemented via the 'm' flag, which does not pass through to the hyperlinks, since it will typically be called from a QR Code (new) only.
31/7/22 PHP Indent Byes functionality implemented. Not wildly useful, but the PHP ought to support the same functionality as RaceManager itself...
30/7/22 Redraw Lots of little tweaks have been made - 'Remove Crew' & 'Remove Race' options are only show if there is a crew/race to remove. Removed crews are now shown correctly as well, with a crew number of 0 not displayed.
30/7/22 .NET I am tempted to compile as AnyCPU now that I have dependency injection working for the Chilkat DLL.
30/7/22 PHP Named Scullers functionality implemented.
30/7/22 Browser T&V reported that the refresh button didn't work. That was because they'd used the browser in RaceManager itself, and then used Regatta Control. The event handlers were not added, since EnsureCoreWebView2Async threw a COM Exception first. Need to report this bug to Microsoft.
30/7/22 Race Cards If you generated a full set, it was then impossible to generate incremental updates, as all of the files existed. Use of a second folder resolves this issue.
29/7/22 PHP The values of IndentByes & NameScullers are now being provided to the MySQL database. Let's do something with them...
29/7/22 RaceManager The other checkbox that was not being initialised was '1st round always called heat'. Just as well that this could not be set, since it modified the Round variable used during the draw for race block movement.
Not sure what effect it would have had, but it turns out that this functionality is only used when the format of the spiders is set to Debug or NamesCompressed. Neither can be set from the UI, and the effect looks to be debugging code, putting the Round name in the space where the winner would normally be.
The checkbox is therefore redundant, and has been removed.
Named & Compressed is actually an output file format, which is malformed for 3 lane racing (only 3 lane races are affected; 2 lane are fine).
The issue was a missing bar character - RaceManager.Libraries.Spiders.FileOutput.TXT.Compress was missing a line of code...
29/7/22 RaceManager I wondered why 'Indent Byes' was having no effect. The controls on the Regatta Output files were not being initalised, so the setting was never actaully set!
29/7/22 RaceManager Bug (not fixed). Reinstate a scratched crew. The spider doesn't show the change
29/7/22 RaceManager Bug fix - when collapsing an event, the crew number was not shown for scratched crews. It now is, and is NOT struck out, so it can be easily read ;)
29/7/22 RaceManager Once the Draw has been published, DO NOT update the division that a Regatta crew is in - it may have been moved... Bug fixed.
27/7/22 RaceManager Minor bug found. If we are running a divisional regatta, and move a crew from one event to another (they entered W.4X+ in Div 3, instead of W.4+ in Div 1), then the entry needs to be moved to the correct division, or the spiders will be displayed in the wrong order. TODO.
26/7/22 Handicapping I promised GTD a week ago that I would sort this out. I failed.
[Masters].[Handicaps] is a new table, populated with the 2016 data. The web page makes use of this to show all potential combinations. The web logic is actually better than the original, which uses grid rows...
26/7/22 ASPX Bug found - [List - Sponsorship for ALL Statuses] was still being called. It should have been [Prizegiving].[ListAll] instead
25/7/22 ASPX With the recent changes to the way that Event Stage is handled (a HUGE improvement), there was no way to view the spiders or race programme until the Draw had been published.
That poses a problem, since obviously you want to be able to preview it...

At the same time, I have split each menu down into its own class, using a standard framework. This simplifies the logic, and removes some very odd code.

24/7/22 RaceManager Why would we not want to withdraw crews scratching before the Draw? See comment from 6/5/18...
23/7/22 Control Printing winners' certificates at St Neots failed, due to unterminated XML. This was because Joshua Tyrrell of Milton Keynes has tabs in his names!
22/7/22 RaceManager The EXCEPT operator is insufficient for eliminating the Checksums table. We need to concatenate using FOR XML PATH. It has been a beast to write!
Why do I care? Generating the checksum table is slow, with many unecessary database writes.
[Entries].[ChecksumGeneration] & the table have been removed. As has OARAGenerateEntryRoster, which was one of the last vestiges of an Access based system, dating from February 2008...
17/7/22 RaceManager At entries closed. Draw done. Seeding changed. Draw loaded; exception thrown.
17/7/22 Database [BROE].[Append Doubling] modified again - rather than having a hardcoded list of private boat names, use the new PrivateBoats table.
17/7/22 RaceManager Assorted tweaks made:
  • Draw - click on a race in the clashes grid for it to be shown. This saves a lot of time scrolling.
  • Draw - when moving a race, display its clashes (MouseDown handled instead of Click)
  • Draw - buttons update correctly on cancellation.
  • Import - hyperlink contains the active day
16/7/22 RaceManager The one thing that I cannot do yet is define boat doubling between different clubs - in this case, Norwich School & Norwich High School are sharing a trailer, and each school is using one of the sculls...
16/7/22 Database Extensive modifications made to [BROE].[Append Doubling].
The source code for OARAUpdateDoubling had comments that suggested that I was aware of a problem - if we add boat doubling by hand, and then it is confirmed on BROE, an error is thrown.
Use of a temporary table in the Stored Procedure resolves this issue.
15/7/22 ASPX The Entry Statistics page now lists the number of paid entries.
14/7/22 ASPX The Doubling Links page now shows the type of doublng involved.
The rerigging page works before the Draw is done
10/7/22 RaceManager I have inserted boat doubling for all crews at St Neots that have specified it in their notes. The problem is that I could not do this for composites.
The logic for composite crews now works, with all entries for the constituent clubs listed.
I've also managed to get ANY relevant composite crew listed.
10/7/22 RaceManager The various notes columns now support wildcard searching - VERY useful when trying to locate all instances of boat sharing...
10/7/22 Finish Must do something about 'No Race' - ie where neither crew turned out at the start
9/7/22 Finish In 20 years I've never seen verdicts of 'placed'.
9/7/22 Clients Miles has managed to break something that Peter failed to do. Let's have a REALLY slow LAN connection, and also a really slow WiFi connection. Autodiscovery get very confused, and constantly reconnects.
I think the problem is that the address being sent does not match the oe on which it is connecting - hard to explain.
4/7/22 RaceManager Notwithstanding the fact that KAR were unable to specify the division for their, manual entry, I have no idea how they managed to enter it into a NULL statusID.
Its actually easy to understand - they clicked on the close icon at the top right corner of the dialog, rather than clicking Cancel (which would have been the logical thing to do).
The button is there only for the import dialog. Bug fixed.
4/7/22 RaceManager It is now possible to add a manual entry to a divisional competition - the UI asks for the Division.
30/6/22 Database CRI Max & PRI Max columns removed from the master database.
28/6/22 Web I have moved to JQuery 3.6.0 Both tablesorter & scroller appear to work with this.
ie9 support has been dropped.
28/6/22 WebView2 When being used by 2 processes, the control throws a COM Exception, though still appears to work. The Exception is now ignored.
27/6/22 RaceManager When publishing, the hyperlink in the dialog footer now shows the correct day.
27/6/22 RaceManager EventStage has always confused people, especially Peter Needham. The DrawPublished flag was added as a stopgap to prevent him from going back to Entries Closed, and screwing up the seeding tables.

I can't see the wood for the trees - why not use the Publish button to set EventStage??? The logic is backwards anyway - you have to set the stage to 'Draw Published' BEFORE you can Publish!

  • Initially, we populate the combo with Taking Entries & Entries Closed. Even this is probably uneccessary, since Entries Closed can be deduced from Baseline...
  • Allow them to publish a draft draw - this has no effect on EventStage
The key to making this work is to modify the getter on EventStage so that it takes account of the DrawPublished flag. This allows a 2 day regatta to have one day set to Entries Closed, and the other to Draw Published...
27/6/22 PHP Publish Draft functionality now works - if the flag is set, the regatta does not appear on the index page.
26/6/22 PHP The Include File functionality is nice, but I rarely set it. A nicer solution is to use a specific folder, containing files named for the Race ID. This ensures they are inserted automatically.
26/6/22 RaceManager Minor bug fix - the results modification grid did not display blades for all foreign clubs - specifically, the ones with a 4 letter club code, and where the old 3 letter blade did not exist.
The concept of the code leaving in races where both crews scratched has baffled Peter. Not sure what to do.
If modifying the result of a race, allow winner to be the crew that is currently listed in second place - then modify second... Annoyance found during RTR, where a crew had been wrongly marked as having scratched
25/6/22 Live Results Caching the 'scratched' state of a crew is not massively helpful, since it can be set by RaceManager - and the server knows NOTHING of this. So I am now using ExecuteScalar code each time - bit of a waste of time, but not much (actually, if doing a full publish, we can use the flag to save time). To force the race itself to be updated, we set the RaceID to be equal to itself, thereby incrementing the row's timestamp. This is done by ForceRaceToBeUploaded, called from RaceManager AND the server.
25/6/22 RaceManager If results are modified from here, the public website was not updated immediately. This is solved with a silent, incremental upload.
25/6/22 TODO. [BROE].[Append New Entries] [BROE].[CheckForIdenticalCrews] [Banding].[ListIdenticalCrews] - all of these use the Checksums table.
Ideally, I would like to get rid of this - it was vital when I used MS Access at the database, but SQL Server has the EXCEPT operator, as used by [Entries].[CrewRoster]. Generation of the checksum is done during import, and is relatively slow.
25/6/22 Database [Entries].[CrewRoster] modified to use LEFT JOINs on the Competitors table. There was also a redundant JOIN in there - presumably legacy code. I undid the changes initially, as the new code produced far more rows than it should have done. It turns out that the code had ALWAYS due this to a mistake in the logic for detecting substitutes!
This allows basic information to be displayed when reinstating a crew. This is a huge improvement, and long overdue.
25/6/22 Server Getting RaceManager itself to carry forward winners to the next round is non-trivial (without duplicating code, which I am reluctant to do).
All the code in InformCommentaryOfMultiLaneResult had been commented out long ago, so calls to it have been removed.
HuntWidows does nothing either. It has gone as well.
InformCommentaryOfWin is redundant
24/6/22 Regatta Peter Needham strikes again! He has unscratched a crew, but my software still marks it as having scratched. Why? because lots of crews srcatch, without BROE knowing...
He'd also like to carry forward winners to the next round - it turns out that this is only done when the Control program connects. THAT is illogical.
Update crewnames should be done automatically before publication.
22/6/22 General I don't see 'Default' as the race winner. Why should I? I do not need to run the server up, so I do not.
22/6/22 Database Joy. [regatta.Draw].[GenerateNames] uses ClubShortName if the crew has a name, and ClubName otherwise (which is the case if crewname shortening is in use).
RaceManager.Libraries.LiveResults.RaceUpdate generated a crew name of 'RC' if the ShortName ended in RC, and the ClubName did not (my mistake when renaming clubs last night). The bug has been fixed - tracking it down was tricky...
Clubs should have BC/RC appended. Schools should not. For brevity, nor should composites
Draw Published should not be selectable at 'Entries closed'. Instead, it should depend on the state of Publish. This does throw issues though if crews are added... Might have to delete the entire event and add it at the start of the day...
Added confirmation when swapping crews that are in different events. Swapping crews ought to update the seeding table.
18/6/22 PHP Hyperlinks have been removed from scratched crews, since BROE does not provide competitor information for them.
18/6/22 PHP If the verdict is DNS, spiders do not show NTT as well, as it is pointless to do so!
18/6/22 PHP spiders.php - minor bug fix in CalculateMaxStringLength - DayID was not specified.
18/6/22 MySQL Rowing & Sculling points have been added to the Competitors table.
17/6/22 PHP Nasty little bug found in FormatCrewName. If the winner of a race will be the winner of another (it happened at TVP, where Peter did not want to collapse the Draw), sNameOnly was not set... So the winner's name shown was that of the prevous crew that the function had seen...
16/6/22 PHP rower.php displayed multiple nomenclatures for the same event.
As it happened, the fix was easy - I had not specified EventID when joining to statuslist_custom
16/6/22 Race Cards TVP are running a 2 lane event this year. So a 2 lane race card has been produced...
16/6/22 RaceManager Bug found in the Race Card generation logic, that caused crew numbers to be inserted instead of 'Winner of Race'.
13/6/22 Database Results upload for Reading (Sunday) failed. BROE said there was an error in the upload file, but failed to say WHAT the problem was. Really unhelpful, making diagnosis impossible...

But, I had a brainwave on the drive home today - it was an oddity that had caused issues generating upload files (unreported, but seen during a remote session). Analysis showed that the BandMapping table contained entries in Op.Sch.1X for Band 1 AND Band A...
[Banding].[ApplyBanding] has been modified to remove bands that no longer exist.

12/6/22 Race Day Today's problem was that the software was set to not record times. Easy to fix, but it required restarting Regatta.Server - it would be better if this option could be set by the Finish program. So there is now a menu option to set it.
12/6/22 Database One of the puzzles of Reading yesterday was why the opposition of scratched crews were not always being carried forward to the next round. It turns out to have been a mistake in the database, which would not set a 'Winner of Race x' as the default winner.
This is easily resolved with a COALESCE statement, and a missing Day predicate in one of the CTEs speeds things up a bit.

They were importing from BROE as well (no idea why they thought scratching crews there was necessary), which didn't help, as the server program didn't know it had to run the default scratching logic.

12/6/22 RaceManager I wish everyone reported little niggles. Rob Burnage told me that it was displaying Saturday's results in RaceManager's webview, even when Sunday was selected - I had meant it to default to the right day, but there was a typo in the querystring...
11/6/22 Database Minor bug found in [regatta.RaceDay].[Winners] (applies to 2 day regattas where crew numbers are not unique to a day). The list of winners was duplicated once a form was marked as Checked, Collected or Extracted - there was a missing day predicate in one of the JOINs.
11/6/22 PHP Variable lane order is not present - can I be bothered to add it?
11/6/22 PHP rower.php finally works for Regattas... Not sure about 2 day logic yet (where someone is racing on both days) - will test with St Neots next month
10/6/22 Draw Modification That's annoying - Change Status functionality had not been written...
26/5/22 Regatta Clients Let's say that I'm lending kit to Reading Amateur (I am, again). I have no idea what IP address their router will assign to the NUC I'm lending them as the server.
This is always a problem, as clients.xml needs to be modified on each machine. Every time.
Or we can open UDP port 1002 on the server, and 1003 on the client, and let the client find the server by issuing a UDP broadcast. The server replies, and clients.xml get modified...
26/5/22 RaceManager Overall, the new XML structure has worked well. There have been a few minor teething issues, but overall it is simpler.
The big difference is that databases.xml need not be installed AT ALL - the competition specific information is in Defaults.xml only. This allows incremental installs, so BRC's NUC can be used for demos.
26/5/22 API My internet connection is poor today, and the API notifications often have informed me that there were a negative number of entries on BROE!
In addition, the API notification has never given the correct information when there are new entries on multiple days.
The logic has been improved significantly - instead of spawning a thread for each day, we now have just the one, which displays the totals. If a response is not received from BROE, it copes, as EntryCount willl return NULL.
23/5/22 TVP Bugger. Despite my best efforts, PN still finds ways to break my software. This time, he is emailing 20 or so statuses, and Windows cannot cope with the path name.
23/5/22 EventData The databases.xml file has been simplified, massively. If we take
22/5/22 Results Modification As the panic of their marquee not arriving on time hit, Walton Regatta used Results Modification within RaceManager itself to enter results. It is not designed for that, as it does not carry forward winners (by design).
I corrected it by hand, but the crew selection dialogs have been greatly improved.
11/5/22 .NET Redundant reference to DocumentFormat.OpenXML 2.9.1.2 removed from Regatta.Libraries - this was causing issues, as RaceManager reference 2.15.0.0
8/5/22 Results Upload When I removed the dedicated results feed software, I made a mistake - it uploads the LOT, not just the changes.
3/5/22 BROE KCH have managed to enter one girl in the bow seat of an Octuple; she is also coxing it. My software throws errors - should I amend the primary key of the database tables to allow this (thus suppressing the error message), or leave it be? Note that this happened again in 2023, and the import logic was then modified to explicitly check for this bug in BROE.
28/422 Regatta Draw I hate to say it, but Peter Needham's requirements (loading a draw, modifying it, then saving it again) are SO useful
28/4/22 ASPX A page to show entries with placeholders has been added.
28/4/22 Regtta Draw It is 4AM. The Draw works, even with 7 competitors who are trebling up.
27/4/22 General Banded College events did not work. This has now been resolved by a tweak in CheckForBanding
26/4/22 Regatta Draw Bug fix - when you changed the combo box from 'ALL Rounds' to a less severe option, the number of clashes remained constant. This was due to doubling links for each entry not being cleared. The curious thing is that sometimes it worked... And it is still flaky - no idea why, though I have taken a backup for analysis.
26/4/22 Finish Sponsor Name is not being displayed. If there is not one, though, the controls need to be hidden. Will sort these issues out after my trip to the Garden Room.
24/4/22 Head Timing Currently, the grid shows just the current division. But it might be useful to be able to show ALL times. It looks as if this was work in progress, since a checkbox existed in RaceManager.

When the option is set, a boolean value is passed to the constructor of Head_Timing_Timing_Info - this ensures that in normal operation we do not transmit uneccessary data.

22/4/22 Banding The Band Nomenclature code has never worked properly, so the controls have been hidden in Release builds.
24/4/22 Database All references to CRI Max have been removed from the Stored Procedures.
24/4/22 Database I wanted the banding grid to sort by band name, then the appropriate CRI (Rowing or Sculling). Had to hunt through the code, so have created fn_CRI to make life easier.
23/4/22 BROE Import I have 2 Stored Procedures - [BROE].[ListNewEvents_Senior] & [BROE].[ListNewEvents_Other]. The logic that calls the Senior SP uses CustomResultsOrder from the EventName (override), while the logic that calls the Other SP does not use the EventName - it calls SanitiseStatusID, working off EventIdentity.

This is bonkers. Ultimately, the 2 routines do the same thing.

One further inspection, SanitiseStatusID is only there to fix some of Star's event names, which can contain Division numbers for reasons unknown. I believe that is is covered by [CSV].[ExecuteCompetitionSpecificCode] and so SanitiseStatusID is redundant.

This has come up because Star (it would be, wouldn't it) have created J14B events. Forget using the points system as designed - let's use a concept that hasn't existed for several years.

22/4/22 Debug Whilst it is pleasing to have finally found & fixed this bug, it only really applies to my system, where I switch between competitions repeatedly to test features.

The new installer package installs competiton specific information (these 2 files) into C:\RaceManager\Config\Competitions. What if a machine is used by 2 competitions, like Reading SBH and Reading Amateur Regatta? In this case, one installer will wipe out the other's data... I found this when I installed Bedford Regatta on BRC's server, only to find the active head race had vanished.

Databases.xml is used to populate cmbRegattaSelection, and could be massively simplified to contain just ID, day, database & display name. We don't NEED host information. The installer could then put files in competition specific folders, rather than the parent.

22/4/22 Debug A bug I have been hunting for a while can be reproduced accurately. Select Day 1 of a competiion. All is good. Now select Day 2 of a DIFFERENT competition, and the entries you see are those for Day 1.

This problem is in how EventData works internally - it reads the XML files to populate the combo box. This is pointless in ASPX.

But the big problem is that it reads Event_ActiveDay from the database, completely ignoring what has just been selected.

That said, I am increasingly unhappy with most of Databases.xml Why? It has nodes containing host (effectively competition) information. Now that we have Defaults.xml (which can be installed), the host nodes are pretty much redundant.

22/4/22 PDF BR Name added to the Regatta Entry Forms
30/4/21

Reminder

Regatta Redraw In no particular order, we have to test the following scenarios:
  1. Change Standard Progression to Round Robin - OK
    • Note that this is an unlikely scenario, but should be tested for completeness
    • A crew could only be allocated once, and wasn't selectable subsequently. Fixed.
    • Number of Lanes used in a Race is held in the Regatta.Names table, which shows the first race for a crew. This prevents Round Robin from being sent to SQL Server, and may cause other, so far undetected, errors... The Regatta.Timetable table has been modified, as well as the Regatta.Races TVF
  2. Create new event from scratch - TODO
    • This does not work at all
  3. Event with only 1 crew left - TODO
    • Dialog for changing Progression System should not be shown (it is empty).
    • bar
  4. Merge 2 Masters Events to create a new handicap - OK
    • If one of the events is ALREADY a handicap, then the information needs to be cleared from OARAMasters
    • bar
17/4/22 Regatta Draw And there we have it. A really elegant solution, which I have wanted for years.
17/4/22 Regatta Draw After the Draw has been done, it would be REALLY nice to be able to move races using the UI & recaculate clashes caused by substitutions. WITHOUT renumbering races or crews. It turns out that most of the code had already been written, though the edge cases (moving a race to the start or end of a division / day) had not been coded.

I think all that remains now is the SAVE functionality, which merely needs to update race times for any races in the Undo Buffer...

17/4/22 Regatta Draw The option to 'keep crews on the water' has been removed. It was an idea for Desborough last year, but was unworkable.
17/4/22 General I'm running out of bugs to fix. There have been a few improvements over the last few days (it is now Easter Sunday), but nothing that anyone else would really notice.
16/4/22 Race Manager RaceManager.Libraries.Handicaps.HandicapLogic (MustInherit) is pointless. Again, it is a remnant of the intermediate code, but getting rid of it has taken a couple of hours, leaving a different unholy mess that will need to be cleaned up.
16/4/22 Race Manager The Masters handicapping logic still has remnants of the intermediate code where I was transitioning from MS Access to SQL Server. RaceManager.Libraries.Handicaps.Logic.Recordset has a comment to the effect that the SqlDataReader should not be closed. Fine, since that is the variable the Property (why not a function?) returns.

Sounds OK, doesn't it? But what about the SqlConnection that was opened, but never closed? Oops.

16/4/22 ASPX Surprisingly, the status statistics page did not allow the Status Description to be sorted - only the counts. This has been fixed.
16/4/22 Banding
  • The Group column is hidden if there are no groups
  • On saving to BROE, the grids are refreshed.
  • The grid containg the bands is no longer full width - it looked daft! Also, the ResultsOrder has been removed, as it provides no useful information.
16/4/22 ASPX A new page has been added to show unpaid entries. Our team at Registration for Bedford Head could not work out why the paperwork said 'unpaid' yet Star Club claimed to have paid. It turns out they paid VERY late.
15/4/22 Results Modification Assorted little tweaks & improvements have been made.
  • The way the code was written meant that 1 3 lane race could not be edited UNTIL a 3 lane race in that event had been recorded by the Finish program.
  • Ampersands in crew selection dialogs no longer are doubled.
  • It is not possible to set 3rd place or 2nd verdict for a 2 lane race.
    14/4/22 General There is NOTHING like a demo for finding bugs! A quick demo to Twickenham last night threw up several:
    • Finish did not work, throwing an overflow exception. This was caused by a bug in Regatta.Server, which was not initialising the Globals class correctly. A static constructor should have been used.
    • Modifying race results in Regatta.Finish worked, but the generated Tweets were wrong, stating just (for example) 'Reading beat'. This was because the second placed crew was not recorded. A comment in the source code shows that this functionality was written during St Neots 2014, but was lost when the messages were converted to self-contained classes.
    • High DPI screens remain an issue. Draw Modification within RaceManager does not render correctly.
    14/4/22 Race Numbers The spare numbers printed for our April Head were wrong, because the dingbat was not printed.
    8/4/22 IT Kit All kit is being upgraded to:
    1. Windows Update
    2. Notepad++ 8.3.3
    3. LibreOffice 7.32.
    4. RaceManager 22.4.8
    5. TeamViewer
    Machines done so far:
    • NUC 6i5 SYK
    • NUC 5i7 RYH
    • NUC 54250 WYK
    • NUC 54250 WYK (WiFi)
    • Dell Laptop 1
    • Dell Laptop 2
    • Dell Laptop 3
    8/4/22 Head Timing One of the problems encountered in February was a crew racing twice with the same number on, yet this not being flagged as an error. [Head.Timing.Start].[Problems] & [Head.Timing.Finish].[Problems] have therefore been modified to include creews that have already raced. The invalid sort order in [Head.Timing.Start].[Problems] has also been fixed.
    7/4/22 April Head The start order was wrong - B3.Op.2X was scheduled to race before Bands 1 & 2. I didn't spot this, and nor did anyone else until today, 4 days after the Draw was published. I have added a sanity check routine, [head].[CheckStartOrder_Banding]. This is not perfect, as it can't deal with Groups or oddities like College Eights, but can at least provide a warning... I will now need to write UI code to call it...
    7/4/22 April Head That's annoying - had not set Divsion 8 up properly, so race numbers start at 738.
    7/4/22 Head Now that I use a master database, I have finally written a stored procedure to copy the Head StartOrder back into it...
    5/4/22 RaceManager What appears to have been a longstanding bug has been fixed. Once you define a custom age to handicap a crew as, it was not possible to put them back to their actual age...
    3/4/22 Head Draw The Notes column has been added - quite useful when you have 3 Adaptive scullers that you want to go off last.
    30/3/22 Race Day One bug I found in February was that it was impossible for Race Control to record a payment. This was actually a bug in the Regatta.Server logic, which was using the wrong constructor when creating a Control_Payment_Details reply message. The client therefore timed out, even though the payment HAD been added. See notes for 17/5/19
    27/3/22 ASPX On the Alterations page, 'Changed By' provides no useful information, so has been removed.
    26/3/22 BROE Import Minor bug fix - Walton & Weybridge have 4 divisions, only 2 of which are used. The unused ones have a null string for their DivisionID, not the expected NULL.
    26/3/22 ASPX The Entry Matrix has been modified so that members of composite crews are listed with the submitting club. Its not quite right - we have one chap who is racing for Cantabrigian, but is also in a composite entered by Champion of the Thames. He appears twice, but without the rows containing identical information. This is bugging me, but I'm not sure the effort is worth it...
    25/3/22 RaceManager The banding screen warns if a crew is racing twice in the same Band. This check should ignore Time Only crews. This has been done in [Banding].[ListIdenticalCrews]
    21/3/22 RaceManager The Banding form isn't particularly good, as it was written whilst the new rules were being developed. It doesn't cope with handicaps at ALL..

    Masters merging does, but the grids do not show bands. This will be fairly easy to fix.

    21/3/22 Database [Banding].[ApplyBanding_LateEntries] had a final UPDATE statement, with the comment 'We also have to consider the scenario of banding an event (so the above code is used). We then change tack, and decide NOT to Band them after all'. This scenario cannot happen after the Draw, so the statement has been removed.
    21/3/22 Banding OK - here's a conundrum. ApplyBanding has now got to ignore entries that are racing in a handicapped Masters event... It does this via a NOT IN clause.
    20/3/22 PDF Race Control sheets for the Head can now be paginated by Club, not Contact. This is a request from our new Control team.
    13/3/22 Regatta Server The logic in this is old, and poorly written. It had its own LogError routine, which seems to have been there merely to suppress error dialogs. Totally unecessary, since the standard library code only displays a dialog if the callback is set.

    The other issue is that it contains a module for globals.

    13/3/22 Database [BROE.Results].[RegattaStartAndFinishFlags] is no longer necessary, and so has been removed.
    6/3/22 PDF
    • If the Signature block is shown on Entry Forms, an eight spills over onto 2 pages. This wasted a lot of time & paper when printing forms for Bedford Eights & Fours Head. I have modified the code to make rows 1mm shorter for eights and octuples.
    • Support for incremental printouts has been added to the Head Race logic.
    • The BR Crew name is now shown on Entry Forms - this is the often meaningless name that they enter the crew as.
    10/2/22 BROE It isn't possible to change the boat type (in this case from an eight to a four, due to COVID) if the boat has been assigned to a Band. The solution to the cryptic error that BROE shows is to remove it from the Band. All works then, and the bug has been reported. BR have responded, and the bug will be fixed.
    10/2/22 RaceManager For a Head Race, it is perfectly legitimate to modify banding after the Draw. I've needed to do this, as Jesus College Cambridge have made substitutes that meant their two crews in Band 3 were identical. The Banding form allowed me to alter the Band they were racing in, but didn't actually update the Status, since ApplyBanding was only executed before 'Draw Published' was set.

    The code was actually a bit of a mess - 2 classes within RaceManager.BROE have been merged, and banding update logic previous done by RaceManager.Libraries.Banding.EntryRow is now done by the DLL - a routine for this had been created, but was not actually used.

    9/2/22 Twitter I HATE Open Source code. TweetInvi doesn't work with .NET 4.8
    9/2/22 Chilkat Previously, I was using 9.5.0.72 (targeting framework 4.0). This has been upgraded to 9.5.0.89 (targeting framework 4.8)
    9/2/22 .NET All software has been upgraded to use the 4.8 framework (from 4.6.2).
    8/2/22 Installer A clean install doesn't quite work. Once this Head is over I will delete C:\RaceManager\Config\Competitions\Databases.xml and see what happens. The slight oddity was that my new server had a database restored - this is not a normal scenario, but I ought to be able to cope with it by looking at the most recently created database.
    7/2/22 RaceManager On the TODO list for a long time has been assignment of new crew numbers (head race only) to a reinstated entry. This has necessitated a new Stored Procedure.
    3/2/22 Database Bug fix in [Banding].[ListIdenticalCrews] - this used to include withdrawn & rejected crews.
    3/2/22 Race Manager Showing the name under which a crew has entered on BROE is now possible. This is shown when banding, as is the Division (for a Head Race)
    14/11/21 Database [head].[RaceOrder] improved, but the Draw logic still needs work. Basically, I provided Star with a full racing sequence, before they banded it. I did a draw, but most events were in the wrong order, as I deliberately did not save the status order after bands were created. This ought to 'just work'... The logic is a bit of a mess. I think that this SP needs to become a function, since it does most of the heavy lifting...
    14/11/21 Database Sort order in [Banding].[ListEntries] improved.
    14/11/21 Database [Entries].[Entry] contains a comment that it might be obsolete. Given that it includes an invalid column, it must be...
    16/10/21 Database [System].[UpdateSetting] created. This gets rid of some ancient MS Access code within EventData.ChangeParameter & ensures that multiple instances of RaceManager cannot cause an exception to be thrown. Admittedly, these were rare, but all bugs need to be fixed...
    16/10/21 Race Manager Long overdue, an editable Time Only column has been added. This applies to Head Races only, and the doubling column now applies to regattas only.
    15/10/2021 Database Examining the Audit Log from Reading SBH, I noticed some massive records. The culprit is almost certainly [head].[UpdateStartFinishFlags], which sets the flags to 1 EVEN IF they already contain that value. Oops.

    There are also some unnecessary updates beng made to the Masters table - will try to figure these out, though not tonight. These happened before race day, and I think are down to the fact that Reading never actually set the software to Draw Published.

    Double clicking on the Handicap As cell in Masters Merging was doing an unecessary update, though this was not done by Reading.

    16/9/21 .NET It turned out that the BROE import DLL was using an old copy of the DocumentFormat.OpenXML DLL. This has been fixed.
    15/9/21 Installer The competition has its own configuration files. A couple of years ago, I tried installing using a separate path per build. Advanced Installer's UI for configuring this is an absolute nightmare, so I reverted to manually distributing the files, which is far from ideal. A better solution appears to be installing files into a parent folder - the UI for doing this is simple, and obvious.

    Yet as more builds were added, it became impossible. New builds were added as selected to existing components, and only 4 were visible at one in their poor UI.

    So Plan C - Variables. the DEF_REGATTA constant must be set to a valid competition variable, and this does appear to work rather well.

    9/9/21 Draw Modification Changing the event that a crew is in does not give a confirmation dialog, and does not work. Cambridge Autumn Regatta W.Mas.E.4- went to W.Mas.4+ Backup taken last night.
    5/9/21 Change Log I've finally reversed the order of entries in this file...
    5/9/21 Race Manager Following a request from Tony Gordon, the user is asked 'Once you publish the Draw, you will not be able to go back to 'Entries Closed'. Are you SURE you want to continue?' before the draw is published to ensure that a bit of thought is taken! I've applied the same logic to Head Races; previously the flag was set within the upload code, for a regatta only - now it is set on the button click. A shared event is used to immediately remove items from the Event Stage combo box - this was not done previously.
    5/9/21 CRA The code for adding CRA entries mainly worked, though I had forgotten to ask for an entry fee, which caused a cryptic warning to be generated when the next import was done.
    1/8/21 RaceManager The code to check for new BROE entries no longer generates an error if there is no internet connectivity.
    1/8/21 ASPX The new logic for possible crews was so NEARLY right. But it did occasionally show #Crew1# instead of crew numbers. This was due to the logic for generating only a subset of records. So if viewing from race 10, and races 1-9 had not taken place, the dictionaries were not being built correctly. An easy bug to fix - just annoying that I'd missed it. Such is the issue of code written in a hurry...
    31/7/21 rowstats http://rowstats.com/regatta.php?id=21222&b=1&s=W.J18.4X&h=1 is not working properly. Will investigate on my local machine, using Rod's data.
    30/7/21 RaceManager After editing the names of composite clubs, the grid is refreshed. Failing to do this confused T&V's entries secretary.
    30/7/21 RaceManager The logic written on 12th May was SO close to being right. And worked perfectly if there were no byes. For a 6 entry event though, the algorithm encountered crews in this order: 1,2,5,6,3,4 and added them to the seeding table in that order with an incrementing variable. What it SHOULD have done was take account of the crew's internal representation instead. Easy fix once I'd realised what was going on...
    30/7/21 RaceManager T&V have W.Mas.A.2X and W.Mas.B.2X - one of the A crews has scratched, leaving the other with no race. How to combine the remaining crews into a Handicap, I was asked. Simple - merge the events. The logic is almost perfect, but it would be nice to be able to reuse the race number from the A race. It also suffers from an annoying bug, whereby the seeding information is not generated correctly, so if you subsequently view the event, the crews are in the wrong order. That's annoying. Will need to find the logic I put in for Collapse on 12th May, and test again.
    Another bug was that both A crews have been assigned to Division 0. The code to merge events from multiple divisions was at fault - fixed now.
    30/7/21 ASPX We've long had the ability to show 'Possible Crews' on Umpires' paperwork, but its left as 'Winner of Race x' for subsequent rounds, since the full list would be too verbose. Due to COVID, T&V is running as a 2 lane regatta this year, with Umpires on the HRR signal stations; getting paperwork to them is tricky, and will be done on shift change ONLY. So the functionality has been added.
    The logic to do this is actually simpler than the original, with the dictionaries being built up on the fly - lane order is irrelevant
    23/7/21 PHP The logic for crew rosters on a 2 day Regatta is pretty shoddy. It'll wait, since nobody knows it exists, but must be fixed...
    23/7/21 RaceManager Talking to the Entries Secretary of St Neots, it seemed bonkers that she had to run the server software, then Regatta Control, just to print the paperwork for Umpires. This functionality has been added to the Output Files tab.
    23/7/21 Database [Entries].[CrewRoster_Baseline] has been slightly tweaked so that it can show substitutes before the Draw is done.
    23/7/21 RaceManager Importing a zip file now populates the [Baseline].[Entries] table, which is necessary for calculating substitutions.
    23/7/21 BROE Import Wonderful - the baseline download throws an error for T&V. The import now continues in this scenario, but warns the user.
    22/7/21 RaceManager A couple of minor tweaks to the unpaid checkbox. Withdrawn entries should not be classed as unpaid, and the text updates to reflect the state when a different event is selected.
    21/7/21 RaceManager Toolbar for web browser improved.
    14/7/21 Database [Doubling].[ReRiggingNeeded] added. I have added an ASPX page to show this.
    14/7/21 Database One of the many problems with BROE is that you can select any boat for any crew, so you can have a sculler racing in an eight. This is bonkers, and it turns out that 2 clubs at St Neots have specified the same boat for a single & a double. These records are invalid, and are now removed by [Doubling].[DeleteInvalidRecords]
    14/7/21 Database Bugs found in [Entries].[ListDuplicateStroke]. It needs to ignore small boats (code had been commented out), and was also failing to filter by Day...
    14/7/21 Database OK - let's be clever about this. Let's put the doubling essay into the Competition Notes, reducing the space taken up by custom questions elsewhere...
    14/7/21 Database [Entries].[ListCompetitorsRacingForMultpleClubs] written. St Neots are not allowing composite crews, yet there are two people racing for one club, and coxing for another...
    14/7/21 RaceManager Due to the essay that they're writing, instead of defining boats properly, I have had to write UI for adding doubling by hand. To be fair, this should have existed previously, and did in the very old Entry Manager software.
    13/7/21 Database fn_ListDoubling added, to be used by [Entries].[ListAll] This function concatenates all known doubling into a string, allowing for an easy way of figuring out what has come in from BROE, and what has not.
    12/7/21 Database I think [regatta.RaceDay].[UpdateVerdict] is obsolete. The code calling it in the server does not appear to be used, so has been commented out.
    11/7/21 Kingston MAJOR bug found. Its been there years, and affects 3 lane races only (not 3 lane events, 3 lane races). The code for Race Finish was updating BOTH days. It hadn't been spotted before, as race numbers have historically been unique across the 2 days. Not so this year :(
    10/7/21 Kingston I hadn't realised that there was no way to turn off recording times after the Draw has been done. There is now
    7/7/21 RTF It turns out that RTF only works with characters that fit into the 7 bits of ANSI, not the 8 of ASCII. So Frigé caused problems. Bug fixed - thank to Miles Fellowes for spotting it. I don't get on well with RegEx, but it is a neater solution than comparing System.Text.Encoding.ASCII.GetByteCount to System.Text.Encoding.UTF8.GetByteCount
    7/7/21 Redraws It would be useful to be able to retime the start of a Division.
    7/7/21 Redraws Crew number shown on original spider to make swapping crews easier (in 3 lane racing, scratched crews are moved to the middle lane). After crews are swapped, the spiders are refreshed so that it is obvious that the change has actually taken effect. The same is done when scratching a crew, though this needs a refresh to get the left hand spideer to allow collapse..
    6/7/21 Race Manager Custom column headers inserted into the middle of a grid were not working properly, as you can only insert before.
    5/7/21 Redraws Retiming whole race threw an error, because Pitches had not been created. Fixed.
    3/7/21 General St Neots have invited essays on doubling to be supplied. Wonderful. All 3 questions have been sanitised, but parsing the essay is impossible. I have had to modify CSV.CrewQuestions to nvarchar(max)
    24/6/21 ASPX Custom Club questions adapted to use submitting Club, so the information provided by Southsea/Guildford is displayed. Southsea themselves have not entered.
    24/6/21 UI Composites button enabled, if appropriate, when entries are first imported. This was a longstanding, trivial bug.
    22/5/21 Twaddle Crews that scratched from a Regatta showed up even if the entire event had been deleted. This is overcome by modifying the SQL statement in TweetScratched_Regatta to JOIN to [regatta].[Names]
    22/5/21 Regatta Redraw The SaveCollapse & SaveExpansion routines have a most peculiar statement, quoting sStatusID. This looks wrong to me...
    22/5/21 Twaddle The generated Tweet for a 2 lane race, won due to DQL, was wrong. As was the text for 'Not Recorded' & DNS...
    21/5/21 Twaddle I'm moving keys from Twitter.xml into the database.
    21/5/21 Database Spiders for events where a crew had scratched were now being displayed in the web pages. It turns out that Desborough had set the flag to only include accepted crews in the Draw, so [regatta.Draw].[ListStatuses] was filtering out the scratched ones. That took some finding!
    19/5/21 MySQL Scratched crews are not showing up on Desborough's website. Not sure why.
    16/5/21 BROE Export Guard code added to prevent upload of custom crew names to BROE during a debug session (ie where we are publishing to localhost).
    16/5/21 Divisions The new code I wrote for DD works, until we do an import...
    13/5/21 TEST Why not add Test scenarios into the test database? Something like delete the first 2 entry ids in a 4 entry event when we are at < entries closed?
    13/5/21 General I ought to be asleep. Abi is due in a few hours time....
    12/5/21 Expansion The last comment has been noted before, and ignored (see 12/7/19, which is similiar) The source code comment at the end of the expansion & collapse routines stated 'This will generate new Seeding data'. Brilliant - just a shame it generated a new randomised sequence....

    I should have noticed this ages ago. THINK I have cracked it. More testing required...

    11/5/21 Expansion BUG - take a 2 entry race. Insert 2 crews into it. Then check it in the modification page, and you'll find that the crews don't appear in the spider where you would expect them to...
    11/5/21 Masters It is no longer possible (in a Regatta) to merge Masters entries which are in different divisions.
    1/5/21 rowstats I've finally bitten the bullet and restored Weybridge 2019, which had been inadvertently overwritten with a demo regatta's data.
    30/4/21 Banding Walton & Weybridge Regatta calls their Bands 'Thames' & 'Wey'. God knows why - this is utterly meaningless. You might as well call them 'Fred' & 'Boris', which were the names assigned to our daily conference calls during COVID lockdown. The calls had to have names, and my fellow Director decided these were as good as any. Prat.

    Rant over. The code now copes, with a couple of delegates defined in the Custom DLL...

    30/4/21 XLSX generation FileAccess.Read MUST be specified, or an exception is thrown on encountering a ReadOnly blade image file...
    29/4/21 Regatta Redraw This was work in progress. MANY parts of it are broken:
    • Most of the dialogs used to beep. Not any more...
    • Update Nomenclature never worked properly, and now doesn't work at all!
    • Status List now shows ALL events (with a really funky sort order for the Count column). The idea is to enable buttons based on what is selected.
    • Dialog for Swap crews is wrongly titled
    • In test database, swap crews 1 (exists) and 20 (not exists). Crew 20 has scratched, so nothing is displayed
    • Swap crews does not edit the Crews table. Nor does it warn you if the swap is invalid (eg swapping an eight with a single scull)
    8/1/21 Twitter Oh joy. TweetInvi has been refactored. It will need to be updated. So I spent several hours doing so, only to find that, like most open source code, it doesn't work. Nor do its examples.
    8/1/21 RaceManager I have removed the reference to ProtoBuf-net.dll (version 2.4.0.8641) since I don't know what it is used for. It might have come in with an early version of Twitter.
    8/1/21 ASPX Minor bug fix - resultsbytime.aspx could not cope with DNF crews where timing is being done to sub-second accuracy. It turns out that it was using a local function, not the standard routine used elsewhere.
    8/1/21 BROE They've changed the data exports, but haven't bothered to say what has changed. It looks like PRI Max has gone. That's tiresome, as I'd spent considerable effort in getting it to be displayed...
    8/1/21 Head Timing This did not compile, due to AddCrew issues. Not sure what I was doing any more...
    8/1/21 OS I am now compiling against .NET 4.6.2 - this means that the Head.Clients will no longer work on Windows XP. Bedford RC will be affected, as will the main Regatta.
    8/1/21 General I have finally replaced the Browser control (see comment on 4/7/19) with Microsoft's new WebView2 control. This is even faster than its predecessor, but has 2 big advantages - it is regularly updated, and is FREE. I can't see a use for Host Object support yet, but know how to use it
    8/1/21 COVID-19 And there I left it. I have not looked at this code in nearly a year...
    7/3/20 Race Manager Head Start Order export code failed to take account of the move to ResultsOrder.
    1/3/20 Documentation SQL Server & IIS installation instructions added
    1/3/20 Database Bug found in [BROE].[List Entries Refunded Online] (only applies to BRC events with discounted entry fees).
    We need to get the refund amount from BROE, not the local discounted rate...
    1/3/20 Database [BROE].[ListNewPayments] improved.
    Bedford RC gives a discount to its members. If the payment is recorded as manual (ie BACS Transfer, cash, cheque) then the discounted rate is used. If it is Online (ie Stripe payment), then the rate used is that defined on BROE.
    29/2/20 BROE API Payment Type is the wrong way around in the API export - 'Manual' & 'Online' refer to Online & Manual, respectively.
    22/2/20 Docs The key to good documentation is having screenshots. I have therefore obfuscated names in an ENTIRE regatta - nobody is identifiable.
    21/2/20 Database ALL Stored Procedures have finally been removed from the dbo schema.
    21/2/20 Database [List - Statuses in Draw on Specified Day] & [List - Statuses in Draw on Specified Day (Divisional)] have been removed and been replaced by [Regatta.PostDraw].[ListStatuses]
    It turned out that ASPX needed both due to a bug! statuses.aspx was flawed...
    21/2/20 Head Draw Abingdon are pressing me for a build. So I have bitten the bullet, and removed StatusID from [Head.StartOrder]. This is painful, and it turns out that there are quite a few queries that all appear to do pretty much the same thing.

    [head].[GenerateRandomDraw] appears to be the most complete & logically written.

    20/2/20 EventCreation GetStatusID did not handle primary correctly; GetStatusDescription didn't handle Lightweights.
    9/2/20 PHP
    • statuses_entered table modified to include DayID, fixing a long-standing bug. Curiously, the code to update was sending this.
    • Crew Lists now available.
    • Assorted changes to regatta.php - tidying up & removing redundant code.
    28/1/20 Masters Merging
    • Banded Masters Handicaps now supported
    • Bug fix in getting EventID of the youngest crew. It should not have made a difference, due to the way the grids are constructed, but it was wrong...
    11/1/20 Race Manager Head Timing now available here. Can't figure out a way of displaying finish time less than start time though...
    9/1/20 Database The Changes table requires wider fields, since Stowe have decided that their crew name contains ALL crew members. 134 characters long.
    4/10/19 Database Installed software last night for KSBH. [masters].[UpdateAgeGroups] was throwing errors, since the database default collation is not the expected Latin1_General_CI_AS.
    This is easily resolved by adding a COLLATE clause to the temporary table; my worry is the dynamic SQL used for custom questions... Note that ALL temporary tables will require this.
    15/9/19 Database [Contacts].[CountPreEventContactsForClub_FromMobile] modified yet again. Not entirely happy with it still.
    5/9/19 BR Exports The membership number supplied by BR no longer contains date information. Except for the baseline, which they forgot.

    The code for generating entry forms has had to change, plus several stored procedures. I'm working around their bug.

    31/8/19 Database Bug fix in [BROE].[LogChange_CrewName] - it was removing handicapping information. I've seen this occasionally, but had never worked out what was going on...
    25/8/19 Database It seems as if [regatta.Draw].[ValidEntries_Count] is no longer used.
    25/8/19 Draw Modification MAJOR UI changes
    • The combo boxes for expansion & collapse have been removed. It wasn't obvious enough to users that there were multiple statuses to modify.
    • Even more confusing were the combo boxes for new lanes & progression.
    • We now have a grid showing all events that can be either expanded or collapsed.
    • There is no need to start a collapse operation. It is the most common thing we need to do...
    • The Save Collapse button wasn't obvious, so has been removed - you're now prompted to save.
    • The AllAllocated event has been removed - SpiderEdited has gained an enum that allows more granular control.
    • The Save Collapse button has now gone. We just show a dialog once all links have been allocated...
    16/8/19 Regatta Draw Conversion from VB6 required several collection objects. These are now all shared properties, which makes the overall code more readable.
    16/8/19 Database Contact allocation has never been understood - most people just ignore it. With a bit of work, I'm now allocating from unique mobile numbers as well. Its going to need testing.
    14/8/19 Database The OARABoats table has been removed. It served no purpose, since data was merely copied from CSV.Entries...
    3/8/19 Henley Masters This is a genuine 2 day regatta.
    28/7/19 Regatta Draw Bug reported by GTD (actually by a rather pissed off F crew, which was listed in the Draw as being D). Turns out that some of the crew name shortening code was not day specific...
    22/7/19 Database Major changes made to [Entries].[ListCompetitorsRacingTooManyTimes]. This was mainly because it did not detect people in composites properly.
    Several redundant JOINs also removed, and the code cleaned.
    20/7/19 BROE Import Competition specific code can now modify crew question names & answers. This is to reduce length of question names (St Neots), length of answers (T&V), and sanitise free text entry (St Neots again).
    13/7/19 Draw Finals Sequence has been removed. Nobody used it - it was just clutter.
    12/7/19 Draw BUG - swap crews in an event. Then try to collapse it. The seeding table has not been changed, so the effects of the swap are not shown.
    4/7/19 .NET The Web Browser control supplied by .NET is appalling - it is actually the one from wshom.ocx (which is Internet Explorer 6). It is slow & bug ridden, and cannot display HTML5.

    $1199 later, we now have a new, blisteringly fast control, based on Chromium.

    4/7/19 Database Phil Clements' definitive list of clubs has been imported. It will take a while to check, and it has numerous mistakes.
    30/6/19 Regatta Draw If seeding is changed, the the Load button is enabled automatically. Previously, there was no way to update it immediately.
    30/6/19 PHP
    • Marshalling information for a 3 lane regatta showed a redundant header (for completed events). Fixed.
    • Regatta page title changed for race day & post race.
    29/6/19 Race Cards BUG - with crew name shortening, a scratched crew's name can appear multiple times. This screws the code.
    The rewrite simplifies much of the logic...
    29/6/19 Verdicts DNS is now officially supported.

    The dialog now has an Information button, which displays all of the possible options. cm is supported, but not listed.

    29/6/19 Race Cards The crew names are now resized to fit the space available. It is not quite right, as the 3 cells have different widths, but it does work ;)
    26/5/19 Import [BROE].[List Entries not Imported] now also shows crews that have been imported, but where the StatusID has not been parsed correctly. This happened at Twickenham, where there were 2 Mas.G.2X events...
    26/5/19 MySQL ALTER TABLE `regatta` ADD `Round` VARCHAR(8) NULL AFTER `Heat`;
    24/5/19 ASPX Changing Boat Type was not being logged due to an error in the hard coded SQL (EntryID is no longer present in the Alterations table).

    Unfortunately, this masked a bigger problem - the code was setting PaymentID to 0, without decrementing the payment...

    22/5/19 Regatta Draw Bug - the RaceType enum did not match what was in the database. Worse than this was that it was not being saved to Regatta.Timetable
    18/5/19 Race Cards I have removed the PDF code - the new Mail Merge, done via OpenXML, is SO much more flexible.
    18/5/19 Database BROE.ImportIssues created. This is used by [BROE].[CheckForFemaleEntriesInOpenEvents] to filter out rows. AJAX is used to update the table.
    17/5/19 Regatta Control Winners Certificates tested - the server code was using an obsolete stored procedure.
    17/5/19 Regatta Control I think Reading Amateur requested the ability to be able to scratch a crew from Day 2 on the Saturday. Rare, but now working.
    17/5/19 Head Control The payments control now works - the problem was the wrong message constructor being used in the server...
    11/5/19 Marshalling Need the ability to correct a crew number and / or delete
    11/5/19 Regatta Finish If running this terminal for the commentator, the results were not coming through correctly. This has now been fixed (change to server during regatta).
    3/5/19 PHP Sponsors & Trophies were not being escaped properly. So the Bedford Girls' Challenge Cup was missing.
    3/5/19 Entry fees BUG - discount entry fees were applied to BRC.
    2/5/19 Seeding EntryID is of little use here. CRI is though. This means a database change is needed...
    1/5/19 Database Bug in unpaid.aspx but it is simpler to fix the ASPX. The problem is that Division is used, instead of DivisionID, and it wasnt spotted
    27/4/19 PDF The Entry Forms now show coxing points. They also show points correctly for oarsmen in Mixed Sweep events! If a regatta decides to use J/Sen.8+ then it will no longer show age.
    26/4/19 Shrewsbury Defaults.xml for this regatta now holds a LOT of values,
    26/4/19 Installer The custom builds have een replaced with individual projects - MUCH easier to maintain. The downside is that we cannot install a file in both, since AI wipes the file instead of replacing it.
    26/4/19 Database Bedford RC's Head Races give a discount to their own members. Nobody else does. [payments].[CreateEntryFee_Default] therefore uses a new function ([dbo].[fn_GetEntryFeesFromBROE] ) to determine whether or not to use the EntryFees table or BROE. It defaults to BROE.
    26/4/19 .NET An unexpected side effect of the change is that the regatta specific import code can be safely moved to RaceManager.Custom, which creates the appropriate class with a factory method, instead of being hard coded. BIG improvement.
    26/4/19 BROE There's nothing like an 11th hour change! This time, I've moved all of the BROE code to a separate .NET 4.5 assembly. Why? Because I am not happy with the threading used in API Polling.

    The aim is to use asynchronous code (available in 4.5+). I've never written any of this before...

    24/4/19 Race Manager I have moved this to .NET 4.5 so that the new mail merge code can be used. This is also a good opportunity to update OpenXML & Newtonsoft to the latest build.
    22/4/19 Regatta Draw I think that the Finals Sequence is redundant. Nobody uses it, and it has little actual use once doubling is involved.
    18/4/19 Database MAJOR problem encountered this morning. Originally I banded the octuples, then decided to Group them instead. So I deleted bands 2 & 3 and assigned to Groups.
    My code did not work, but deleting all entries and importing did.

    The problem lay in [Banding].[ListUnMapped], which failed to notice the new groups, since the band already existed.

    A total rewrite has therefore been necessary. The logic is significantly better, using CROSS APPLY to turn the columns of CSV.Bands into rows.
    The logic has been extended, providing the number of Bands in use - this allows 'Junior 15 Eights (Group A)' to be generated automatically instead of 'Junior 15 Eights (Band 1 Group A)'.

    17/4/19 API We can now upload crew/band assignments via the API.
    14/4/19 Clients DNF does not work if no time has been recorded. Major bug in add new start time - it was using the finish time id!
    12/4/19 Database [head].[CompletedEvents] has been heavily modified to include the new substitutes code.
    9/4/19 Database For some reason, [Entries].[ListAll], [Entries].[PlaceHoldersExist] & [email].[ListEntriesWithPlaceholders] were filtering out substitutes when calculating placeholders. This constraint has been removed, since it is wrong, though there may be a BROE bug before entries close.
    9/4/19 Head Race I've amended [head].[CreatePositions] yet again:
    • Back in November 2017 we filtered out the Adaptives so they did not appear to have won the event outright (they do a short course).
    • Other heads have the concept of a short course, so it is useful functionality to include.
    • No UI for setting courses up yet, or for defining which events run over which course.
    • The Stored Procedure is VERY complex, with multiple stages:
      1. Create Overall Positions, per course. This based on time, plus penalties.
      2. Create position within status. This based on time, plus penalties AND handicaps.
      3. Append '=' to duplicated overall positions, per course. This was tricky to do, but appears to work.
      4. Append '=' to duplicated positions within each event.
      5. Set Time Only
      6. Set DNF
      7. Set DQL
      8. Calculate difference between each time and the status winner's
    6/4/19 API Downloading the baseline data takes ages. Since it only needs to be done once, it makes sense to only do it once!
    However, BR doesn't make it easy, since the baseline CRI info is not included in the main export. We need an extra table, so I've created the Baseline schema.
    6/4/19 Database A couple of redundant tables have been dropped: RedrawTypes, BROE.CrewBands
    5/4/19 ASPX The substitutes page has long been a problem, since it did not show crews where just the cox has been changed. With the new code, this is now resolved.
    [Entries].[CrewRoster] & [Entries].[CrewRoster_Baseline] have been modified as well, removing a dependency on the Checksums table. The former now uses EXCEPT.
    5/3/19 Import OARACountSubstitutions has been removed. This used Entries.Substitutes_Baseline and Entries.Substitutes_Current to calculate Crews.Substitutions.

    This is a slow operation, but was the only way that Access could handle it. SQL Server has the EXCEPT operator...

    3/3/19 Race Manager Head Timing is now available within this program. It still requires the server to be running.
    3/3/19 Race Manager The sort order of the entry grid is now saved. Usually I sort by descending EntryID...
    2/4/19 Masters I have finally sorted out the stored procedure, so that overall positions are calculated before handicaps are applied. See 9/4/19 for details.
    2/4/19 Pennants [head].[ResultsByTime] can now display a Pennant for the fastest sculler, fastest female junior double etc. Abingdon have this concept.
    31/3/19 MySQL Now that we can publish directly, the MySQL export is redundant. The code still exists, since it is used for publish, but need to remove the file output.
    31/3/19 Masters Merging Notes are now displayed
    31/3/19 Misc When a new competition is created, default parameters are applied (such as lane names) from Defaults.xml
    31/3/19 Database If a Masters crew contains placeholders, its actual age is indeterminate, so is set to the age group that was entered.
    30/3/19 Misc Multiple choice dialogs now support string keys.
    30/3/19 Head Timing Custom import for Abingdon Head has been added
    30/3/19 Head Timing
    • All cells now support Timing Precision.
    • Time Elapsed is updated when a time is altered
    • DNF works.
    29/3/19 BROE API I now have a fully working implementation.
    • All endpoints have been tested, with the exception of 'OE2UploadEventBands', which does not work at present, according to the documentation, and 'OE2UploadCrewBands'
    • Every 15 minutes, RaceManager checks BR for new entries. If any are found, a red bell icon is added to the title bar - click on that to download...
    • On creating a new database, you are prompted for the date, and the API Keys
    • Date MUST be correct for import to succeed (to prevent loading off old data by mistake)
    • The API key must also be relevant to the competition!
    The progress dialog has been updated to show counts for each day, and can be viewed at the end of import if so required.
    26/3/19 BROE API This is pretty good.
    16/3/19 Head Draw Since SQL Server's random function is unreliable, I am now doing the randomisation in code. Unless you're sorting the draw by CRI / CRI Max (new features).
    11/3/19 Regatta Draw If the move mode is blocks, we can now reorder races within a block.
    11/3/19 Banding We can now import band information from an XML file. This allows Reading Amateur's custom nomenclature to be applied.
    10/3/19 Misc The timetabling control has been modified to only show boat classes that are in use.
    10/3/19 Regatta Draw BUG. Do the draw. Save it. Change band nomenclature. Reload draw, change it and save again. Many errors...

    This has actually been a bit of a beast to fix, since many tables need adjustment, BEFORE the new StatusID & Description have been generated.

    10/3/19 Race Cards A double strikeout is used for scratched crews - bit more obvious.
    9/3/19 .NET The changes I made for high DPI appear to work.
    7/3/19 Race Manager Sponsors & Trophies have been merged into a single form. Prizegiver has also been written.
    7/3/19 RTF output The RTF files now support Unicode characters - so we can have an event sponsored by 孙允珠
    4/3/19 .NET High DPI support has been added throughout. Amazingly, anchoring (bottom & right) does not work, unless you put the controls in a Panel, which has DockStyle.Fill set.
    3/3/19 .NET Another reason to get rid of AdvTree is that it doesn't work on high resolution screens with zoom.
    1/3/19 Database Search for !=
    1/3/19 Database OARACrews is proving harder to get rid of
    1/3/19 Database OARACompetitors is next to go. It is only there because I was using Access' own import logic, instead of doing it properly.
    1/3/19 Database BR are also going to remove expiry information from membership numbers. This means that [Entries].[ChecksumGeneration] will need to be modified
    28/2/19 Database Following the announcement from BR that old status points will be removed from the export files in the next month or so, I am removing the OARAPoints table.
    24/2/19 Database [regatta].[Races] has had to be modified to deal correctly with an empty lanes table. As it is an inline TVF, we can't declare variables, so I've had to join to Regatta.Names instead...
    24/2/19 ASPX Coxing points now displayed on the crew lists.
    16/2/19 Entries Control Several columns have been made optional.
    16/2/19 General A lot of classes have been moved from the Spider Engine DLL and into the main program, which is where they are used. They were only in the DLL to aid with the transition phase.

    Quite a few classes have also been removed since they are no longer used.

    15/2/19 Regatta Draw It has been painful, but I can now create a draw without either Lanes or Progression being explicitly specified.
    14/2/19 Race Manager I have combined Lanes & Progression into Seeding. They shared a lot of functionality, and in trying to replicate Borne 2019, I've been flipping back and forwards...
    13/2/19 Database Having both [List - Statuses in Draw on Specified Day (Divisional)] AND [List - Statuses in Draw on Specified Day] is pointless.Only the latter now exists.

    On second look though, they've reverted to their origial definitions, since ASPX needs both. SpiderEngine has been simplified by just using the divisional variant.

    12/2/19 Regatta Draw I've fixed this one (not the last 2 though). Undo buffer threw an error when moving the last race of the day.
    12/2/19 Regatta Draw Another bug. expand an event, then another. The second throws an error due to it having the same race number...
    12/2/19 Regatta Draw BUG found. Set 2 lanes up for Masters events. THEN handicap them. Try changing the number of lanes, and AddMissingLaneInformation will set it back to 2...

    AddMissingLaneInformation is a throwback to Access, which lacks COALESCE. Time to remove it, and do it properly...

    10/2/19 Head Draw By and large, it worked. Just 2 queries where the logic wasn't quite right. And it is a HUGE improvement!
    3/2/19 Head Draw Total rewrite.
    2/2/19 .NET I bought the DotNetBar library for the multi column TreeView control. And now I'm getting rid of it - the SuperGrid is FAR more powerful...
    1/2/19 Database Bug fix in [BROE].[ApplyHandicapping] - this failed to identify crews that changed status since they were handicapped.
    31/1/19 Import BROE allows a club to withdraw a rejected crew. That plays merry hell with my code, so I have to modify [BROE].[LogChange_Reinstated] to cope. Think this is what confused me during TVP 2018.
    27/1/19 Server The object model for this has barely changed since it was converted from VB6. Time to remove the modules.
    26/1/19 Test I have created a handicap event. One crew has then changed from a coxed four to a Quad. The code does not cope.
    26/1/19 Timing The new client timing program is taking shape rather nicely.
    • It is based on a grid
    • Double click to edit
    26/1/19 Messaging I am now SO glad I converted the messages to classes last year. It makes life SO much easier!
    25/1/19 Database [head].[RecordDNF] has also changed significantly. We now pass in a CrewID, since TimeIDs cannot be correlated.
    25/1/19 Database [head].[AppendTimesElapsed] has had MAJOR modifications, since it has to do the merging as well...
    24/1/19 Head Timing I have bitten the bullet, and deleted dbo.Times
    20/1/19 Server A named mutex ensures that only one instance of the server program can be run.
    20/1/19 ASPX I've put a SyncLock in to try to prevent the errors we occasionally see when opening multiple tabs in quick succession. So far it appears to work.
    12/1/19 Regatta Draw I've implemented an Undo buffer. There's Redo functionality as well, but on second thoughts, the button is probably not necessary. Multiple undo is rather nice though...
    4/12/18 System One of the problems I've faced is that people forget to set the system to Race Day. EventData now does this
    4/12/18 Installation The software can now be installed without my intervention, AND without having to open SSMS...
    19/10/18 BROE Results Bug in [head].[BROE_Results] found & fixed. Suppose we have a crew in a handicapped event. They then sub in a 23 year old, so are moved to a banded senior event.
    They'll still be in the OARAMasters table, so an extra row will be generated in the CSV...
    9/10/18 SQL Server Thanks to C Clemmett of Reading, who has pointed out that RAND is fundamentally flawed, showing a linear correlation with its seed value.
    9/10/18 Blades Fed up of having to maintain blades.dll AND the files in ASPX, I have deleted the latter. They will be created on the fly as necessary.
    6/10/18 Start order Reading SBH has convinced me that this should be keyed off immutable ResultsOrder, NOT StatusID.
    4/10/18 Installer I am now creating regatta specific builds. Databases.xml & Twitter.xml are custom for each.
    Can't be bothered to fully configure the installer yet though.
    4/10/18 Installer Next to go are the old versions of Newtonsoft, since everything now uses 11.0.2.21924

    This brings the size of the exe down by another 500Kb - it is now about 39Mb in total.

    3/10/18 Installer I have removed the feature based prerequisites (OpenXML SDK & SQL Server Management Objects.
    It has long been suspected that these were uneccessary since I am installing the DLLs to the GAC as well. They are - tested on my new NUC7i5BNH.
    3/10/18 Race Manager I have had the ability to create databases for several months. The software now extends this, and checks for the existence of the audit database, creating it from the installed backup if necessary.

    This means that Race Manager can now be fully installed by a user.

    3/10/18 Installer The Regatta Application Pool is now used. This is installed & configured to run as Network Service, which is installed by SQL Server as a login.

    This means IIS runs out of the box.

    27/9/18 Banding Reading SBH defines T1.Op.1X instead of my usual Op.1.1X so the software now supports this.

    This is the beauty of the EventCreation class. ResultsOrder is immutable - StatusID & StatusDescription can be generated in whatever way we wish...

    22/9/18 Reading SBH Custom Start Order can now be loaded from an XLSX file.
    22/9/18 Database [head].[AddMissingStartOrder] removed, since it is handled by [head].[RaceOrder]

    HeadStartOrder moved to Head.StartOrder for consistency.

    17/9/18 PHP Fun & Games with W3C compliance. A huge amount of work for no visible gain :(

    Also removed the last bit of code that predated urlencode()

    16/9/18 PHP Isle of Ely (Johnson/Gräf) entered St Neots Regatta. And caused major problems with spider display due to the umlaut. Now fixed with an mb_str_pad function.
    This has been bugging me for several years!
    16/9/18 PHP Prepared Statements now used for the Head Race code as well.
    16/9/18 Head Race LMS asks me for the division statistics on a regular basis. Why not provide this information automatically?
    1. I have created a new table in MySQL
    2. Then created a PHP script to populate it
    3. Publish functionality extended
    4. On importing entries, publish the configuration & Division statistics
    5. Change the Draw page to redirect to Divisions when appropriate (ie before the Draw has been published)
    All I have to do now is write a new PHP page from scratch. Haven't done this in years!
    15/9/18 Live Results Head Races are now supported.
    13/9/18 Banding Band Mapping now takes place automatically during import.
    9/9/18 Output Files The Names output now creates 2 files. The new one is compressed, removing unnecessarily white space. I have been meaning to write this for ages - it wasn't easy!
    9/9/18 Redraws Cambridge Autumn sent me a detailed text for a draw collapse. Which I did for them. Half an hour later they realised they should have done W.J15.2X, NOT J15.2X

    So the draw modification code has gained a couple of extra buttons - to reinstate a crew that has vanished due to draw collapse, and to renumber a crew (necessary here as we want it to have its original number...)

    3/9/18 Redraws Wow. Not even Peter Needham inserts a completely new event after the Draw has taken place. But Cambridge Autumn have, and the code now copes...
    2/9/18 Regatta Draw Load Existing now sorts by race time, not ID, so any changes (in this case an expansion) are loaded in the correct sequence.
    28/8/18 ASPX Entry Statistics now show foreign club areas. This was complex to start with; now it is a beast!
    26/8/18 T&V After generating the racecard, I am now applying custom styling to scratched crews (red and struck out).
    25/8/18 T&V Race Card generation moved to a new project (since it uses .NET 4.5). This uses OpenXmlPowerTools, which makes mail merge very easy (5 hours to get a fully working solution).
    1/8/18 T&V Incremental Race Cards can now be generated. But the code was fatally flawed!
    1/8/18 Live Results The program is no longer necessary, since Regatta.Server does this itself (in a new thread).
    31/7/18 Redraw Regenerating the SeedingInfo table after (let's say) moving a crew from one and to another is all very well and good, but the order is screwed.
    31/7/18 T&V Tony managed to screw up the seeding tables. I cannot figure out how.
    27/7/18 Database [regatta.raceday].Races_ForSponsor also fixed as it didn't cope with St Neots...
    28/8/18 Winners' Certificates St Neots are using Race 1 & Crew 1 on both days. This has never been fully tested in anger, and there were a few problems:
    • Server code was using dbo.EventNumbers instead of regatta.EventNumbers, so new certificate generation did not work.
    • Old points were shown, not PRI. And the columns were too narrow.
    • [regatta.RaceDay].[Winners] is poorly written, but using a CTE to filter dbo.Entries solves the issue. It still needs rewriting though...
    27/7/18 Custom Code A new DLL has been created, and Race Card generation moved into it.
    27/7/18 T&V The have created Men's Alumni Eights. For some reson, yet to be determined, this is used as the StatusID, which breaks a lot of the ad hoc SQL.

    Rather than fixing the bug immediately (it should be ALM.8+) I am fixing the SQL so that it will not catch me out in future.

    15/7/18 Live Results BUG - in 3 lane racing, a crew can scratch and it not affect the race at all. This means that it will not be uploaded...
    15/7/18 PHP Bug fix. In PHP, NULL === 0, so some of the winner codes were not being filled in correctly (2nd crew in a 2 lane race where max lanes is 3.
    This is why I pay for debuggers.
    14/7/18 General The ghastly TextEntry method of entering times has been removed. It put up a hell of a fight!
    At the time, this seemed like a good idea. The new Time Entry dialog is significantly better - if you want a TimeSpan, why return a String???
    14/7/18 Draw Collapse Used live during the regatta. I had to re-enter winners & verdicts, but this is much easier than pratting around with Race Modification.
    10/7/18 Spider output KAR use the highly compressed spiders. Most people don't - think I ought to provide a dialog in the same way as I do for crew name shortening.
    10/7/18 Lanes control Set to 2/3 lanes now only affects the current day.
    10/7/18 Race Manager All RichTextBox controls have now been replaced with SpiderViewerEx controls, since these support zooming. An animated zoom, what's more ;)
    I've decided on a LayoutTransform instead of the original RenderTransform since this does not resize the control's bounds.
    9/7/18 PHP Bugger. Kingston Amateur Regatta's website uses PHP 5.5.38 - the ... operator used for unpacking arguments to variadic functions requires PHP 5.6
    So I've had to provide workaround routines.
    5/7/18 Various changes:
    • Finally found the bug that caused the wrong day's entries to be displayed when switching between regattas
    • Added notes to the Masters merging control. Note that this requires a change to [masters].[ListEntries] but no error will occur if it has not been updated.
    • Composites button is too hard to find (on entries control popup menu) so I have added a button on the ribbon.
    1/7/18 Masters Walton & RTR both modified Masters after the draw was published. Need a way of cleanly handling this. TODO
    1/7/18 Race Details Event Number added, as requested by Shrewsbury.
    1/7/18 Regatta Finish Confirmation dialog now moved to a separate class. All of the items on it are now hyperlinks, allowing editing.

    This is a huge improvement.

    1/7/18 TaskDialog
      Various improvements have been made that will need to be ported back to Dimaco code:
    • Autosize improved to take account of the vertical scrollbar, if necessary
    • TextMarkupLinkClicked event added
    • ProcessCmdKey added to handle Enter key
    30/6/18 Change Status This did not work at RTR - Crew 214 changed from J16.4X+ to Sch.4X The status change slot went into the coxed event, but 214 was not inserted into the coxless. They'd scratched from the coxed event - I wonder if that was the issue???

    Update - it WAS the issue. The software now prompts you to reinstate the crew.

    30/6/18 Regatta Finish TVP & RTR have a habit of recording 0 lengths. I suspect that this is actually a crew not turning up. The dialog now prevents this verdict.

    A verdict of = translates to Dead Heat; ? to Not recorded.

    30/6/18 rowstats One of the problems with 3 lane racing is showing the winner. I introduced positional display some years ago, but this screws up races that have not taken place, since lanes are not shown.

    I have been meaning to split the table for a while; this is now complete.

    30/6/18 Draw Collapse If we collapse an event, then it ought to republish the regattadata table. I have written this, but it is obviously totally untested!
    29/6/18 Spider Viewer Peter reported that the viewer was showing a different order to the Spiders. Sadly, he was correct.

    I had not noticed it before since I was not swapping crews around. He'd put most of the scratched crews in the middle lane (quite rightly). Yet the viewer ignored this.
    It turns out that the control was not making use of the Regatta.Seeding table. An easy fix.

    29/6/18 Spider Viewer I have added strikeouts.
    29/6/18 Race Cards Peter says that the lack of strikeouts for the scratched crews caused a problem at TVP.
    My response was that the library doesn't support them, and a proper commercial library would cost about £700.

    Then i had a thought - why not modify MigraDoc? Being open source, I should be able to figure it out...
    I was using 1.32.2608 - I downloaded 1.50.4740 and set about modifying it, using the Underline code as my starting point.
    Basically, whereever underline code was found, I duplicated it to provide strikeouts. The only difference is y position above baseline...

    28/6/18 General Crew names for fours & eights have long been a problem. For example, Hampton have used characters from the Lion King at RTR - I had Boaty McBoatface at Bedford last year.
    Or they're just plain wrong as the crew composition changes...

    So I have finally bitten the bullet & rewritten [Entries].[ListBigBoats] The code copes with duplicate surnames, and even duplicate initials.

    And an unexpected, but welcome, bonus is that it sorts out composites, which the previous code failed to do...

    28/6/18 Dialogs The TimeEntry dialog is not very good - people ring me to say that it won't allow them to enter 3:45 - my response has been to enter 03:45 instead

    This is not really good enough, so I have written a new dedicated dialog, based on the keypad.

    27/6/18 General Peter texted me in a bit of a panic, as he had a runtime error when trying to output the programme. The reason for it was that the RTF file was open in Word, and he's incapable of deciphering the error message.

    Not really surprising - it is a bit cryptic! I've therefore added a proper exception, thrown on RTF, XLSX & PDF generation if files are open.

    27/6/18 Draw Modification Race times can now be edited.
    26/6/18 Draw Modification I am beginning to see the advantages of WPF. I now have zoom capability...
    26/6/18 Draw Modification One issue with Draw Expansion was that it created races at midnight, which had to be retimed in Regatta Control. Not so any more, though the control does not as yet display times particularly well.
    26/6/18 Draw Modification I have added the ability to change lanes & progression system for ANY event.
    23/6/18 Twitter
    • Maximum Tweet length increased to 280 characters. Except this doesn't work - Tweets of 151 chars and above (151 is in TVP data) are not tweeted.
      This surprises me, since I tested long tweets using @bedfordrowing
    • Names are now taken from the Regatta.Names table to ensure they match what is shown elsewhere. This resolves several longstanding bugs
    • Tweet Scratched & Race Rescheduled flags can now be set from the client. This makes them easier to find (Walton issue).
    23/6/18 TVP An interesting conundrum has come to light. Found by my bug finder in chief, Peter Needham. Now that we can publish from the main software, he published, did an import, republished, and rang me.

    The problem was that the scratched crews were not being shown. The culprit was the RegattaGlobals class, which wasn't initialising a lookup table each time.
    The class is legacy, written when MS Access was used - it wasn't fast enough...

    23/6/18 RTR Peter has not managed to break the software yet.
    23/6/18 Regatta Control Bug fix - dialogs in Race Modification did not allow a crew to be removed.
    21/6/18 QR Codes This idea came from Shrewsbury, and now the software generates them...
    20/6/18 Idea If we rotate a spider 90 degrees, we should be able to cut out excess space...
    20/6/18 Reports It will need a lot of tidying up, but these are now in the main application. Why? TVP couldn't work out where the Reports program was.
    20/6/18 Exports I have rationalised the names of the various regatta output files.

    I have also finally created Blades.xlsx

    19/6/18 Redraws It was SO close. Then Peter decided he wanted to collapse & retime everything, which means going back to Entries Closed to modify the timetable.
    It turns out that this requires the entries that have been collapsed out to be marked as withdrawn (and delete the crew numbers for good measure).

    It ALSO requires that any draw expansions have been done. I have no way yet of enforcing this.

    17/6/18 Spiders Weird & wonderful bug found in spiders.aspx ONLY present in Regatta Control program, where the GUID contains a key string - in this case C04. Fixed, though unlikely I'll ever see it again!
    16/6/18 Database Bug found in [Entries].[EntryForms] - it was not using @iDayID. Which meant the both days were printed at the same time...
    14/6/18 RaceManager We need the ability to modify verdicts etc post race - bascially, upload results to BROE, and fix the warnings once at a time. Weybridge's results are spot on ;)

    We also need the Publish button to be available on Race Day.

    14/6/18 Database MAJOR bug found in [regatta.PostDraw].[RenameStatusID], which was used extensively for Reading. It was not modifying the BandMapping table,
    8/6/18 Walton I still do not know how they managed to break the seeding tables. But all is sorted now, and the Draw Modification code has been tested. It is bloody brilliant ;)
    7/6/18 Regatta Draw For completeness, [Regatta.Draw].[EventNumbers] should also be modified.
    7/6/18 Regatta Draw Request from Reading Amateur - add option to only include Accepted entries in the Draw. This is actually very easy to do.

    In the Regatta.Draw schema, modify [ListStatuses], [ValidEntries_Count] and [ValidEntries] to take notice of a new flag, which itself is read by a new scalar function.
    This actually helps TVP significantly - rather than the bodge (Temp State column), we can use this...

    6/6/18 Regatta.Names I've made comprehensive changes to the code, including adding a dialog to the regatta draw button. This removes the need to flip to Entries Closed to modify the crew name shortening options.
    5/6/18 Regatta.Names The generated names are rubbish. This needs work.
    5/6/18 BROE Import Entries that have scratched before the draw is made can have their Withdrawn flag set (optional). But subsequent imports were marking them as having been reinstated, which is NOT what we want.

    [OARA2 - Update Entries Reinstated] and [OARA2 - Update Entries Reinstated] need to be modified.

    4/6/18 Regatta Draw Shorten Names appears to be bugged. I have no idea what the last 2 statements were meant to achieve!
    4/6/18 rowstats We can now publish from RaceManager! But ASCII only...
    3/6/18 Banding The UI really is not at all intuitive. Weybridge missed it completely, which doesn't surprise me.
    • The control now shows statuses where there is one or more bands/groups to which a StatusID has not been assigned in red. This is a big improvement.
    • Auto Banding functionality written - this will save a lot of time. It works as long as they do not change the default band/group names.
    1/6/18 BROE Import I have finally got around to fixing one of the little annoyances - any crew that is rejected after entries close is marked as having scratched as well.

    The problem lay in [BROE].[LogChange_Scratched] and I suspect the logic is very old.

    31/5/18 RaceManager Ashley Tilling is a star - he's reporting every glitch he finds. Which lets me fix them:
    • Draw - row for Gap between Divisions was not displaying properly. This turned out to be a mistake in CellRange creation - it is slightly different to that used in Merge Masters.
    • Finals Sequence did not let you move a row to be the end of the division - when you saved it, this change was undone. It turns out that all of this code was based on Head Race sequencing. Most has been removed, since it did not actually apply!
    • And there's nothing like a demo to find bugs. ASPX - Winner of Race 1 was not hyperlinked.
    • CRI Max missing from Merge Statuses.
    27/5/18 Parameters When the RaceOptions program was used, splitting the parameters into a series of User Controls made perfect sense, since each occupied its own tab.
    Now that they're pretty much all on one form, I have removed the controls, with the result that I can optimise the layout.
    • Active Day removed. This has actually long been obsolete.
    • Days - also obsolete
    • RaceID & BR CompetitionID are now configured in the XML file. They've been left in, but are now read-only.
    • Composite Club Format has never been set, as far as I am aware. Removed.
    26/5/18 Substitutions The software now DOES cope. Note that cox only substitutions are not listed; this is by design, as such substitutions do not count towards the 50% Rule.

    How? It is actually very easy - If taking entries, or entries have closed, then generate checksums on BOTH the Competitors table AND the Baseline table...

    26/5/18 Database [CSV].[Transfer Competitors] modified to set COX for the position in the Baseline table. I'd missed this during pre season testing.
    26/5/18 Substitutions The code for working out substitutions relies on MD5 checksums, generated durng import. The problem is that it relies on the user having set the correct Event Stage.
    During the 'Taking Entries' phase, one column is populated - thereafter, another is, and detecting crews with substitutions merely needs to compare the two.
    But what if they don't do this? (I've just screwed it up myself, and I am meant to know how this software works). Alternatively, what happens if they ONLY import after entries close?

    The software ought to cope.

    26/5/18 Draw I never intended to write a block movement system today. But I have (nothing better to do). It doesn't check for invalid moves too well, but will do shortly.
    26/5/18 Diabetes I was meant to go to the National Schools Regatta today. Pulled out since my bloods were off the clock last night, and have been little better today. Right decision.
    23/5/18 BROE At long last - the download contains a CSV file stating the Competition ID. So if they download the file to the wrong folder, entries won't be added to the wrong day.
    Given the IT knowledge of some of my users, this has been a problem waiting to happen.
    The new code is MUCH better, albeit slightly slower. GetLatestZipFile checks each file, making sure it corresponds to the right day. It will also ignore files that are for the wrong competition ;)
    21/5/18 Twitter Nuget package now used. More DLLs, but it is fully up to date.
    21/5/18 Installer I have removed the old VB6 draw program. This allows 4 prerequisite components to be removed, and a COM control. This reduces the build by about 10Mb.

    Removal of the SQL Server 2008 Management objects drops it by another 13Mb - a build that was 72Mb is now 49Mb.

    20/5/18 Walton Bugger. Some Tom fool in Thames Region has decided that CRI Max is the way to go
    18/5/18 Regatta Draw Highlight the last manually moved row in red. This would have helped me a lot when sorting out my own draw!
    18/5/18 Regatta Draw Once the draw is published, DO NOT allow changes in the draw screen to be saved, since everything gets renumbered & retimed.
    12/5/18 ASPX Amazing. the station headers were the wrong way around
    12/5/18 Marshalling BUG - if a crew is wearing the wrong number (of one that has been knocked out) we do not have a next race of crew, and an error is thrown.
    11/5/18 Marshalling UI written. It is not beautiful, but will do.
    11/5/18 BUG InformationDialog used EventData. This won't work on a client!!!
    9/5/18 MySQL export Rachel has just reported an issue, which is caused by the J15.A.8+ crew that St Edwards pulled out between entries closing and the draw being done.
    9/5/18 Hardware It is going quite well.
    1. New Windows Server 2016 configured. This is reserved as 192.168.2.11 on the 4G router
    2. 3 Dell laptops have been massively improved by fitting SSD drives.
    3. 2 NUC devices
    4. 1 HP Core 2 Duo laptop (ex work machine, nothing special). Running Windows 7.
    5. 3 old laptops. Very low spec, running Windows XP
    6. 2 old PCs. Very low spec, running Windows XP
    7. 1 4G router
    8. 1 Laser printer
    9. 3 gigabit 5 port switches
    10. Lots more storage boxes for ease of transport & setup
    Mini Display port to VGA adapter has been broken by somebody and will need replacement
    8/5/18 Draw The new UI is briliant. It allows me to move a race & see what effect it will have. But the problem is that after publishing the draw, it renumbers races, which is clearly absolutely wrong. Easy to fix, I suspect, but not at midnight.
    7/5/18 Shrewsbury Generally OK, though a few minor issues picked up
    • [List - Sponsorship for ALL Statuses] had a bug in a JOIN clause, which meant that sponsors could not be allocated to all events.
    • 1st Race and 1st Crew for Day 2 have no effect. This is frustrating, as I am sure I had tested this section of code.
    • They based their banding on CRI Max. I don't currently display this ANYWHERE.
    6/5/18 Regatta Draw Wow. Automatic clash resolution failed (no surprise there). So I let it do the bulk of the work, paused it, and used the UI to sort the rest out by hand. This is proof that working on the visualisation from the outset, rather than shoehorning it in at the last minute, was the right approach.

    One bug found relates to the option I've had for years - withdrawing crews that scratch before the Draw. This has always been a bit of a bodge - now that BROE allows us to unscratch a crew and then reject it (which is what I've done) it might be time to bin this rather poorly understood functionality.

    5/5/18 Regatta Draw 11th hour or what? I have now completed the new version of the draw. It seems to work.
    14/4/18 Bedford Amateur We are going to have enough people to man a marshalling system. Better get on & write it...

    Last year's system didn't work - it was entirely web based, and that was a major mistake.

    Rudimentary client written, which updates a table on the server. Quite how I do the ASPX visualisation is beyond me.

    14/4/18 General I have had a major testing session this morning, fixing assorted minor bugs, and convincing Peter Needham that ‘8+ Event for crews who want to double’ is not a valid StatusID...
    12/4/18 Misc Lots of little things tidied up:
    • New Contacts schema in the database; all stored procedures relating to contacts have been moved into here.
    • The contact from BROE used is now the Pre Event contact, NOT the Race Day contact. The latter is still necessary, but ONLY in the BR forms.
    • SetupNewCompetition recreates [BROE].[ClubQuestions] & [BROE].[CrewQuestions]. This prevents an error being thrown when a new database is created.
    • Delete data from current database no longer clears contacts. The idea is that a new competition will always be completely empty, having been restored from Blank.bak - even then, the tables are initialised, just in case.
    • Default state for Paid checkbox fixed
    • ALL parameters moved into the main program. RaceOptions is now totally redundant.
    • MAJOR bug found in keypress handling. A dialog may be shown BEFORE the KeyPress event has completed, so the KeyUp event happens in the second dialog. This has been a right bugger to find!

      Fairly easy to fix though - override ProcessCmdKey instead of trying KeyPress - the latter just does not work as expected...

    • Custom questions added to the Banding Control. This makes Bedford Regatta MUCH easier to configure!
    • Setting up regatta division from blank db will need some work.The combo has been moved to a more logical place, but the divisions control does not update yet.
    • The nightmare that is TVP & Reading Town has begun early. With an event name defined as '8+ Event for crews who want to double'
    4/4/18 Head Draw Too late for our Head (which won't happen), but I have modified the SQL that generates the Draw to include bands. [head].[RaceOrder] & [head].[AddMissingStartOrder] needed work.
    30/3/18 Import One of the longest standing known bugs in the code is what to do with Masters entries that have been handicapped, but which subsequently change status.
    Leon Taylor has just changed from Masters A to Open Sculls, giving me a perfect test case. It is actually an easy fix in [BROE].[ApplyHandicapping]
    27/3/18 Spider Viewer The old control is now totally redundant and so has been removed.
    27/3/18 TODO
    • 24/6/17 PHP Repechage flag. This was coded on 20/12/17, but has never been tested.
    • 18/7/17 RaceIntervals table
    • 20/7/17 Expanded flag
    • 22/7/17 Official Warnings - think the UI is written (mainly) but not used yet
    • Reading Amateur's request for adding half an hour, let's say, to all races left (if there is a major delay eg sunk cruiser)
    • Removal of ClubShortName and replacement with a configurable NameToUse
    • 28/12/17 InsertTimeBeforeRace TVP bodge is still there.
    • Collapse/Expansion should honour existing results. But then again, what about scratched crews that have been collapsed out?
    • Final removal of RaceOptions
    • 9/2/18 ListCrewsChangedAfterFormsPrinted
    27/3/18 Collapse etc Beautiful. I now have the ability to merge statuses. I did this manually for T&V last year, I seem to remember - the new code is SO much better!
    26/3/18 Dialogs Time to test string based dialogs - have ripped the code apart.
    25/3/18 Collapse etc
    1. Collapse - done.
    2. Change Status - done
    3. Late entry - direct replacement of scratched crew - done.
    4. Late entry - addition of MULTIPLE new crews. This was impossible last year - I could only expand one crew at a time. Which was painful, to say the least!
    I reckon that I should now be able to write code for merging 2 events

    Regatta.RedrawnStatuses is now redundant, and can be deleted.

    25/3/18 Spider Engine LoadPlateEvents removed, since the dictionary it populated was not actually used.
    24/3/18 Draw Expansion By comparison, Draw Collapse is trivial. This is an absolute beast, complicated by the way that I bodged it in last year (with a 2 stage process).
    22/3/18 Draw Collapse The control has been removed. Given the vast complexity I am planning, it makes sense to have just a form. With a highly advanced ribbon control.
    22/3/18 Draw Collapse It works. LOTS more testing required, but the basic functionality is in - a spider of 7 has just reduced to 4. Update. It works just as long as you pick heats that still exist.
    21/3/18 Draw Collapse Ah. The WPF version was proof of concept only.
    20/3/18 Draw Collapse All of the pieces are in place. The time has come to replace the SpiderViewer control with the new WPF version.
    20/3/18 Database All of the RegattaXXX tables have been moved into the Regatta schema for tidiness. It will take a week or so to find and fix all the references in code.
    20/3/18 Lanes & Progression This form now supports a Ribbon
    20/3/18 Draw Collapse Eureka. I've just figured out how to store the spider for the original (currently done as a text file). Use the Regatta.Spiders table... This has never been used, so can be modified at will.
    19/3/18 Regatta Draw I am now testing in earnest.
    • Crew number allocation for Round Robin events fixed in .NET This has never been used, to my knowledge, but testing is always good ;)
    17/3/18 Regatta Draw
    1. Stage 1 is use of a saved draw, which means that .NET & VB6 have the same crews racing each other. This has worked fine for a couple of years
    2. The next stage is to get the initial draw to have races in the same order. Only then can we directly compare doubling.

      To my great surprise, this is not happening. It turns out that VB.NET's underlying Dictionary object is to blame - iterate through the Keys collection, and you do NOT get the same order that they were added in. Why? Because I derived from System.Collections.DictionaryBase. Deriving from Dictionary(Of Integer, Status) resolves this issue.

    3. With that problem resolved, I find that the order in which the racelist is composed is an issue. Because VB6 uses a TreeView control, the last race is listed first - the timetable is composed by laying out the finals first, so this made sense 15 years ago. VB.NET stores the timetable in a dedicated object, creating the grid on the fly - for this it makes sense to have the normal race order displayed.

      Getting VB.NET to lay out heats in the same order is actually trivial, with a reverse SortedDictionary in CreateRaceList...

    4. Now that the two frameworks display the same data for 1st round, I can look at the horror that is AppendFullInfo. I suspect that several of my earlier iterations might have been right, but I had not realised that I was not starting from the same point...
    5. I am still unable to get the number of clashes to be displayed the same, as the 2 programs work so very very differently. This may pose a problem.
    6. After a bit of work, the VB6 software calculates the same number. In debug ONLY.
    7. But I drop the interval to 2 minutes (from 3) and the numbers differ. Bugger.
    8. It DOES resolve clashes. And significantly faster than the old code, which is really half the point of going down this route.
    15/3/18 Race Manager Testing many, many scenarios revealed a cross thread exception. An Invoked lambda expression resolves this.
    11/3/18 TVP Custom Printing functionality has now been written. 3 hours of solid work - it has to cope with Divisional regattas, which significantly complicates things.
    11/3/18 Dialogs Ouch. Virtually all of them have been changed - this is going to need a lot of testing. The first one I ever wrote was the DaySelectionDialog - the new structure is SO much simpler!
    10/3/18 Dialogs
    • Dimaco will have new functionality fairly soon, as I have massively improved the Integer dialog so that it can be used as a base class.
    • In the process I have managed to get rid of its own base class, instead inheriting directly from GenericDialog
    • SpecialValues have been extended, with an ALL checkbox
    • GenericDialog has become MustInherit. This is ongoing development, but the time has come...
    9/3/18 Dialogs Conversion is complete, though there will almost certainly be a few glitches.
    8/3/18 Dialogs Dimaco has a MUCH better set of options dialogs, supporting multiple choice. The StatusSelection & Club Selection dialogs have been converted. The code is SO much simpler, as the heavy lifting is done by the base classes - all we need to do is pass the dictionary to the base constructor...
    6/3/18 Database Since moving to SQL Server, I have had to create the database for each regatta using the system. This is not really practicable - I should be able to give a user instructions on how to install SQL Sever, and then for the software to create the databases.

    This is not a trivial operation. I've had an initialise database routine for a couple of years - this works fine, but requires the XML file to be edited, and a database created.

    The new code is rather more sophisticated:

    1. The user is given a dialog containing all events defined in the XML file. This year is the default, but if it already exists, you can create next year's
    2. SMO is used to create the database, with the files relocated to c:\RaceManager\Databases. This was the hard bit that previously had me stumped.
    3. The XML file is modified, adding in entries for the new competition. Note that multiple days are supported.
    4. The user is prompted for the location of the BROE export files for each day.
    5. Finally, the competition's name is set.
    This has taken about 4 hours to write, debug & test...
    24/2/18 Regatta Draw I am now in a position to sort this out. VB6 generates a valid Draw; .NET shows clashes that do not exist early on. This is not an issue (as I know the code is flawed). The point is that I am steadily improving the UI...
    24/2/18 Regatta Draw The investment in time is paying off. The Ribbon Control is a HUGE improvement here
    24/2/18 Database [OARA2 - Log Division Changes] & [OARA2 - Update Divisions] merged into [BROE].[LogChange_Divisions].

    The logic for logging the changes has been improved, since it would not have included entries that had a NULL division.

    24/2/18 Norwich They wanted me to help with their head (which is actually running today). But the person dealing with it failed to reply to any of my emails, and finally last night sent me a zip file. For their Autumn Head. Not very impressive.

    That said, their data is quite useful, as:

    1. They have not specified Division Numbers (see above).
    2. Some crews have not been assigned to a division at all (no idea how this is possible). The Regatta import code would have detected this, but the Head Race code did not. This has been fixed.
    24/2/18 BROE Import Rather than the user having to remember to configure Division Names, I now import Divisions.csv & work off that. It even works if they have not defined divisions as well (though will probably go wrong if they have defined some, but not all), as the underlying stored procedure [BROE.ListDivisions] returns ROW_NUMBER().
    9/2/18 Database [Entries].[ListCrewsChangedAfterFormsPrinted] created - I generated a temporary table when I printed the entry forms, and can use the EXCEPT operator in SQL to detect those that have subsequently had substitutions.
    For the temporary table to be REALLY effective, it also needs to store the crew's StatusID...
    9/2/18 Reports
    • The actual Entry Form is the same, whether we're running a Head or a Regatta. The latter has had more development over the Summer - its been moved to a static class that both variants can use.
    • Age and Club are now only shown when relevant.
    • Rather than checking presence of 'X' in the StatusID, we now use EventCreation.ScullingEvent. This allows points for Mixed Sweep events to be shown correctly - a very rare case, but one that was not previously addressed.
    • Copies added to Runners & Riders (since my printer refuses to collate multiple copies).
    9/2/18 General I have removed the BROE2 flag within the code, since ALL competitions from now on will be running the new system, whether they like it or not.
    7/2/18 Database The OARABaseline table has been dropped, as a CSV file now contains all of the information we need, and removes one of the major flaws in the system as a whole ;)
    6/2/18 Server Now that EventData is a static class, it MUST be initialised!
    6/2/18 Head Clients Focus now set to the textbox on Form activation. This has needed doing for a while!
    4/2/18 Draw I am going to have to radically rethink the way that I do a head race draw. The ActualStatusID field is an anachronism, and just can't work with Banding.
    3/2/18 Banding All of the Banding stored procedures have now been rewritten and tested. Since BROE now allows us to upload band assignments, my next task is creation of UI to edit bands.

    This proved to be easier than expected, though the custom sorting isn't right; nor is the highlighting of crews racing twice in the same band.

    2/2/18 Banding MUCH MUCH LATER!

    This has taken some considerable effort. I've managed to removed the BROE.Bands table as it is now obsolete, and have a system that deals with bands & groups correctly. The next stage (tomorrow morning) will be to copy CSV.CrewBands to BROE.CrewBands for the purposes of writing UI to actually UPLOAD banding information... Its nearly midnight, and my brain hurts.

    2/2/18 Banding I wrote this code this time last year, before BROE2 supported Groups.
    It is now time for a fundamental rewrite. But the problem is that there are STILL issues in the export files - the data is just so inconsistent...
    [CSV].[GenerateCrewBands] has therefore been created - it takes the new CSV.CrewBands table, removes 'Group 1' from bands that don't have any Groups, and then updates CSV.Entries to insert Group 1, which is missing.
    To be honest, these are fundamental bugs in the export code that need fixing ASAP.
    27/1/18 UI NOW I'm happy. The Head Race Draw form now combines the draw and the Divisional Sequence, PLUS various options (for export) only previously available in RaceOptions (which is now almost completely obsolete).
    20/1/18 UI I have now created all of the forms (with the exception of Status Changes, which will never be used again). The delegates have largely been unnecessary, since EventData is now a static class.

    17/1/18 UI It is really rather nice doing it this way, though I need to think about how to implement (if necessary) the horrors of the delegates used in the old system...
    13/1/18 UI So I've not done any of the above list. I've instead started work on the new UI. I've played around with a few ideas over the last couple of months, but had not figured out the best solution.

    Currently I have a sidebar. Clicking on an item causes a new control to be created, and the old one to be disposed. This takes time, and means you can't swap between items easily - state is lost.

    Now it is MUCH better. You can be viewing entries, sorting by entry number (descending). Change to a different regatta, and the entries are STILL sorted...

    13/1/18 TODO
    • Custom printing code for TVP. This isn't high priority, but needs writing.
    • Further development of the new UI. The Ribbon is going to be most useful for the Entry Viewer control, which currently has a lot of useful functionality rather hidden away in an awkward context menu.
    • Regatta Draw will probably also benefit.
    • Need to finish the expand / collapse functionality.
    • Need to work out why the doubling isn't properly carried through. Suspect this will need a weekend of solid work. (UPDATE - a week is a more realistic timescale)
    31/12/17 General Greatly looking forward to finding out what 3 little bottles of fun Abi's procured for me!
    30/12/17 .NET I have bitten the bullet, and made EventData into a static class. This removes the necessity to pass it into pretty much every routine, though I will need to make sure that default values are supplied for EVERY field...
    28/12/17 T&V It would probably help them out if I created the results sheets. These are landscape, with 20 rows per page. Columns are [Race], [Time], [Event], [Stage (Heat, S/Fin, Final)], [Winner], [Distance], [Time]. Heat shown in Black, Semi in Blue, and Finals in Red. VL - if tied at top, most wins takes precedence. Need to exclude 'Row Over' and 'No Race'
    28/12/17 Old Notes These are the notes that have been stored on my phone for a while...
    • Timing corrections must reset focus.
    • Insert extra minutes for certain TVP events. Looking at the code, I have hardcoded this in InsertTimeBeforeRace - it needs to be configurable...
    • Store using keys, not RaceID
    • once draw is saved to database, store its row version. provide a load button that calls initialise first. If versions of entries, seeding or seeding info are greater than the saved value, warn and do not do the load.
    • Must call AddMissingData
    • need to work out why seeding is not being stored in the database. (all preceding 10/6/17)
    • Names uploaded by results feed miss out the sculler's name.
    • crews taking up a status change should retain their original number. (11/6/17)
    • patterns.aspx should show number of races, not just X (12/7/17)
    • Need way of collapsing events once results have been set.
    • Also removing races from 'Races to go' if all crews have been removed.
    24/12/17 Spider Viewer This is starting to get really rather nice.
    • The TextBox control has been replaced by a WPF RichTextBox.
    • The control also has a Ribbon - this can be merged into the Ribbon used by the new UI (what new UI?).
    • I have figured out how to modify quite a few properties in WPF code - I can style the hyperlinks how I want, and have also figured out how to strike out text.
    • I have a placeholder menu - I intend to use this for things like Undo, and bulk operations.
    • The new control was developed in a test application, but the time has come to merge it into the main application...
    22/12/17 Redraws I have decided to fix the Spider Viewer control (which is based on the fatally flawed LinkLabel). I am trying to use the RichTextBox control - not the standard one in WinForms, but the one provided by WPF. And getting that framework to work inside WinForms is non trivial to say the least!

    Update - March 2018. The effort was well worth it, as I now have full draw collapse / expand / merge capability.

    20/12/17 Redraws On 12/8/17 I noted 'The table has been redesigned; all code will need to be modified.' This has not yet been done!
    19/12/17 Spiders Indent Byes option added.
    19/12/17 Spiders The underlying query MUST be sorted by Heat number for the winners names to go in properly...
    18/12/17 Database MAJOR changes made to [BROE.Results].[ExportRegatta_v1]. It didn't cope with banding or multiple days. Utterly useless, in fact.
    7/12/17 Import Until Phil adds an extra field in events.csv to denote whether the override name is the default or user defined, I am forced to do some sanitisation in GenerateStatuses_Senior.
    1/12/17 Database Star New Year Head has screwed up just SOME of their event names this time around... UPDATE - this wasn't their fault - it was due to a 'feature' in BROE2.
    27/11/17 General LTT - awesome ;)
    22/11/17 PHP All outer SQL statements have been converted to Prepared statements. Uploaded to rowstats.com Note that I have not bothered to do the live pages, since they work off XML files, effectively.
    20/11/17 PHP Amazingly, PHP does not allow you to bind parameters one at a time. Instead, I have to do this: $rc = $stmt->bind_param($types, ...$params); The ... operator allows an array to be unpacked for use in variadic functions - a truly crpytic syntax that's actually extremely powerful, once you get your head around it...
    18/11/17 PHP I have failed to make the code resilient enough to withstand a SQL injection attack by parameter validation. It would be far far better to use prepared statements. These will take a while to get right, as the parameters have to be removed from the SQL statement itself, being replaced with ? characters. They then need to be added in the RIGHT ORDER in a subsequent call.
    16/11/17 General
    • My first challenge is to get SourceSafe up & running. I had a brief experiment with Visual SVN when I first got this laptop, which will not be repeated.
    • Got there in the end - had to manually create all of the solution bindings, which was rather painful. I have no idea why it cannot just accept the folder structure - it requires the solution file for multiple project solutions to be located above the binding root... Still, all done now.
    • Checked the XML syntax of this document - many errors were fixed...
    16/11/17 General In hospital for a 3rd day. The diagnosis is vasovagal syncope - hopefully they will decide what to to with me at this afternoon's MDT.

    Fortunately I have managed to persuade Suzy to let me have my laptop - in a side room, I now have everything I need to kill time...

    6/10/17 General Moved house
    1/9/17 Database Since 2003, 30 characters have been more than sufficiient for a Contact's name. Not so any more, as 'Michel von Czettritz Und Neuhaus' has just entered. Unsurprisingly, he's from a Cambridge club.
    27/8/17 Database My war on Views continues.
    • [Display - Club and EntryNames] is one of the oldest routines in the database. And has finally gone. It turned out that only GenerateNames used the short form of the club name, which is rather what I'd hoped to find.
    • Getting shot of [Display - Regatta Names] has been harder. [regatta.RaceDay].[Races_AffectedByDoubling] is mind bendingly complex (and badly written), and [regatta.RaceDay].Winners is just as bad...
    • 18 Views left
    • I'd managed to delete [OARA2 - List Crews with Substitutions] by mistake. This one was especially tricky, as it was used in .NET code as well, JOINed to other tables. This has meant that I have had to create 2 extra stored procedures. These are candidates for futher work - they're used as a pair to count the number of substitutions, and once I have Cambridge's final data, I will investigate use of the SQL EXCEPT operator. TODO
    • 14 Views left
    • [List - Racing Sequence] was migrated from Access. I have no idea how it works! It was only used in a few places, and code written from scratch is easier to follow regardless...
    • 8 Views left - and 5 of these relate to Payments
    • [Statistics].[Payments] needs rewriting - the combined logic is appalling.
    • 2 Views left - and they're used in code.
    • FINALLY. 0 Views
    This has taken many, many hours to achieve. Some of the resulting logic is impenetrable, and a lot of work needs to be done to resolve this. But the underlying logic is known to work, and the table design has been fixed for some years now. The BIG advantage of using Stored Procedures only is that I have control over the formatting of the SQL code. Gone are the days when I relied on a graphical query designer - when I moved to SQL Server, I was lost, and generally added new logic graphically via a View before moving the code to an SP. Times change.

    And now, ALL Stored Procedures are self contained. There are NO dependencies (apart from 5 scalar functions, and one TVF for Regattas). Beautiful.

    20/8/17 Database My war on Views continues.
    • [List - Competitors] has been converted to a Stored Procedure, with the doubling code moved to a CTE.
    • [List - Composition of Specified Crew (Current)] & [List - Composition of Specified Crew (Baseline)] have also had the doubling code moved to a CTE. In the process it was found that this was a single stage, as opposed to 2 in the original (Access based) logic. Both referenced [OARA2 - List Crews with Substitutions] with a LEFT JOIN, but did not actually use it!
    • [List - Composition of Specified Crew (Current)] has been totally rewritten, using the baseline code as a basis, then adding extra JOIN logic as necessary.
    • [List - Rowers Doubling Up] was referenced by [BROE].[Append Doubling] but was not actually used.
    13/8/17 Database I have now moved a lot more procedures into appropriate schemas. More work needs to be done, but there are only 48 left in dbo... Make that 47, as [List - Composition of Crews] was redundant.
    13/8/17 CRA Very minor changes have been necessary to the code for CRA event creation in order to cope with BROE2. More painful was the realisation that BR have new codes for Schools/Junior events - brought to light as Cambridge Autumn have offered EVERY possible event.
    12/8/17 Redraws The table has been redesigned; all code will need to be modified.
    12/8/17 Database
    • There were 2 tables relating to spiders. These are not yet used (though have been on the TODO list for a while) - either way, they've been moved to the regatta schema.
    • More importantly, the RegattaRedraws table has become [regatta].[RedrawnStatuses], and a [dbo].RedrawTypes table created.
    • All of the Views concerned with Doubling have been converted to CTEs. Any Stored Procedure concerned with viewing doubling has been moved to a new schema.
    • All of the Views related to Payment have been merged into [Payments].[Totals_MultiDay]. Unsurprisingly, the resulting code is almost unreadable, and will not be used until properly cleaned up... It requires 7 CTE expressions, at least 1 of which I suspect is legacy code and thus totally obsolete.
    • And I have no idea why the [Payment - Totals] view still exist
    • I have spent the best part of an hour on this. But [Payment - Totals] is not actually called by ANY VB.NET code. BUGGER.
    • That said, [Entries - Payments for Specified Club Multiday] IS used. I see no point in [Entries - Payments for Specified Club].
    • [List - Contacts belonging to Club or Composite] was calculating a custom contact name. But it is never used. I have converted it to a CTE where necessary, but it may need to be stripped altogether...
    12/8/17 MASTER My master database is now 2017.cambridge
    12/8/17 BROE2 They've added BoatID to the export, but in true Bristol IT style, it doesn't work properly. For the time being I'm going to call BOTH [CSV].[Transfer Boats] AND [CSV].[Transfer Boats_v2] to ensure evrything is picked up.
    5/8/17 Regatta Control UI for awarding Official Warnings added. The web page and table were written during St Neots, but I had to manually add the record. Everything works, except I have no way of issung a warning that applies to ALL races of a crew, or any way of displaying this. In addition, I will need to modify the main regatta ASPX page to display warnigns - and I have not even thought about this yet...
    1/8/17 ASPX
    • Victor Ludorum code for Henley extended to include the number of races won, and the number of finals won. This is to give sufficient information in the case of a tie (which looked likely this year).
    • regattacompleted page updated to use a non alphanumeric sort on the club name. This is because Henley name scullers...
    25/7/17 Database
    • The 2 views for detecting female only entries have been merged into a single stored procedure. This is significantly better written - its easier to read, and 2 minor filtering bugs were fixed in the process.
    • [BROE].[Append Doubling] has also been largely rewritten, merging the 3 views into CTEs. These were further inproved by removing the ORDER BY clauses, and using yet another CTE to filter out Rejected & Withdrawn entries.
    • After the changes (and yet another hunt), 19 obsolete views and 2 obsolete stored procedures have been identified. This is very much an iterative process, as many views depend on each other - as one is marked as obsolete, others become obsolete as well... The problem arises because Access ONLY has views - there's no equivalent to SQL Server's Common Table Expressions, which are a far better solution.
    • [Regatta - Update Null Races] update to use COALESCE logic - it is easier to understand. This has not been tested, but will work. NOTE - This logic has now been lost - I must have overwritten the database I was working on :( And it is not called anyway!
    22/7/17 St Neots
    • Verdict of Bowball has been coded
    • Handicaps ASPX page improved (none of the queries were day specific, which made it incredibly confusing), but it really needs totally reworking to provide a table such as GTD prepared by hand...
    • BUGGER - only just noticed that St Neots have the same race numbers on both days. This SHOULD work. But the doubling page didn't...
    • TODO - Add Offical Warning capability. I've written the database table, and an ASPX to display it - all that remains is to write the UI on Control. Because the server will need modification, I can't really do that in the middle of St Neots Regatta...
    • TODO - remove clipping instructions from Winners Certificates. UPDATE - looks as if this has been done.
    • TODO - The data in the Qualifying column (regattacompleted) is wrong - ELI.1.8+ IS qualifying despite what it says. I think that the issue lies in [List - Qualifying Statuses] - this is currently a View, which does not filter by DayID. I'm going to have to change it to a CTE in the morning... That is now done, and STILL it did not work. It turned out that the culprit was a JOIN to OARAStatuses, instead of CTEEventID as used elsewhere (results export, for example)
    • doubling.aspx should be ordered by race time, not race number
    • This dataset (end of Saturday) is going to be very useful for testing!
    • [List - Regatta Winners] needs major work.
    • [Statistics].[Lanes] is not day specific. I thought I was going to get away with it, but GTD noticed, and I patched the system ;)
    20/7/17 TODO When a status is collapsed/expanded, set a flag in EventData. When Live updates (initialise) succeeds, clear this flag. On load, if the flag is set, initialise...
    20/7/17 Redraw I can now move a WJ16.4X to a W.4+ This is done via 'Other Status', which brings up an extra dialog...
    18/7/17 Database Clearing data from RaceIntervals table needs to be regatta specific - TODO.
    17/7/17 Database BUG found in [List - Sponsorship for ALL Statuses] - it was not really day specific. It also had several totally unnecessary JOINs. Having got the logic working, I have now rewritten the JOIN clause, making it significantly simpler, and easily understood. Previously it was just a port of the original Access code...
    16/7/17 Database BUG found in [OARA2 - List Doubling between Boats]. It looks like a cut & paste error which resulted in no records being returned...
    13/7/17 BROE2 More work needed on Club questions for a 2 day regatta. BR have just added Club Abbreviation - due to the way I designed the code, this ended up in the ClubQuestions table. Execpt, being a 2 day event, it violated primary keys...
    8/7/17 KAR I'm not
    7/7/17 Import BROE2 does not honour crew names being unique within status - so an Op.1X Everitt is followed by Op.8+ Everitt-2. Bloody annoying, and the code now copes.
    7/7/17 Import GetHandicapNames was meant to show the applicable age categories for Masters Handicapped crews. Unfortunately, it returned ALL Masters crews.
    6/7/17 BROE2 St Neots have not defined any questions. As this is the case, we still need to regenerate the BROE.CrewQuestions - at the moment it has 'Level' in it, which is what was used at Bedford Regatta (the original database).
    5/7/17 RTF Static classes are now used to define the fonts & font sizes. This means that I should be able to modify them rather more easily.
    4/7/17 BROE2 It now is. The data files from St Neots import OK
    27/6/17 BROE2 Bugger. My code is not 2 day compatible.
    24/6/17 ASPX TODO - get shot of the middle tab in Regatta Control.
    24/6/17 Printing RTR want to print from a specified race number (to save paper). They will obviously need to specify which division, and which lane orientation. Note - the ASPX pages should show lane names for the printing options, not Lane 1 first and Lane 1 last.
    24/6/17 Race Cards The race cards for TVP & RTR are ALMOST right. Except they showed (1075) Winner of Race 75. Fixed.
    24/6/17 PHP Added new flag (Repechage) to control whether for 3 lane racing 'Winner of Race n' or '1st in Race n' is shown. There is no code written for setting this export flag yet. UPDATE 20/12/17 - this has been coded to use the existing 'Allow Repechage' flag, but has not been tested.
    24/6/17 Regatta Configuration The Handicapping item is now only shown if there are entries that HAVE been merged into a Handicapped event!
    24/6/17 Import One of the problems facing me for TVP & RTR has been Peter Needham's liking for adding crews AFTER the Draw. With the new expansion capabilities, this is not too much of a problem, except that the import code was still creating new crews for these new entries. This is necessary for a Head Race, but must NOT be done for a Regatta due to the way that the expansion code works. Fixed at last.
    24/6/17 PHP ListByPosition now works if blade colours are being shown. Previously it was not inserting the extra cell.
    23/6/17 Merging I have FINALLY got the cell merging for the Masters controls working. Simple once you know how...
    22/6/17 BR Results Reading, TVP & Hexham are now all wanting results export in the new format, since BR are chasing them. I can't do Hexham, as they have never used my software on Race Day, but I really ought to finally write the code for the others (see 4/6/17).

    Done. TVP & Reading have their files.

    22/6/17 Regatta Draw
    • On loading a saved Draw, gaps between divisions are inserted as appropriate. TVP reported this as a bug - given that the code was written in a marquee during Reading Amateur, my response at the time was that I really didn't care.
    • One thing TVP did not notice was that after loading a saved draw, clashes were not calculated until you moved a race. Fixed.
    • ICancellable implemented
    22/6/17 Live Results Because the clever bits of this code actually reside in the DLL, runtime errors & web exceptions were being treated as the same, displaying a runtime error dialog. I've therefore added a shared event, allowing any web exceptions (eg unable to resolve URL) to be shown to the user without the stack trace that would accompany a runtime error. This is much better.

    Minor bug fix as well - GetMaxRowVersionFromMySQL should ONLY be called if the previous call has succeeded. If a web exception was thrown, then the return value will be null...

    11/6/17 Regatta Draw (new) TVP are using this, since they do not have any doubling.
    • Draw modification has been added. There are a few caveats to this, but it does seem to work.
    • Draw expansion was not setting the ProgressionSystemID!
    • The Draw can now be tweaked AFTER saving it to the database. This relies on you not having changed the status of any entry, or added any new crews. There's no UI to handle this - it just throws unrecoverable errors!
    6/6/17 TODO
    • Change event in draw to separate draw (ie get rid of it). Need to delete the races from Regatta.TimeTable, and set the ProgressionSystem to 7
    • Draw expansion
    • Browse Entries needs a flag for Rejected. This was actually already coded, but wasn't being added to the toolbar!
    • BUG - ListPairsAndDoubles was returning records for ALL days. This caused assertion errors in debug...
    • Draw Expansion works. Messy, but works. Note - it is no longer quite as messy...
    • Levels for draw collapse / expansion are wrong.
    • EventNumbers are being generated for events that are in a separate draw.
    • TVP are using the new draw. Looks like it is not saving SeedingInfo correctly - you have to run the VB6 program to initialise them...
    • Seeding control was not displaying anything for unknown blade colours. It turns out that the paths were wrong...
    5/6/17 Progression Minimise Races functionality added.
    4/6/17 ASPX BUG in ASPX link
    4/6/17 Regatta Draw Bug found - Status Change slots were not being added to the Draw for non-divisional regattas. This was because the placeholder entries had a NULL DivisionID.
    4/6/17 Regatta Draw Bug found - if Crew Name Shortening is set for scullers, AND Scullers are named, then the names generated were inconsistent.
    4/6/17 General TODO I told KAR that the software outputs BR's new results spreadsheet. That isn't strictly speaking true, it turns out, as I coded it for 2 lane racing ONLY. Oops.
    2/6/17 Misc
    • Reports - Race Cards now generated for TVP. This has been an utter sod to write.
    • Web Pages - Status Statistics now show the number of races that each status will have, taking into account its lanes & progression system.
    • Temporary flag available to 'reject entries' in software ONLY. This actually uses the TimeOnly flag, so is available for Regattas only. It is automatically cleared on re-importing entries from BROE.
    Time to talk to Suzy. I've abandoned her for the last 4 hours...
    1/6/17 TVP Demos never work.
    • Rescheduling race - the dialog is only big enough to show 2 crews, and components don't scale properly when the dialog is resized. Fixed.
    • Draw Collapse broken. It appears that something is truncating the crew from seedinginfo.
    28/5/17 TVP J14 octos & J13 coxed quads run at a minute extra pitch. This has been hard coded.
    28/5/17 PHP List by position now implemented for 2 lane racing
    20/5/17 BROE2 One of the issues that Bedford Regatta's Entries Secretary reported was the inability to see the answers to my Club question (Gazebo Pitch?). It turns out that the import code was incomplete - it was importing into a table in the BROE schema, instead of the CSV Schema (as is done for Crew Questions). The PIVOT logic for both tables has had to be rewritten, as it did not cope with there being NO questions defined.
    20/5/17 Draw Collapse This is now recorded in the RegattaRedraws table. I'm not making use of this yet, but it needs to be somewhere, as I forgot which ones I'd done for Bedford Regatta!
    20/5/17 Walton Not can I code against an error that was reported 'Config.client gives error message on one laptop so can't put in IP'. A TeamViewer session established that there was nothing actually wrong - the server's IP address in the XML file was incorrect. What 'Config.Client' is meant to mean is anybody's guess.
    20/5/17 Walton Investigating the cause of ASPX errors (trying to view spiders containing a scratched crew). Their database contains numerous withdrawn entries that have a crew number. The ONLY way this can happen is if they did a Draw, then set it to Entries Closed & reimported entries from BROE (with the 'Withdraw entries scratched before Draw' flag set). I cannot code against this scenario - why on EARTH would anybody do this???
    20/5/17 Regatta Control Amazingly, I had never included the ability to modify the time taken by a race! I wish this had been picked up before, instead of half way through Walton Regatta!
    19/5/17 ASPX Walton want the Regatta Name to be printed on update sheets. I have no idea why. I have got it working, though this will need to be a setting...
    19/5/17 Twitter A custom footer has been added at Walton's request. But they didn't use it.
    16/5/17 Reports The Refund details on the Race Control sheets are wrong. I think that Draw Collapse is the culprit... So I've modified the code to use LEFT JOINs...
    13/5/17 BROE Configuration You try making this pile of sh1t work on Walton's exports. I can't.

    Analysis shows that the crews export file contains 2 events for W.J15.2X and 1 event for W.J15A.2X – the same goes for W.J14. I have never encountered this scenario, and the code does not cope.

    13/5/17 Regatta Finish
    • Mike Perry entered verdicts of 'r/o' & '4.00 lengths'. The code now copes with both...
    • One of our Finish Umpires (I missed his name, but he was from the Lea) had a very good suggestion - display the last race result - winner, time & verdict for passing to commentator. This has been coded now - I cannot understand why I never thought of doing this before!

      I've actually taken his suggestion one stage further, and have provided a grid showing ALL race results. This is a huge improvement. Note that the grid CAN be sorted to find results (I deliberately have not allowed filtering, as it tends to confuse people), but the sort is cleared when another race finishes. Each finished race is inserted at the TOP of the grid, so it is always visible.

    13/5/17 RaceManager
    • If an invalid race number is put into the Finish software, a KeyNotFound exception was thrown. It SHOULD have been a RaceNotFoundException - this is effectively passed back to the client.
    • If the Start clock is running fast (it was 12 minutes out, as NTP was not configured correctly), then the time taken can be negative. This DID cause problems for the first couple of races last weekend, before I worked out what the issue was. The code now handles this with a Date.TryParse statement.
    12/5/17 ASPX The reason the Lane Statistics weren't displayed for Bedford Regatta was that I had forgotten to finish the code! All sorted now, though it will need tweaking for 3 lane racing.

    I have also added a Regatta.Distances table, allowing for statistics on Verdicts to be generated.

    6/5/17 Lane stats not working Regatta Finish - Need to display last race result - winner, time & verdict for passing to commentator. This will be useful! negative race times (start clock running very fast) threw an error need to reconnect if no message reply is received
    4/5/17 Regatta Draw The Lea have just reported that crew names for their coxed fours in Bands 1 & 2 are missing. No time to figure out why now, but this MUST be resolved ASAP.
    4/5/17 PHP Spiders have been changed so that they show Race Number & Time for any race that has not taken place (in the expanded, results view). This basically completes the live results code. The change was trivial, replacing && with ||
    4/5/17 Live Results The code I wrote the other day to initialise the regattadata table ALMOST worked. The problem came when I collapsed the Draw for a number of events, as it sent the wrong number of crews to the MySQL database. This is resolved by using [regatta.Draw].[ListStatuses]. NOTE - I have no way yet of sending just this table on a redraw...
    4/5/17 Draw Collapse Bugger. I was going to use this for real, and it doesn't work. Specifically, it does not fill in Winner of information... Fixed. TODO - Fill in RegattaDraw.Redrawn
    27/4/17 Database BUG found in [regatta.RaceDay].[Names] - Shrewsbury & Weybridge WILL need this.
    27/4/17 PDF Bug found & fixed in Race Control sheet generation.
    25/4/17 Draw Expansion Why not? I'm on a roll now!

    This can happen in several ways:

    1. An Entry has been received after the Draw - I have deliberately left out an entry from Green Templeton in order to simulate this
    2. We merge 2 or more statuses, because somebody has scratched, leaving a singleton with no race.
    25/4/17 Draw Collapse It didn't let me change race times around though...
    25/4/17 Draw Collapse This has been on my TODO list for a while - I just haven't been brave enough to take the final plunge...
    • The first stage was to modify RaceManager.Libraries.Spiders.StatusList.Refresh (hard coded not to apply for Walton or Shrewsbury 2017). [regatta.Draw].[ListStatuses] has been modified to show the COUNT from [regatta.Seeding] - the routine makes use of this information.
    • Next stage - amend [regatta.Draw].[ValidEntries] and [regatta.Draw].[ValidEntries_Count]. These need to take account of the Scratched flag, which we will COALESCE in. I love that function!
    • Final stage - use the SavedDraw class to regenerate the requisite tables
    And it works!!!
    25/4/17 BROE2 The banding bug is still there. Possibly a good thing, as it has highlighted a problem in [BROE].[CheckForStatusChanges]
    25/5/17 Installer DevComponents.Layout.dll was missing. This only affected events running on BROE2.
    25/4/17 BROE2 This allows us to transfer a payment from one crew to another. I have no way of detecting this, as the information is not in the output files - see crew 1006968. I've had to do a manual database edit, reducing the recorded payment by £80, and setting PaymentID to 0 for this crew. Actually, looking at the history, I could detect this - Rachel marked it as paid, then 5 days later marked it as unpaid. I have undone my changes, and added a Refund instead, then modified [OARA2 - List entries unpaid on BROE] to filter out refunded crews.
    24/4/17 Regatta Draw ShortenNames is giving a problem. By making use of BoatRowers in the underlying SQL, the problem is fixed.
    21/4/17 Live Results
    • The regattadata table is now being populated via a new message
    • The EventData table sets EventStage to RaceDay, just in case.
    • What I had forgotten when writing this to start with is that I have ALWAYS done a Draw upload to start with, and this populates the Clubs & Statuses tables. Once the code is used in anger by other regattas, this won't necessarily be the case...
    • All done. My test database (created this morning with NO data at all) now allows full regatta upload...
    • The next challenge is the Marshalling code I promised my Committee I'd write.
      • I have found some good example code that handles authentication. This works, both locally & on rowstats.
      • Getting there. I now have a secure page - if somebody stumbles across it, then they will be asked to login
      • http://www.rowstats.com/marsh will be the link. This page will show a list of all Regattas that are currently on Race Day.
      • Time to call it a day. I've been coding for 6 hours, and now have a system that populates the marshalling table. Tomorrow's task will be to make use of the information...
    20/4/17 RaceManager After an abortive attempt to use a Container to display custom buttons, I've now cracked it with an ArrayList. The code started in the Merging control, but is now being developed in the Entry Browser. The main difference is that this implements ICustomButtonProvider - any controls that implement this will have their buttons added. Note that the event handlers will remain in the original control - this has been tested & works a treat.

    Why the focus on this, when I have so much else to do? I want to be able to filter out the withdrawn entries, and for this setting to be persistent...

    8/4/17 PHP Why does the mysql file written throughout the day have eventstage 3 in it?
    8/4/17 Regatta A couple of SPs have needed modification, but nothing serious
    8/4/17 Head Added the ability to scratch a crew from the division editor. Need in browser to be able to change contact. Actually need to merge the logic into a static class.
    6/4/17 Firewall Need to add a rule for Regatta.Server.exe
    6/4/17 SQL Server
    • 3 more obsolete views deleted.
    • Importing all code into a new blank database revealed just 2 uses of synonyms. I THINK I have managed to purge them all...
    • Found a script to find and generate code to delete all extended properties. I made sure that only MS_SSMA_SOURCE was actually deleted...
    6/4/17 Reports At last - I have found out why AVG was reporting this as a virus! Amazingly, it didn't like the application icon. I removed the 256x256 PNG image from this, and now it just works. This means that I can shift the functionality into the main program, and get rid of yet another redundant bit of software.
    5/4/17 General Add in a blocking call to wait for SQL Server to start
    5/4/17 Import A month ago I sorted out a lot of unecessary updates to the Entries table. I had forgotten about OARAUpdateHandicapNames. By caching the handicap names BEFORE they're checked, we can avoid yet more updates...

    More of a problem, though, was the SQL logic in OARAUpdateHandicapNames. It was appending a Masters crew's age category as it was when entered, instead of what it was being handicapped as. This affected one crew from St Neots, and another from Champion of the Thames, both of whom contacted me. There may have been others that I did not spot.

    2/4/17 BROE Masters Merging control does not work properly for BROE 1. Need to resolve this ASAP for Walton & Weybridge...
    1/4/17 BROE2 If you unreject an entry, the Rejected Flag is not cleared. This is by design, apparently. A truly shit design.
    1/4/17 Database [Banding].[ApplyBanding] has been modified so that it copes with entries that have been banded, and then unbanded. I just pray that they've fixed the bug...
    1/4/17 BROE2 Rudimentary support for Groups has been added.
    30/3/17 TODO Need to be able to change payment details - specifically, changing what is recorded as an online payment to a BACS payment, and adding details of who paid.
    26/3/17 Masters The next challenge is picking up gender changes (yes, really). I have a Mas.D.4X that has already been handicapped. But they've just changed to being a MIXED crew...
    26/3/17 Masters Added support for removing crews from a handicapped event if just 2 or more crews at the same level are left in it...
    19/3/17 Live Results I had put a button into the Regatta Draw control to initialise Live Results - this was meant to populate the MySQL database with the appropriate data from the EventData table. Except I had never finished coding this. I've therefore moved the button to Regatta Clients (Live Results) and implemented a couple of new messages. rowstats.com has successfully received the data for my April Head & Bedford Amateur Regatta
    19/3/17 Kit I have bought:
    • 3 Inspiron laptops. They're nothing special, but a HUGE improvement over the second hand crap that Bedford College threw away 6 years ago.
    • A NUC5i7RYH - a top of the range NUC with an M.2 SATA SSD drive, 16Gb of RAM and an i7 processor. This will be for George Hammond.
    • A Proroute H820 LTE 4G Router. This is the 4G version of the excellent device I borrowed from Steve Reece last year, which gave Race Control internet access for ALL machines. The problem was that it took a while to set this up, as Steve & I both had other things to do (he provides ambulance cover), and we had to reconfigure the IP settings on the various laptops. This year I'll be able to set everything up in advance...
    • An O2 4G data only SIM, with 12Gb of data valid for a year.
    • Excluding the NUC (which I saw on eBay and was too good a deal to miss), this came to just shy of £960, with the NUC being another £360
    19/3/17 MySQL Time to design another feature - crew checkin.
    • We will have a marshal outside Star Club, and hopefully one just upstream of the Suspension Bridge.
    • I haven't considered authentication yet - we need to ensure that the marshals can login to the database, since they will be making changes.
    • The idea is that each position will type in a crew number, and press a button to save it. They'll also need to be able to delete a record, and to edit a crew number.
    • This will be saved in a MySQL Table - EventID, DayID, MarshalID, CrewID
    • Gavin wants instant feedback to a crew - what station it is on, and whether their opposition is waiting.
    18/3/17 Import All routines that show webpages have been modified to use ExecuteScalar instead of ExecuteReader.
    16/3/17 Masters Merging CRI & Custom Questions have been added to this control.

    You can tell I have a big coding session to do (the Regatta Draw and Collapse) - I am doing ANYTHING but what I need to do! The Merging control now uses grids instead of treeview controls. This allows for better styling, including grouped headers. I have also added owner drawing code to render the Status description in such a way that it spans multiple columns - merged cells won't allow me to do this directly.

    15/3/17 Database [List - Sponsors on Specified Day] has needed extensive tidying - I have just converted the 2 Views it used to CTEs
    12/3/17 Kit I have just put in a request for £959
    12/3/17 Import Several routines have been modified to use ExecuteScalar instead of ExecuteReader - if all we want to do is check whether or not a web page needs to be displayed, there is no point in wasting time constructing a recordset.
    12/3/17 CSS I've added 3px padding (left & right) to TH elements.
    12/3/17 Database The routines for checking minimum ages of coxes & rowers have been modified to work with BROE2. It is actually significantly simpler, as the Junior Age Group is exported instead of the Date of Birth.
    11/3/17 .NET Shared member variables (for padding) prevent a row from being deleted. Visual Studio 2017's debugging tools gave me the information I need to find and fix this.
    11/3/17 Database Another 18 Views, and 2 Stored Procedures have been marked as obsolete
    11/3/17 Database The CrewID field in the CSV files is variously named as [CrewID], [Crew ID]. The database has ARACrewID for most of the older tables. I really should have done this properly to start with and renamed.
    • BROE.CrewQuestions had ARACrewID, though this is created in [CSV].[Create CrewQuestions], which has now been modified.
    • BROE.Names had ARACrewID
    • CSV.Baseline had CrewID
    • CSV.Competitors had Crew ID
    • CSV.CrewQuestions had ARACrewID
    • CSV.Entries had CrewID
    • Checksums had ARACrewID
    • Entries had ARACrewID
    • OARABaseline had ARACrewID
    • OARACompetitors had ARACrewID
    • OARACrews had ARACrewID
    • OARAPoints had ARACrewID
    • StatusChangeRequests had ARACrewID - this table is unused
    I have now modified EVERY Table, Stored Procedure & View to use BR_CrewID.

    NOW I can fully appreciate how useful the import routines are - I can map any CSV column to any database column...

    10/3/17 General I am installing Visual Studio 2017. Initial impressions (gained at work this afternoon) are good, and it will be nice for once to be using a brand new IDE...
    10/3/17 BROE2 They're now outputting Status Points totals in the Crews export file. Great - except that the totals include points held by a coxswain. Do these goons (I struggle to call them developers) NEVER learn?
    10/3/17 BROE2 Date of Birth has gone for legal reasons. It has been replaced with Age, which for most people would be great - J14 etc for Juniors, and Masters age for Masters. But, NULL for Senior crews, which right royally screws up my masters.aspx page, which displays senior crews that are in fact Masters. I've raised this as an issue, and it should be in the next release.
    9/3/17 VB6 The code has been modified to use the new database tables, so the synonyms are irrelevant here.
    9/3/17 SQL SERVER BUGGER - Synonyms need to be redefined for each database. I've copied 2017.feb to a test database; in BOTH databases the synonyms point to 2017.feb tables. This functionality was sort of expected - I just hadn't tried...
    General Power cut There's nothing we can do at work, since the power's gone off for a couple of hours. I was in the middle of installing Visual Studio 2017 on my main development PC...
    8/3/17 Database I am having a fairly major tidy up, identifying all routines that are now obsolete (lots of the Views fall into this category), and merging Stored Procedures where it makes sense to so do. I am also shifting more and more of the logic into appropriately named schemas.
    7/3/17 Import One of the first routines to be converted to .NET was OARACalculateMasters. In VB6, this was actually quite tricky, since Access does not support SELECT CASE logic. During the conversion, I left the logic untouched, always intending it to be improved upon at a later date.

    With yet another temporary table, and a NOT EXISTS clause, we can calculate the AgeBand (A-K), modify any records that have changed, and then insert any new ones. We can also merge in the code for setting Age Category Entered. All in all, we lose a stored procedure AND about a hundred lines of code.

    7/3/17 Import Its nearly 4AM - I've been unable to sleep, so have spent the last couple of hours finding the missing entry fees bug. Blindingly obvious once you start with TOTALLY empty tables. I was referencing the Entries table before it was populated, so the new statuses were not being added. On importing a second time, the table contained entries, and so their corresponding statuses were added. This is a major relief, as this was pretty much a showstopper bug.

    I fixed a bug in EventCreation at the same time, which was creating Junior A events (which have no meaning in BROE2)...

    4/3/17 Database I have added a RowVersion column to the Entries table. Sadly, it confirms what I had suspected - the names of small boats are updated on EVERY import, whether necessary or not.
    • Stage one is to modify the view to include the CURRENT crew name. This should have been there from the outset.
    • We can then modify the VB code so that unnecessary updates are not done.
    • This works absolutely fine, and thus speeds up the import slightly. But I see that Withdrawn entries are still being updated in some way, and I can't figure out what is going on yet.

      Update - it looks as if LogChange_Withdrawn was the culprit. Whilst modifying this so that records affected are returned in an OUTPUT parameter, I noticed that it was always updating the EntryFee to 0 - it doesn't need to do that (obviously) if the EntryFee is already 0...

    4/3/17 Import The missing entry fees issue IS still there. I THINK I now know how to recreate it, so have saved 2 zip files and instructions. I'll try to find it tomorrow...
    4/3/17 SQL Server I have now written the code. My knowledge of SQL has improved MASSIVELY - I'm creating a temporary table, inserting rows into it, then using it as the basis for a series of UPDATE and INSERT statements. Finally, I return the number of rows to the calling appliation via an OUTPUT parameter, and drop the table.

    This methodology ought to be the template for all of the other logged routines (such as withdrawn)

    1/3/17 BROE2 Our April Head is now open for entries.
    • I have edited EVERY override identifier to use my own nomenclature instead of Phil's. The differences are:
      • He uses Op to denote Open events; I omit anything unnecessary
      • He uses spaces as separators; I use full stops
      • He uses MasA etc; I use Mas.A etc.
      • He uses x for a sculling event; I use X (no minus symbol)
      • He uses x- for a coxless sculling event; I use X
      • He uses 8x+ for octuples; since they are always coxed, I use just 8X
    • I plan to create a new database table to handle crew names. This is needed as I edit them in the main entries table AND clubs are also able to edit them.
      • On importing entries, any Crew that is not in the table will be added to it, and the BROE_Name set
      • The next step will be to compare this field to the value in CSV.Entries
      • If they differ, then we will update the dbo.Entries table with the new value
      • Once this is done, we will update the BROE.Names table with the new value.
      • Finally, we will log a change to the Alterations table.
    • I only opened for entries yesterday, but have 15 entries already, and have just changed the name of one of them - time to write the code I need...
    • CreateFolderRecursively has been moved to a new namespace, & all programs have been recompiled. This change allows me to utilise code I wrote at work - the FileChecksum...
    18/2/17 Database I have created a test database so that I can add features into the code without disturbing the actual data (until I manage to set results). The zip files are an absolute godsend here!
    • I clean the test database, and import 23January20171752.zip An Exception was thrown immediately from GenerateStatuses_Other, as EventCreation.GetStatusID had no errorhandling. It turns out that the problem lies in GetBaseResultsOrder, which does not generate the --- code used for banding & grouping.
    • The next issue is one that plagued me during the import - missing entry fees. I managed to replicate it in my first import, but now suspect that it was an artefact of an incomplete import, as clearing the database and reimporting fails to generate it..
    • First up will be change of boat type. The import I have picked is 04February20171225. This has 2 instances of the problem: Crew 1000480 - a BMS J15.8+ that was changed to a J15.4+ & Crew 1000755 - a BDS J15.4+ that was changed to a J15.8+
    • The ASPX page uses [OARA2 - List Changes (Status)] as its data source. This is actually quite a relief, as this View has major problems (it does not cope with banding) and hence needs to be rewritten. It will become a Stored Procedure, and will be extensively tested.
      • The first stage is to move it to a test window, and to tidy it up so that it becomes readable. That's actually easier said than done, as the WHERE clause is complex. If I use 3 distinct parts, it should be easier.
      • Now remove the horror of [Display - Club and EntryNames]. This gets shot of a LEFT JOIN (why was it there?), replacing it with a simple CASE statement. Much cleaner.
      • Replace the LEFT JOIN to OARAMasters with a NOT IN predicate in the WHERE clause. This leaves a VERY simple bit of code...
    • I have added a new AlterationType. On finding a change of boat type (note that it doen't yet take account of whether or not the entry fee would differ), it removes the PaymentID, and sets the DefaultEntryFee.
    • Banding - DayID & BaseStatusID are now created - these were found to be necessary after the code was originally written.
    • Banding - We can now edit a Band's description.
    • Banding - on creating a new banded status, we first check whether it exists already. If it DOES exist, then it displays the description stored in the database, NOT the default.
    • Banding - Status Descriptions are not generated correctly for U23 or College. I haven't got time to fix this today.
    • Now for the most pressing issue - results export. My C & CDE eights give duplicated rows in the export file, for reasons I have not yet found.
    • The answer is actually simple - there is no way of do this, as we get the EventID from a ResultsOrder
    • We need to generate YoungestEventID instead of YoungestResultsOrder. Generating the correct EventRaced is then trivial.
    • The following database objects will need to be recoded:
      • VIEW [dbo].[OARA2 - List Status Raced] - will be marked as obsolete soon
      • PROCEDURE [dbo].[Draw - Add Missing RegattaData]
      • I spent ages transforming [dbo].[Doubling - List Worst Case] to use CTE logic only (ie no old Views). Only to find that it is not used...
    17/2/17 Results Bugger. it looks as if BROE2 has 'lost' banding info - I certainly didn't change anything after the draw. Further investigation proves, beyond all doubt, that whenever a club admin edited a crew, banding information was set to NULL.

    Quite frankly, this is not good enough. I am given to understand that Bristol IT have professional developers, though nothing I have seen to date supports that view. Shoddy design, shit coding, and an arrogant, totally unwarranted, belief that they know best - how Regattas & Heads actually run is irrelevant to these utter fucking tossers.

    17/2/17 Results The hard bit here has been modifying [OARA2 - List Status Raced]. Since this is only used in 2 places, I am going to remove it completely.
    • It breaks down into 3 distinct parts, instead of the original 2 - Normal, Handicapped & Banded
    • Of these, Handicapped caused the first issue, as YoungestOrder is not being generated correctly - it MUST include the final 3 dashes. I have not modified the code yet (I'm still trying to generate results), but have instead run an UPDATE on the table.
    • Banding was the next one to be recoded. Here, I think that we need DayID - just in case we decide to use the same StatusID for completely different things on each day. Unlikely, I know, but if the table is designed correctly to start with we've got a chance of it working...
    There is a problem in the data (of my own making). We ran Mas.C.8+ AND Mas.CDE.8+

    As Novice no longer exists, I couldn't create a combination class for these. The Masters Merging code MUST warn (TODO) if this scenario is encountered - otherwise (as here) we'll have multiple winners of the same event, but with non contiguous placings. I have no solution except to create another event on BROE. The SQL now generates the correct number of rows.

    The code from [OARA2 - List Status Raced] is now in [head].[BROE_Results] as a CTE (CTEStatusRaced)

    Note that the old view has been left alone, and will need to be updated for the regatta code.

    11/2/17 Head Races It is going to be bloody cold tomorrow. The Entry Matrix now highlights competitors who are racing in more than the maximum permitted consecutive divisions. This is a new parameter.
    10/2/17 Database I could really do with a few more checksums to hold information on the ENTIRE crew. At the moment, the checksums allow me to detect crew substitutions only - coxes are ignored.
    9/2/17 BROE2 Massive bug list. But I still like it.
    7/2/17 BROE2 When a boat type is changed, we MUST regenerate the entry fee!
    5/2/17 Database [OARA2 - List Changes (Status)] is going to take a LOT of thought.
    4/2/17 Banding So, now that I have sorted the ResultsOrder (whose purpose is sorting ;) I can start to write the UI for naming bands. Note that BROE2 does not yet support Groups
    4/2/17 Banding The biggest challenge in getting banding working (I have 2 days to do so before I have to do the Draw) is the ResultsOrder field.

    • See comment made on 28/9/12
    • Characters 1-5 remain the same.
    • Character 5 is age specific. H/L for Seniors, A-K for Juniors (age group) and 0-N for Masters (used for determining combination classes).
    • I have deleted CRA events, as they just confuse matters with an 'O' suffix (depending on the length of the field, this can be character 5 onwards).
    • The new system has the concept of vertical and horizontal bands (the latter will be called Groups, not Divisions as originally proposed, as 'Division' has other connotations).
    • I will therefore use character 6 for oddities (College, Club, Alumni etc.), character 7 for Band, and character 8 for Group. The fill character for these will be '-'. This actually makes the field significantly more readable - I had originally planned to use 'G', but this was significantly harder to parse by eye.
    • To ease the process, I have removed all handicapping from my entries, then deleted ALL handicapped statuses. I can then run a chunk of SQL to generate my new ResultsOrder
    • Under this system, character 6 may not be necessary. Except it will allow the event to offer, let's say, Alumni eights and for them to get fewer points than if they were placed in a high band within a generic category of eights...
    • Now for the hard bit - Masters.
    • Except it wasn't hard at all - just insert '---' before the handicap data. I can't test combination classes, but think I've got the order right...
    • The next bit WILL be hard - creation of 'normal' statuses. But, since I have already imported all of my entries, I don't actually need to do it until after the race (when I'll wipe entries and start again). TODO
    • Update - By creating a temporary field in the table, I have managed to generate the correct StatusDescriptions for all Statuses, AND the Groups that already exist... There was one description that was wrong anyway!
    3/2/17 General I have bought another server - for £300. This one runs Server 2012, which means that I can retire the Club Server. The Regatta Server MIGHT be able to run Server 2012 - I'll use my company licence, which we're never going to use. If this is the case, then I can move the server code to .NET 4.5 and later...
    28/1/17 ASPX Head Race Entries by Status has been massively improved, with Points & Ranking both displayed. It also shows any custom questions that have been defined.
    27/1/17 BROE Need to build the DivisionList table from BROE data, as we have just changed from 16:30 to 16:45 and ended up with a NULL division Changing BROE override name is a pain in the proverbial, and I will need to create UI for handling this.
    23/1/17 Results I am told on good authority that BROE2 will not support XML results upload as it causes problems elsewhere. So they'll be using JSON instead
    23/1/17 Entry Browser The number of Placeholders is now shown.
    22/1/17 Import Something has gone wrong with online payments, with records being added constantly. Will have to investigate tomorrow. Investigation reveals that Entries.PaymentID is being set to 0 for one crew, which was a bit of a concern - I have no idea what will be doing this. It turns out to be in the routine that handles composites - if the composite's composition has changed, then it basically deletes the payment & recreates it with the new ClubID. So far, so good. But unfortunately, it didn't check whether or not the composition HAD changed. Oops. Multiple TODO statements in here suggest that the code was never finished... Bug found and fixed, though there remain a couple of unexplained comments about Online Payments in OARAIdentifyComposites...
    21/1/17 Race Manager The Entry Browser Control now becomes seriously useful
    21/1/17 SQL Server CSV.CrewQuestions is useful, but is rather hard to work with. I have therefore written [CSV].[Create CrewQuestions] - this uses dynamic SQL to create [BROE].[CrewQuestions], which has one column per question. Note that it also adds an index to the table. The next stage is to get the Entry Browser control to display the questions - harder than it might seem, as the question names vary from competition to competition...

    This wasn't actually as painful a task as expected, since CommandBehavior.SchemaOnly comes to the rescue again. I'm not sure how it will cope with optional questions (or rather, I haven't configured any, so haven't tested).

    21/1/17 Race Manager Lots of functionality exists in BROE.Import - we can change a crew's divsion, name, status etc. The new Entry Browser needs to have all of this functionality, so the code has been moved to shared routines in the RaceManager.Libraries.Entries.Logic namespace.
    19/1/17 Race Manager The Output item now allows me to get all of the email addresses for a specified club. I needed to mail all 4 people at Norwich School - instead of copying each address from contacts.aspx, I wrote the functionality in...
    14/1/17 Laptop I suppose I'll get used to this keyboard eventually. It is nothing special, and the numeric keypad is a nuisance. Function keys aren't separated. But it has an i7-6700HQ processor and 24Gb RAM, so I'll have to learn to like it... NOTHING seems to slow it down, which rather justifies the £700 price tag.
    14/1/17 SQL Server What a truly wonderful feature Synonyms are. Any SQL referencing the old definition (dbo.Regatta) will be automatically redirected to Regatta.TimeTable, thus allowing me to make a breaking change without actually breaking anything! Synonyms have therefore been created for all 3 table redefinitions.
    14/1/17 Database Gulp. I have finally bitten the bullet, and have removed the dbo.Regatta table, replacing it with regatta.TimeTable. Draw & DrawStatusInfo have also been moved into the new schema.
    11/1/17 ASPX The Crews page now supports placeholders
    11/1/17 BROE2 By default, this exports XLSX files in a zip archive. Unfortunately, BROE2 does not remember which format you last used, so I fully expect people to download the default choice. So there's been nothing for it but to write an XLSX parser. This is written with the Open XML SDK, which is an absolute nightmare to use...
    8/1/17 BROE2 Senior events now import. I suspect that there will be a lot of work to do on StatusIDs once we start to configure the bands...
    7/1/17 Libraries SQL.Insert now copes with Unicode by prefixing N to every value. I doubt it will slow anything down.

    Update - it doesn't slow anything down. It just breaks a lot of code. So now we only use Unicode where necessary, checking whether ASCII.GetByteCount differs from UTF8.GetByteCount

    7/1/17 Race Options We've had the ability to set a standard seat price for ages. But every Bedford Head offers discounts to its own members, which I've had to set up manually every time. I'm amazed that I've not sorted this out before...
    18/12/16 Grids The first stage of working out how to do the banding is to design the entry browser control. This is going to be loosely based on what is already in BROE.Import. I've added a new namespace to provide shared sorting of StatusID cells.
    17/12/16 BROE2 Non Banded entries are now imported, without the necessity of the horror that is BROE.Configuration That said, it can't deal with extra events being added yet, but is a good start.
    12/10/16 RaceManager.Libraries I've moved ErrorHandling to a Class, instead of a Module. Whilst it makes the code ever so slightly more verbose, it does allow shared member variables to be set from OTHER projects. This is important, as it allows me to throw error messages from background threads, and have them displayed in a dialog on the main UI thread, instead of just disappearing into the ether. I wish I'd known how to do this when writing the socket classes 4 or 5 years ago...
    10/12/16 BROE2 We have decided (or rather I have decided) to run our February Head under the new rules. I have Wycliffe's data for testing purposes.
    • The Additional Information is brilliant, though it makes parsing the CSV files significantly more complicated. This data can be present in the Crew & Club export files. Each now has an additional table within the BROE schema - ANY fields that are not recognised end up here... So the ClubQuestions table for Wycliffe contains the values of the 'Bringing a 52 seater coach' question, which Phil Clements has specified.
    • [BROE].[Clubs] is new - this currently contains just BladeImage information.
    • [BROE].[Events] is also new. Once Bands are exported properly, this will be used to generate the OARAStatuses table. Probably.
    25/11/16 Spider Engine Minor bug fixed - EventNumbers.RaceTypeID was incorrectly set for Repechage events.
    25/11/16 Race Management
    • Each item in the panel is now responsible for determining whether or not it should be displayed. This makes the code in the main form much clearer.
    • Each item defines its own event handlers
    • A major advantage that comes from merging the Head & Regatta code is that duplicated code can be identified and removed:
      • DeleteAllRecordsFromTable has been replaced throughout with a SQL.Delete object
      • Code for creating the baseline was defined 3 times. The newest definition (in RaceManager.Libraries.BROE.EventStage) was correct, since the deletion is done in the Stored Procedure. The others had a redundant deletion statement, and have now been removed.
      • The ErrorMessage dialog looks to have been an early attempt at standardisation. Only used in Regatta.Clients, it has been removed and replaced with ErrorDialog.
    • BROE Results is now redundant as well, as this program now provides that functionality as well.
    • I have now added the ability to add & assign payments. Note that the totals are NOT day specific.
    • I doubt anybody really uses the Entry Manager. I do for:
      • Making Payments - now available here
      • Editing Club & Composite names
      • Probably the most important - editing Crew Names
      • Exporting email addresses. I have now moved this functionality into Regatta.Libraries (fixing a minor bug with free entries), ready for it to be called here as well.
    23/11/16 General The reason that so much code is being written tonight is that Suzy's on nights at the moment - 2 every week. I intend to make the most of this, and write. And write. And write...
    23/11/16 RaceOptions Most of the functionality originally available here has been superceded by the Regatta Management program. So the tabs that are duplicated have been removed.
    23/11/16 Dialogs NumberDialog is appallingly bad.
    23/11/16 Regatta Management This program's purpose is changing yet again.
    • Because it is SO useful to have a single UI, I'm adding the Head Race draw to it.
    • All of the sidebar items are now generated on the fly.
    • A couple of the Head controls have Save Changes functionality - you can't move to another item if something needs saving.
    • Clicking on the same item twice no longer casues it to be reinitialised. This is a big improvement.
    • Masters.Handicapping has been added.
    • Most of the styles need redefining, but Masters Merging is also in.
    19/11/16 DNB My subscription expires on Monday. Little has been added recently that is useful, so I think I'll install 14.0.0.1 and then let the subscription lapse for a few months.
    19/11/16 Head Draw I think that this was the last program to have the m_aLogic syntax - basically a base class that enabled the transition from Access to SQL Server. Long obsolete, and now removed.
    • The Web Browser control has been removed. I never look at it here, and I doubt anybody else would either.
    • I plan to move the guts of this program to 2 controls within Regatta.Libraries
    • All of the logic has now been moved, though I still need to do a bit more work on the namespaces...
    6/11/16 Draw Collapse I have just realised that I am using the original draw object, not the new one. This means that the last 3 hours has been largely wasted. It was going so well - I should have realised that it was just a bit too good to be true...
    6/11/16 Draw Collapse Due to a bug in Microsoft's implementation of GDI+, we are limited to a maximum of 32 LinkLabels, regardless of what the documentation says. I will have to figure out a workaround for this at some point - TODO
    5/11/16 Draw Collapse Making good progress on this as well.
    5/11/16 Regatta Draw (NEW) I have made very good progress this morning.
    • This software now handles a divisional Draw - functionality that was somehow lost in translation
    • Status Grid is now up & running
    • Carrying forward doubling remains an issue TODO
    • Race List composition now works from the Seeding control.
    • It is VERY fast
    I've spent 4 hours on this - think it is time to go home and have lunch, as there's a limit to how much my brain can take...
    5/11/16 Race Options The Event Stage combo box has been changed to a dedicated control (which actually already existed), as 'Entries Closed Early' is not actually used anywhere... The same issue occurred in the VB6 draw, which has also been resolved.

    NB The .NET version must NOT have its design time property set. There's a workaround for this, I know, but I've not put it in yet...

    5/11/16 BROE Configuration I've been aware of a bug here for a while, and had assumed I'd fixed it. There's nothing like a demo to find bugs though... Basically, until you've got some entries, altering the Lanes & Progression had no effect. Fixed now - if the Update SP returns no records, then do an Insert instead...
    2/11/16 Regatta Draw Demos always highlight bugs. Last night TVP's draw threw an error - the problem occurred because the code expected a / character in the crew name of a double scull. But for some reason, the competitors are not listed for one of their crews, so they're named 'Bryanston B'.

    Further research reveals that this was a scratched crew - because I don't have the files at the point at which entries closed, I don't have the requisite competitor information.

    29/10/16 ASPX My push to standardise QueryString parameters continues. Encoding ALL of them allows me to use them in application code as well - there are many places where obsolete parameters are used (am starting with the horror that is the CrewDetails form).

    BUT. All of the hyperlinks in the pages that I've moved to subfolders (import & stats) are now broken. Construction of hyperlinks has always been a bit of a mess - this is going to force me to review the code.

    28/10/16 ASPX Having now found out Microsoft's (well hidden) syntax for web root (be it actual or virtual), I can create a proper folder structure for the aspx pages instead of using prefixes. This confers no actual benefit, but does make the project better structured...
    23/10/16 Entry Manager I've been putting this off for weeks, but have finally added some necessary functionality - the ability to move entries from one contact to another. This was in the original version, but was lost when I moved to SQL Server (mainly because the original code was rather clumsy).
    11/10/16 ASPX
    • Cracked the problem with sorting hyperlinks.
    • Added export capability to completed.aspx
    • Added club filter to completed.aspx
    • Moved more constants into the Web namespace
    • Added export support (no hyperlinks) to a couple of pages that don't officially support it yet.
    • TODO Add ability to remove club filter.
    8/10/16 Reports TODO - write the remaining substitutions code, as per the Regatta. I should really have checked this before starting printing...
    7/10/16 General On this day, 4 years ago, I looked up from this laptop and saw for the first time the woman whom I married.
    7/10/16 ASPX
    • TimeOnly was throwing an error due to the recent addition of DayID to the Crews table
    • Scratched was nowhere close to being W3C compliant...
    • Sorting implemented for Scratched. Except if 2 day - I have no idea what is going wrong.
    • TODO I think the problem is caused by hyperlinked numbers
    • TODO - implement ~/
    7/10/16 Entry Manager Added the ability to deallocate a payment from an entry.
    28/9/16 BROE Import BUG found & fixed. This only applied to events that have a discount structure for their own members (Bedford RC does this). The SQL failed to take account of the extra rows, resulting in payments far larger than reality being displayed.
    25/9/16 Masters I have finally resolved a longstanding issue with merging Masters categories. If you convert a Mixed crew to Open, you know its going to be relatively slow, and so should start in the appropriate place in the racing sequence. But the logic didn't allow you to merge it with other Open statuses. I've therefore rewritten the SQL (moving it from hardcoded VB to a Stored Procedure), and made a couple of tweaks to the code.

    One of the other problems with the merging logic is that it didn't allow you to alter the age category at which a crew would be handicapped. This has also been fixed. More time will be needed to sort out some of the internal kludges. There are many.

    17/9/16 General Yesterday we submitted the results for Cambridge Autumn Regatta. This morning I installed the software on BRC's Events Laptop. This afternoon I broke everything.
    • When I first started the .NET conversion, I created the Regatta.Libraries namespace. With hindsight, this was a mistake, as it prevents me from having the Regatta.Results.Regatta & Regatta.Results.Head namespaces etc. The namespace root has therefore been changed to RaceManager.
    • All of the utility classes (Numbers, MySQL etc) have been changed to shared routines. Each class has a private constructor to prevent its creation.
    • Ideally, GenerateMySQL should be split. But Suzy's woken up after a night shift...
    • Handicaps control moved into the Controls namespace
    • ctlTrophies, ctlSponsorship moved. As has been MySQL
    • Where encountered, private classes are being moved to their own source code file.
    • Hanidicaps still has a base class (created during the short-lived transition from Access). This needs to go.
    • The next big target will be Spiders, which are an unholy mess.
    14/9/16 ASPX One of the standard questions when culling an oversubscribed regatta is 'who were the last crews to enter'. I've therefore extended the entry statistics to show this.
    10/9/16 General DNB updated to 12.9.0.0 as I like the look of the new Pie Chart control...
    10/9/16 General Bug in EntryFee control fixed - change an event price, and then change it again. The inputbox showed the original value...
    10/9/16 PHP Minor update made to the Marshalling information page - if a crew has scratched, AND it is being shown as a 'possible' crew, then strike it out. It would be better to not display it at all, but this will take a bit more work as I need to check the logic.
    4/9/16 General For UI consistency, all dialogs in Regatta.Libraries are individually defined, as GenericDialog is now a MustInherit class. There are MANY, many dialogs in the rest of the software - its probably a case of working through each in turn. Only RegattaClients remains an issue, and that's a complex one...
    4/9/16 CRA I'm not going to be able to get the entry stuff written today.
    3/9/18 Live Results I really need to initialise these from code...
    3/9/16 CRA The software has now created CRA.Mx.Mas.ABCE.IM3.4X+ (CRA Mixed Masters A/B/C/E Intermediate 3 Coxed Quads), which is sorted as FXTA4ABCEO. I think that should be a sufficiently complex example...
    3/9/16 Database StatusID increases to 25 chars; StatusDescription to 60 chars..
    3/9/16 Regatta Management Ever since the software moved from being manual entry only, creation of CRA events has been a pain in the neck. By moving a lot of logic out of BROE.Configuration and into a new namespace (Regatta.Libraries.EventCreation), I can now create CRA events. The only modification required was addition of the 'O' (for oddity) identifier. Note that I should be able to apply very similar logic for Egham's skiffs...
    2/9/16 BROE.Import One of the most common problems encountered by users importing files is that the browser they're using saves crewexport(1).csv as crewexport.csv exists. The import routine now copes with this, though backup does not. Yet.
    28/8/16 Club Management UI added for Club Type & Club Area.
    28/8/16 Database Major changes made to [Statistics].[ClubAreas] to cope with foreign crews.
    28/8/16 Regatta.Libraries The controls used in Race Options (and now Regatta Management as well) had two ways of updating the EventData table. The reliable one was via a delegate passed to the control's Initialise event. But there was ALSO an Event being raised by some of the sub controls - I only noticed this when trying to change the BROE folder in Regatta Management - it didn't work. The event has therefore been removed, and the delegate used instead. This is cleaner, and more predictable - if you specify a delegate, you expect it to be used!
    28/8/16 Regatta.Libraries clsComboItem purged from - it was defined in two classes, but only used once. That has been rewritten as EventStageItem and generally cleaned up.
    27/8/16 Regatta Management FINALLY. I have full Backup & Restore functionality built into the software.
    27/8/16 Regatta Draw I really ought to come up with a better name for this program, as it now does FAR more than a Regatta Draw...
    26/8/16 Regatta Draw I am reviewing EVERY chunk of SQL, and am finding quite a few issues. The insidious one relates to Crews.DayID, which was not in the original database design - many JOINS do not take account of this.
    25/8/16 Regatta Draw Wow. The placeholder division at Reading Town causes MANY totally unexpected side effects. [Regatta - List Statuses in Draw on specified Day] was the culprit - this has now been replaced with [regatta.Draw].[ListStatuses], which does precisely what we need.

    The database for Reading Town is now the standard

    25/8/16 Regatta Draw Tidying up the unholy mess continues. The two chunks of SQL used to get the Finals Sequence have been replaced with Stored Procedures.

    The Finals Sequence control was, inexplicably, showing statuses where there was just a single entry. It shouldn't have made a difference, as entries in these events should be rejected by the time the Draw is actually done, but it feels better to do it properly..

    24/8/16 Spiders I used my new Spider Editor in anger for the first time this evening. No more pratting around with Word macros, though it isn't as good at showing whitespace
    24/8/16 BROE Import If a regatta is not a divisional one, then set DivisionID to 1. This allows us to use the same logic AND lets us identify entries (in an actual divisional regatta) that have not been allocated to a division. Why's this necessary? Because Reading Town have a placeholder division...
    24/8/16 Entry Manager Changing the division of an entry in a divisional regatta is now done with a proper Options dialog.
    21/8/16 ASPX Bit of a tidy up done:
    • The constants are being moved to a new namespace within Regatta.Libraries - this allows consistency with the applications.
    • InsertAjaxScripts made into a generic routine. This has allowed me to fix a couple of inconsistencies, and makes adding new AJAX functionality much simpler.
    7/8/16 General
    • I've moved the Clubs & Composites forms from BROE.Import to Regatta.Libraries
    • As I encounter them, single method classes are being converted to static classes
    • It looks as if CSVAmalgamation doesn't amalgamate any more, so it has been renamed
    6/8/16 Ideas GTD has made a few requests for marshalling information. We really need to be able to find out where a crew's opposition are - also to be able to list all crews that have scratched. And it would be REALLY nice if this information were pushed to marshals' devices, probably via an AJAX script...
    6/8/16 Regatta Draw This has become far more than just Draw Configuration. It is now more like an entire Regatta Entry Management system.
    6/8/16 Database SetupNewCompetition requires DELETE FROM EventData WHERE Parameter = 'BROE_Baseline_Entries' DELETE FROM EventData WHERE Parameter = 'BROE_Baseline_Date'
    6/8/16 Spiders 3 lane, 6 entries, 3 to final added. Nobody's requested this, but it is an obvious addition.
    4/8/16 Regatta Draw Most of the sidebar items now work. I'm creating the controls on the fly, which is slow, but expedient during development.
    4/8/16 General I've finally fixed RegattaSelection.Race so that the selected item of a 2 day race is not ALWAYS Day 2...
    31/7/16 Regatta Draw So now I need to expand the UI. I'm undecided as to whether to use a Ribbon style (which I personally find bloody confusing to use) or a side bar. The side bar's got it so far.
    31/7/16 Trophies
    • The first stage is to make sure that the code works. It didn't, with a syntax error in one of the SQL statements. This has been fixed.
    • Then I moved all of the UI (Nodes, menus etc) into Regatta.Libraries
    • Amazingly, the program still referenced the old ADODB namespace, which hasn't been necessary since I abandoned Access totally 2 years ago.
    • The program will remain for the time being as I still use it for Head Races. But all it consists of now is a form containing 2 controls...
    31/7/16 General I suspect I know the gist of a lot of Rod's feedback - too much swapping between programs is still necessary. Of course, he doesn't realise that I've already condensed quite a lot of functionality...

    The first stage, I think, will be to merge the Sponsors & Trophies into the Regatta Configuration program. This is becoming a much more comprehensive bit of software - today its going to get a UI update, with a side bar. Some of the options (thank goodness these are already controls) will come out of the abomination that is RaceOptions...

    29/7/16 Regatta Draw Here's the idea. I wrote basic Redraw capability in a couple of years ago, but it was clumsy and very hard to use. The biggest problem was its user interface - VB6 just doesn't have appropriate controls available for
    28/7/16 Twitter
    • This no longer echoes by default. In fact, it never should have done.
    • Ignore Tweet now works.
    28/7/16 Reports
    • The BR Logo now displays correctly. I've hardcoded the path, and added it to the installer.
    • Henley T&V seemed a bit surprised that a separate page was needed for each contact's Race Control sheets. It is rather verbose. So I've added an option...
    28/7/16 Regatta Server I wondered why am umlaut was displayed as ? in Control's Race Modification grid when looking at Kingston's data. And Henley T&V has the same problem with acute accents... Now I know why - the server's TCP comms were ASCII and the clients' were UTF8. Oops.
    28/7/16 Spiders We have been mucking around after the draw and ended up with IM3.4+ having entries on BOTH divisions. This causes the spiders to be corrupted. Answer? Fix the underlying data, as it is just plain wrong.
    28/7/16 Live Updates There was a flaw in the logic here. Suppose that I initialise the data, with a crew in lane 1 having scratched. It is subsequently moved to the middle lane (to separate the two crews that are left), and the results set. Because the code only sent scratched data if TRUE, then the MySQL database would show the crews in both lanes 1 & 2 as having scratched. This is easily resolved by always sending the scratched flag. To resolve the issue at TVR, all we have to do is clear and upload again.
    27/7/16 BROE Import Bug found - this was not updating existing entries to Composites. It now does, though I've got a bit more work to do with payments.
    27/7/16 Regatta Draw I have removed all of the Redrawing logic from the Spider Engine. Its has never been satisfactory, and I've had an idea... The following views & Stored Procedures can now be removed:
    • List - Statuses in ReDraw
    • List - Statuses in Redraw on Specified Day
    27/7/16 PHP Field names in the export file are case sensitive. So clubshortName is no good - it HAS to be ClubShortName. This explains why some of the names weren't shown correctly.
    5/7/16 General KAR is another competition that suspends entries on BROE instead of closing. This causes me a problem, as the withdrawn flag is set instead of the scratched flag. I've therefore updated [BROE].[Update Withdrawn] so that it takes account of the Event Stage, and updates the appropriate table. NOTE - this is not called by BROE.Import yet.
    5/7/16 Database [Display - Regatta Names] is rather legacy, and could now be replaced. But the big problem is that it filtered out 3 lane races - this is not what it was meant to do!
    5/7/16 RTF Files Miles Fellowes has reported a bug - one of the rarely used characters (┤) was not displayed in the RTF files, though was fine elsewhere.
    19/6/16 Regatta Draw The new Lanes & Progression control is really rather nice. You can change the number of lanes in use, and the progression systems can also be selected. But, critically, you can only select a progression system that's valid - for example, if you have 6 entries, you can't select a Round Robin...

    Note that this is a rather blasé summary of 600 lines of code, which took about 7 hours to design, code & test...

    19/6/16 BROE Import I have suspected for a while that the check for Identical Crews wasn't quite right. It wasn't taking account of the Rejected flag... I've deleted the 2 views, and replaced them with a single stored procedure with better logic.
    18/6/16 Live Results I'm now writing all of the configuration necessary to get this functionality working on the KAR website without any intervention on my part.
    15/6/16 Regatta Draw On a train heading up to Stockport to finally get the VPN tunnel for Morrisons working...
    • Another issue found in [regatta].[Generate Names] - this did not cope with a 2 lane race containing a crew placed 3rd in a previous round, which is perfectly possible when running a repechage.
    • If the progression system for an event is set to Repechage, and there is no pattern defined, it now reverts to a normal draw.
    • New Schema [regatta.Draw] added. This will mean modification on the HT&V and KAR databases; this needs to be done anyway. To be on the safe side, the old routine will be deleted as it is no longer used.
    • A new SP, [regatta.Draw].[ListStatuses], filters out statuses that have just a single entry. This should have been done by the Seeding control. It wasn't.
    • The new SP is also used by the new Lanes & Progression tab. Whilst most people configure the number of lanes used based on just the status, HT&V also take acount of the number of entries. Having to go back to BROE.Configuration to make a change is annoying, especially as this program is so slow to load (more on that later, methinks). Lanes & Progression also have nothing to do with BROE...
    • Seeding control displays repechages correctly.
    12/6/16 Live Results The code didn't quite work for the Sunday, as I'd forgotten to add the DayID field to the MySQL statements...
    11/6/16 Race Manager Rather embarrassing - Reading threw an error on startup this morning. Easy to fix, but I really should have found this in testing.
    4/6/16 Henley T&VR I STILL haven't written anything custom for TVR, as I keep finding issues that need addressing. If I wasn't a perfectionist I could probably ignore things...
    4/6/16 Regatta Draw I've found a rather insidious bug. Run the Draw, which generates checksums for the entries at each status. Now CHANGE the status of every crew in ELI.8+ to ALM.8+ (Henley T&VR Alumni Eights). Run the Draw again, which generates an identical checksum, but for a different Status. The Seeding control is now right royally confused... Finding the cause of this has taken most of this morning; fixing it took less than a minute - all we have to do is prepend StatusID to the data used to generate the checksum...
    30/5/16 KAR Whilst setting up the database for KAR 2016, I noticed that they've stipulated that doubling up is illegal for anyone enter Open or Women's Novice Sculls & Doubles. So I've added a new import check, and a corresponding web page.
    22/5/16 Regatta Draw Most of the classes in this program have been moved to either Libraries or Spiders. The main form was then converted to a control hosted in a tab within Regatta.Draw.Configuration

    Why? Because I'm starting to accelerate development of the VB.NET version, and need to merge the code. Configuration was a much later project, but has outsripped the actual draw in functionality, with new features such as seeding, variable race pitch etc. Maintaining both was only ever meant to be a short term solution...

    12/5/16 Walton It is much simpler, from both the Regatta's point of view, and the competitors', to offer all Masters events and combine them before the Draw. Despite advice, Walton don't do this. So I've had to alter Masters.MergeStatuses to cope.
    7/5/16 Bedford Regatta Bugs found:
    • Commentary listed Race 1 as being a final. It is not.
    • Commentary listed the crew name (Stevens) only, without the club name. Useless.
    • Commentary remains at the bottom of my list of priorities.
    • PHP spiders need updating to remove hours from time taken - this is being populated from the Live Results Feed software with no intervention from me.
    • Steve Reece has lent me a Pro Route 4G router. By assigning two IP addresses to my network card, I can be on the LAN and the internet. Brilliant bit of kit.
    • Too Many.aspx needs to ignore scratched crews. Actually, it is simpler to leave them in, and strike out as appropriate. Done.
    • Default Verdict should change to Row Over an hour after Race Time. Fixed.
    • Regatta Control - Race Modification. Race Time should be displayed as HH:MM, not HH:MM:SS. Fixed.
    • When we modify a crew's scratched flag in Race Control Modification, we need to update the cached data on the server, as otherwise the crew still comes up with a strikeout in Finish.
    • 3rd boat events are non qualifying. This is according to GWH.
    • Finish code - need to truncate verdicts - enter 'bowball' and see what happens. Not a known verdict, and the shortcut expansion produced garbage, but they just ignored it... I've now (the day after the regatta) fixed the code to limit verdicts to the 20 characters allowed by the database.
    • If we're running ahead of time, add 24 hours - have just seen '23 hours, 56 minutes Late'. Oops.
    • Timescale on Course produces junk. Update - the junk was actually the date, as SQL Server stores Start Time as a date instead of just a Time. And the column order for the Actual Start Time was wrong...
    • Use multiple finish terminals. Finish a race, so there are none left on course. The other still displays a race, AND a running clock (from start timing)
    • PHP BUG - Scratched1 does not appear to be updated...
    5/5/16 General Many 11th hour changes have been made:
    • Status Change code has been completely rewritten. The problem was that it did not cope with apostrophes in club names - and my (real) one was Sir William Borlase's. A new class helps, and the SQL Update class does the hard work. Big improvement. The only issue is that the button in Regatta Control is not disabled when there are no more status change slots available.
    • Timer added to Live Results
    • Live Results saves its information to a log file.
    • Twitter is now Day specific
    • When a race is retimed multiple times, [regatta.RaceDay].[UpdateTimeOfRace] deletes the original record.
    • Lots of little improvements have been made to ASPX pages
    • Extra filter added to the Doubling page, allowing me to view close races only. These are defined as being within 110% of the turnaround time. Note - [Regatta - List Races affected by Doubling] needs some fairly serious work - it is far too complex, and could be simplified with a couple of well designed CTE statements.
    • Regatta Entry Forms now show the number of available substitutions for each crew, PLUS the names of the oarsmen who have already been substituted out. This is a huge improvement...
    • Extra column added to the RegattaNames table to allow easier generation of the MySQL export data, which previously did not take account of crew name shortening. It now does.
    1/5/16 Regatta Draw The Draw for Bedford Regatta 2016 is out.
    30/4/16 Regatta Draw I have found a bug. A big one. A Goliath Beetle, in fact. GetNodeToMoveTo is MEANT to return a node at the appropriate distance to resolve a clash - in other words, on a 2 minute pitch, and a clash between two races 20 minutes apart, it should have returned a position 10 nodes away. Except the polarity of the interval was negative, so it always returned a position ONE node away. This bug has been there for a long long time, and has significantly complicated the draw - far fewer iterations are required to achieve the same result now.
    23/4/16 Regatta Draw One unexpected effect (though I really should have anticipated it) of the new Draw code is that it is no longer possible to determine the time of the last race until clash resolution is complete. This is because I am adding in gaps if Octuples & coxed quads are followed by Eights. Bedford Regatta's draw started off by finishing at 19:07; the Draw currently has it finishing at 19:35. In other words, it has added half an hour's worth of gaps at the most appropriate times.
    16/4/16 Reading I went down to Reading on Thursday night. Overall it was good, though they were running last year's code, which has been much improved...

    It was well worth my time, as people from KAR, TVR & Reading were there. Several requests and comments were made:

    • Adrian Champion: Reading use Finals Certificates - need a way of recording & displaying that these have been issued to ALL crews in a race.
    • Tony Gordon: in the Regatta Control program, the Crew Details popup would be improved if the web page showed WHY you were showing it. Easy to write, and now implemented.
    • Ken Morgan: let's say that the Regatta is delayed by 45 minutes due to a thunderstorm or a cruiser sinking in the channel. It would be really useful to be able to retime all races, possibly removing any scheduled gaps. This would have to apply per division, and I rather like the idea.
    • Ken Morgan: in the web pages, the hyperlinks to a Race work, but the menu obscures the race we're interested in. This has annoyed me for a while - now that someone else has mentioned it, I've really got to sort it out...
    • Rob Burnage: The verdicts dialog does not allow you to cancel (when in Regatta Finish). So get rid of the button. That said, I need to keep it for Race Modification (in Regatta Control).
    • Rob Burnage: again in Finish, you can cancel from some dialogs, but not others.
    • Rod Murray: Higgs of Henley don't want the spiders, per se. Instead, they want a list of Crew Names & Race Times. This should be pretty easy to generate. Update - its is an absolute beast to generate.
    • Rod Murray: HT&VR needs a crew list for the programme, listing StatusID, then ClubName, then competitor in boat order.
    • Verdicts dialog MUST have some help on what shortcuts it accepts.
    • The Status Change functionality would benefit from a combo box.
    16/4/16 SQL Server [Regatta - Spiders] has been rewritten. It used to use the [Display - Regatta Names] view. This is pointless, as the RegattaNames table contains all the information we need. Comparison of the Execution Plan confirms that the new code is significantly faster, since it is so much simpler! In fact, the improvement is so dramatic that I really ought to remove [Display - Regatta Names] completely.
    13/4/16 SQL Server I have also started moving logic into separate schemas. This forces me to review the database code, and many amalgamations & improvements have been made already.
    13/4/16 SQL Server I have added DayID to the Crews table. Very few queries currently make use of this - its is really just a placeholder for the ultimate goal of having the same crew numbers on both days. It shouldn't cause any problems...
    13/4/16 BROE.Import Multithreaded Import was never going to be easy, which is why it has been on the TODO list for so long. It has taken just shy of 5 hours to write, but I'm really rather pleased with the result. Once the import is complete, a dialog is shown to indicate what steps (if any) need to be taken...
    3/4/16 Head Draw When moving statuses in the global sequence, its very easy to lose track of the one you've just moved. Any that have been moved are now shown in red for clarity.
    2/4/16 General You can tell this coding session is going well - I'm putting in high resolution icons...
    1/4/16 ASPX Patterns written. This page is similar to the original Spiders.asp page, but with one crucial difference - instead of being a static HTML page, it is dynamic, built on the fly from the spider definitions, and able to cope with new progression systems being added. 2, of course, were added recently...

    EntryMatrix is a really useful page, but the hyperlinks should really point to the crew list. This change needs [Statistics].[EntryMatrix] to be modified.

    Alterations was not W3C compliant. With a modification to [List - Alterations] it now is. In addition, the sortable columns were wrongly defined for a Head Race. NB: I have actually decided to get shot of the View, and do it in code - this page is the only place that the view was used...

    The Alterations page could not be sorted. I have no idea why, but upgrading tablesorter from 2.15.10 (13 March 2014) to 2.25.7 (1 April 2016) has fixed it. This library is being actively developed, and the change log suggests that many fixes and improvements have been made in the last 2 years. The new build is also minified, which should help.

    31/3/16 Walton
    • First real test of the new installation package - it just worked, though installed an empty GAC folder and was missing the firewall configuration tool. Couple of shortcuts also missing, though these will need a bit more thought
    • RaceOptions was not changing data held on the Admin control - just a missing event handler in a program I'm still very much working on.
    • VRP works a treat - now it is time to add extra time for certain combinations. Walton makes this an easy test, as they have Octuples followed by Eights near the end of the day - easy because I don't need to scroll through the draw to find the pair of races in question!

      I've done it with an extra table, and a new TimeTabling tab in RaceOptions.

    20/3/16 TODO Going back over notes made in Leander during HRR 2015:
    • Crew Check in required for Reading Amateur Regatta. This will be quite easy to write
    • Add sponsor - need to use it immediately
    • Labels on numbers
    • Check winners certificates
    • Need new Handicapping display for Regattas. Because at the moment it is broken! The code now compiles, but I have little clue as to what the numbers it presents mean. And if I can't work it out instantly, what hope has the Starter???
    20/3/16 Regatta Draw The next 'nice to have' feature will be adding extra time AFTER a race, IF the next one is going to be significantly quicker. So I could add, let's say, and extra minute after an octuple if it was being followed by an eight or coxless quad
    20/3/16 Regatta Draw To test VRP, I hard coded a race pitch of 3 minutes for sculls, and 4 minutes for everything else. Clash Resolutino took 372, 305 interations. Having now implemented the proper code, using Race Pitches defined in the RaceOptions program, I still get 372, 305 - thus proving that the code is correct. It was actually extremely simple to write, with a new class doing the work.
    19/3/16 Regatta Draw Reading the .NET code has surprised me. As of 19th September last year, I abandoned INI files for storing the Seeding, and moved it into SQL Server. To be perfectly honest, I'm not surprised that i'd forgotten this, as it was probably the last bit of code I wrote before Suzy was diagnosed with ovarian cancer. I wrote nothing for 2 months.

    So its now time to move this code into the VB6 draw...

    18/3/16 Regatta Draw F**K Me. A cleaner draw than I've ever had from this ancient algorithm, with no nasty tweaks being required for divisions, gaps etc. AllocateRaceTimes does the hard work; CalculateClashesInternal uses the time it generates, instead of trying (and failing) to work times out its own...

    So now, finally, I can implement a Variable Race Pitch. Note that this removes the bodge for Octuples

    18/3/16 Regatta Draw Yet more problems in CalculateClashesInternal found, caused by gaps betweejn divisions. But looking at the code in more detail, I see a fairly major flaw:
    Whist we have had a different pitch for Races & Finals for some years, this routing ignores Finals completely. Probably not the end of the world, BUT we are now introducing a variable race pitch, which complicates matters further. Sorry this is rambling, but I'm thinking aloud. I've added in the UI for VRP to the Race Options program, and all works OK. I've yet to incorporate it into the draw, as initial debug testing worked.
    The problem is that I dont' trust CalculateClashesInternal - it needs to run off the same timings as are used to calculate the fional race times. In the original code, they weren't available, but have been for a while - let's get rid of the iInterval variable and see what happens...
    18/3/16 Regatta Draw Henley T&V has Round Robin events for Primary Coxed Quads. It has proven quite tricky to shoehorn these into the Draw, as there is no progression per se, but I got there in the end.
    10/3/16 Walton Last year's code was a rush job - I'm now implementing what I couldn't do then at short notice - variable race pitch
    6/3/16 Masters Masters K category added to the handicap table. There are only 3 oarsmen in the country at this level, but the code needs to be comprehensive ;)
    6/3/16 ASPX Menu links generally fixed to handle querystring parameters
    6/3/16 Request Flag when number of entries in event reaches a threshold. Different limits for different boat types.
    5/3/16 General The EventData class has always contained a publicly accessible Data function, which returned the internal Hashtable. Why this wasn't a proper Dictionary(Of String, String) is another matter...

    The problem is that many keys have been changed over the years, and some of the supposedly obsolete ones were still in use (mistakenly). I have therefore removed public access to the Dictionary - ALL properties are now strongly typed.

    23/2/16 PHP How did I manage to write something this complex without a debugger?
    21/2/16
    • Payment assignation is now working in the Control program, though there's no way to actually make a payment yet.
    • Possible Crews are now availiable in PHP. This is the critical bit for getting live results working.
    • The [Control - Scratch Crew] and similar Stored Procedures in the database no longer have NOCOUNT set. This allows us to return the number of rows affected (should be 1!) and so to catch invalid input data
    17/2/16 General In no particular order, here's what's required over the next couple of weeks:
    • Payment modification in Control program.
    • MySQL Regatta Update
    • MySQL 'Possible Crews'
    • Substitutions on PDF Entry Forms
    • Message structures converted entirely to XML. This would have no actual benefit, but would make the code significantly cleaner.
    • Removal of the Hashtable from the EventData class
    • Multithreaded import from BROE
    14/2/16 ASPX The Audit Log does not take account of the RaceID. Now that I have more than just test data, this has become apparent.
    13/2/16 ASPX TODO - divisions shows the Start Time in milliseconds...

    Start & Finish timing programs are a bit of a mess - some places TimeSpan, others string used Update Database did not apply handicaps

    13/2/16 Reports TODO - dialog now shows radio buttons instead of checkboxes.
    13/2/16 Installer I've finally installed the software in anger on 2 XP laptops and 3 XP Shuttle PCs. A couple of minor issues were found (I hadn't tested it on a machine that did not have IIS installed), but all have been fixed. I know I've rather left this to the last minute, but it is a nice to have optional extra - if it had all gone horribly wrong, I'd have resorted to file copy, as I have for the past couple of years. But it hasn't.
    11/2/16 TODO
    • If reinstating a crew after the draw, add it as a crew.
    • Manual Entry
    6/2/16 Head Clients I've inserted a bodge, which seems work. The only solution I can now think of is to send a message from the server on successful connection, and to call the clients' init code when that is received. Suzy's wondering where the hell I've got to, and I'm wondering what the hell I've achieved in the last 5 hours.
    6/2/16 Installer Well, one thing has gone right this week. The new installer works a treat, even on Server 2003.
    3/2/16 Head Clients After much head scratching, I think I've figured out what was wrong with the connections. It was nothing whatsoever to do with the Socket Library, but rather the fact that the Socket's Connect method was, effectively, being fired from a Form's Load event. In the meantime, though, the Client Socket now uses the same tcpClient code as the Server Sockets does, which should improve readability if nothing else.

    Update - It still has problems. I'm now tearing my hair out. I've now got a proper Asynchronous BeginConnect (that times out after 5 seconds and tries again), so I'm fairly certain now that this is not the issue. It turns out that Dimaco's code works slightly differently, with the client socket being created BEFORE the server socket starts listening.

    So we do it a slightly different way, using threads properly. On trying to connect, a client program spawns a new thread, and creates a socket that takes a ManualResetEvent as a parameter. It then blocks until the event is set. The ONLY way that this event can be set is by a connection being established. In order to keep the UI responsive, and to allow the program to be exited, the thread is defined as a BACKGROUND thread. This is crucial.

    BUT, it should be possible for all of the threading to be done in the client socket itself, absolving the need for the calling program to know anything about threads.

    One Bug I HAVE found though, was in the Server Socket, which was not being closed properly when a client disconnected, resulting in a CLOSE_WAIT state until the application closes. Oops.

    2/2/16 Head Clients Just as I get Start and Finish working, I break them again. This time it is to change the Tree controls to Grids. Why? Better sorting, primarily, plus row highlighting
    29/1/16 Head Clients One of the ongoing problems with maintaining separate Start & Finish programs has been that so much of the code is shared between them. But differs in subtle, hard to track down ways. As an example, Start allowed times to be corrected in HH:MM:SS.ff format; Finish did not. Inconsistencies like this make the software much harder to use.

    I now have a new module in the software, containing shared Timing code. It uses Delegates to call back to the original code.

    • Each program handled connection / reconnection slightly differently, and none of the implementations were perfect. They all now share the same thread safe code.
    • The dialog for entering times really isn't very good. So now it has been replaced with a MUCH improved dialog that uses input masking.
    • Marking a crew as racing for a Time Only (Control) would never have worked, due to a bug in hardcoded SQL. Fixed.
    • The Status Change button in Head Control just displayed a message box saying that this was TODO. Not impressed. The problem is that there aren't any status change slots to select from. We now download a list of the most appropriate statuses from the server, and allow the user to select one
    • Finally got AutoSize working for the Options Dialog.
    • On connection, Head Start & Finish call a Protected function to Activate the Form. The first (very ugly) solution was with timers; now that we have menus, these can't be used.
    • Timing Program: This has always been a bit poor, as I'm the only one who uses it! All operations are done to a TimeID - if you're editing a Start Time, for example, the dialog did not show you either the Crew number OR the original time. This made it harder to use, as you were never sure whether or not you were editing the right one...
    • If you've got really screwed up timing, and delete both the Start AND Finish time of a crew, its REAL time would never have been transferred into the main TimesElapsed table. This has been fixed by deleting records where both times are NULL
    • Outstanding Bugs:
      • It can still be a bit reluctant to connect to the server. Problem only seen when running executables.
    28/1/16 Sockets And so it begins. Few messages work now.
    24/1/16 General Its rare that I find a bona fide bug in an existing program! BROE.Import did not cope with apostrophes in crew names; once this was sorted out, nor did Masters.MergeStatuses.
    17/1/16 General The icons used throughout the software are being changed so that they render nicely at all required sizes.
    16/1/16 Installer WARNING - using Advanced Installer, each Assembly to be registered in the GAC must contain just a single DLL. The reason is that internally, the hashes must match...

    Having rectified this issue, my new installer works. All I need do now is get the Client software working again...

    10/1/16 SQL Server The [Statistics_ClubEntries] table is used to generate the TimeOnly web page. The problem is that this table is not always updated, and so the counts are not guaranteed to be correct. It was added when MS Access was being used as the database, since it was the only way of achieving the desired result; with SQL Server, we can achieve the same with a CTE. MUCH nicer.
    10/1/16 PHP Following a request from Reading, I've started to write code to update rowstats.com on the fly. This has been on the TODO list for many years
    21/12/15 General If you don't ask, you don't get. Yesterday I requested a free licence for Advanced Installer, more in hope than any real expectation, as they only give out free licences for Open Source projects. So I was very surprised to receive a licence worth $399 this morning. Finally I can ditch InstallShield 6.30, which predates even Windows XP.

    • It works on 32 & 64 bit Operating Systems, from Windows XP to Windows 10.
    • Assemblies can be installed in the GAC.
    • PDB (debug files required for line numbers in error logs) and other files the user doesn't need to know about can be installed as hidden. This is very useful, as one of the biggest complaints has always been that there are too many programs...
    • Websites can be installed
    • Prerequisite components (eg Visual C++ 2010 Runtime) are installed before the main setup, ensuring that everything is present.
    12/12/15 Twitter TweetSharp is very old, and is no longer being maintained. It also is detected as a virus by many AV programs. So the time has come to replace it - TweetInvi appears to be the best solution...

    A good choice. It just works, out of the box. OK, it needs .NET 4.5, but so does the PDF library I'm using. And, to be honest, how many people are running XP / 2003 server still?

    29/11/15 Firewall Now that I'm using UDP, I've created a proper Firewall configuration utility.
    29/11/15 Sockets Now that EVERY message is a discrete type, we can get rid of the public AddItem methods. The only one that is now necessary takes an xmlDocument as its parameter - this is necessary for the next round of changes...
    29/11/15 General An oft-repeated complaint about my software is that there are just far too many programs. I've always been of the opinion that each task should be done by a single program. But, with 8 client programs, I'm beginning to change that opinion.

    So now we have just one. It needs to determine whether a regatta or a head race is being run

    22/11/15 Regatta.Libraries Breaking change made - ALL messages must now be a discrete type instead of a generic Message class. This will mean that all the client programs will need extensive modification. But, there are too many of them to start with, and the purpose of this exercise is to merge them
    21/11/15 Regatta.Libraries Breaking change made to the Socket classes. They've all been renamed and moved into a TCP Namespace as we now have UDP functionality as well.
    21/11/15 BROE.Import Online refunds have been a problem for some considerable time. We can't just modify the PaymentID, as we need to track both the original payment AND its subsequent refund. I added Entries.RefundID a couple of months ago, but have only just got around to coding it.
    21/11/15 BROE.Import Bug found - Payments were being processed BEFORE entries were added to the database!
    12/11/15 General Married Suzy.
    7/10/15 Tropies Renaming a trophy causes the grid to be updated immediately. Trophies have been added to the Head Race export logic, and the PHP code modified to match.
    19/9/15 Regatta Draw The .NET code no longer uses INI file to store the fixed draw information. There are several advantages to this:
    • The program is being flagged by Norton & others as dangerous. Not exactly certain why, but INI files are a good candidate as only this program uses them...
    • The database is fully self contained - there are no magic settings stored in the filesystem.
    5/9/15 Configuration Added a SQL node to databases.xml to allow the SQL Server instance to be specified, and also (critically) the SQL Driver. I have always installed SQL Server 2008 - for Cambridge Autumn I installed 2014 only, which meant that the VB6 Regatta Draw program was unable to find the SQLNCLI10 driver...

    Note that this node applies to ALL databases, but can be overridden for individual ones. So my machine by default uses localhost\SQLEXPRESS but uses localhost\SQL2014 for Cambridge Autumn.

    22/7/15 Regatta.Libraries The Draw configuration program can now download individual blade images as required.
    14/7/15 Regatta Draw (New) The plan is for this to be up & running for next year. I've now added Drag & Drop support for individual races, so the racing sequence can be manually altered. Obviously, this doesn't let you move a race beyond its previous or subsequent rounds!
    13/7/15 BROE Config Support for RSS-LD & RSS-LD Rowability events added
    12/7/15 Database [Control - Generate RegattaNames] modified to delete existing information for the relevant day.
    12/7/15 SQL Server Documentation This has been extended to use the new control, so we can now choose the database to view.
    12/7/15 Regatta Libraries DotNetBar toolstrip controls already exist for Regatta Selection. I have now also created a standard Combo Box.
    11/7/15 RaceManager Oops - had tested most of Kingston's functionality, but not recording the winner of a TWO lane race in a THREE lane regatta.
    30/6/15 ASPX New index page written. This is used as the 'Home' page for my machine - it is REALLY useful to be able to easily switch between multiple regattas if you're taking entries for 5 of them simultaneously...
    31/5/15 General There are too many programs. Working out what to use, and when, is just getting harder. I need to have a radical rethink - previous solutions have been to create multiple folders, though this is just differently complicated. I think that I need to rework the UI and create a dashboard application:
    • Most people just use BROE.Import to import from BROE.
    • The purpose of BROE.Configuration is not clear.
    • There are a lot of client programs that could be usefully merged. We could even merge Regatta & Head into one, and show the appropriate UI.
    • MigraDoc, TweetSharp, Chilkat & DotNetBar would be better off in the GAC.
    30/5/15 Regatta Config Bug found - this was not saving the checksum when seeding crews. So if the RegattaDraw program had not been run previously, all edits made were lost... This took quite a while to figure out on a TeamViewer session to Walton.
    30/5/15 Walton Code requests:
    • They want to have each status running at its own pitch. I considered putting this in at the last minute, but they've settled for a standard pitch of 2:30 this time. Its not a bad idea though, and does away with the current peculiarity of 'Gap for Octuples'. Whilst investigating I found that this functionality hasn't been fully implemented when calculating clashes...
    • rowstats.com shows the spiders. They want to encourage people to buy their programme, so don't want spiders to be visible. Fair enough, so I've added an option to the RaceOptions program.
    • They still plan on printing & updating A3 spiders on the day, and want enough space to write everything in. They also want all spiders to be the same width. I coded this years ago - the Named output file format - so have just added it back in.
    • Request for BROE3 - a limit, per status, of the number of entries
    30/5/15 General Reading tried running the client sofware from my Documents, into which they'd copied the Config & bin folders. It refused to connect, so I suspected the usual culprit - the firewall. Only after 20 minutes or so of head scratching did I realise what was going on. There's no reason why it should not work now though ;)
    30/5/15 General Woke at 05:30 and started coding...

    One of the problems with moving to ASPX is that all of the blade images have moved. This isn't a problem on the server, but can be a pain on client machines. The answer is to use System.Net.WebClient.DownloadFileAsync My first attempt was in the RaceNode class itself, but this caused problems due to threading. I have therefore added a server routine to supply a list of all clubs; the Finish program can then download whatever files it needs in one go.

    Finished coding just before 22:00...

    29/5/15 ASPX The Victor Ludorum page has finally been written, as Hexham wanted. But, as usual, I've made it generic, with Overall, Masters, Juniors, Oxford, Cambridge, Durham & Oxbridge all listed separately, if applicable. Its actually rather nice.
    29/5/15 Regatta Draw Reading run a 'Mini Regatta' on the Sunday for J14 & below crews. This is genuinely drawn on the day, and runs entirely within their lunch period (Note - lunch is a concept peculiar to the Thames based river regattas). I've therefore added an extra Progression System, and excluded this from the Draw.
    28/5/15 Enquiry Exeter Regatta have been touch. They're a 3 lane event with repechage, who do not use BROE at all - instead, they have standard spreadsheets filled in by the 14 or so clubs who enter. This could be interesting...
    6-7/5/15 Misc Another massive snagging session:
    • Twitter up & running, with a few improvements
    • Twitter Import written. This stems from an idea that I had last year, but couldn't code due to a bug in the TweetSharp library. I truly loathe Open Source code - the latest version does not build, and I wasted several hours trying to get it to do so. I think that I've found the source to the old version, but have compiled the executable to a separate folder, just in case.

      So, what does this program do, I hear you ask? Well, it scrapes results from HHavox2, which is my test account, and simulates a Finish program. So I can run this on a publicly accessible server (in Bedford RC) and it will update the database in real time, WITHOUT the need for VPN tunnels. Up at the Start, they can print their own update sheets...

      The problem I had with TweetSharp was that I could not use it to DELETE Tweets - this is necessary, since otherwise Twitter.Import will keep on sending the same results to its server...

    • Winners' Certificate generation had a number of issues, all caused by the move to SQL Server.
    • Start Timing now works - I was using the wrong parameter type.
    • Control, Start & Finish now attempt to reconnect when a network connection is dropped.
    • More worryingly, terminals occasionally fail to reconnect to the Server. I still have no idea as to why. TODO
    • The massive changes made to Spider generation were well worth the effort. It is now a trivial exercise to add strikeouts to denote scratched crews. This makes visualising redraws significantly easier. Note - an hour later, with more events to redraw, this functionality is absolutely fantastic ;)
    • I need to redraw several events. The Redraw program has not been converted to .NET and is such an unholy mess that I'm not going to even try to do it in the next 2 days. Instead, I'll use the Race Modification functionality that Regatta.Control provides - its a bit painful, but does work rather nicely.
    • TODO - provide functionality to change a crew from a composite to a normal club. The backup taken this morning has a LIC/LEE composite (which has paid) - now they want it to be just Lincoln College...
    • BUGGER. Only just noticed that the .NET software does not export Sponsors & Trophies to MySQL... The VB6 code has obviously been significantly improved since conversion to .NET started. Fixed now, though the PHP code does not cope with trophies that begin with the word 'The'. So I've edited the Trophies table...
    • Twitter Import has to deal with crews scratching and retimed races. The only thing it CAN'T cope with at present is races being retimed more than once. This shouldn't happen, but cannot be fixed in time for the Regatta on Saturday...
    • My Regatta Server is up & running. This means I can spend tomorrow morning doing a final code test.
    2/5/15 Misc
    • Update Names functionality does not work properly under .NET - I'm not going to risk fixing this at such a late stage - the Draw is less than 2 days away...
    • VB6 Draw program updated - I had inadvertently removed Gaps!!! Not really surprised, as the code is a bit of a mess.
    • .NET Regatta Configuration program (still not sure what to call this) updated to add the extra gaps for Octuples. It still gives slightly different times to VB6, and I don't think that Gaps work at all, but I'm not really bothered as it is still very much Work in Progress.
    • Need a PDF export of Blade Colours. I've done it by hand yet again...
    • IDEA New functionality in Regatta.Finish - allow the user to lookup a race by entering a crew number. VERY simple to write, and potentially very useful.
    • Status Changes aren't quite right, though will do.
    • Regatta Specific Reports now written.
    • Numbers for Stacys now written
    • BROE Import's Refund code is not working QUITE as expected. For anything refunded, it keeps adding a payment and then refunding it, EVERY time we do an import. Looking at the code, it is because Entries.PaymentID was being reset to 0. I've altered the code so that it sets this to -1 instead.
    • SQL Server fn_GetAudit (a Scalar Function) now returns TRUE once Event Stage has been set to Draw Published.
    • Regatta Entry Forms modified to show only the relevant Points - why bother showing sculling points for an Elite VIII??? This gives us an extra column, which allows us to show Junior / Masters ages.
    • Bug in Entry Forms found (both) - the cox's points were being included in the total. Now fixed.
    30/4/15 ASPX I've just had a query from one of our coxes - she wants to know when she's likely to be racing, and whether or not there will be any clashes. A thought suddenly occurred - why not show Spiders on rower.aspx? With the new code (in which Sponsors & Trophies, both irrelevant in this scenario, can be omitted), this is VERY simple to achieve.
    30/4/15 Regatta Draw I have removed all unecessary references - SSTab, vbAccelerator, RegattaHelper. I have also moved Status Changes into the new .NET program. What's left is very simple, but not simple enough. Tomorrow I will get rid of the 3 DLLs and
    25/4/15 General I have had a major snagging session today. MANY bugs have been fixed, including:
    • Plate Spiders now work properly. I've been hunting this since Tuesday - the problem was that InsertCrewName was taking a List of StringBuilder as its argument, instead of just a StringBuilder.
    • BROE.Config now handles 3rd boat events correctly - it ONLY creates a private Match for J18 crews. This is a special event for Bedford Regatta.
    • CreateSingletons moved from ASPX to BROE Import. It was written in a bit of a hurry and tested in the web pages; we now know it does exactly what is required, so has been moved... Ideally it should move again, this time to Regatta.Libraries.
    • BROE Import creates Online Refunds. This has never worked properly; now it does.
    • BROE Import allows us to change a crew's status. This is very useful when trying to work out the effects of splitting events, BEFORE you split them on BROE.
    • Race Options allows me to initialise a new competition, but not delete info from OARAStatuses. This is only useful when testing, but then saves a HUGE amount of time!
    • The VB6 Regatta Draw software now uses the XML configuration file to get the SQL Server database it needs. Previously this was hardcoded for Reading 2014
    • Finals Sequence is now configured in the .NET program.
    14/4/15 General So now my thoughts turn exclusively to the Regatta season.
    14/4/15 Database Sunday's head went quite well, though there were some problems with timing. If a crew had already raced (possible if the finish timing person entered numbers in a hurry, and only typed 2 instead of 245, for example), then the original record's time was replaced. Fortunately, these were quite easy to spot, and I could restore the original values by looking at the Audit Log (this is SO useful). I've fixed the Stored Procedure this morning.
    11/4/15 DEV Head.Control now has an experimental ferature that allows me to detect a dropped network connection. With a Head Race tomorrow, this won't go live today...
    11/4/15 Control (both) EVENT_GUID is now used to show the admin pages.
    11/4/15 General I found the problem with Regatta.Control (and the rest) failing to shutdown properly. It appears to be a bug in DNB - if you leave a CircularProgressControl running, the form doesn't close properly...
    11/4/15 ASPX For senior crews, show Junior age?
    9/4/15 Head Draw Another useful request from Lydia - we can now right click on a Crew, and change it's division.
    4/4/15 BUG Regatta.Control does not shut down on aborting a connection to the server. Not sure if other programs suffer from the same issue...
    4/4/15 General Custom race numbers can be produced by Stacys. I've therefore added the ability to generate these. Note that it only works for Head Races at the moment.
    4/4/15 ASPX Following a request from Lydia, Adaptives & Rowability have their own selection criteria on the Time Only page. I use this page sparingly, but Lydia uses it when coalescing events prior to the Draw.
    2/4/15 ASPX Adaptives & Rowability removed from the Masters page.
    1/4/15 Regatta Draw Editor This is beautiful. It has needed writing ever since I created the INI files that allowed Draw customisation (7th June 2010). You just drag a crew to put it in the right place... To be fair, this would have been nigh on impossible without the recent changes to the way that Spiders are generated.
    1/4/15 General In no particular order, I need to do the following:
    • Check regatta gaps work in the VB6.SQL Regatta Draw program. Rather as suspected, this fails with an 'Variable uses an Automation type not supported in Visual Basic' error. This is because VB6 does not have a timestamp datatype. It is an easy fix - instead of opening the table directly, execute a chunk of SQL that uses CONVERT(varchar(8),[GapStart],108) to format the time as a string...
    • Create Regatta Draw editor (INI file manipulation)
    • Add BROE files to backup routine and zip the lot
    • Reports - remove spiders
    • Reports - add Regatta Control
    • Create export file for Stacy & Son
    • Add the ability to rename Sponsors. This was a trivial task - the hard bit was getting it written for Trophies, which I did yesterday...
    • Auto generation of BROE Competition ID from XML file
    • VB6 - load current Regatta database name from XML - currently it is hard coded as 'reading.2014'
    • Remove Rowability & Adaptives from CreateOverallPositions
    1/4/15 Race Options Long overdue is the ability to backup a database...
    1/4/15 BR Rule Changes I have added support for Rowability events. This would have been done ages ago, but BROE only adds the new events on All Fools' Day, which makes life hard for our April Head.
    31/3/15 Trophies &
    Sponsorship
    The SQL code was wrong - the allocation grid showed both days, not just the currently selected one. Problem picked up during a demo to Reading last night...
    31/3/15 General ALL projects now recompiled with Visual Studio 2013. I'm still targeting .NET 2.0 - the change has been made because the new compiler gives extra compilation warnings.
    26/3/15 BROE.Import Another new ASPX page - we are now shown all entries that have not been imported into the database. These are usually where a new event has been added, and BROE.Configuration has not been run. The Access version relied on an error being thrown; in SQL Server I'm doing it properly ;)
    21/3/15 Timing The database has been modified to return an output value from the Crew Renumbering SP. This allows errors to be sent back to the client (no matter which one). These are shown to the user in a standard (new) ErrorMessage dialog. This class ensures visual consistency and less code.
    21/3/15 Head Both the Start & Finish programs were sending time correction messages twice, with only the second expecting a reply
    7/3/15 Spiders Now that I've got spiders working in ASPX, its time to break the code again. The problem is that I want to output them in PDF format, which will necessitate extra formatting. To be honest, formatting of the headers has always been an absolute nightmare, with <H1> tags etc embedded into the output, then stripped out for TXT output. We COULD parse for them, but the headers for Plate events make this tricky...

    So everything has been changed. Spiders are created as just raw text, with all formatting being done by the calling application. This allows for much better control, and quite a bit less code.

    28/2/15 ASPX Wow. Spiders worked, pretty much first time. I'd missed a few Finally statements to close connections, but once these were added in, spiders.aspx just worked. The VB6 code has been changed slightly since the original conversion to VB.NET was done, with hyperlinks added. These have been retrofitted.
    23/2/15 General Lydia's documentation has revealed many inconsistencies. For example, when setting up a new competition, you have to create the database, delete everything via BROE.Import, then configure it in RaceOptions. The latter program now does everything.
    22/2/15 Handicaps The first bit of code to be converted to SQL Server was actually the only bit that didn't work as expected. It SHOULD have calculated handicaps at the end of each division. To be honest though, I don't think it ever worked as intended.
    15/2/15
    14/12/15 General Apart from a quick foray to Tesco to get lunch, I have been in this building for over 12 hours. Time to go home...
    14/2/15 Regatta.Server TODO - Create Trusted.xml when this program starts, and update it as clients connect. What's this file? The solution to access levels within the ASPX pages... The ASP pages used the 'core' QueryString constant, which is truly horrible.
    14/2/15 SQL Server The [Crews] & [Times] tables now have a TRIGGER defined that logs all activity to a separate database. I have long suspected that there is a bug in the head race timing correction code; to date I have had no reliable method of capturing EVERY change to the tables. Triggers provide that capability.

    The trigger only executes if the scalar function [fn_GetAudit()] returns 1. At the moment this function is hard coded to do so - it will ultimately get a value from the EventData table.

    14/2/15 Head.Control I'm not going to code this tonight, but having a payment system is perfectly possible with SQL Server, regardless of whether or not Regatta.Server.SQL.exe is running. Because we can connect directly to SQL Server on a specified TCP port. We can also provide a username, rather than using sa...
    14/2/15 Database The February Head will run on SQL Server. I won't tell anyone unless it goes wrong... If it does, then I'm fine, as side-by-side versioning means that the original software will continue to work.
    11/2/15 SQL Server Awesome - import from Access... This means that we MAY be able to use SQL Server to run this weekend's Head, even though Access was used for the Draw. And, if successful in this, we can also run Bedford Amateur Regatta in SQL Server...
    7/2/15 Reports Concentrating on Head Race at the moment. Labels for Numbers, Runners & Riders were written yesterday (though have not been printed to check label alignment). Today's task is ENTRY FORMS.
    • There are several minor flaws in the ones produced by BROE
    • Redundant info such as Coach Name shouldn't be there.
    • Lack of an updatable Crew Number on BROE is a major issue.
    • The new ones will be sorted in the same order as the Race Control Summaries
    7/2/15 Reports One of the biggest problems incurred by moving to SQL Server is the generation of reports - Runners & Riders, Labels, Race Control Summaries etc. Whilst it is possible to install Access and link to the relevant database, this approach is cumbersome and not easily deployable - it requires the end user to have some knowledge of ODBC datasources, and the ability to diagnose issues.

    So I have turned to PDF

    6/2/15 BROE Import Bug found by LMS - the payment grid shows the wrong total if there is only a single contact. Fixed in both database versions (Access & SQL Server).
    4/2/15 ASPX When we change the status of a crew (because it is racing twice), We update Checksums.Identical to NULL
    3/2/15 ASP Looking back, I am very pleased by the quality of the ASP code that I managed to create without use of a debugger. With a couple of minor exceptions, it is fully W3C compliant.
    29/1/15 Database I have left Head Race results to the very end. The Access code works, but is cumbersome and very ugly. The advantage of starting from scratch, rather than converting this code is that I can take full advantage of SQL Server's functionality. It also helps that I have a good table structure, and know my data. CreatePositions does most of the heavy lifting; COALESCE() is used to add DNS.
    24/1/15 Masters Merging statuses can now be done in SQL Server. I think that just leaves Sponsorship & Trophies to convert...

    Couple of bugs fixed - although it warns if you try to create a CDEF handicap, it would not warn on a CF handicap. Fixed. Also found the longstanding bug that created invalid ResultsOrder when handicaps for multiple classes were created simultaneously. It was actually a variable that was not being reset.

    24/1/15 ASP I have FINALLY found the solution to a longstanding problem. Whilst table sorting is possible via JQuery, and works in all browsers, it does not work in a WebBrowser control, and instead throws errors. The solution is to add a META tag: http-equiv="X-UA-Compatible" content="IE=edge". Setting the version to 'edge' tells Internet Explorer to use the latest engine to render the page and execute JavaScript.
    18/1/15 Regatta.Libraries The Regatta Selection combo boxes can now be filtered by the type of database that the application supports.
    2/12/14 ASPX stats_entries is very complicated in ASP, with over 1400 lines of code. Multiple TRANSFORM queries are used, which are pseudo-joined to create summaries for both Entries & Clubs. The ASPX code is under half that size, with the heavy lifting being done in SQL Server. Multiple PIVOT operations are combined via CTEs, which are then all joined to produce the statistics. I'm actually really pleased with the various Stored Procedures in the [Statistics] schema (each is self contained without referencing any View objects), and demonstrates that I have a sound knowledge of both my data AND T-SQL ;)
    1/12/14 ASPX One problem that I've had all along is summary rows. For a sorted table, these must lie outside the TBODY, preferably in a TFOOT. The problem is that a TFOOT must be defined before the TBODY in which the sums are calculated. We could cache the TBODY to a variable, and output it later, but a much neater solution is to use a bit of JQuery to update cells in the TFOOT once the entire table has been generated... Using a TFOOT also allows the table to be sorted without disturbing the summary rows.
    30/11/14 ASPX I'm doing well. The vast majority of the simple pages have been written, and I'm now turning to the rather more complex PIVOT queries. Most have gone well, until I get to Divisions. The ASP code is dreadful, having evolved over the years. It's had a conversion to classes, but is too dreadful to even contemplate a straight code conversion - I have tried!

    Eventually I have cracked it, though it has taken almost an entire day of coding. I stuck with the original as it had a lot of complex export code.

    28/11/14 ASPX Another sleepless night means that crew.aspx has been written. It feels like a lot more code, but has actually increased by only 15% The original was pretty horrible, and has taken a significant effort to rewrite
    22/11/14 SQL Server Access has the TRANSFORM operator; SQL Server has PIVOT. For once, I prefer Access. The EntryMatrix was actually quite easy to create. The stats_entries ASP page currently uses multiple CROSSTAB queries (ie ones that do a TRANSFORM) - in T-SQL I can UNION ALL multiple statements, then PIVOT the whole lot in one go.
    21/11/14 Regatta.Server The Merge routine (for Head Timing) has been massively simplified by doing the lot in SQL.
    19/11/14 database I should have made the transition to SQL Server years ago. [Head].[AppendTimesElapsed] replaces [Timing - Append TimesElapsed], [Timing - Results] AND [Timing - Valid Information]. One simple INSERT statement, using a couple of CTEs

    And if that wasn't proof enough, try creating the overall & status positions. This takes hundreds of lines of VB.NET code, or a trivial bit of SQL using the RANK function. I'm in heaven ;) Firstly we RANK, then append = as required, and finally...

    19/11/14 Timing Correction This now allows times to be entered in HHMMSS.NN format.
    16/11/14 BROE.Import.SQL Bloody hell. I have just imported entries for the first time. It is incredibly fast...
    • The combo boxes for event selection do not currently work. Both types have been moved to a new namespace in Regatta.Libraries, but do not yet update the XML.NB - this was coded on 18/1/2015
    • clsComboItem has been purged, at long last ;)
    • All parameters have been converted to shorthand syntax, with the exception of the one in MakePayment, which has been converted to an OUTPUT parameter.
    • Where possible, queries have been converted to Scalar functions.
    • TODO The routines that log changes made on BROE use two Stored Procedures - one to log the change, and then the other to actually MAKE the change. These could easily be condensed to a single SP.
    • I have only found ONE bug in the original program - OARACalculateVeterans was calling a complicated UPDATE query inside a loop, instead of outside it. I'm rather pleased to have found so little wrong ;)
    • ADODB has gone, making the software pure .NET
    • Times.StartTime & FinishTime are now time(2) fields, which means that the separate StartDecimal and FinishDecimal columns are redundant and can be removed.
    • Regatta.Server.SQL compiles, albeit with some of the more complex routines commented out...
    So now comes the next headache - web pages. These are currently written in ASP, and need to be converted to ASPX.
    15/11/14 General It is now 2 weeks since I started the conversion to SQL Server. I am now starting to recode BROE.Entries, which is by far the most complex program. I have decided that this (and Regatta.Server) should be separate programs, leaving the original Access versions untouched.
    12/11/14 General I have added every head & regatta to the configuration XML file. Historically, one of my biggest problems has been creating a new database - I've got to do it, and build an installation program for somebody else to use. It would be much better if the end user could create an database. The problem is that there is so much to set, including Registry keys
    7/11/14 General I've finally bitten the bullet, and installed Windows 7 64 bit...
    • Getting MSCOMCTL.OCX to work in the VB6 IDE is painful. You have to manually register it, and also use regtlib to register msdatsrc.tlb (both in SysWow64). It seems that Microsoft broke something quite badly in IE 10
    • I've also installed new versions of DotNetBar & Chilkat
    • Now comes the hard bit - removing the software's dependence on the Registry. HKEY_LOCAL_MACHINE is very hard to write to (UAC gets in the way) so I've used HKEY_CURRENT_USER for a while, on the assumption that the user who installed the software will be the one using it. Not so. When BRC bought a new laptop last month I installed under my own account. Lydia used it under hers, so it didn't work - I had to repair the installation to add the extra registry key. With multiple users, each of whom may have their own Active Event, we have a recipe for disaster.

      I am therefore going to use XML files in the Config folder. Ultimately, I will install race specific files, which will be appended to the index

    • Regatta.Libraries is almost complete - I haven't converted CreateStatusPositions etc yet - TODO
    • Perversely, the hardest part of the conversion was getting the Handicap control to work with SQL Server. Masters.Handicaps has therefore been the first application to be rewritten.
    • And now we come to the next problem. SSMA has got some of the converted logic wrong - namely the short circuit logic first encountered in [Count - Competitors]. It failed to convert this routine, as the Key into EventData was computed from a parameter; in the case of [List - Racing Sequence subquery] there was a hardcoded value. The View is therefore invalid. All Views therefore need to be checked...
    • WHY did [List - Statuses in Draw] need to join to [List - Racing Sequence] ???
    • Obsolete Draw - Add Missing HeadStartOrder subquery
    • [OARA2 - Points Update] depended on 2 views, both of which can be converted to CTEs.
    • Joy - SQL Server lets me use an explicit Time field instead of a DateTime. This corresponds to .Net's TimeSpan class.
    4/11/14 SQL Server [List - Results by Status] has been written, but I'm not confident of the sort order. I am therefore going to stop until the SQL has been tested.
    1/11/14 SSMA Version 5.2 of the SQL Server Migration Assistant (the last version to work on XP) has been hard to find. But its reports are invaluable... A number of tables had nullable primary keys (how???). The migration will be iterative as more errors are picked up.
    • About 200 queries will need to be manually converted to Stored Procedures. SSMA is good, but does not handle even the simplest parametric query.
    • I have started by converting the queries prefixed with OARA2. I have written 30 Stored Procedures tonight - SSMA had already created 30 Views. With only 400 odd queries in the Access database, this is a significant achievement.
    • UPDATE FROM is Microsoft specific syntax. They really screwed up though, making the syntax different in SQL Server and Access...
    • Now that I'm used to the syntactic differences, I think I'll convert the rest of the UPDATE queries, of which there are 53. Then the 31 INSERT queries, and finally the 2 DELETE queries.
    • Its 4:30 AM, and the snoring has stopped. Time to grab a few hours sleep.
    • The first of the major conversion problems comes with [Count - Competitors]. Access allows a parameter to be defined in a top level query, which any subqueries can then reference. SQL Server does not (unsurprisingly) allow this - it feels more like a bug than a feature! The solution is a nice simple CTE.
    • One big advantage of this process is that I'm still finding obsolete queries - 8 so far today...
    • [Timing - Append TimesElapsed] is going to be rather difficult to rewrite. I'm leaving it for the time being.
    • Another conversion issue lies in use of Values within the EventData table. Access allows the logic to be short-circuited; SQL Server requires that the value is selected into a variable, which is then used in the main body of the query. [OARA2 - Check Minimum Ages of Rowers] shows this in practice.
    • 85 Stored Procedures written (and a few Views). 131 queries to go...
    • [Regatta - List Races] is used as the base query for many other queries. The problem lies in Access' shortcut - the parameter is declared in this query only. I could write a CTE for each SP that references it, but this has the potential to introduce subtle bugs, as each SP will require its own CTE. So the solution is a TVF...
    • Only 67 Access queries left to convert. I'm slowing down, as I've run out of simple ones. Some of the logic is unneccesarily complex...
    1/11/14 Database Just checking the draw code - it turns out that [List - Draw Composition] needs to be slightly modified to exclude rejected entries. This is necessary due to the way that these are now handled. Rejected was added to the database fairly recently, and actually updated the Withdrawn flag as well in order to shoehorn in the extra functionality without having to change too much database logic. Now that the import routines have been changed
    24/10/14 General Its 2:15 AM. Bed time. I started with 462 queries, and now have just 388 - a 16% reduction. Next query is [List - Regatta Winners]... This looks far more complicated than it should be, as I think it started life as an Access report that named the beaten crew
    24/10/14 Race Options
    • Use BROE Priority removed
    • ASP options added for Form checked & Form Extracted. I think these are used by Bedford RC only.
    • Added Load / Save functionality. This will prove invaluable once I start to upgrade the old databases - it allows me to save EventData & EntryFees to file, and start with a clean database in the new format.
    24/10/14 Database Still hunting obsolete code. It is getting much harder!
    • [List - Collapsible Statuses] depends on its subquery (which is flawed, as it does not include DayID in the JOIN) & [List - Scratched post Draw]. By definition, ALL scratched crews are post Draw! Investigation shows that [List - Collapsible Statuses] is not actually used, and so all 3 queries are obsolete...
    • [List - Crews on Specified Day]
    • [Doubling - Count Links subquery]
    • [Doubling - Count Links]
    • [Entries - Change Entries to New Contact]
    • [Count - Withdrawn Entries by Status]
    • [Entries - Withdraw Entry]
    • [Statistics - Club Wins at Regatta]
    • [Count - Races Uncompleted] was not day specific. Hardly surprising, as it is obsolete...
    • [OARA2 - Append New Contacts] removed when converting to SQL Server
    • [Entries - Update Contact Verified] removed when converting to SQL Server
    23/10/14 Database 62 queries have now been marked as obsolete. With 398 left, I have removed 13.6% of the queries in just 5 days.

    Further reductions are still possible, as quite a few of the server's queries are very simple, and could be done in code.

    22/10/14 General It is time for the last race I'm involved with this year - Star Club Head or the River. They will get the new code. One immediate benefit is that linking tables is now simple - you don't need to remember that you have to exclude various CSV files.
    19/10/14 Database
    • I have reordered the fields in the Entries table for clarity.
    • [Entries.OARAComments] has NEVER been relevant, so has been removed. The changes have necessitated some other alterations, notably to [Statistics - TimeOnly], and BROE.Import.exe
    • The following queries have also been marked as obsolete, as no records of their usage can be found. It has been an iterative process, as obsoleting some queries reveals that those that they depend on can also be removed.
      • [Statistics - Statuses]
      • [Statistics - Specified Status]
      • [Count - Entries Withdrawn per Status]
      • [Count - Crews Scratched per Status]
      • [List - Disqualifications]
      • [Statistics - Payment Total Already Banked]
      • [Statistics - Payment Total NOT Banked]
      • [List - Doubling between Clubs]
      • [List - Doubling between Days]
      • [List - Withdrawn Entries]
      • [Entries - Entries received from specified Club]
      • [Entries - Other entries received from specified Club]
      • [Entries - Add Cheque]
      • [Entries - Payment Summary for Contact Only]
      • [Entries - Payment Summary]
      • [Update Form Checked]
      • [List - Entries by Contact]
      • [Mailing - Entry Addresses]
      • [OARA2 - Update Comments]
      • [OARA2 - List Changes (Comments)]
      • [Statistics - Time Only (Head)]
      • [List - Clubs in Draw after Withdrawals]
      • [List - Statuses in Draw (Divisional)]
      • [Payment - Money owed per entry]
      • [Entries - Payment Details for Entries]
      • [List - Last Entry Made by Contact]
      • [Update Last Entry]
      • [Entries - Payment Missing]
      • [Entries - Payment Missing subquery]
      • [Statistics - Head Uncontested Statuses]
      • [Statistics - Regatta Uncontested Statuses]
      • [List - Clubs with Winners]
      • [List - Head Winners by specified Club subquery]
      • [Mailing - Notification of Draw (Regatta)]
      • [List - Sponsors Addresses subquery]
      • [List - Sponsors Addresses]
      • [Mailing - Notification of Draw]
      • [Mailing - Other Crews Entered]
      • [List - Status entered within Club (Distinct)]
      • [List - Regatta Entry Details by Day]
      • [Entries - Mark specified Club as Active] - replaced with SQL in BROE.Entries
      • [List - Clubs using contact]
      • [Debug - Invalid Draw]
      • [Mailing - Entries By Status]
      • [Mailing - Summary of Entries]
      • [Mailing - Contact Addresses]
      • [List - Entries by Specified Division] - used only in the obsolete entries.asp
      • [List - Entries per Division]
      • [Count - Entries at status for specified Club]
      • [Entries - Details of Specified Contact]
      • [List - Clubs]
      • [Count - Crews per Boat Class per Division Summary]
      • [OARA2 - Update Contact Last Entry]
      • [List - Completed Events by Status]
      • [Update - Log Withdrawal of entries at Specified Status]
      • [Count - Entries Assigned Payment per Contact subquery] was referenced by the same query, but was not used.
      • [Count - Entries Assigned Payment per Contact] - replaced by SQL.
      • [Statistics - Regatta Entries] was only used to export Regatta info for Rowstats. All it really did was select crews where ignored = 0 - ie all crews that have not been excluded by a ReDraw operation. It was actually very easy to convert to a single SQL statement that did not need multiple JOINs...
      • [Count - Entries per Status (All)] can now be removed.
      • [Count - Withdrawn Entries by Status] can also go.
      This means that more than 8% of database queries have been removed this weekend...
    • And these table fields:
      • [Entries.Checked]
      • [Entries.FormsOK]
      • [Entries.Received]
      • [Contacts.MailingList]
      • [Contacts.LastEntry]
      • [Contacts.LastEvent]
      • [Contacts.Verfied]
      FormsOK & Received predate BROE, and are now totally redundant. They have not been used in application code for years.
    • The worst logic relic was [Payment - Money owed per entry]. This selected 6 fields from a single table (Entries), with no WHERE clause. Yet it was used in 9 other queries...
    • The JOIN logic in [List - Entries where payment is assigned] and similar queries appears wrong, joining ClubID and ContactID
    • [Payment - Create Time Only Entry Fee] does NOT do what I expected - it applies the Discount pricing structure...
    • The [Regatta - Mailshot of Draw] report contains a reference to a missing field. It has not been printed, to my knowledge, in years. [3 Lane - Mailshot of Draw] is even more complicated, and similarly redundant. The underlying query [Mailing - Notification of Draw (Regatta)] is therefore obsolete.
    18/10/14 Database One of the major obstacles to converting this system to SQL Server are the ISAM text drivers, used to import the CSV files. They rely on a link specification, which is a bit of a bugger to configure, and assume that the files are always present in c:\RaceManager\OARA. There are also problems caused in the import by the fact that all of the fields in these tables are defined as Text (nvarchar). And creating a new event is made more difficult, as you have to remember NOT to relink these. The optional 'Priority' field in the export means that a couple of queries need to be duplicated, run off a database option that is easy to forget.

    So what's the solution? My actual job has shown that importing CSV files, row by agonising row, is actually very simple and, more importantly, fast enough. Ultimately, it could be speeded up even further in SQL Server with a CLR Table Type...
    We already use Chilkat.CSV in BROE.Configuration - this has some very useful logic for handling CSV files, as it complies with RFC 4180.

    • [OARA2 - Transfer Boats] can be simplified, so that it only imports new boats. We don't actually care that the OARABoats table will contain records that are no longer used (as people change their mind over what boat they are actually going to be using). This means that the call to DeleteAllRecordsFromTable('OARABoats') can be removed.
    • [OARA2 - Transfer Boats (Priority)] can now be marked as obsolete.
    • [OARA2 - Transfer Entries (Priority)] can now be marked as obsolete.
    • EventData key [Event_UseOARAPriority] is now obsolete. I am not going to change RaceOptions for the time being.
    • The CSV import code can also do some data transformations. BROE exports boolean fields as Y/N - it would be better to change these to 1/0 and have the BROE_Crews table contain Boolean fields, instead of text. We can also obsolete [OARA2 - Points - Remove Not Declared] and [OARA2 - Points - Remove Regression] which use InStr (not SQL Server comaptible).
    18/10/14 General Suzy's got a shocking hangover (I did say that the third glass of wine was a mistake), so I can get on with a decent coding session...
    27/7/14 Regatta Draw When you generate Spiders, the folder containing the output files is now opened. Not doing this confused St Neots, who assumed that nothing had happened...
    27/7/14 ASP A long standing request from Mike Perry emerged at St Neots yesterday evening - the commentator could do with a list of sponsors, listed by event. It looks as if this was work in progress (a familiar theme?) - the page existed, but had a syntax error and was not on the menu structure. All working now.
    26/7/14 Regatta.Twitter If an error is thrown during the loop (it did at St Neots on Saturday for reasons as yet unknown) then no more Tweets will be generated. Each race is now handled in its own routine.

    The problem is almost certainly related to HuntWidows - there were several instances where the second placed crew was listed as the Winner of Race nnn. Results for these HAD been set.

    26/7/14 Regatta Server
    • Bug found in the Status Change code - it could not cope with a NULL DivisionID
    • Finish code modified so that the 'winner' of a rowover is not marked as having started
    • Scratched Status Change crews are no longer sent to Twaddle.
    19/7/14 ASP It looks as if the minimum age functionality was work in progress. Looking back through this document, it was added on 16 Jan 2013, but obviously never tested, There's no UI in Race Options, and the ASP pages don't work. Both problems have now been fixed.
    19/7/14 BROE.Import Separate pages are now shown for rowers & coxes who are too young. The query for coxes has been modified to include the same fields.
    19/7/14 Masters.Merge Only by demonstrating functionality do you really find out what's missing ;) In this case (and also for the Handicaps program), it is the regatta selection combo box at the top right hand corner.
    18/7/14 Regatta.Libraries Verdict dialog moved here as it is now used by more than one program. I have also inserted the rather nice Options dialog that I wrote yesterday as work. It can't be used yet, as the existing code conforms to the previous bodge, and will need rewriting.
    18/7/14 Regatta.Control In the case of a 3 lane Regatta (guess which one), you might want to insert a crew into the middle lane when there's not meant to be one. The race modification grid therefore shows all lanes, whether or not they are meant to be in use.
    18/7/14 Regatta Finish Race modification functionality doesn't really belong here, so it has been moved to Regatta.Control
    18/7/14 Regatta Draw Fixed bug where an error would be thrown for Day 2 where the 1st crew number configured was already being used on Day 1. This happened at KAR.
    I also now save to the EventData table the time at which the Draw was done. I don't make use of this, but it provides useful information. The values are cleared when data is deleted in BROE.Import
    1/6/14 Database Egham offers punting events - I didn't know about these, as there weren't any last year. The StatusList prefixes are N & O
    1/6/14 Masters.MergeStatuses This has supported creation of Novice Masters (an oxymoron) for a while - support has now been added for IM3 events as well.
    28/5/14 Regatta.Finish The race modification code was obviously never tested properly. It now works as intended.
    25/4/13 TODO
    • Finish - if you correct a race that has already gone, the next round is not updated
    • Finish - if unlisted race is finished, where does the time go? In fact, why does it ask for one at all?
    • GenericDialog - this could do with a Default button.
    • Entry Manager - Alter Payment Structure throws an exception. Now can't replicate this
    • spiders.asp - it would be useful to display by club, as the PHP code does
    • Start - start a race thats already gone. you get an error, but nothing else
    26/5/14 Database Couple of issues found in [List - Regatta Winners]. The EventNumber was being pulled in from a subquery, leading to duplicate rows for any events where a Plate was run. In addition, an extra row was being generated as the query did not take account of the OARAStatuses.Active flag...
    24/5/14 Redraws This now inserts the round designator
    21/5/14 Bedford Regatta No major issues, though a couple of niggles:
    • The person using the Start terminal wanted a button to clear the displayed race. No idea why, as they were incapable of using other buttons and called me over to click them... Either way, its been added.
    • Twitter - the wrong crew was being stated as having rowed over. Given that they usually don't row over the course at all its is better just to suppress this Tweet. Need to check this code.
    • After Status (in the race list) we have (P) - this should be done via round
    • Twitter - should use the new Round designator
    • Redraws - this should update the Round designator, instead of just wiping it
    • Regatta Winners does not show PLATE
    • 1/33 lengths was being entered on the finish. Why not just 1/3 ???
    • We could do with some help on the shortcuts for verdicts
    16/5/14 Regatta Draw Egham throws up yet another bug. This time, their admin assigned a scheduled gap immediately before a division ended. This threw a type mismatch.
    14/5/14 Regatta Draw Better checking for empty recordsets added - if you do a Draw with no entries!!! then errors will not be thrown.
    1/5/14 Regatta.Control This now generates RTF files for the Winners' Certificates. A request from Egham that is actually rather useful. There are 2 buttons - one prints ALL of them, the other prints just those events that have been won since you LAST generated the report ;)
    1/5/14 Regatta.Finish
    • All of the dialogs have now been moved so that they don't obscure race information, which was rather tiresome...
    • The user can no longer cancel out of the Verdict dialog. This was a bug.
    28/4/14 Regatta Draw Another request from Egham. Their admin team prefers to have crews numbered by club, as it makes stuffing envelopes much easier. The fact that it makes pairing crews up significantly harder is totally lost on them. If I see Crews 4, 5 & 6 I know I have a race. Egham might have 17, 383 and 145. Bonkers, but coded.
    28/4/14 Database A couple of queries have been modified to take account of the Rejected flag when doing the draw. This has never been entirely right, as it was added long after the database was designed. Its useful to see what the effects of rejecting crews would be when the regatta is massively oversubscribed and you need to reject entries... At this rate, Bedford Regatta will run for more than 12 hours...
    28/4/14 ASP A request from Egham is to show the Round designator on the printouts (H, QF, SF, F). This is quite a good idea, so has been coded.
    23/4/14 Head.Control Following useful feedback from LMS (no surprise there), I have added the ability to mark a crew as racing for a Time ONLY.
    She also needs the ability to change a crew's status - this is rather more complicated...
    28/3/14 ASP JQuery 1.10.2 is now used. This allows the new, improved TableSorter code. This allows us to sort dates properly - the previous version was American...
    I've also added Priority (if used) to the page that shows competitors racing too many times. Bedford Amateur (150th) is using this option as we suspect it will be oversubscribed. Annoyingly, BROE does not allow a crew's priority to be changed by the person who entered it - only the competition can do so.
    9/3/14 PHP An idea comes to mind - why don't we show crewlists on our results? We could generate an MD5 hash of the person's BR Number (including a bit of salt), and thus track all of the events in which a person has raced.
    9/3/14 SpiderEngine I have finally hyperlinked everything. Crew Number, Club Name & Race Number - all work. I have removed the underlining from the hyperlinks to avoid clutter, though appreciate that this makes it hard to see that there actually ARE hyperlinks.
    9/3/14 RaceOptions PlateProgression is not used by the SpiderEngine, so has been removed.
    9/3/14 SpiderEngine Finals Format is no longer a configurable option - you always want to show the Race number in the spiders. But this DLL still used the option.
    I can't think why you would want to have the Plate Events listed at the end of the program, so this option has been removed, and from the DLL.
    8/3/14 ASP A new page has been added (racetimes), which shows the time between races. I think that including this information in the existing doubling page might be confusing.
    8/3/14 RaceOptions The EntryFee grid has been improved:
    • Support for Skiffs & Adaptives has been added
    • If a cell is empty (possible for Skiffs & Adaptives), then creating a new entry fee works.
    • Cell merging has been added.
    8/3/14 Database BoatTypeID for Adaptives has been changed from V to A for sorting purposes. Skiffs have a BoatTypeID of I (new).
    7/3/14 Regatta Draw I have finally figured out the divisional draw bug. Basically, gaps between divisions have a time, which MUST be allowed for. Otherwise, a crew racing in the final of Div 1, and the first Race of Div 2 would be treated as being just 3 minutes apart, even if there was a lunch hour between the divisions...

    Finding this bug was actually quite easy, given the draw for Egham 2013.

    22/2/14 BROE.Import I need to recode the functionality for adding a new entry. This might be CRA (Cambridge Autumn) or Skiffing (Egham et al.) Whilst the form has always existed, it has not worked since the program moved to .NET Rather than converting it, it will be best to start from scratch
    22/2/14 Installation Removing the obsolete COM components from the Head Editor component reduces the size of the installation package by 4Mb...
    22/2/14 BROE.Import The changes to GenericDialog help here as well. We can improve Payment Assignation.

    Failing to enter the name on a cheque/card now keeps the AddPayment dialog open.

    22/2/14 Libraries
    • The Generic Dialog class has been substantially altered. It started life as a direct code conversion (from c# to VB.NET) of the DevComponents TaskDialog class. The problem is that it class is actually quite restrictive - whilst DNB has many classes derived from BaseItem, the TaskDialog only accepts an array of RadioButtons. For work, I need CheckBoxes as well, and also need to be able to specify the minimum dialog width. So I've broken compatability here, and implemented the functionality.
    • The code has been tidied, removing unused properties, and renaming TaskDialogIcon to Icon
    • The array has been replaced with a List(Of BaseItem). This allows me to use Radios, CheckBoxes, TextBoxes, ComboBoxes etc in any order I want... I've never liked the ReDim statement anyway.
    • This makes the dialogs in BROE.Configuration significantly easier to program - much neater.
    7/1/14 BROE.Configuration This should be able to cope WITHOUT the event export file, as everything we need is actually in the Crew Export file. This was highlighted when importing legacy data from Egham.
    7/1/14 Database The import queries for entries and competitors have been altered to cope with blank rows in the CSV file. Egham had done this - it must have taken AGES!
    2/11/13 Regatta.Draw I've started work on the .NET version again.
    • Not sure whether it was worthwhile (because of numerous CType calls), but I now have classes for Heat, RaceGap & GapBetweenDivisions, all of which are derived from Race
    • A big change is conversion of the DataGridView controls to DotNetBar.SuperGrid controls. This keeps the look & feel of the application consistent. But the big advantage of this is that I can filter rows and sort as necessary.
    • Lots of redundant code has been removed
    25/10/13 SQL Server At work, I have abandoned Access completely. SQL Server 2008 R2 Express is my new platform, though 2012 is also a possibility. This is a stable, powerful database.

    Pros:

    • Fast & efficient. No database bloat
    • Fully supported in .NET without having to use ADODB COM Interop
    • We can generate audit logs in a separate database. Why would this be useful? Answer: tracking changes made on Race Day itself, and being able (ultimately) to replay these events.

      There are still a few bugs in the system. Being able to replay actions would be extraordinarily useful

    Cons:
    • Significantly harder to install - not something that most people could do. However, its fairly straightforward, and I've already created scripts to handle much of this.
    • No Reporting engine is built in. However, there's no reason why we could not use Access to perform this task.
    • No direct table access. This is used by a few server side routines; recoding these would be quite easy.
    This will be the last major change. To be fair, I started writing this system in 2003. XP was brand new, as was Server 2003. 64 bit OSes were a rarity, and Micro$oft hadn't devised the hell that is UAC.

    To be fair, it's not done too badly...

    25/10/13 Database The following queries have been marked as obsolete (in Star Nov):
    • OARA2 - Transfer Custom Event IDs. This is redundant now that the intermediate file has been removed.
    • OARA2 - Transfer Lanes and Progression. This is redundant for the same reason.
    • Select - Last Heat won by Crew. The query's comments stated that it was used by Commentary. It is not.
    • Select - Last Heat won by Crew subquery
    The time may have come to do an audit of all queries. Because I plan to move this database to SQL Server.
    11/10/13 Database The [Head - Draw (Continuous)] report has been deleted. I do not think it has ever been used...
    28/9/13 Head.Start
    Head.Finish
    Both programs have been improved, with support for dropped connections clearing the grids, and multiple terminal access coded for Start - Finish is tonight's job.
    28/9/13 Regatta.Libraries Numerous changes have been made to the Socket layer. It turns out that the 'Collection was modified; enumeration operation may not execute.' error was deep within clsListener, caused by the call to TCP_Socket.Close modifying the collection. I have also changed it so that m_tcpListener is closed BEFORE closing the TCP_Socket; this ensures that the client's socket does not immediately try to reconnect. If it succeeded in so doing, then Start's ConnectionEstablished code would fail as the connection to the database had already been closed.

    This has taken me all morning, but the effort has been well worth it. I can now close the Regatta.Server program cleanly; when it restarts, all clients will reconnect.

    27/9/13 Head.Start The Regatta programs have for a long time supported the idea of having multiple terminals running simultaneously. Since only BRC uses the head race code in anger, this has never been coded. But, as I'm now more committed to Suzy than I am to the F***ING club, I'm trying to make myself totally redundant. So the code has to be comprehensive.
    14/9/13 Regatta.Libraries We now have a Race Manager specific event log. I'm not actually making use of it yet
    12/9/13 BROE.Import Rather than entering the PaymentID when assigning payments to entries, we have a proper dialog...
    12/9/13 Database The [ChequeDetails] table has been removed. Its original purpose was to enable sorting of cheques by Sort Code (our Treasurer at the time was a banker, and insisted on this happening). Utterly pointless. Removal of the SortCode field makes the table pretty much obsolete - even its name was wrong, as we wish to record a Drawer for card payments as well. So we now have [Payments.Drawer].

    Obviously, this entails major changes to the various queries. I think I've tracked them all down.

    10/9/13 Database HeadStartOrder has been altered to use CompetitionID instead of HostID. This allows the 3 Bedford Heads to use different start orders if required
    29/8/13 Database [Update - Withdraw entries at Specified Status] marked as obsolete - it was only used in BROE.Import when scratching all entries at a specified status. This is a relic of KAR before moving to BROE; I never liked the functionality...
    28/8/13 General One hell of a day. Our Management Buyout FINALLY went ahead, and I proposed to Suzy ;)
    27/8/13 BROE.Import This now can import entries WITHOUT the statuslist csv file.
    24/8/13 Database [Draw - Add Missing RegattaData] no longer updates the RegattaDraw.Turnaround field as it has never been used, and so has been removed.
    24/8/13 Database The RegattaFinalsSequence table is not being used. This was noticed as it contains NO current status information. The RegattaDraw code looks like it allows the table to be modified; in reality the code is commented out. I'd never actually noticed, but the Draw is actually laid out by ResultsOrder. Experience shows that there is no optimum Finals Sequence (which Lickfold assumed there was); it all depends on the actual doubling. Storing the information between regattas is therefore of little value. I might add this to the RegattaDraw table.
    24/8/13 Database I think that OARAStatuses might be improved by addition of an EntryFee field. This is a job for another day, but might allow some really odd custom pricing to be applied.
    24/8/13 Database The reason for hunting through these queries is that OARAStatuses & RegattaDraw should really be merged. The latter is an abomination, but DOES allow non BROE events to be created. So, sadly, I'm going to leave them alone. That said, RegattaDraw should be configured by the BROE.Configuration program, instead of relying on an intermediate CSV file
    24/8/13 Database I can find no record of [List - Head Start Order (Actual)] or [List - Head Start Order (Full)] being used, so they have been marked as obsolete. [OARA2 - Assign Missing Divisions] also appears to be obsolete. These queries are the only ones that reference OARAStatuses.DivisionID, which I think is a remnant of the system before BROE supported allocating a status to a single division, as Kingston do.
    19/8/13 Masters.Handicaps A total rewrite is needed, since the Standard Times will be different on each day. The best key is actually the BROE Competition ID, which appears to be constant. The code actually becomes simpler, and the database queries (with lots of INSTR and RIGHT JOIN) are no longer needed...
    19/8/13 Twitter Oops. Oxford Regatta tweeted that the wrong crew rowed over. Missed this during testing
    16/8/13 Regatta.Finish I haven't got time to write a new program (Regatta.Editor), so have extended the Finish program to provide the same functionality...
    15/8/13 ASP payments has had a major overhaul, since alternate row shading made it look apalling - some rows spanned, while others didn't. An utter mess, resolved by the use of classes.
    13/8/13 Masters.Merge This program generates a CSV file, which is then imported. This means that the database is not self describing, as the import code uses a second file. Yet on examining the code, I find that the program only generates this file - it does not load it. So lets get rid of the intermediate file...
    7/8/13 BROE.Import The facelift is now virtually complete. There are still a few InputBox calls, but the forms themselves have been massively improved.
    7/8/13 Permissions Support added for Windows Home Server 2011
    20/7/13 Twitter This is now a client program, with the server providing the information via XML, and the client tweeting it. At least, that's what I planned to do. Instead, with trees getting in the way of the wood, I wrote a complex handshaking system that composed the Tweet text on the client, but still tweeted from the server. Prat.

    Now that I've realised my mistake, I can move code between the 2 programs. The reason I'm doing this is that both KAR & Bedford Amateur are unable to get an internet connection on the server machine, but may be able to do so (via a 3G dongle) from a client. That client has therefore to be able to tweet itself, but still store the tweets on the server

    11/7/13 Regatta Draw MAJOR BUG - If we are shortening crewnames for the spiders, and we have an event split into 2 (eg Nov.A.1X & Nov.B.1X) then crew names will not be shown if there is just 1 one sculler in A & just 1 in B. Nobody has noticed this before - even KAR's JW failed to spot it, despite many other, totally pointless checks. MB of Star Club did, and its taken about 4 hours of coding to resolve...
    10/7/13 KAR SO close to just working, but missed one important point - masters handicaps should be run in 3 lanes. And there's no way to define that.

    This is actually quite a tricky one, due to statuslist.csv and the RegattaDraw table, both of which feel like bodges.

    2/7/13 BROE.Import This is getting a major facelift, upgrading it to the same visual style as all the other programs. Its a major task, which will take several weeks to complete.
    The new grids are nice, as they have a title & inbuilt alternate row shading. And I can derive a class, adding EntryID etc, which makes searching SO much simpler...
    17/6/13 Finish I did Regatta Finish all weekend. Largely OK, though Tony Gordon compained that the font was too small. I have to agree with him, and changed it during Sunday's Regatta. Getting the TextEntry form to display at the correct position has taken until tonight, as the offending code is buried deep inside Regatta.Libraries.dll - to rebuild it would have required stopping Regatta.Server, which is far from ideal, even on such a relaxed race pitch, with results being texted to me every 15 minutes or so...
    16/6/13 Regatta Draw Only 2 races moved (both due to undeclared boat doubling). Regatta finished on time, thank God.
    10/6/13 Regatta Draw This had better work, and work perfectly. I've just seen the Umpires rota for the Coronation 60th Anniversary regatta. It reads more like a FISA/Henley rota than any regatta I have EVER encountered. If I screw this up, it will be VERY public, and VERY embarrassing. I still remember the fiasco of KAR 200?, when I screwed up the draw right royally...
    10/6/13 Regatta Draw I have coded the ability to renumber a regatta draw, so that race numbers remain in order, even after changing race times. This is very useful, and should have been written years ago.
    7/6/13 Regatta Draw I have FINALLY found the bug associated with gaps. It was assumed the internal gap time was measured in minutes, and therefore multiplying by 60. In fact, it was ALREADY in seconds. C60 has such limited doubling, some of it occurring around gaps, that this bug (which has thwarted me for ages) was trivial to find and fix ;)
    5/6/13 Regatta Draw Bit of a problem with Repechages - they are generating extra Event Numbers, but not RaceTypeID
    3/6/13 .NET You would have thought that compiling for 'Any CPU'. would be the most robust. Yet that doesn't apply to Micro$oft. It hasn't produced JET drivers for 64bit Windows, so .NET loads some 64 bit code, then some 32 bit code, and then crashes with a VERY cryptic error message. Brilliant - I have recompiled most projects to target Any CPU...
    30/5/13 ASP Minor simplification made to regatta.asp - Groups are no longer valid, so the code to deal with them can be safely removed.
    30/5/13 ASP stats_entries now copes with a 2 day regatta where entries have been received for one day, but not the other. This is an unlikely situation, admittedly, but the code should be able to handle missing columns in the recordset generated from the TRANSFORM operator.
    24/5/3 PHP Whilst I'm doing PHP stuff (and have reacquainted myself with its arcane syntax), I might as well make the long overdue move to MySQLi, as the MySQL extension is long deprecated. The conversion is worthwhile, as it has highlighted several instances of poor programming and dud logic.

    Perversely, the page that has given the most problems is blades - it is standalone (doesn't require a RaceID), and is also very, very old...

    24/5/13 PHP It looks like our ISP now has detect_unicode ON. Since spiders.php & all of the associated files contain a byte order mark, all we got was question marks. The generation code has therefore been modified, removing the first 3 bytes (BOM), and the PHP now displays spiders correctly. This was an absolute bastard to find!
    9/5/13 ASP There's no menu structure for it yet, but spiders can now be shown for an individual club
    9/5/13 Database Bug found in [List - Races affected by Scratchings] - because it was selecting * from [Display - Regatta Names], races with a plate outcome were listed twice (2 eventnumbers). So they were filtered out by [List - Races won by Default] and the winning crew not carried forward.
    2/5/13 BROE.Import FINALLY, the CSV files are backed up properly. This has been a very low priority issue - I knew it was wrong, but never had time to fix it. Amazingly, in the week before Bedford Regatta, I DO have that time - testament to how little needs writing. Hell, I've even coded Commentary!!!
    1/5/13 BROE.Import We have a problem with importing payments, in that entries were withdrawn BEFORE calculating payments made. That's fixed, but we still have a problem if importing from scratch...
    28/4/13 Commentary Its an absolute bastard to write...
    28/4/13 Regatta.Server Commentary is FINALLY being coded. I have added a new message (emRegatta_Commentary) to differentiate the message generated by InformCommentaryOfWin from messages sent by Control. Its first item is the RaceID, then the originating message type (eg RaceFinished), followed by a list of paragraphs to display.
    28/4/13 Regatta.Server Regatta Statistics removed, as it has never been used. In fact, it isn't even possible to install it...
    28/4/13 Regatta Draw The EventData table holds a value to indicate whether Status Change slots are available. The Draw program now sets this.
    Whilst coding this, a hard coded DayID was found in Regatta.Server
    25/4/13 TODO
    • Finish - if you correct a race that has already gone, the next round is not updated
    • Finish - if unlisted race is finished, where does the time go? In fact, why does it ask for one at all?
    • GenericDialog - this could do with a Default button.
    • Entry Manager - Alter Payment Structure throws an exception. Now can't replicate this
    • spiders.asp - it would be useful to display by club, as the PHP code does
    • Start - start a race thats already gone. you get an error, but nothing else
    • TextEntry dialog now supports times as HHMM, MMSS, HHMMSS. Big improvement.
    25/4/13 Regatta Start Many minor changes made
    23/4/13 Spider Engine within a PRE block, vbcrlf is significant. Double instances of this are now removed, so Plates display correctly (HTML).
    19/4/13 BROE.Results EventInfo now contains the full status description. This follows from one of the BROE help pages, which suggests that this should be set before setting results.
    19/4/13 BROE.Config Minor bug found - newly created statuses had AssociationID set instead of StatusTypeID. This was only picked up due to Bedford Regatta's use of 3rd Eights, where the draw is done on the day from existing competitors.
    18/4/13 Race.Manager When Head.Timing does an Update, this now sends messages to Start & Finish to clear their grids.
    18/4/13 Race Manager This now uses the new control to automatically generate the Standard Times and then the handicaps. I am trying to make myself redundant on race day; this was one of the operations that I had to do on Sunday, as only I have the login details for my server...
    18/4/13 Masters.Handicaps The Standard Times control & handicapping table have been moved to a new control in Regatta.Libraries
    17/4/13 Head.Draw This now deletes Standard Times, as they need to be calculated from the fastest crew per boat type
    9/4/13 Head.Draw A nasty thought occurs - what if they scratch, and then we renumber?
    9/4/13 PHP QS_FULL has been removed throughout, as we ALWAYS want to show hyperlinks and let the user browse...
    5/4/13 ASP We ALWAYS want to hide withdrawn entries. So the filter has been removed.
    5/4/13 ASP [entries] page removed, as it's pretty pointless. I'm not sure I've looked at it for any event deliberately
    4/4/13 Database ClubID removed from [List - Rowers Doubling Up subquery]. This sorts out crew.asp, which gets a bit funny with people who belong to more than one club (BR feature introduced AFTER the query was designed). This means that [List - Competitors] also needs to be modified.
    27/3/13 Installation This now contains the 2013 Rules of Racing, with all the old ones removed.
    27/3/13 ASP torace has been added to the menu structure. It has been slightly updated, with the links ONLY available once results for the final division have been set.
    27/3/13 BROE Config Support for Masters J has been added.
    23/3/13 ASP resultsbytime has been modified to use legal ID values - these are used for sorting by status, so we need to strip out '=' and 'T/O', since punctuation is not allowed in XHTML IDs. The PHP resultso page has been updated with the same logic, ensuring that it passes W3C validation.
    23/3/13 ASP torace.asp has been coded. This allows an admin to scratch crews that have not raced once the last division has finished, which then enables all winners to be announced.
    23/3/13 ASP QS_SORT has been removed throughout, as have all the constants related to it. They weren't used, so just added unnecessary code.
    23/3/13 Database [List - Completed Events by Status] marked as obsolete. It was used by completed.asp, but the sort orders are now done with JQuery on the fly.
    19/3/13 BROE.Configuration Progression systems & Lanes now coded. This is much neater than before.
    19/3/13 ASP Another long outstanding fix - divisions.asp now uses a class, so that divisions with no entries can be seen in the grid - very useful when few entries have been received, as it shows Division 8 DOES exist!

    Its also gained Actual Start Time.

    11/3/13 Regatta Libraries Breaking change on TextEntry - we now have an enum for DataType, instead of TypeCode itself.
    9/3/13 Regatta.Draw
    • Using the generic DaySelectionDialog simplifies a lot of the code used in this program, as cmbRegattaNames is no longer necessary. That said, I'll have to provide some way of switching between days.
    2/3/13 VB.NET The ONLY program left to convert is the Regatta Draw.

    The problem is that it was never designed properly - it just evolved. Numerous inconsitencies, several unresolved bugs, and a truly ghastly object model make a straight conversion nigh on impossible. Even if it was possible, I'd be left with a pretty crap program; whilst it works now, its not really very good.

    Rewriting is not going to be easy, and needs to be done in stages. I have now got the object model pretty much sorted (see below), as well as the output routines, and the visualisation. Many parts will have to change as my knowledge of VB.NET's inheritance system has changed significantly since I started writing this (in May 2012).

    At the moment, clash resolution is not working, mainly because some of the internal logic is incomplete. Conversion is unlikely to happen in 2013, but 2014 might see a very big change ;)

    • The Spider integrity program (VB6) has been modified to generate VB.NET source code. The old 'Schemas' were encoded strings held in a dictionary. These have gone, replaced with a proper object model.
      • Instead of 1 class dealing with a number of entries, and having to do different things for plate, repechage etc, we now have one class to handle 2 lane racing with a plate event etc. There are currently 125 of these classes (VB6 had 31) - writing them from scratch would have been a nightmare!
      • Each class has lanes, outcomes & crews.
      • Placeholders in the spider are still encoded. For simplicity, the classes hold this information.
      • Max Level is now stored, instead of being calculated.
      • Several redundant enumerations have been removed from Regatta.Libraries
    • Spiders are now created. The new object model makes this significantly simpler.
    • Unicode is natively supported. This has necessitated a few changes to the RTF generation code (now hived off into a separate routine).
    • SeparateEntriesFromSameClub is made easier by the new object model
    • Most of the routines have now been converted; to get the base up & running as fast as possible, most of the code was commented out until the structure had been finalised.
    • EnsureStatusChangeInFirstRound is giving me more headaches than any other routine...
    • Using the standard CSV import class is a big improvement, though has necessitated several changes as the program was calling [Draw - Add Missing RegattaData] before the import. Duh.
    The problem I face is that it is not carrying doubling far enough.
    23/2/13 ASP oara_create_contacts has FINALLY been updated to make creating a new contact a single step process. This functionality is about 6 years overdue...
    23/2/13 Database [OARA2 - Transfer Lanes and Progression] now takes account of the Active flag used by BROE.Configuration. As does [OARA2 - Transfer Custom Event IDs]
    22/2/13 General I'm knackered. And slightly drunk. Able to realise that the changes to Race Options will help (checkbox handling) but incapable of doing any more.

    SW is shattered.

    17/2/13 Documenter This is truly a Godsend when renaming fields...
    17/2/13 Database StatusList.Bums renamed to StatusList.Seats
    17/2/13 BROE.Import This needs to be reskinned.
    17/2/13 ASP Trophies has been extensively modified, and now takes account of dead heats.
    16/2/13 Race Manager MPI has been removed. Sockets firing too often though.
    10/2/13 Feb Head
    • need a way of automatically scratching all crews that have not raced at the end of the day. Was this what torace.asp was meant to have done?
    • need to integrate masters handicaps (head race) into the server
    • get rid of MPI. we can probably lose the proxy as well
    • log timing changes
    • if you have done a merge, you cannot adjust times...
    • timing - need to be able to correct a time by entering it
    8/2/13 ASP completed.asp now handles masters handicaps correctly
    8/2/13 Twaddle Up & running again, with the new URLs requred by OAuth 1.1
    6/2/13 Head Race Start & Finish now download their grids from the server on startup. This is a BIG improvement, allowing recovery after program crash.
    6/2/13 BROE Import Payment assignation bug finally found & fixed. It was easy once I had a worked example ;)
    26/1/13 Regatta Libraries EventStage control created, encapsulating the design & logic that's used in several programs. Head.Editor is so far the only project to use this.
    16/1/3 Database [OARA2 - Check J14 and below] has been marked as obsolete, as it was designed to check for a bug in BROE that has long been fixed. It hasn't been called by the software for quite a while.
    16/1/13 Database I am concerned that Star's New Year Head would have had 10 year old children racing in freezing conditions. A new query has therefore been written to identify minimum junior ages for both rowers & coxes. I'm not using [OARA2 - Check Minimum Ages] yet, but will do shortly.
    12/1/13 Database [Timing - Errors subquery] modified to not show crew 0 where start and finish times are missing (ie have been deleted). [Timing - Errors Union] requires the same fix. [Timing - Errors] has been updated to not show crews that have a time recorded previously, EXCEPT for where a crew has raced twice...
    9/1/13 BROE.Config I think that this finally does what I wanted it to do years ago!
    9/1/13 General cmbRegattaSelection is used in many projects. Since the code is cut & pasted into every project, it has been incorporated into Regatta.Libraries as a standard control. BROE.Configuration is so far the only project to use this.
    5/1/13 BROE.Config
    • College Eights etc are now displayed properly. The sorting is done via the IComparable interface, which is very neat.
    • I have FINALLY implemented a graphical way of splitting duplicate events
    • I meant to clear my flat today. But this got in the way, and is now VERY good
    4/1/13 General Now I truly appreciate the benefits of being single - I have not written a line of code in the last month, and very little in the previous two...

    She's on nights for the next fortnight, so I should be able to get the February Head fully coded. It will NOT be the disaster that October was!

    4/1/13 General Still unable to sleep on my left side, though am driving now...
    30/11/12 General Still unable to drive, though starting to code again...
    30/10/12 General X Rays show I've shattered it into 5 pieces.
    28/10/12 General Hell that hurt. Have tripped over, and think I've broken my collarbone.
    14/10/12 October Head An unmitigated disaster, not helped by spending 2 hours in A&E. After that, even basic debugging was impossible.
    • LoadStatusDescriptions was case sensitive, leading to all sorts of problems.
    • Of all the code that DID work, Masters Handicap calculation was the most pleasing, since it had never been tested in anger. However, had I been fully compos mentis, I would have realised that not even Leon can do the course in 4:28 - that time was recorded by an Adaptive Sculler over 1000m. Similarly, a Primary Four did it in 4:39. So the handicaps were wrong. I have checked each, and this error has made no difference to the eventual outcome. The underlying issue has been fixed.
    • Start & Finish Timing programs were in the middle of the rewrite. Whilst they compiled, they failed to work.
    • For the first time ever, somebody else did live Finish Timing. Marvellous. The problem was that I was still required to sort out the problems. It would be far better if Start Timing at least could fix their own issues, for which they need a TimeID
    • The Start Timing code was the very first routine written, predating a proper networked system, and also predating any understanding of how it would actually be used! It worked very well (11 years or so), but requires admin intervention to fix issues. These might be:
      • Missing Number
      • Wrong Crew Number
      • Pressing RETURN by mistake for no reason at all
      • Late / early RETURN for a crew - easy if MR or JKSM are on the Start
    • Its getting there. I now need some people to try to break it...
    • Once Start is sorted, I can do the same to the Finish code...
    9/10/12 Race Options TODO UI to avoid certain race numbers. I have managed to find 455-499 to use in Div 7, but have no Number 467.
    9/10/12 Misc I organise the minutiae of Head Races fairly successfully. Yet forgot to order the bloody numbers.
    29/9/12 Database I am increasingly of the opinion that StatusList can be a temporary table; the only persistent information held in it is FinalsDay1 & FinalsDay2. These fields are a bodge, and need to be removed ASAP.

    It turns out that removal was quite easy, with a chunk of SQL in the RegattaDraw program replacing the old queries.

    • I can find no trace of [List - Racing Sequence (Regatta)] being used - it might have been a first attempt at this change.
    • [List - Finals Sequence for Specified Day] is now obsolete, though it was used, for some inexplicable reason, in the GetEntryCount routine
    • [List - Finals Sequence Reverse Order] appears to be obsolete - again, I can find no reference to it.
    • What's the point of [List - Last Entry Made by Contact]???
    29/9/12 Masters.Merge
    • The key used to be the first 3 characters of ResultsOrder. We have to append the 5th character as well (senior status identifier).
    • If you try to merge more than 3 age groups together, you are warned that this is not recommended.
    The new code has been tested, except from where Seniors have been moved to a Masters event on 'Accept Change'
    28/9/12 BROE.Configuration Base Length is ALWAYS 5 The reason is that Masters have a Senior Status as well as an age category, Juniors have A/B, and Seniors are either normal or Lightweight. The advantage of adding the H for heavyweight is that parsing becomes much simpler.
    Character 6 (Senior) A = Div A B = Div B C = Div C (seen once) D = Div D (Never seen) K = U23 E = Club M = Academic / College R = CRA (this is set by a manual database edit only, so may be applied after any other modifiers) V = Invitation P = Primary (can't conflict with Adaptive) X = Adaptive LTA Y = Adaptive TA Z = Adaptive AS Character 6 (Juniors) S = 2nd Boat T = 3rd Boat  U = 4th Boat (Never seen, but just in case) P = Primary Character 6-9 (Masters) Composition of Masters Handicap
    26/9/12 BROE.Configuration Its been painful. 3 nights spent just sorting out the ResultsOrder, let alone dealing with duplicates. However, I think it now deals with every combination that BROE has to offer - our Autumn Head has been configured for ALL the oddities!
    25/9/12 BROE.Configuration The changes to ResultsOrder mean that this now needs rewriting as a matter of priority.

    I have changed my mind about the sort order (character 5 is now the senior status), as I want Masters A Novice to be listed after Masters A. Originally planned as KMT0BCD, Masters B/C/D sculls will now be KMTB0BCD. To break this down, the first 3 characters denote sculls, mens, Masters. B denotes the youngest category in the handicap event. 0 means it is Elite, and BCD that B, C and D are included in the handicap.

    This will entail changes to the various masters programs.

    I have no idea how to deal with U23. Figured it out. The order is Elite Sculls, Elite Lightweight Sculls, Elite Lightweight U23 Sculls

    Oh hell. We now have FISA Junior 19

    23/9/12 Database
    • StatusList.ResultsOrder expanded to 8 characters.
    • Masters now use character 4 as their Senior status - currently either 0 (ELITE) or N (Novice).
    • Placeholder added to the sequence for Coxed Double sculls (a likely Explore Rowing event).
    • LMS' normal event (W.Mas.IM3.1X) is now possible, and the ResultsOrder for this can be generated.
    23/9/12 BROE.Results Head Statuses now properly sorted (changed [OARA2 - List EventIDs]).
    22/9/12 Head Race ALL of the Head Race client programs have now been converted to .NET
    21/9/12 ASP Page_AddModifiers & Page_RemoveModifiers added for regatta & draw ONLY. Ultimately, these will be implemented throughout.
    20/9/12 TODO The current list, in no particular order:
    • Need a way to easily modify the crews in an particular regatta event. If the resulting structure does not conform to a standard spider, mark it as such.
    • Support for Race 49A
    • Take up status Change from NEW entry on BROE (Oxford requirement)
    • Manual Entry (BROE.Import)
    • The BIG one - removal of CrewIDs & Outcomes from the Regatta table
    • Removal of FinalsSequenceDay1 and replacement by a proper table.
    • Senior status identifier added to ALL masters events (resultsorder field), not just the novices. This will mean the field has to be widened.
    • Commentary
    • Regatta Editor
    • BROE.Configuration is still dreadful, and needs a total rewrite
    • Better handling of BROE's Rejected flag - it should be treated separately, instead of in conjunction with Withdrawn
    • Disassociation of plates from the main event
    • Any class that inherits from Node should create Cells itself, rather than using separate properties
    • Overhaul of the database reports
    • SpiderHelper table. This records extra info for each status, such as the max length of crew name, and the decompressed spider.
    • New program - Regatta.Spiders This will generate RTF files for each status that has changed (ie has had results set) since the last time a printout was done. It will use the SpiderHelper table.
    • Remove the last few grids from RaceOptions
    Of these, I rather like the printing one. \page is critical
    20/9/12 Spider Engine Couple of changes have been necessary due to the change from GroupID to RaceTypeID.
    20/9/12 Database The next stage in the refactoring process is to convert RaceNo to RaceID. This gives no benefit in itself, but will allow me to standardise some of the logic, and ultimately add the ability to refer to a race as 49A...
    • [List - Runners & Riders] had a field for PlateExists. This does not appear to be used anywhere, so has been removed. It also had a Final field, which is pointless, since it used a single IIf statment on a field already present.
    • TODO - we have [Select - Race] AND [Select - Specified Race]. Why?
    • The following have been marked as obsolete:
      • [Timing - More than 10 mins late]
      • [Statistics - Timing]
      • [Statistics - Verdicts]
      • [Display - Regatta Information] as it duplicates [Display - Regatta Names]
      • [List - Repechage Events]
    • GroupID has been completely removed.
    • RegattaDraw.Groups has also been removed.
    • I may have made a mistake by removing EventNumbers.GroupID before inserting its replacement
    19/9/12 Merge Statuses Following a query from the Isis Sculls, this will now create Masters NOVICE handicapped events.
    19/9/12 Database Another round of SQL Server migration to identify database issues:
    • Crews.CrewID is the primary key, yet was nullable. Same for BoatClasses.BoatClassID. Checksums.EntryID ChequeDetails.PaymentID ClubAreas.ClubAreaID Club.ClubID etc etc etc
    • Boolean fields in Crews & Entries had no default value. There may be other instances in other tables.
    • The tool has been significantly improved - it now copes with UNION queries, and can therefore identify superfluous ORDER BY clauses in them.
    • I'm going to need MANY passes through this, fixing as much as I can each time.
    11/9/12 BROE.Results Another long overdue change - sort the status list, and the crews within each.
    9/9/12 ASP Printing menu added to regattadraw. The page has also been renamed as regatta - long overdue!
    7/9/12 Database Regatta.GroupID has been removed - all queries that reference it have been modified to use RaceTypeID. The database documentation utility I wrote years ago is invaluable when refactoring!
    7/9/12 Database [Regatta - Runners & Riders] report has been removed, as the HTML is significantly better.
    3/9/12 PHP Google Analytics has been added
    3/9/12 VB6 MySQL export code for Master's Handicaps has been added to ExportRegatta, and the database & PHP modified to suit.
    29/8/12 BROE Import OARAConvertDivisions needs some work - if we are running a head race, but the Draw Format (regatta specific) is set to divisional, it will not transfer the divisons as the Division BROE names cannot be set.
    19/8/12 PHP apple-touch-icon support added. This is different for each host club...
    19/8/12 ASP If no Masters Handicaps have been defined, the column is not shown on RegattaDraw.asp
    18/8/12 BROE Results This now copes with Status Changes (ARACrewID = 0).
    17/8/12 ASP If we are scrolling, a new StyleSheet is used, magnifying the text, and padding the table cells.
    17/8/12 Race Manager This now calls ForceWinsDueToScratching on startup
    17/8/12 Race Manager The Status Change code now checks the following:
    • The crews have the same boat type - for example, both are Coxed Fours.
    • Open Crews cannot be moved to a Women's event, etc
    • Crews can only be moved UP a status, not down. A change from IM2.1X to IM3.1X is obviously not allowed!
    16/8/12 General I have FINALLY found why the TaskDialog sometimes refuses to be shown, and locks the application - you HAVE to set the dialog's Owner when showing it...
    16/8/12 Race Manager StatusChangeTakenUp would not have worked in a month of Sundays. One of the biggest problems is that the code predates the RegattaNames table, which is there for speed. It also predates the m_dCrewInfo dictionary, which is again there for speed. It now works a treat! The only thing left to do is to ensure that the crews are of the same Boat Type - otherwise, BROE will refuse to accept the results
    16/8/12 Database [Select - Status Change] now takes DayID as a parameter in order to cope with Oxford Royal...
    16/8/12 MySQL USE 'database' statement added.
    15/8/12 TODO The AmalgamateFiles code is pretty poor. It is currently written as a shared module, which does not help - it really needs to be done as a class within Regatta.Libraries that throws exceptions as appropriate.
    15/8/12 Regatta Draw When a Status change slot is removed, it was (unhelpfully) removing the slot from BOTH days. Very old code, rarely used. I have never seen anyone add status changes to BOTH days of a Regatta. Either way, this has been fixed.
    15/8/12 Masters.Handicaps Confusingly, the grid was showing entries for BOTH days. Fixed.
    15/8/12 Race Options Administrator Details are no longer used, so have been removed.
    15/8/12 TODO
    • Log Changes to Event Stage
    • Sort out the RegattaNames table - we could do with having the calculated Crew Name in there.
    • if we set eventstage to closed, we should still WITHDRAW crews
    15/8/12 MySQL Generation The VB6 code to generate MySQL statements for a regatta has been greatly simplified. This also allows the underlying query (which was creaking at the seams, with many LEFT JOINs) to be simplified down to 3 tables, linked with INNER JOINs. The .NET code has been altered as well, but has not yet been tested.
    14/8/12 Masters.Merge This program was creating '... Single Sculls', where elsewhere in the database it is just 'Sculls' for brevity.
    14/8/12 Masters.Merge This program was only using a CSV file for Day 1, and BROE.Import was not capable of merging files. Both problems resolved.
    12/8/12 Entry Manager The odd functionality required for Kingston, whereby crews scratching before the draw is made (ie in the short window between closing entries and doing the Draw) are withdrawn, and hence don't end up in the Draw, is coded as yet another option. The database key is 'EVENT_WITHDRAW_SCRATCHED'.
    11/8/12 Database [Statistics - Statuses entered] was not performing as expected - grouping by DayID was not a good idea.
    11/8/12 Database [List - Composition of Specified Crew (Current)] & [List - Composition of Specified Crew (Baseline)] modified to show only doubling up matching DayID. If a competitor was doubling on Saturday, but NOT Sunday, and you viewed Sunday's crew list, that person would be listed twice
    1/8/12 Race Manager Clicking on an IP Address now opens a VNC window to that machine.
    18/7/12 ASP TG of Kingston has had a very good idea. The substitutions pages is useful, but it would be FAR better if it indicated the NUMBER of subs made to each crew.
    15/7/12 Regatta Control This is now looking rather good. All the original functionality has been implemented, and the various dialogs moved into Regatta.Libraries for re-use.
    12/7/12 General I have now written a fully functional SNTP client.
    4/7/12 PHP / MySQL A 2 day regatta can now have differently named days.
    4/7/12 Database Bug found in [List - Statuses in ReDraw] - it was not day specific. So if a status appears on both days, then the InDraw field was the sum of both. This caused problems for MySQL generation, and will probably have other unexpected consequences.
    29/6/12 VB Sockets Booleans as explicitly cast to Longs for compatibility with .NET
    29/6/12 Masters TODO Neither program is multiple day capable.
    29/6/12 Database [Statistics - Time Only subquery (Regatta)] wasn't using DayID properly in the Type 2 statements. This caused a formatting error where a status was being run on both days. Fixed.
    27/6/12 Spiders JW has come up trumps, and provided the missing 3 lane spiders for 16-27 entries. 17 & 23 are different to what I had before
    20/6/12 Installation I am now installing the .NET versions of Sponsorship & Trophies, as they are SIGNIFICANTLY better than their predecessors.
    16/6/12 .NET All programs have now been converted, apart from the Regatta Draw.
    • Race Options - OK
    • BROE Import - OK
    • BROE Results - OK
    • BROE Configuration - dreadful, needing total rewrite
    • Head Start
    • Head Finish
    • Head Timing
    • Head Control
    • Regatta Start
    • Regatta Finish
    • Regatta Timing
    • Regatta Control
    • Regatta Terminal
    • Regatta Commentary
    • Regatta Editor - conversion incomplete
    • Trophies - OK
    • Sponsorship - OK
    • Masters Merge - OK
    • Masters Handicaps - OK
    • Race Manager - OK, but client properties not implemented
    • Proxy - OK
    16/6/12 Libraries Regatta.Libraries now has all the structures for the RaceDetails & OnCourse controls written and tested. The Finish program still needs significant work - a task that will now be MUCH simpler. Hopefully.
    16/6/12 Options Bug in Colour selection found & fixed.
    16/6/12 BROE Import For a divisional regatta, the grids now show the division's abbreviation instead of the division number.
    14/6/12 Sockets The old library used an 'ExpectsReply' field. This has been replaced with an enumerated member, which allows asynchronous replies
    10/6/12 Control .NET version written, but not yet fully tested.
    9/6/12 Finish All change. The way the two controls interacted was rubbish - typical of badly written code ported to another language!
    8/6/12 Finish If the entered verdict contains an exclamation mark (!) then take it as is...
    8/6/12 Finish The logic made sense to me when I wrote it. But nobody has ever really grasped what's going on. Time for yet another rewrite, I think.
    7/6/12 Sockets And I hate multithreading
    7/6/12 Sockets I love inheritance. The Message class now derives from List(Of String)
    7/6/12 Sockets The presence of an extra item at the end of a message has always been an issue. Now found & fixed in .NET
    31/5/12 .NET Now that I'm exclusively developing in this language, I might as well get the base classes properly defined. Regatta.Libraries has been redesigned, with somewhat better use of Namespaces.
    30/5/12 General The programs used on Race Day were by and large written in a hurry 10 years ago. Since then, I've never really touched them, and am now finding lots of partially implemented functionality. They now work with both the old VB6 server AND the new .NET one. The programs are being versioned as 3.12.2
    30/5/12 Regatta Server The buttons on Regatta Control for Form Checked & Form Extracted currently do nothing in the VB6 implementation. This has been identified and fixed in .NET serverfinish doesn't handle emServer_Stations_Request either
    30/5/12 Race Manager Here we go - am starting the BIG project - conversion of Race Manager, its associated DLL, the Proxy AND Sockets. This is a truly massive task. I'm leaving MPI in for the time being, as conversion of both ends of the messaging protocol simultaneously would be a nightmare. Ultimately this will be changed to MSMQ.
    29/5/12 Trophies Fully functional .NET build
    29/5/12 Database The next challenge is to remove GroupID. For Sponsorship & Trophies, this will be easy; for the Regatta table it will not.
    29/5/12 Database HostClubID field added to the Sponsors & Trophies tables, and amended the queries to match. I can imagine that having my default list is a nuisance for other regattas! Also modified [List - Sponsorship for ALL statuses subquery] so that it lists statuses BEFORE the draw is done - we can therefore allocate Sponsors to events as soon as entries are received.
    29/5/12 Database Various logging queries still referred to OARA. These have been changed to BROE.
    28/5/12 ASPX Bored witless at work, I have tried my hand at ASPX development. The pages CAN use the Regatta.Libraries assembly, which means more code can be shared. Ideally, entry import would be delegated to a separate assembly as well...
    20/5/12 Installation EVERYBODY forgets to run the Permissions program. So the installation program now does this BEFORE the reboot dialog is shown. This should help a lot.
    18/5/12 Sponsorship This has been totally rewritten in .NET - I'm actually VERY pleased with the new functionality. You select the Sponsors who are Active (ie the ones who have given you money), and can then asign them to a status by clicking on the appropriate column & selecting them from a popup menu. The really nice bit is that counts per boat type are displayed on the left, which is SO useful... Its taken about a day to write. The first version used tags throughout - it worked, though Option Strict posed a few problems. Version 2 extends my knowledge of VB.NET inheritance, implementing the same functionality, but FAR better.
    18/5/12 Timers This DLL is not used much. However, its original implementation contained a critical bug that would cause program lockup (interminable loop) from time to time. This was caused by the way that indicies were allocated. Using ObjToPtr fixes the bug.
    18/5/12 Options DotNetBar really helps. It is a very powerful framework, with replacements for ALL standard controls, and loads of extras. I've barely scratched the surface of its features, but already have a significantly slicker UI.
    18/5/12 General With my laptop becmoning increasingly unreliable, I have purchased an OCZ Agility 3 SSD. After aligning the partition with their Linux tools, I have installed XP successfully
    8/5/12 Database [OARA2 - List Overpointed Crews] modified so it does not show scratched crews.
    6/5/12 Misc Assorted issues found by Shrewsbury:
    • They added Status Change slots to the Sunday, then found they couldn't do the Draw - it complained about different divisions. This has been fixed for both normal AND divisional competitions.
    • The UI for groups was still in the regatta draw program. This has been removed.
    • The BROE Configuration program failed to deal with splitting J15B.1X into 2 groups. I reckon that this wretched program is due a full rewrite - tinkering has not resolved its fundamental problems.
    6/5/12 PHP spiders now show winners of races BEFORE race day - if crews scratch, its useful for their opposition to be able to see this. The crew that has scratched is also shown as struck out using a span.
    6/5/12 PHP Bug found in regatta to do with KAR's ListByPosition option. Its much simpler to use a flag instead of an && clause each time.
    5/5/12 Spider Engine Event Numbers are ALWAYS generated - the new Options program doesn't have a way to set the option.
    4/5/12 MySQL Export Code for Outcomes has been added to the VB6 implementation. .NET code to follow. Code for Variant has yet to be implemented.
    4/5/12 Regatta Draw Got it. At long last I can see why some races violate the minimum turnaround time. It is related to octuple gaps, which don't increment properly. Adding the ability to change finals pitch highlights this, and its trivial to fix. Have not worked through the logic yet, but extending the time of a race is the answer...
    3/5/12 Regatta Draw
    • Added the ability to have finals on a different pitch. Also made the octuple gap of a configurable length.
    • Improved the handling of saved draw files, including a checksum to determine whether or not the file is valid.
    2/5/12 Entry Manager If we are importing payments from BROE, we MUST take notice of the refunded flag...
    2/5/12 Installation A general tidy up has been done, ensuring that files are not erroneously marked as shared, and that all application specific files (apart from databases and CSV files) are uninstalled.
    30/4/12 Database OARAContacts.EmailAddress expanded to 255 characters as one entry at Shrewsbury put several alternates in, making it longer than the defined field size of 50 characters.
    25/4/12 .NET I have evaluated many controls, and have eventually purchased DotNetBar form DevComponents. This assembly provides a multi column treeview, which is precisely what I need. Creation of Masters Handicapped events is now done in pure VB.NET Not entirely sure I like the default skin of this control, but that's something to do later. For the time being, it will do - I am focussing on code.
    20/4/12 .NET Masters Handicaps has now been converted and MASSIVELY improved. Changes to the Rules of Racing mean that Standard Times for Heads are calculated from the fastest time of the day in the appropriate boat class. Trivial to calculate, but it means that handicaps cannot be calculated until the END of racing. This makes life VERY difficult for me
    17/4/12 Sockets The overlap with my day job continues! We've found a bug in the Socket library, which results in a handle leak. Given that this code was ported from the Regatta system, it existed in the original code as well!
    11/4/12 ASP New page (oara_unpaid) added, allowing us to see entries that have been marked as paid in the database, but where BROE still reckons they haven't. Its useful for crews to be able to see when their payment has been received. Entry Manager opens this page if necessary.
    11/4/12 PHP mysql_set_charset ('UTF8') added to framework to allow UTF8 characters (such as Höök) to be displayed correctly. The collation on the entries table has been changed, though I doubt that this is absolutely necessary. Will check once results are set.
    3/4/12 Database [List - Race Number of Crew subquery] could marked as obsolete, I think.
    3/4/12 ASP Couple of minor issues on the entry statistics page found and fixed - column headings for a 2 day event were not always right. Club Totals (for Regions and Club Type) are not simply a sum of the 2 days, as most clubs enter both. The logic has been rewritten and is now correct.
    1/4/12 BROE I have spent an hour so so bug hunting in my code, only to find that the export file now includes the Composite Code, which is being incorrectly calculated (XPR/ROB/ROB or STA/IEL/IEL). I have changed [OARA2 - Transfer Entries] to cope with this, as the database handles composite club order itself.
    29/3/12 Database Somebody else's data is always useful - have not seen a regatta with Masters entries on both days before - the masters ASP page was screwed up, because the counts of entries per status was for the whole regatta, not day specific. This has been fixed.
    24/3/12 Regatta Draw Bloody thing is getting stuck. To be fair, I am using Star Regatta 2011, which had some truly horrific doubling issues.
    24/3/12 RegattaDraw I'm back to the .NET version of this. Have figured out why races were doubling with themselves - now I need to get doubling propagated up the tree.
    21/3/12 PHP Couple of issues in the code to switch between days found & fixed.
    21/3/12 Finish Day1_RecordTimes is used for PHP code - why don't we ALSO use it for Regatta Finish? This entails a new message
    19/3/12 Review I go through this file from time to time, and have found a PHP issue dating from 29/4/10, which is STILL not fixed ;( It turns out that the SELECT clause must be DISTINCT.

    http://www.rowstats.com/regatta.php?id=115&f=1 is also giving issues. I seem to remember, though, that W.IM1.1X was extensively modified post draw... IM2.8+ is more of a problem, and will need to be fixed. Though on inestigation, it looks as if multiple scratchings screwed this up as well.

    19/3/12 .NET Miscellaneous notes:
    • Currency Format is "C2"
    • Case insensitive Dictionaries ARE possible - the syntax for the constructor is perverse...
    • None of this is difficult - its just a question of getting used to the syntax.
    17/3/12 OARA Events This is being converted to .NET - slowly, as the first 2 attempts were deleted due to poor design.
    • A total rewrite has been required for this incredibly badly written program.
    • Grids should be used for display ONLY, not as the fundamental data structure. Disassociating the logic from the grid simplifies a lot of routines.
    • All references to COM objects have been removed.
    • Unstructured error handling removed.
    22/2/12 Regatta Draw
    • Only now am I beginning to realise how horrific the original code is!
    • Richard Moseley's idea of having finals on a different pitch is actually rather easy to implement (am coding in .NET). Octuple gaps are also easy, without having to resort to adding non-existent gaps.
    • The TreeView, and its colours, has gone
    • Groups & Plate events not yet supported
    • The Schemas have been removed. Useful though they were, they were utterly incomprehensible to anyone apart from me.
    • This has now occupied more than 75% of the last 72 hours. Go figure.
    • Massive improvements in reporting!
    • Got to get clash resolution working
    17/2/12 .NET Well, the Regatta Draw program compiles, but is VERY slow. Unusable, in fact. The time has come, I believe, to rewrite it.

    What a difference it makes to actually DESIGN the object model. The Draw is composed of Heats, which contain Outcomes, and Crews. Each Crew is composed of an Entry & a Club

    11/2/12 .NET Conversion of the Regatta Draw program is going to be VERY difficult. The first stage has been conversion of the Spiders. In order to avoid cut and paste errors, The SpiderIntegrity program has been modified to generate vb files in addition to php. It wouldn't be difficult to make it output C# as well.
    9/2/12 Entry Manager On importing entries from BROE, the EventStage is read from the database. Because we MIGHT have changed it in another program...
    7/2/12 ASP Contacts page did not cope with 2 clubs (Eastern Region Composite) having the same name. Trivial, but annoying, so found & fixed.
    5/2/12 Database Regatta.Twitter has been removed, as a separate table is significantly more flexible.
    5/2/12 ASP The PHP code for twitter has been ported to ASP, and the logic slightly improved.
    3/2/12 ASP twitter.asp is a huge improvement on the previous version in PHP, as it allows me to use the framework that everything else works off, and without having to remember to create a DSN or install the right ODBC drivers. I have written and tested this using October 2011's data, so it will be used in anger next weekend.
    2/2/12 Head Editor Is being converted to .NET, a process that is highlighting how badly the fixed divisions functionality was inserted. It worked, but that's the only good thing about it. For the time being its coming out, as Kingston declined to use my software this year. Bit annoyed by this, as MANY user interface and functionality changes were put in for their benefit.
    2/2/12 Proxy emProxy_ConnectionEstablished has been renumbered, as it is useful to have 0 as emNoReply
    1/2/12 .NET The tRaceOptions structure used by all of the server side programs was implemented with shared modules and global variables, neither of which sits very well with a .NET application.

    Not so any more - we now have an EventData class inside the Regatta.Libraries namespace.

    • Two constructors have been written so far; ultimately, we should be able to initialise the class with just a RaceID (aspx maybe?)
    1/2/12 Entry Manager VB6 development has now been stopped. Changes to the database queries may now prevent it from working.
    31/1/12 EntryManager Tony Gordon's idea for a composite club ID being ordered by number of competitors has been coded - we have an Eastern Region Womens eight, which contains 6 clubs.
    30/1/12 .NET Interesting - column headers DO allow sorting. And you can also do custom sorting, so entries made by a club can be sorted by ResultsOrder instead of StatusID.
    30/1/12 ASP If correcting the age of a veteran crew, remove the record from the Masters table. NB: will need to check what effect this has when combining statuses for handicap purposes.
    26/1/12 .NET The OARA Results program has been converted to .NET - pretty painless, actually! The Head Race functionality has been tested already, since Star have not set their results yet.
    15/1/12 Masters Slight problem found when dealing with an entry that has been changed from Senior to Masters - it cannot be added to a handicap... This has been fixed.
    14/1/12 .NET The inherited DataGridView controls in the Entry Manager are unnecessary as I have found how to use add rows & configure cells individually.
    7/1/12 .NET The pain has been worth it. Entry Manager & Race Options are now written in managed code, and require just 4 DLLs (ADODB, VBRun, my Regatta DLL & the Layout Manager I purchased last month). NO registration is required.

    The plan now is to convert all of the utility programs (such as masters handicapping)

    5/12/12 .NET I have been working steadily on this for several weeks. The big problem has been the fact that the custom treeview controls don't work very well under Interop, so they have to be converted to grids. This causes pain beyond belief, but, as I now have full control over formatting, makes for a rather neat UI.
    • Entry Manager is now written entirely in managed code, and can run WITHOUT installing anything (we've tested on the new KAR laptop).
    • Race Options is getting there. When I converted it, a lot of code was commented out - am now checking that EVERY parameter is settable.
    • edfSeparateCompetitions renamed to edfDivisional
    • There are many redundant keys in the EventData table. These have been identified and stripped out.
    • The final problem is that EntryManager uses the EventData Hashtable directly, instead of the structure built from it.
    • There are also a couple of keys that have never had any means of being set. Composite format (.NET functionality ONLY) has been added, though am still not sure where to put the Octuple Gaps...
    • Sadly, the treeview control is perfect for displaying entry fees... Its actually very hard to do in a DataGridView
    13/11/11 MySQL Entries.StatusID has been extended to 16 characters to cope with Mx.Mas.D.IM2.4X That's right - Star really ARE running this! The extra character is to allow for coxed events, which I'm sure they'll do....
    13/11/11 .NET I love overloading - makes it very easy to add functionality in stages. And, joy of joys, you can get the value of a grid's cell by the row number and the column NAME.
    12/11/11 .NET Suspecting the Interop MSHFlexGrid, I have removed it, and the program now runs happily in a Virtual Machine. I have added a couple of assemblies to the installation program - given that I can now run this, VB6 development must cease.
    11/11/11 Database ALL done. And it works a treat. I've been meaning to do add this functionality for years...
    10/11/11 Database The rationalisation of Addresses continues. AddressTypeID has been implemented, so we can now safely remove the 3 obsolete fields (ClubAddress, ClubID and ContactID) from the Adresses table. I'm also working on the oara_create_contacts ASP page - if a BROE admin address exists, it will be used instead of the club address. No logic yet to create this, and I've had too much wine to code it now. Tomorrow's job...
    19/10/11 Race Options Setting the OARA download folder to c:\RaceManager\OARA is no longer possible.
    19/10/11 Profiles Its now possible to create a profile under HKEY_CURRENT_USER only.
    19/10/11 KAR AARGH! They're testing the bloody regatta already. And, with no copy of Access installed, need to create a profile by hand. Fat chance. So I've done it myself, and documented the process - its really rather laborious.
    14/10/11 Options
    • The browser used by Entry Manager can now be specified.
    • Every tab's contents have been converted to a control. This doesn't add any functionality, but improves code readability, and allows some redundant code to be identified and removed.
    11/10/11 General Best day of the year - my manager has resigned. And isn't being required to work his notice - everybody wants shot of him as soon as possible.
    6/10/11 PHP The Draw pages had not been updated to use the new short querystrings - think I've fixed them all now... More work needs to be done to use the new EventData table throughout (drawbyclub & drawbystatus), but at least it works now.
    6/10/11 General MANY thanks to LMS, who becomes the first person from this club who's interested enough to test functionality before Race Day.
    6/10/11 Type Library Bugger. Incorrect enum definition means I have had to rebuild the server DLL and HeadStart. Bugger
    6/10/11 Entry Manager Added the last bit of logic for adding late entries to the database - actually adding them to the Crews table...
    5/10/11 PHP draw.php has has been radically overhauled, using the EventData table as elsewhere. Have also made it, and drawbyclub, fully W3C compliant.
    6/9/7 Entry Manager Instead of viewing a web browser form, its better to use a real browser. Especially as some machines appear to block the display of this extra form...
    6/9/7 ASP After altering statuses, the 'Viable Events' page is broken. To overcome this, we need to regenerate the [Statistics_ClubEntries] table when all status changes have been accepted...
    1/9/7 Database Addresses.ClubAddress has finally been removed, with a new table (AddressTypes) added to cover this. The reason is that I want to use BROE admin addresses by default, except if a known address is in use. The idea is to use email address to decide which to use, though I'll have to think about this when fully sober.
    31/8/11 ASP The inline styles have now been completely removed, with the resulting code being significantly cleaner and so much easier to read. The CSS has become much more complicated, but is logically laid out, with the more complex styles arranged in descending order of precedence.
    24/8/11 ASP The CSS I wrote in February (was it really that long ago?) isn't actually that good. I had to use inline styles to hide certain borders, which makes for slow, complex code.

    Fortunately, JQuery makes this MUCH simpler. $('.hilight tr:even').not('.rm_table_break').addClass('alt') Beautifully simple

    16/8/11 MySQL results.ARAID & results.ShortName have been dropped - never used, and always NULL. There was even a comment in the source code that this needed to be done! divisionlist & stations tables have been dropped.
    28/7/11 MySQL Rather than running a query that finds MAX(ProgressionSystemID), we can store the information in the EventData table
    28/7/11 MySQL Version 5.2 has deprecated [CREATE TABLE ... TYPE=MyISAM]. Instead, it should be [CREATE TABLE ... ENGINE=MyISAM]. The documentation for 5.0 (as used by our ISP) states 'TYPE is a synonym, but ENGINE is the preferred option name.'
    27/7/11 PHP The only Host Club specific code left is in index.php There's no solution to this, really, and I'm not bothered. What's FAR more important is that host specific code dotted around multiple files has finally been removed.
    27/7/11 PHP On analysis, the Eventindex in now only used (in conjunction with HostClub) to set the stylesheet. A far better option would be put this in the EventData table as well...
    Sorting out the footer is more tricky. Given that I'm trying to remove any host specific code, I'm prepared to forego the inclsion of BRC's footer on every page for the time being, and add the relevant rows at a later date. The whole point of this is to improve the code.
    27/7/11 PHP Conversion to the new EventData table is complete. All hardcoded values have been replaced with constants, making the code significantly easier to read and hopefully less prone to errors
    21/7/11 General Tony's suggested creating some form of a dashboard application
    21/7/11 MySQL It turns out that conversion wasn't as hard as I had expected. OK, the index page requires an extra query, but the other pages can be simplified, with a few redundant queries going. I've also decided to remove the [stations] table; currently, if a regatta modifies its station names, this will have no effect in PHP. And the EventIndex is critical here.
    19/7/11 Regatta Control It needs a lot of work, especially in the Socket Library, but this is also running in .NET And, most importantly, connecting to the server.
    19/7/11 MySQL I'm beginning to realise that the current [races] table is insufficient, and should be converted to a portmanteau like the EventData table in Access. This is going to be rather tricky...
    19/7/11 General A truly lousy day at work. A formal complaint (requested by the MD) will go in tomorrow - this may finally be the end of the bastard.
    18/7/11 ASP The template system used to generate the RegattaDraw page is very useful. Not part of the original design, it was poorly written to start with and then had 3 lane code scarfed in. Then lane order reversal was added. The resulting code is far too complex, unnecessarily slow
    17/7/11 General During a mutual break at the National Championships, Tony & I went over the system. Once he left to sort radios out, I had a good play...
    • spiders.asp # to be replaced by ChrW(9532) - fixed
    • regatta.php KAR lanes missing - fixed. This was because Eventindex in the MySQL database was set to 0, not 1 as expected.
    • Display TimeTaken - rather surprisingly, this ought to be Day specific. With hindsight, this is obvious, as Kingston Amateur uses stakeboats, while Kingston Borough is a free start...
    • kar.css crest needs to be static, like bed.css
    • regatta.php contains <hr SIZE='2'>
    • ctlRaceDetails would be improved by showing Lane names instead of Crew 1, Crew 2 etc.
    • Verdicts: if all numeric (or /) then assume lengths.
    • regattacompleted.asp does not show weekend at all
    • victor.asp needs to show 'Sat' instead of 1 etc.
    • menus - races due from T time for N minutes does nothing - remove or fix
    • regattadraw.asp should show 3 lane results
    • regatta.php - alter so that instead of showing lane order with (pos), show in position order. This to be an option, specified in the regatta table and hence day specific.
    • RegattaControl. add buttons for races gone & togo to the top buttons. It would be nice if these were userconfigurable.
    • RegattaControl. view full stats button does not work
    • entry manger - ara form OK and received to be visible only if BROE not used exclusively. make this a new option (ie for Richard Moseley)
    • entry manager: if draw published or later, any changes to composites should update the regattanames table
    • finish - should accept nro and ro
    • finish - if you don't enter a time, it should display NTT
    • composite club naming. new option of majority to be added. on equality, go alphabetical.
    • simple race doubling page. red is too close, yellow on the margin.
    • lets go wityh the origianal idera of serialising the doubling.
    • need AJAX based checkin system
    9/7/11 Kingston Seem happy. But, having bought a brand new laptop on which to run the regatta, the person entrusted with its safe keeping managed to leave it at home. Numpty.
    9/7/11 Misc Couple of issues have come up:
    • Got to deal with blank line in masters.csv If edited manually, this is an easy mistake to make.
    • Need and extra web page to notify the user of entries within a single status in 2 different divisions. Ths can happen EITHER when making a manual entry, Or when bumping up existing crews on OARA. KAR 2011 managed to do both...
    • MySQL export doesn't seem to use the truncated crew names held in the RegattaNames table. [Export - MySQL Regatta Results] will need to be modified, though the changes in fact make it significantly simpler.
    • Sponsor names 'In memory of' don't appear to work.
    • StandardTimes table needs a RegattaIndex. Could also do with separate columns for conditions - ie Normal, Strong Head, Strong tail...
    • BROE needs a way
    • Handicaps code din't quite work as advertised, as the RegattaNames table is not updated as crews win
    30/6/11 Database Now that the TimeOnly page works for regattas, its time to extend its functionality - different limits for Seniors, Juniors & Masters
    30/6/11 Entry Manager Subtle bug in FindContact found & fixed. Click on a contact in the payments grid. If this person is not the first listed, AND they've entered a composite crew AND they entered the composite first, it tries to select an invalid row. I found this error by chance whilst in .NET - its been there for years, I reckon...
    28/6/11 Database I have been trying (all evening) to get the timeonly ASP page to work with a regatta. I'm now convinced that the complexity of the SQL is beyond the Jet Engine, and that I will have to use intermediate tables to accomplish this.
    26/6/11 Race Options Converting this to .NET was never going to be easy, as there are SO many controls. I've encapsulated all controls in a tab into a separate control; not strictly speaking necessary for the likes of Admin, Lanes etc, but it does make the code more manageable & allows me to validate one section of code at a time. ctlLanes is complete and tested - the others are a bit more tricky.
    23/6/11 Entry Manager On second thoughts, why bother to maintain VB6? I am getting used to .NET's syntax, and the only way to improve my skills will be to code in it regularly. Some of the new functionality makes life SO much easier - being able to embed a combo box in a menu is rather neat, and allows a convenient way to switch profiles WITHOUT closing the EntryManager. True, this could be done in VB6, but having it in the top level menu makes the functionality immediately obvious. And it saves me a HUGE amount of time, as I'm currently switching between Bedford & Kingston. Earlier in the month it was worse, as Ironbridge & Star were also open for entries...
    23/6/11 Entry Manager For the time being I will be maintaining both VB6 & VB.NET - the former is being updated as I find obsolete/useless code when converting to .NET
    22/6/11 Database [OARA2 - List Emergency Contact Details for New Entries] now shows composites AFTER normal clubs. This should make the process slightly more intuitive???
    22/6/11 Database I currently generate a composite club code from all the clubs entered, with the submitting club listed first. But what's ACTUALLY important is the clubs represented in a composite when entries close. Let's suppose that we have a composite entry from BED/STA/SNE, which is then paid for. A payment is recorded against this clubID. The SNE oarsman is then substituted out, and entries are closed. Under my current database logic, this poses a problem, as there is no payment from the current club. The solution may be to drop the idea that payments belong to a Contact AND Club, OR to record the submitting ClubID
    22/6/11 Datbase [OARA2 - Transfer Entries] uses the composite code, if available. WHY? I suspect that this predates the routines to generate composite club IDs from the crew lists...
    22/6/11 .NET Its a bit slower to import than the VB6 code, but that's probably because scrrun is still in place.
    • Its no longer an MDI application. There are several reasons for this - firstly, the IE form requests the user to close it - with 2 close icons, one above the other, people often close the main application by mistake. Also, merging of menus & form icons is very messy
    • Duh. I spend ages converting CreateCompositeClubIDs to a full .NET implementation (ie no Scripting.Dicitionary) only to find that its never called... OARAIdentifyComposites is the routine that is used, but doesn't seem to be nearly as good
    17/6/11 .NET Given that I have completely rewritten the VB6 data binding, I have made another attempt to convert the project. And it worked! OK, lots of code changes have been needed, and getting rid of scrrun.dll will be exceptionalyl painful, but its looking good so far...
    12/6/11 Database [List - Competitors racing too many times] - must join [List - Rowers Doubling Up].DayID to Entries.DayiD
    12/6/11 ASP Wonderful thing, somebody else's data. Squad crews don't enter Bedford; they do enter the Met. 9 clubs in a boat causes a 'Application uses a value of the wrong type for the current operation.' error on several pages - the reason being is that the sClubID parameter is often limited to 20 characters...
    10/6/11 Regatta Draw Several issues have come up:
    • MaxLevelOfHeat didn't work, as the schemas have changed since it was written. This has now been fixed.
    • Tabbed Output file has been written and approved by JW. So that's finally done.
    • 8 lane racing is now possible
    • Ouch. ReplaceEntryNumbers fails. The reason? The regatta I'm currently working on has over 1000 entries (really), and the software assumes that all entry numberss are 3 digits long. This might be a right bastard to sort out.
    • It wasn't too bad. I now have a working draw that can deal with up to 9999 entries. However, it is still limited to 999 races & I have no plans to change this!
    • As well as showing the closest clash, its good to show the best achieved so far
    • I deduct 5 minutes for cox doubling. This is fine, as I generally run a turnaround time of about 40 minutes. The regatta I am dealing with specifies longer (I can get it to 75 minutes, but no more) as the course is longer, and its a top quality (Henley Qualifying) Regatta. But they apparently make cox & boat sharing SIGNIFICANTLY shorter - back to the 35 minutes that I use.
    10/6/11 Spiders The HTML files output by the Spider Integrity program are now written in UTF8 so that they render correctly. And they also are now WC compliant.
    10/6/11 General My Unicode controls would make all of this look much better
    10/6/11 Entry Manager DeleteDoubling needs to completely delete manually added records. TODO
    10/6/11 General Its 1:30 AM Thats 2 nights in a row where I've been coding until the early hours...
    10/6/11 Regatta Draw Bug found in ShortenCrewNames - it was failing to cope with Bedford Regatta's oddity of J16.2nd.8+ I didn't see this during the draw, as I elected then to shorten eights & fours ONLY, but now have added few small boats for testing...
    10/6/11 General OK - I have no way of displaying it yet, but I now have 7 lane racing up & running. Its taken 5 hours of solid coding, but that was cut & paste & test, rather than any actual development. I'm actually rather pleased, as it proves that the framework is a flexible as I intended it to be...
    9/6/11 General Just when I thought I was getting on top of this database, I get a query. From a 7 lane regatta. Let's see how flexible the code REALLY is...
    • OARA Config needs trivial changes - merely adding a single lane.
    • OARA Events also needs a trivial change - adding a single item to a combo box.
    • [Display - Regatta All Crews] needs extending, as does Control - Generate RegattaNames subquery. To be perfectly honest though, these would be FAR better done in code rather than some truly horiffically ugly SQL...
    9/6/11 Entry Manager I remember reading that data binding in VB6 is the spawn of the Devil. Vastly inefficient, with SO much potential to frustrate. The first stab to improve this was in August 2005, with a rewrite in January 2006. With hindsight, the ADODC control has caused far more hassle than it was worth, and I should have totally abandoned data binding at that point and done it properly - i.e. manually.

    Hindsight is great. Its far simpler to execute a query each time we want to move to a new record, albeit a fraction of a second slower. Store the recordset's contents in a TYPE variable, and we have a much simpler program. Its taken 3 hours, and looks good so far. OK, there's no way to add an entry manually.

    • With the exception of Crew Name, all bound text boxes can be converted to labels.
    • We have a smaller memory footprint
    • As the application itself now updates the controls, we can easily display Day 1 as 'Sat' and Division 1 as 'AM' if appropriate.
    • m_fCodeCall & m_fAboutToFind are now (thankfully) redundant
    • Many redundant declarations have ben removed
    • chkDeleted removed - it was only written for the chaos of Kingston Regatta, pre-OARA, where all entries were input on a single day, and the same entry could be added twice by mistake...
    • It turns out that all of the ADODC controls on frmEntries can be removed. A couple were totally redundant!
    • The UI for record navigation looks so much better
    • Nasty bug to track down - as SetupRecordsetADODC is no longer called, we HAVE to call g_aConnection.CursorLocation = adUseClient in order for any grids to be able to load data. In pracice though, its probably better to leave this alone, as a client side cursor is expensive - just set it for each recordset that needs it.
    31/5/11 ASP spiders.asp modified to show a divisional competition in Event number order
    29/5/11 Regatta Draw This is why I test scenarios. The new code for shortening crew names is good, but can remove important information - Masters' status when they're in a handicap.
    29/5/11 EntryManager All of the code for fixed divisions has been removed, as OARA now handles this itself. And it works a treat.
    29/5/11 Hexham Oops. Forgot about this one!
    24/5/11 Resources Very simple. And just a batch file to create it.
    22/5/11 General I have a new laptop hard drive, so have taken the opportunity to rebuild the programs from scratch.
    • Enums have been moved to a Type Library
    • SourceSafe is up to date.
    • Proxy Receiver name is generated from an INI file, so in the event of a server crash, we don't need a reboot (Bedford Regatta did, which lost 5 minutes of connectivity).
    • Several libraries were missing from SourceSafe - when the laptop was last rebuilt, I merely installed the software, which worked perfectly, but didn't allow me to check everything properly. Some of the source code had not been copied to the new path, so was not under source code control.
    • RegattaResources removed from the installation program, as I could not find anything that uses it... On checking, its used by RegattaHelper to load station names, but rather than having a COM DLL, I will create a custom resource DLL as used by my employers - this will have to wait until I get access to the source code tomorrow.
    This rebuild has taken about 5 hours
    17/5/11 ReDraw Manager Now that results have been uploaded, I can start to debug this. The fixes are in fact pretty simple...
    17/5/11 OARA Results A minor tweak has been made to the code - scratched crews are no longer always recorded as DNS - a crew may have competed, and subsequently scratched. This is in fact fairly common in College Eights (3 crews this year).
    14/5/11 Bedford Regatta I should have checked the redraws more carefully. The spiders looked great, and the crews were OK. The problem is in the progression - instead of the winner of race 3, at 08:34, being encoded as 1003, it was encoded as 834 - the last 3 digits of the time. This has caused some confusion today - easy to fix now that I'm aware of the problem, but bloody annoying. I really should know better than to write mission critical code at the eleventh hour...
    11/5/11 ReDraw Manager Every year I plan to get this working. And every year something more important turns up. Until nw, with St Edwards scratching multiple crews that have a major impact on the fairness of the draw. No way am I going to redraw 6 events by hand, so I've had to get this program working. To be fair, most of the hard work was done. However, a MAJOR problem has arisen - the RegattaDraw table is cleared whenever entries are imported...
    10/5/11 Regatta
    • The Start & Finish programs have had minmor updates, allowing them to be expanded to full screen, with the controls resized & repositioned as required.
    • Control should not be shut down with Alt-Q unless the connection was successful.
    8/5/11 Regatta Draw Bugger. Everything worked for both Bedford & Shrewsbury, until the latter tried to split events.
    7/5/11 Server Race Finished messages are sent to Finish terminals as well at Start.
    5/5/11 Spiders Minor layout change made to the 13 & 14 entry spiders.
    5/5/11 Entry Manager It is now possible to remove doubling instances. The button has been there for a long time, but additions to other functionality stopped it from working...
    4/5/11 OARA Config The Progression System editor I wrote a couple of months ago has been abandoned, as it was slow, inflexible, and unable to cope with oddities such as College Eights, Primary events, Combination classes & Junior B. In other words, unfit for purpose! It took many days to write, and has been replaced with a far simpler system (that copes with ALL the oddities) in just 3 hours.
    4/5/11 Database Star have defined events whose description is >40 characters. StatusList.StatusDescription has therefore been widened to 50 characters.
    28/4/11 2003 Server I have now installed MySQL & PHP on this, and tested the Twitter feed for Bedford RC. Sadly, since GTD won't give me the access codes, I can't tweet to Bedford Regatta.
    28/4/11 2003 Server We're getting there. I want a zero configuration installation program, so the virtual directories are now created as well.
    28/4/11 Permissions Updated for Server 2003, plus a recursive option for certain folders. This allows me to give people VPN access to my server to play with the software WITHOUT having to make them admins, which is generally a VERY bad idea.
    28/4/11 General For some unknown reason, the registry access code does not allow a non administrator to open keys under HKLM, though it does allow them to be enumerated, and for their values to be enumerated. The Profile Selection utility has therefore been modified to copy all the values to HKCU, and all program recompiled to use this new location.
    27/4/11 OARA Null Character bug fix works.
    26/4/11 ASP
    • Race Number for the regattadraw page was sorting as text, as the element contained an anchor. I can't figure out the JQuery code to support this, but it turns out that if we give an ID to the TR tag, then the same effect can be achieved, and the column sorts properly.
    • The vast majority of the columns are centred; the class has therefore been applied to the row, and only crew names left aligned.
    • Redundant leading space on 'Next Race' removed.
    • IDs for statuses are now unique, which means that the page is W3C compliant once more.
    22/4/11 Generic The source code has been backed up to our website.
    21/4/11 Generic Лодка is being specified as the boat used by several of my club's entries. Nasty, I know, but it will test whether other systems can handle Unicode properly...
    21/4/11 ASP TODO - No background when printing...
    21/4/11 OARA I see that we are not allowed to charge more than £200 per crew. Why'm I seeing this? Because I'm adding a Junior B event to Bedford Regatta at a price SO high that nobody will enter it...
    21/4/11 Regatta Draw Gaps are no longer configured here; instead, they are done in Race Options.
    The only things left on the Parameters tab are Groups & Status Changes. The latter will not be displayed if no statuses are eligible - Novice events obviously are not, nor are any Masters events UNLESS they are non-Novice combinations. Junior events pose more of a problem, due to to existence of Junior B (I note that OARA does not support Maiden - I'm fairly certain it used to).
    21/4/11 Race Options No visible change here, but internally the control arrays have been removed and a couple of User Controls added. It makes the layout easier to manage, and the code significantly simpler to read.
    21/4/11 Regatta Draw In response to JW's ongoing gripes, I added the ability to shorten crew names on 13th September last year. This was done automatically, though is now controlled from the Race Options. The algorithm used to shorten the names of pairs & doubles (which can be VERY long) has been improved. If a club has just one entry in an event, then the crew name is removed. If the club has more than one entry in pairs or doubles race, then we try to shorten to just stroke's name. If this is not unique, then we try bow's name. If this is ALSO not unique, we have a problem. However, I've never seen identical twin doubles...
    21/4/11 Database
    • All of the variants on [List - Regatta Winners] have been removed, as JQuery sorting is preferable.
    • [Regatta - List Results so far] references [Regatta - List Races] and so has been marked as obsolete. Investigation shows that its not used.
    • [List - Regatta Entry Details by Day and Club] can also be removed, as it merely provided a sort to kar01.07
    20/4/11 ASP
    • The Masters page is now Day specific.
    • The Entry Matrix has been extended to support divisional regattas. Again, it is Day specific.
    • ClubStats has been largely rewritten, as it did not cope with 2 days.
    20/4/11 OARA Config Yet another bug in OARA found and fixed. I've wondered before why some of the comments in the grid were wrong - it turns out that the CSV file can contain NULL characters, which the FileSystem object is unable to cope with when reading a line from the CSV file. Reported this bug to AG - the fix will be rolled out on Tuesday. In the meantime, the program has been modified to work around the bug.
    18/4/11 Database StatusChangeRequests table added.
    16/4/11 Spider Engine Minor bug prevented spiders from being created.
    14/4/11 Database StatusList.ResultsOrder is now indexed, with no duplicates allowed.
    13/4/11 PHP Duh. Twitter has deprecated the nice, simple Basic Authentication mode that I used. So I've had to rewrite using OAuth, which is significantly more complex.
    8/4/11 Database It turns out that we need Masters.HandicappedAs - I'm not prepared to run C/D/E handicaps. The trouble is that the import from OARA updates Masters.Actual... I've updated the ASP page to show the new field, but there's no UI for setting it yet. TODO
    7/4/11 ASP All filters are now defined via Capabilities; this removes a lot of page specific code.
    6/4/11 Database [Payment - Create Time Only Entry Fees] added. This is used by both web pages that alter the TimeOnly flag.
    3/4/11 OARA Events This now includes support for the new Primary Events, as introduced in Rules of Racing 2011.
    3/4/11 ASP A few pages have export capability, which reformats & removes hyperlinks. The problem has always been that this is undocumented - you have to know which pages support the feature. To make life easier, a new menu (top level only) has been added to the appropriate pages, again via the increasingly useful Capabilities.
    30/3/11 ASP [Statistics - Entry Matrix (Heads)] is useful. So much so that I've extended its functionality, and written an ASP page to view its output.
    28/3/11 ASP oara_create_contacts didn't always render properly. The cause was [List - Contact Details for Specified Club], which only sorted by surname instead of surname & ContactID. So the rowspans weren't necessarily correct...
    27/3/11 Website This log now sits on rowstats.com
    25/3/11 Database [List - Starters] appears to be obsolete. [List - Statuses raced so far] is only called by resultsbystatus, and is so simple that it can be replaced with SQL.
    25/3/11 Regatta Draw [ScratchEntriesWithoutOpposition] is not actually used any more. This means that the following queries can be marked as obsolete: [List - Events with no Opposition], [Draw - Log Withdrawal due to no Opposition], [Draw - Log Withdrawal due to no Opposition Subquery].
    24/3/11 Installation Rather pleased with this - the April Head, Bedford Regatta & both days of Shrewsbury have installed on a virtual machine without any problems.
    24/2/11 PHP This language has the ability to check whether a function exists, which makes writing framework code SO much cleaner, as pages don't HAVE to implement all the functionality.
    22/1/11 ASP Various filter and sort options still exist. To make their configuration easier (including a separator bar after the last one) they are now turned on via Page_GetCapabilities as well.
    22/1/11 ASP The ability to show Sponsor's races has existed for a while. The problem was that there was no link in the menu structure.
    22/1/11 General Sponsorship & Trophies have been updated. The underlying tables have had a few changes to column names (Group -> GroupID, for example). But the main problem was that these programs still used long obsolete treeview controls, which have now been replaced.
    22/1/11 ASP include paths for tablesorter are now root relative - ie 'events/include/tablesorter' instead of '../events/include/tablesorter' as I am now starting to look at the KAR pages.
    22/2/11 Database It turns out that all 6 variants of [List - Withdrawn Entries] were for kar01.05, which can now be better implemented with TableSorter
    21/2/11 Spider Integrity The output from this program is also XHTML compliant. Pointless, I know.
    20/2/11 PHP All that remains now is to incorporate TableSorter into our website.
    20/2/11 ASP The new framework is finally complete, with Page_GetCapabilities returning a dictionary of page specific options.
    • This allows the Show/Hide blades option to only be displayed on pages that actually CAN display blades.
    • Grid & Highlighting are also only shown if relevant.
    • Columns can be specified as being unsortable via CAP_SORT_COLS. This generates custom headers for the (absolutely brilliant) tablesorter JQuery library. Column values are:
      • 0 - no sorting possible
      • 1 - Column can be sorted
      • x - Column is sorted by ID. This allows me to sort Statuses by ResultsOrder, which is rather neat. This has not been applied to all pages yet, but is fairly easy to implement.
    • If CAP_SORT_COLS is missing, or its length is less than the number of columns, then the undefined columns are sorted.
    16/2/10 Server Query terminals are now refreshed when a division's results are set.
    16/2/11 Database I have done a fairly brutal purge of old contacts & their email addresses. It needed doing...
    16/2/11 Race Options A section for MySQL has been added - there's no point in generating MySQL code if nothing is done with it! But the main reason for this is to define the IncludeFile
    16/2/11 ASP
    • This has all had a facelift, with much more reliance on CSS.
    • Tables are now flat, which saves a bit of screen space.
    • The tablesorter has finally been extended with a custom stylesheet and icons to show the sort order.
    • The menu now floats instead of being fixed at the top of the page. This should be of major benefit to punters on race day.
    • I'm extremely pleased with this.
    16/2/11 ASP Following discovery of a google jscript API that makes IE CSS3 compliant, I now use nth-child CSS selectors to highlight alternate rows. masters.asp shows this really nicely, coupled with inline styles for any rows that span multiple rows. The only downside appears to be that the header row AND the next row are highlighted when using thead, which is necessary for sorting... But we can work around this with a hidden row...
    14/2/11 resultsbystatus Need to limit it so that crews still to race are not shown as DNS, but we also need to show that the event is NOT complete...
    14/2/11 OARA Results Now that OARA handles status changes made via XML upload, we do not have to check [OARA2 - List Changes (Status)].

    So why am I modifying this program yet again? The anwser is that Masters handicaps are now fully configurable - its best to leave them in their original category on OARA, I think, and update the notes to show that a handicap is being run.

    14/2/11 ASP resultsbyclub has been modified so as not to show a disqualfied crew in bold if they would have won the event. Queen Mary UL won Novice Fours yesterday, and were disqualified after finding that their entry forms were incorrect...
    11/2/11 Change Log Ouch - this file has been converted to valid XHTML. It took about 7 hours
    9/2/11 ASP British Rowing's Rules change yet again this year, with 2 points awarded for a win where 9 or more crews start. So the code developed on 28th January is going to be even more useful than anticipated, and has needed just a minor change to 2 queries and the ASP.
    9/2/11 ASP Head Race trophies now split down into pots & medals. This is Bedford specific as we usually give medals to Junior crews, so I'll need a flag in EventData to handle this.
    7/2/11 Database
    • [Count - Number of Divisions] marked as redundant, as it has been replaced with a variable in EventData.
    • Nasty - [Timing - Mark DQL] & [Timing - Mark DNF] had a LONG hyphen. Not sure if this would have caused a problem, but if it had, then it would have been a right bugger to track down...
    5/2/11 Entry Manager
    • The parameters to OARACreateCrewNamesForSmallBoats were actually obsolete, given that the 2 queries just marked as obsolete had been commented out. This simplifies the code...
    • Now that we have a proper method of combining veteran statuses, AppendVeteranSuffix is obsolete and can be safely removed.
    • Removal of this routine simplifies CreateNamesForSmallBoats, and allows a redundant join to be removed from [OARA2 - Small Boats]. The same applies to big boats.
    5/2/11 Database [OARA2 - Small Boats affected by Substitutions] & [OARA2 - Small Boats added After Draw] appear to be obsolete.
    5/2/11 Head Penalties Possibly not the best program to use, but never mind for the time being.
    • Veteran entries can be combined into a handicapped status.
    • They can also be removed from the handicap.
    • All changes are logged.
    • The = symbol and the actual category are appended to the crew name if appropriate. Null crew names are handled.
    • The idea is that the entries remain in their original status on OARA. The problem now is that the EntryManager will complain that crews have changed status. Whilst not critical, this is messy, and potentially highly confusing.
    • Sadly, fixing this is quite complicated, requiring yet another CSV file to import, and another table (as you can't run update queries that have a CSV file as a source table - the ISAM does not support it, even though that table is not being updated - DUH!). The main change is to [OARA2 - List Changes (Status)] - this needs to ignore differences between the Entries & OARAStatuses tables if, and ONLY IF, the entries exists within OARAMasters.
    • I'm extremely pleased with this code. Its taken about 10 hours to design, code and test.
    5/2/11 PHP regatta.php (when sorted by club) highlights. But it shouldn't do this after results are published...
    3/2/11 Database NASTY. The competitor export file can be encoded in UTF8. Excel doesn't recognise this, nor does my software. But Access DOES - if we change the import spec to UTF8, then everything is fine. Bedford now have a boat called Лодка (it means Boat) to further test this. We also see the benefits of converting the ASP pages to UTF8 XHTML...

    I have changed the import specs for the competitor & crew export files.

    3/2/11 Entry Manager Having manually modified 2 entries this time around, and thus breaking my self-imposed rule of NO database edits, I have added the ability to change the entry fee due for a crew. This is a significant improvement.
    3/2/11 ASP timeonly now has AJAX capability, and logs the changes to the Alterations table.
    1/2/11 Misc Select - Specified Race used several times - StartTime (Actual Time) not used -why?

    Regatta - List Races had a Final field - this was just an expensive IIF statement on another field - 1stGoesTo...

    31/1/11 PHP Its very useful to digitise another Head's results - in this case, Quintin's results highlight a few problems with Time Only
    28/1/11 General I'm not sure that I have ever had the time to do a detailed run through the Regatta functionality this early in the year. Apart from the items listed above, its revealing several other flaws:
    • Usage of the Times table for Regatta Start Times is dreadful. A column should ALWAYS be used for its declared purpose - bastardising CrewID into representing RaceID is simply not good enough. It is one of the last remnants of the original system, which used DAO internally, and was written in 2 days flat. The time has come to fix this...
    • I have added Debug.Assert statements whereever a Recordset.Find operation is attempted, as this indicates legacy code. The exception is the Head Race matching routine, which works VERY well.
    28/1/11 ASP regattacompleted now has instructions on what to clip... It deals with Masters, J14 and under, other Juniors & Private Matches. All of the logic is done in ASP, based on ResultsOrder & StatusTypeID. Rachel Maltby happened to be in the Club as I was finishing this off, and sees it as a major improvement.

    The page also changes the 'Extracted' column to 'Cards Collected' for Bedford Regatta. It might be useful to define this functionality via RaceOptions so that other regattas can benefit.

    27/1/11 OARA Events We now need a way to configure the oddities such as 2nd boats, College eights, B events etc
    27/1/11 TODO Review comments from January to June 2010 and ensure that all issues have been fixed.
    27/1/11 Server I have had a problem for a while with multiple Start or Finish terminals running simultaneously. When the second (of either) connects, a spurious is received by the first instance, claiming that the race is already on the course. The problem has been traced to SendRacesOnCourseToClient, which was broadcasting instead of sending the message to the new client ONLY. The fix, as with Commentary, is aMsg.StringItem(emfTarget) = "H" & iHandle - the Proxy treats numeric targets as broadcasts, and ones prefixed by "H" as specific to a single client.
    27/1/11 Database [Regatta - List Races in progress] incorrectly used an INNER JOIN to the SponsorshipAllocation table, which meant that no races were shown as on course UNLESS they were sponsored.
    27/1/11 ASP regattacompleted now uses AJAX
    26/1/11 Wiki I really must start editing this...
    26/1/11 Treeview
    • This has been annoying me for a while now - many of the fore & back colours were being serialised to the same keys, making the properties worse than useless. At long last I have got round to fixing this.
    • The back colour rectangle was 1 pixel too narrow. This has also been fixed.
    • As has the artefact drawn when a cell contained text, but its width was 0.
    26/1/11 Regatta Draw A MAJOR change has happened - we no longer need to exit the program and restart when changing days.
    26/1/11 Regatta Draw
    • TODO - need to automatically assign the division for a status change slot...
    • clsDrawEngine.Entries is redundant and has been removed. This shows that clsEntry is also redundant. Of course, both may be part of some long forgotten improvement path that was never completed, though looking at the code nearby, it looks like these are remnants of the old doubling algorithms... A quick check through SourceSafe confirms this.
    26/1/11 Regatta Draw Of course, users will expect to be able to modify events in the OARA Config program (eg changing whether or not a Plate is running), then run the Draw and have it pick up the changes WITHOUT having to reimport the entries. The file amalgamation code has therefore had to move to a separate shared module
    25/1/11 Database [OARA2 - List Women Only Entries] has been modified to ignore J13 events and below. The code is Mid([ResultsOrder],3,2))<"UG")
    25/1/11 OARA Events Editor for Lanes & Progression finally coded. I can now safely delete these from the Regatta Draw program.
    25/1/11 Database RegattaDraw table - GrandFinal removed & OARA added.
    22/1/11 Database [List - Composition of specified xxx] has been removed, and replaced with [List - Composition of Specified Crew (Current)]. As well as Current, there's also a Baseline version. The page itself has been updated to be fully W3C compliant, and now also shows boat doubling.
    21/1/11 Entry Manager Following on from a comment made by Shrewsbury, I now backup the CSV files when importing..
    21/1/11 ASP Boat Sharing is FINALLY shown by crew.asp
    20/1/11 Database
    • GrandFinal removed from the only 2 queries that used it, as this functionality is LONG obsolete.
    • I think that Regatta.Group has been replaced by Regatta.GroupID in all queries.
    20/1/11 General TODO - I understand that Bedford Regatta will be offering Adaptive events next year...
    12/1/11 ASP oara_status_changes modified to use the new [Head_StatusChange_RaceOrder] option.
    12/1/11 Entry Manager [OARA2 - Append New Entries] now takes a fTimeOnly parameter, allowing late entries to be automatically marked as Time Only.
    12/1/11 OARA Events I REALLY ought to be painting tonight...

    Division configuration (for both Heads AND Regattas) has been massively improved, using a variant of the Status Selector control that I removed in April 2009. I'm actually rather pleased with this control now...

    5/1/11 Entry Manager OARACheckAllStatusesValid is redundant, so has been commented out.
    5/1/11 Database
    • I've been meaning to sort out the club addresses for a while...
    • [Generic - Labels for Posters] is now sorted by ClubName instead of ClubID.
    8/12/10 .NET Again, BUGGER. I am rewriting from scratch.
    • I have finally managed to update the database - StatusID ONLY. This is painful beyond belief.
    • Getting the Active Profile from the registry is actually trivial - I was concerned that I might have to create DSNs, but this isn't actually the case.
    • A couple of routines in the OARA module are incorrectly declared as Public.
    • Option Strict On is a godsend - it forces me to correctly cast everything.
    • The majority of Dictionary objects have been converted to HashTables, but there are a couple of places where typed Dictionary(Of TKey, TValue) objects make more sense.
    • New Hashtable(StringComparer.InvariantCultureIgnoreCase) is very useful. I wish that VB6 had constructors...
    • OARACheckAllStatusesValid has some VERY odd logic for determining DayID - needs to be checked. Update: on 5th January it was found to be obsolete.
    • Nasty. For Each does not go through a Hashtable in order
    1/12/10 .NET Work has started on conversion of the EntryManager. This is a useful exercise, even if it is never deployed, as the .NET IDE highlights programming errors that can be retrofitted to the VB6 project.

    After 3 nights of pain, it has become obvious that conversion of this program is unlikely to succeed. The problem is the various data bound controls, which don't upgrade properly, and the MSHFlexGrid & DataCombo controls, which are single threaded and hence unusable in .NET

    BUGGER.

    29/11/10 ASP Nasty. I had not realised that parameters in ASP are passed ByRef unless explicitly passed ByVal. So the BladeImage function was modifying the ClubID passed to it if the ClubID was that of a composite club. This was an absolute bastard to find whilst adding (pointless) functionality to winnersbyclub.asp
    22/11/10 Veteran Handicaps I have to come up with a better way of combining these - its all too easy to inadvertently change the DivisionID of a status within the OARA Events program, which can (and did) lead to significant confusion.
    22/11/10 OARA Results The StatusPosition field has never been calculated correctly, as it appended an = symbol to EVERY record. The problem was that it wasn't taking any notice of StatusID! This has now been fixed.
    20/11/10 Kingston Kingston never fails to throw up surprises. The problem here is partially of my own making. When combining Veteran categories to produce a handicapped event, I always combine them on OARA, and change the EventInfo to match - this allows the crews to see what they're actually going to be racing. Since Tony isn't familiar with the intricacies of my database, the easiest way to combine 2 statuses was simply to give them the same StatusID within the OARA Events program. This works a treat - UNTIL you look at the results. [OARA2 - List Head Results] lists each crew in the handicapped status multiple times - in fact, once for each status within the handicap. This is because there was a JOIN from Entries to OARAStatuses on the StatusID field.

    The differences are in the EventID_Raced field. I can't just take the minimum of these EventIDs, as when setting up the race on OARA, you can add statuses at any time, and so the smaller numeric value is not guaranteed to represent the younger category. Fortunately, the key is in the OARAStatuses table already - the EventIdentity. I have therefore created a new query - [OARA2 - List Status Raced] This is very simple:

    SELECT OARAStatuses.StatusID, Min(OARAStatuses.EventIdentity) AS MinOfEventIdentity FROM OARAStatusesGROUP BY OARAStatuses.StatusID;
    OARA2 - List Head Results is then slightly modified to use this query. Sadly, this wasn't the end of my problems. The database had 3 crews at Mx.NOV.2X Kingston changed Molesey to Mx.Nov.2X and the OARA Results program was unable to cope with the change in case.
    14/11/10 Entry Manager Withdrawn entries are now greyed out in the grids - this allows me to remove an expensive IIF statement in the underlying query.
    14/11/10 ASP Rather cryptic message from Kingston - it turns out that the draw ASP page did not support grid/shaded row as the Regatta pages do. It didn't cope with Mortlake Anglian & Alpha either...
    13/11/10 OARA Events
    • Bug found - not possible to handicap Masters Sculls, as a replacement operation was not being done. This has now been fixed.
    • Handicapped statuses are created OK, but their HeadStartOrder is wrong (not set) - it should be set to that of the youngest crew. This is now done.
    13/11/10 ASP
    • Club Statistics page added. So far, this only shows the total number of entries made by each club; however, this will be expanded to show more detailed stats.
    • Time Only page finally created. The [Head_Entries_ForTimeOnly] key is not really sufficient, as it doesn't allow us to specify the rules - we state 3 or more entries from at least 2 clubs
    12/11/10 Entry Manager Junior Racing Names - not seen an entry for one of these in a while - at least, not from one that isn't in the database. The problem is that they do not appear on the ARA websitwe
    12/11/10 Database masters.asp has a slight problem - [List - Masters] was not checking that all crews in the masters table were, in fact, STILL Masters. A JOIN to [List - Masters Entries per Status] fixes this.
    10/11/10 Race Options
    • Couple of minor bugfixes added for the Divisions grid event handlers.
    • We can now define Maximum Crews per division, and specify a warning percentage for each.
    • The code to generate division statistics is utter crap. Hundreds of lines of code that do what can be done with a very simple PIVOT operation. Yes, the code DID work, but it was virtually impossible to work out what was going on, let alone try to modify anything.
    • Changing to a PIVOT also allows me to get rid of the Day1_BoatClasses key, which is not editable via RaceOptions - indeed, I had failed to spot that Star SBH included an octuple, because it was excluded by the value of this key (124).
    • All the warning types are now implemented. I'm actually rather pleased with this evening's coding session...
    • Sorting is utterly pointless for this table, but is enabled nevertheless ;)
    6/11/10 Database [Head_Entries_ForTimeOnly] key added to the EventData table. Uncontested Statuses uses this, though other pages will have to be updated.
    6/11/10 Database Nottingham's Juniors all use 'Own Boat'. Whilst notification of this is annoying for Heads, it could pose a major problem for a regatta. Therefore, [OARA2 - List Doubling between Boats] has been modified to explicitly exclude this name.
    6/11/10 Entry Manager Kingston have let crews specify their division this year - inevitably, one crew has entered the wrong one. So I've written a new ASP page & query to handle this. The code ignores their choice; however, it would be better if the entry on OARA showed the correct division.
    5/11/10 Head Draw The Penalties table is now cleared when the Draw is done.
    5/11/10 Masters The Handicap/Penalties editor has been significantly enhanced. It can now automatically calculate the required handicaps, based on a table of Standard Times, which are also editable. Any changes made will automatically update the results as appropriate. Standard Times are Host Club specific, so the full table can be built up.

    All that remains now is to work out a better way of combining statuses... (NB: this was added on 5 Feb 2011)

    3/11/10 Database
    • [List - Crews containing Specified Rower] has been marked as obsolete, as [List - Entries containing Specified Rower] can do the same job. This also simplifies the ASP.
    • [List - Crews at specified Status] is probably obsolete, though I'm going to wait until after KSBH before I remove it.
    3/11/10 ASP
    • Since several of the OARA specific pages are generally useful, they have all been moved to the main folder.
    • pagesetup.asp has been split, with all the menu generation code moved to a separate file for clarity.
    • The rowspan bug in masters.asp has finally been found & fixed.
    • JQuery tablesorter now handles UK dates correctly.
    • entrystats.asp - the count of entries made each day now ignores withdrawn entries, so that its totals tally with all other sections of the page.
    29/10/10 ASP resultsbystatus.asp now uses a new JQuery based scrolling system. Its far from perfect, but does work with IE. More development is required.
    21/10/10 Database I've started to purge the contacts table.
    20/10/10 General I've finally found the code to get the name that IIS 6 uses for anonymous access. This allows the Permissions program to work immediately, instead of having to assume that the IUSR account is in sync with the machine name. On my test Virtual Machine, it isn't...
    15/10/10 Proxy Server It turned out that the problems with the Query Terminals were coming from here. Despite a comment that client specific messages were prefixed with 'H', the proxy took no notice, and so just broadcast to all stations.
    13/10/10 ASP completed.asp now has a full AJAX implementation. This is a massive improvement, with significantly less network traffic, less expensive queries, and a significantly enhanced 'user experience'. Thanks to LMS for reporting her frustrations.
    12/10/10 October issues
    • LMS noticed that the form confirming the correct crew (frmCrewDetails) show the previous page before refreshing to the right crew. This has now been fixed.
    • She also noticed problems with completed.asp, with changes scrolling to a random point. I can't see any way round this at the moment, though I suspect that it would be significantly better to use AJAX.
    • IE will not scroll results. This is a MAJOR problem
    • Query Terminals should be able to use different settings. But they don't. Major bug? Or dud versions? Not sure, and with a dying laptop battery, I won't find this tonight.
    8/10/10 Database [List - Competitors by Number] & [List - Competitors by Club] have been marked as obsolete, since sorting is now done via JQuery.
    7/10/10 Entry Manager [Entries - Payment Missing] has been modified to show ARACrewID - pretty much vital, as they print off the paperwork from OARA and send it to me showing which crews they are paying for...
    7/10/10 Handicap Utility
    • The main routine takes the Standard Time (after any adjustments have been applied), plus 2 age categories. This change should make it generic enough to be merged with the Penalties & Handicaps Editor.
    • To make this change easier, the relevant code has been encapsulated in a UserControl. This is nice as it loads the data in Design Mode as well...
    • Combo boxes on the main form no longer need to be scrolled, as I have written SetDropDownHeight. This allows the 9 age categories to be displayed without a scroll bar, since combos normally show a maximum of 8 items.
    6/10/10 PHP This must be a first - adding functionality to the PHP before incorporating it into the main ASP based interface! A StandardTimes table has been now been created in both databases; the main difference is that the MySQL database MUST store EventID. As yet, the handicaps pages only show the Standard Times, but these should be enough for the time being.
    4/10/10 ASP Handicaps page needs some serious development.
    30/9/10 ASP JQuery is brilliant. Multi column table sorting is now possible (hold down the shift key and click on table headers to multisort). I may have to add a Page_Sortable function to the template, as the code does not cope with sorting tables that use rowspan/colspan. Never mind...
    27/9/10 Race Options TODO Add the ability to specify the maximum TOTAL boats in a division.
    27/9/10 Entry Manager TODO If substitutions make a Senior crew no longer eligible for veteran, then they need to be deleted from the Masters table...
    27/9/10 Database More pain will be the renaming of Regatta.RaceNo to RaceID. Why bother? The answer is that it will make the code easier to migrate to the revised database structure...
    26/9/10 Database The following have been marked as obsolete, as either I can find no trace of their use, or they use a long obsolete (and removed) column:
    • List - Regatta Draw by Specified Club
    • Check - Payments assigned
    • List - Status Alterations
    • Payment - Cash Received
    • Mailing - Notification of Changes
    • List - Status Names (was used in clsServer, but is very simple and only called once, so might as well be done in SQL).
    24/9/10 Database Renaming Regatta.Group & Regatta.Time will involve some pain.
    • SponsorshipAllocation.Group also renamed.
    • Mailing - Notification of Draw (Regatta) - GroupID can never be NULL or 'Z'
    • Mailing - Notification of Withdrawals (Regatta) is probably obsolete, as Regatta - Mailshot of Withdrawn Entries has never been used and so has been deleted.
    • About 20 queries have needed modification to cope with the renamed columns. Obviously, the ASP & VB code will need extensive modifications...
    24/9/10 Entry Manager
    • Now that Clubs.AllWomen has been removed, FindWomenOnly is obsolete, and has been removed.
    • The ASP page to show identical crews now allows them to be marked as TimeOnly if necessary. The underlying database query has therefore been modified to cope with this.
    24/9/10 SSMA Not that I'm planning on migrating to SQL Server, but SSMA is a very useful tool for highlighting database problems:
    • Labels - Back of Numbers (Regatta): iDayID not listed as parameter
    • Clubs: delete obsolete fields RepeatMail, Lapsed, Registered, AllWomen, BladeKnown
    • Entries & StatusList - StatusID field varies in size (50:16). this has been fixed at 16 characters.
    • Regatta: Time->RaceTime
    • Regatta: Group ->GroupID
    • List - Full Racing Sequence: StatusList.Raceorder does not exist. It is therefore obsolete.
    • OARA2 - Identify Contact by Emergency Email: could be made simpler without the wildcards. This syntax predates the EmailAdresses table. UPDATE - This change significantly speeds up the query...
    • OARA2 - Identify Contact by Admin Email: Obsolete
    • Payment - Entry Fees: Obsolete
    • Mailing - Club Addresses: This has a hardcoded BED...
    13/9/10 Regatta Draw During the Draw, names of 4s & 8s are shortened. However, redraws and other odd operations have always required the RegattaNames table to be cleared, and then regerated with [Control - Generate RegattaNames]. The problem is that this query generates errors, which are offputting for a user, and prevent correct operation under ADO. Using LAST(RaceNo) fixes this.

    The RegattaDraw program has been modified to allow these operations to be done together.

    10/9/10 ASP
    • The Masters ASP page has been extensively modified, and now presents far more useful information. If it could create Handicapped events as well...
    • The Crew ASP page now has a link to the status.
    10/9/10 General Its often useful to know whether a crew racing in a senior status is in fact veteran - rather than rejecting them, we may want to move them to the appropriate veteran category instead. The EntryManager therefore now generates this info for ALL crews.
    10/9/10 PHP Scratched crews now shown correctly. It was fine if blades were visible - I was only using the class in this case ;(
    7/9/10 ASP
    • New key added to EventData - ASP_NextRaceListedLast. This was a request from Ironbridge - much better done in an option than hardcoded to this regatta.
    • Still purging obsolete constants.
    7/9/10 EntryManager Yet again, Cambridge Autumn Regatta throws up a couple of issues:
    • We've imported the entries for the first time AFTER closing on OARA. This means that OARA has generated composite ClubIDs, but the program has not added them to the Clubs table, since it normally does them after creating composite IDs internally. Unfortunately, the first sign of this was errors at the very end of a regatta draw, which means everything we did last night is invalid and will have to be redone. And since the missing crews are doubling up extensively, the clash resolution is significantly more complex. It does resolve - eventually...
    • The creation of composite clubs has therefore been moved to a separate routine, which is called regardless of whether or not we have modified Entries.ClubID.
    • Extra functionality added to allow a list of email addresses to be generated.
    • I suspect that Richard's machine doesn't have IE installed - the EntryManager cannot view any webpages internally, though they all work perfectly well in Firefox, which is his default browser. I have been toying with the idea of moving OARA import to a web based system for a while now - this may well be the catalyst for that change. The biggest problem is likely to be use of the FileSystemObject to amalgamate data files - most of the logic is done in SQL. Another problem will be the error handling...
    • Richard doesn't use the standard capitalisation when entering his CRA crews. The program now does this itself...
    • Day Tickets will not be reinstated. So I have finally removed the conditional compilation code.
    2/9/10 ASP XHTML conversion is now complete.
    • CDATA tags added to menu creation javascript so that the menu is ignored by the XHTML validator.
    • CDATA tags also added to the scrolling code, so that this validates as well. Not really necessary, but I like to do things properly if at all possible!
    • TODO The unknown club address page does not have the right CSS. In addition, this is a very poor way of doing things - we should be able to use the ContactAddress export file...
    25/8/10 ASP Duh. Visual Studio allows me to do search & replace operations in ALL open files, which is a bloody sight quicker than modifying each page in turn...
    • Harcoded querystring parameters (eg club=bed) replace by constants (eg QS_CLUB) wherever found.
    • resultsbyclub & resultsbystatus are slow because they are poorly written. TODO. There are also so many basic errors in these pages that I'm amazed they render at all...
    • resultsbystatus now validates. The main problem is the way that blade images are added - the function adds a TD tag, whereas it would be better for the calling page to handle this.
    • divisions still contains B tags. These are necessary due to its convoluted logic, which would be better done with a PIVOT query. TODO.
    • BladeImages are now done with a new routine, which makes conversion to XHTML MUCH cleaner.
    • Server.URLEncode is a much better solution than sFilter.
    25/8/10 Database [List - Head Winners by specified Club subquery] marked as obsolete.
    24/8/10 ASP The conversion to valid XHTML continues. crew isn't playing ball at present, as it has H1 etc tags inside tables, which isn't allowed. kar0106, boatusage, winnersbyclub, timingerrors, completed & alterations have been converted. The Head Race specifc pages (completed & winnersbyclub) also needed conversion to the new page structure.
    23/8/10 PHP Work has rather got in the way recently, so I've not had chance to look at this for a month. Shame, as there were a couple of minor bugs in the PHP code on our website...
    22/7/10 MySQL Verdicts held in the database have been corrected wherever possible. I'm left with 7 oddities (all from Kingston) which I cannot figure out. No matter - its better than it was...

    Oddities can be found with:

    SELECT verdict FROM `regatta`  WHERE isnull(verdict)=false  and verdict <> ''  and verdict <> 'row over'  and verdict <> '1 length'  and verdict <> '1/2 length'  and verdict <> '1/3 length'  and verdict <> '1/4 length'  and verdict <> '2/3 length'  and verdict <> '3/4 length' and verdict <> '7/8 length' and verdict <> '1 1/2 lengths'  and verdict <> '1 1/3 lengths'  and verdict <> '1 2/3 lengths'  and verdict <> '1 1/4 lengths'  and verdict <> '1 3/4 lengths'  and verdict <> '1 1/8 lengths'  and verdict <> '2 lengths' and verdict <> '2 1/2 lengths' and verdict <> '2 1/4 lengths' and verdict <> '2 3/4 lengths' and verdict <> '3 lengths' and verdict <> '3 1/2 lengths' and verdict <> '3 1/4 lengths' and verdict <> '3 2/3 lengths' and verdict <> '4 lengths' and verdict <> '4 1/2 lengths' and verdict <> '4 1/4 lengths' and verdict <> '4 3/4 lengths' and verdict <> '5 lengths' and verdict <> '6 lengths' and verdict <> '7 lengths' and verdict <> '8 lengths' and verdict <> '5 1/2 lengths' and verdict <> 'easily' and verdict <> '1 foot' and verdict <> '2 feet' and verdict <> '2 1/2 feet' and verdict <> '3 feet' and verdict <> '4 feet' and verdict <> '6 feet' and verdict <> '6 inches' and verdict <> 'a canvas'  and verdict <> 'Not Rowed Out'  and verdict <> 'No Race' and verdict <> 'Disqualified' and verdict <> 'Disqualification' ORDER BY `regatta`.`verdict` ASC
    And fixed with:
    UPDATE `bedfordr_db1`.`regatta` SET `Verdict` = 'Row Over' WHERE `regatta`.`verdict` = 'Default' ; UPDATE `bedfordr_db1`.`regatta` SET `Verdict` = '1 length' WHERE `regatta`.`verdict` = '1  length' ; UPDATE `bedfordr_db1`.`regatta` SET `Verdict` = '1 1/2 lengths' WHERE `regatta`.`verdict` = '1 1/2' ; UPDATE `bedfordr_db1`.`regatta` SET `Verdict` = '1 1/4 lengths' WHERE `regatta`.`verdict` = '1 1/4' ; UPDATE `bedfordr_db1`.`regatta` SET `Verdict` = '1 1/2 lengths' WHERE `regatta`.`verdict` = '1 1/2 length' ; UPDATE `bedfordr_db1`.`regatta` SET `Verdict` = '1 1/3 lengths' WHERE `regatta`.`verdict` = '1 1/3 length' ; UPDATE `bedfordr_db1`.`regatta` SET `Verdict` = '1 1/4 lengths' WHERE `regatta`.`verdict` = '1 1/4 length' ; UPDATE `bedfordr_db1`.`regatta` SET `Verdict` = '1/2 length' WHERE `regatta`.`verdict` = '1/2 lengths' ; UPDATE `bedfordr_db1`.`regatta` SET `Verdict` = '1/3 length' WHERE `regatta`.`verdict` = '1/3 lengths' ; UPDATE `bedfordr_db1`.`regatta` SET `Verdict` = '2/3 length' WHERE `regatta`.`verdict` = '2/3 lengths' ; UPDATE `bedfordr_db1`.`regatta` SET `Verdict` = '1/4 length' WHERE `regatta`.`verdict` = '1/4 lengths' ; UPDATE `bedfordr_db1`.`regatta` SET `Verdict` = '6 inches' WHERE `regatta`.`verdict` = '1/2 feet' ; UPDATE `bedfordr_db1`.`regatta` SET `Verdict` = '2 feet' WHERE `regatta`.`verdict` = '2 feett' ; UPDATE `bedfordr_db1`.`regatta` SET `Verdict` = '3 1/2 lengths' WHERE `regatta`.`verdict` = '3 /12 lengths' ; UPDATE `bedfordr_db1`.`regatta` SET `Verdict` = '3/4 length' WHERE `regatta`.`verdict` = '3/4 lengths' ; UPDATE `bedfordr_db1`.`regatta` SET `Verdict` = '3 lengths' WHERE `regatta`.`verdict` = '3. lengths' ; UPDATE `bedfordr_db1`.`regatta` SET `Verdict` = '3 1/2 lengths' WHERE `regatta`.`verdict` = '3 1/2' ; UPDATE `bedfordr_db1`.`regatta` SET `Verdict` = 'Not Rowed Out' WHERE `regatta`.`verdict` = 'nRow Overo' ; UPDATE `bedfordr_db1`.`regatta` SET `Verdict` = 'Not Rowed Out' WHERE `regatta`.`verdict` = 'Not Rowed Outot' ; UPDATE `bedfordr_db1`.`regatta` SET `Verdict` = 'Not Rowed Out' WHERE `regatta`.`verdict` = 'NRO' ; UPDATE `bedfordr_db1`.`regatta` SET `Verdict` = 'Row Over' WHERE `regatta`.`verdict` = 'No Show' ; UPDATE `bedfordr_db1`.`regatta` SET `Verdict` = '1 length' WHERE `regatta`.`verdict` = 'length' ; UPDATE `bedfordr_db1`.`regatta` SET `Verdict` = 'a canvas' WHERE `regatta`.`verdict` = 'canvas' ; UPDATE `bedfordr_db1`.`regatta` SET `Verdict` = '1/3 length' WHERE `regatta`.`verdict` = '1/3' ; UPDATE `bedfordr_db1`.`regatta` SET `Verdict` = '2 1/2 lengths' WHERE `regatta`.`verdict` = '2 1/2' ; UPDATE `bedfordr_db1`.`regatta` SET `Verdict` = '1 3/4 lengths' WHERE `regatta`.`verdict` = '1 3/4'; UPDATE `bedfordr_db1`.`regatta` SET `Verdict` = '1/2 length' WHERE `regatta`.`verdict` = '2/2 length' ; UPDATE `bedfordr_db1`.`regatta` SET `Verdict` = '1/4 length' WHERE `regatta`.`verdict` = '2/4 length' ; UPDATE `bedfordr_db1`.`regatta` SET `Verdict` = '4 feet' WHERE `regatta`.`verdict` = '1/2 canvas' ; UPDATE `bedfordr_db1`.`regatta` SET `Verdict` = '4 feet' WHERE `regatta`.`verdict` = '1/2 a canvas' ; UPDATE `bedfordr_db1`.`regatta` SET `Verdict` = '1 length' WHERE `regatta`.`verdict` = '1' ; UPDATE `bedfordr_db1`.`regatta` SET `Verdict` = '1 1/4 length' WHERE `regatta`.`verdict` = '1/25 length' ;
    21/7/10 Spiders
    • $ character inserted into the 3 lane repechage spiders wherever necessary.
    • Plate definitions for 27-32 entries created. They'll probably never be used, but at least now exist.
    • Spider Integrity program can now check for missing $P markers.
    21/7/10 Regatta Draw A 3:30hr train journey from Hull enables me to have a seriously useful coding session!
    • The PHP export code is now aware of the dropped columns.
    • LoadDivisionalSequence should NOT clear tvSequence.Nodes as this makes a divisional competition impossible to configure for all but the last division. However, in this scenario, we really ought to add an extra column and cancel drag operations if we're moving to a new division (which isn't possible)
    21/7/10 MySQL
    • Legacy field dropped from local database (StatusList table).
    • TODO - we could really do with renaming all of the tables to make the data access code easier to read.
    • regattadata.Repechage & regattadata.GrandFinal fields dropped. Repechage has been superceded by ProgressionSystemID, while GrandFinal was a mad concept only used in one year because one of our sponsors bought special pots, and didn't have enough when we got so many novice sculls that we had to split the event into 2 groups...
    20/7/10 PHP The pages have all now been converted to the new structure, and have been verified as XHTML 1.0 Transitional. Much of the logic has been simplified, and I am starting to use Hungarian notation to show scope, though this is slightly harder to do given that all module level variables are global in scope. I'm prefixing variables defined in the include files with g_ and files in the main folder with m_ And its made even harder by PHP's declaration syntax...
    • Repechage & GrandFinal variables removed from Spiders as they are obsolete.
    • eventid 87 removed from regattadraw as corresponding data does not exist in the regatta table.
    • It looks as if statusinfo.php is obsolete. Further checking reveals that $STATUSDESCRIPTION is, but the routines are still used. For the moment...
    • W3C images added to the footer.
    17/7/10 PHP I am applying a framework to the code, in a similar way to the ASP. Whilst modifying the spider code, I have found the code structure very confusing, with different pages created in different ways. This needs to be changed.
    17/7/10 JavaScript I never knew that this language allows you to add functions to standard objects!
    Date.prototype.getWeek = function()  	{	var onejan = new Date(this.getFullYear(),0,1);	return Math.ceil((((this - onejan) / 86400000) + onejan.getDay()+1)/7); 	}  	function myWeekCalc(date) 	{	return date.getWeek(); 	}
    17/7/10 JQuery Words fail me. I have NEVER come across anything this potent that's free. Lightweight, fast, slick - the possibilities are endless. Much of the UI for BRC's bar management system will be written in this, which will be a good way to learn the framework.
    15/7/10 Kingston A good idea from Kingston - I'm very surprised neither they nor I have thought of it before: define the lanes and progression system BEFORE doing the draw - ie before any entries have been received. We know that the UI in the RegattaDraw program is crap; this provides a way of getting rid of some of that crap.

    I propose a new program, which will look at the events defined by OARA + any others that have been entered. In this way it will cope with a fully manually entered regatta (not that I expect to see such as thing again).

    15/7/10 OARA 2.0.34 released. No idea what it does...
    15/7/10 PHP Our ISP now runs MySQL 5.1, so we can use subqueries at long last. This allows me to generate spiders per club, which is really rather neat. Lots of other changes:
    • Redundant loop removed in spiders. I have a feeling that the same crap code exists in VB6 as well.
    • SpiderIntegrity program modified to output PHP files in UTF8 encoding. This means that the {}#~|+ characters in the spider are already correct. Any replace function takes time, so getting rid of these is a bonus.
    14/7/10 OARA Results Bug found in here - Veteran Handicap events were been set to non-qualifying, which is wrong.
    14/7/10 Javascript It wasn't XHTML that was at fault - instead it was my poor knowledge of JavaScript, which has taken a FireBug session to fix. lMax=document.body.scrollTop should be lMax=aSpiderImage.y How it worked before is a mystery.
    14/7/10 PHP The PHP in the spiders & schemas is a mess, with a complex set of switch statements in a single routine that's over 2800 lines long. Its virtully impossible to debug, let alone read, and has to be independently edited whenever new layouts are added to the RegattaSpiders DLL.
    Not so any more - I've moved to a class based system The SpiderIntegrity program has been modified to generate PHP files, each of which contains a class. These implement a common interface (ISpider), on which there are 2 methods - Schema & Spider.
    13/7/10 PHP I have now installed MySQL on my laptop, and set PHP 'display_errors = On'. Ouch. The code is not as good as I would like it to be:
    • Undefined variable $fRepechage in schemas.php This should have been replaced long ago with $iProgressionSystemID
    • Undefined index: 2nd etc in regatta.php - 3 lane specific query, but the code references it anyway...
    • Changes to the way scratched crews are handled (ie XHTML/CSS) mean that the strikeouts were being applied to the blade image, not the crew name. This has been fixed.
    11/7/10 Javascript Scrolling pages no longer work. I suspect XHTML to be the cause - not something I can fix in the middle of a regatta!
    9/7/10 Installation 3.10.1 tested (Start, Finish & Control only)
    9/7/10 Permissions Duh - 2003 Server does not have the expected vbs files...
    8/7/10 IIS Permissions utility now creates a PHP virtual directory.
    8/7/10 General I am rather annoyed that Henley Royal Regatta has beaten me to creation of a Twitter feed. So I now have a fully automated Twitter feed, with a PHP script running once a minute checking the database for any race results that have not yet been sent to Twitter. If it finds one, then it composes a message, fires it off, and then modifies the database table to prevent it from being sent again...
    7/7/10 Regatta Draw BUGGER. Kingston added 2 extra events, but failed to assign them to divisions. So they're not in the draw... The program now prevents this from happening again :(
    7/7/10 MySQL
    • Sanity check query: SELECT * FROM `clubs` WHERE `ClubID` = `ClubName`
    • RegattaData table: StatusID field widened to 12 chars - we didn't notice in May as we don't run Masters events at all.
    6/7/10 Spiders 3 lane, no repechage or plate systems created for 17 & 23 entries.
    2/7/10 ASP EntryStats is becoming Day specific. It is a bit tricky as the code was badly written to start with! But crosstab queries, pivoting on DayID, make the ASP code very simple...
    • The downside is that I've lost the ability to view withdrawn entries for the time being - not really a problem, as I cant see this as being useful to anyone - it was written as proof of concept...
    • I've also lost the day gaps in TimeOfEntry, which only extended the page, and wasn't really that useful.
    1/7/10 Kingston All divisional regattas stagger the statuses allowed in each division. For example, NOV, IM2, SEN in Div 1; IM3, IM1, ELI in Div 2. Not so Kingston Amateur Regatta. The Borough Regatta staggers it, and has twice as many entries as the Amateur Regatta. I rather think they've shot themselves in the foot. The rationale made sense (from the regatta's point of view) - any status changes required would be easy on the Saturday, as all eights etc. would be in the same division. From a crew's point of view, its a right bugger - nobody can be in 2 eights; if you are in an eight then you can't do a single scull or a quad either So the senior oarsman who has taken up sculling this year can't race again unless he is in a double. Absolutely bonkers.
    1/7/10 OARA There is a 'Competition Notes' field for each crew. I've never noticed this before, though its been there at least a year, according to my saved export files. We might as well make use of it. TODO
    1/7/10 Idea It would be nice to implement a divisional system for Bedford Regatta - the problem is that I would need to have some events running outside the divisional system, as they have 5 rounds of racing, which obviously cannot be fitted into a divisional system. Not sure what I'm going to do for these...
    1/7/10 Installation Extra CSS files added for Help & KAR. Additionally, the old, redundant ones have been removed.
    29/6/10 ASP Massive changes have been made to the ASP code:
    • All pages are now required to have Page_GenerateBody as well as Page_GetTitle.
    • Page_Connect allows pages that run action queries to have a lightweight initialisation method.
    • StartPage renamed as Page_Initialise to tie in with the new nomenclature.
    • All include paths are now virtual.
    • Page termination code has been standardised, and is called within the include file.
    • Redundant (and erroneous) BODY & HTML termination tags have been removed from every page.
    • XHTML is being implemented slowly...
    • Several redundant routines have been removed from pagesetup.
    • Many pages had a CreateHeader routine - this hasn't been used for several years.
    • Several redundant constants have been removed.
    Henley tomorrow...
    28/6/10 CSS My knowledge of CSS is increasing steadily...
    28/6/10 Database [OARA2 - List Women Only Entries subquery] has been modified to cope with the new codes for Masters.
    23/6/10 ASP statuses page has FINALLY been fixed so that it lists statuses before the draw is done.
    22/6/10 Client Options It turns out that THIS is where the spurious 'Profiles' registry key was being created. In practice, it doesn't need to access the registry at all...
    21/6/10 ASP I have started to convert the pages to XHTML. This is a massive job, and will inevitably take a very long time. The benefits are:
    • Page errors (such as missing closing tags) will be found and fixed.
    • Stylesheets will be used to control ALL presentation - bold, strikeout & red can be defined with a simple class statement instead of 3 nested tags.
    • Layout can be changed on a per regatta basis - KAR want some oddities; CSS allows this.
    • Page sizes are significantly smaller, which should make the server more responsive.
    • Cascading Style Sheets allow the same formatting to be applied to all children of an element - much simpler than having to apply separate CENTER tags to each element, for example.
    The downside is that I can no longer just cut and paste to an email. However, on balance, I think that this is worth it...
    19/6/10 Database TODO I need to purge old contacts, email addresses & addresses
    17/6/10 Database Currently, anyone coxing and rowing will be flagged as Crew doubling. Cox doubling infers a shorter turnaround time (TODO This should be specified, instead of being 5 minutes less) as coxes don't need recovery time. But surely in this case the doubling up should be flagged as COX, not CREW?
    17/6/10 Database The 3 queries of the form [OARA2 - List Doubling between xxxxx] have been modified so that they don't include doubling between days. This is because I'm pretty sure that oara_same_division will screw up otherwise. It was written for Head Races, which are 1 day only...
    17/6/10 OARA I don't bloody believe it. The ARA flatly refuse to add extra columns to the CSV files, yet now it turns out that the PRIORITY field (optional) is not added at the end of a row, but instead is inserted near the beginning. Thus screwing up my standard ETL. So I've had to create a new linked table, and a query [OARA2 - Transfer Entries (Priority)] to import the entries. I now need to add a flag into RaceOptions to cope with this...
    16/6/10 ASP
    • entriesbystatus now shows whether a crew has paid, and the division for a divisional regatta, if appropriate - this is to help when figuring out what status changes need to be made.
    • oara_same_division now only shows a single line for each issue - much clearer to read.
    • oara_same_division shows the day if we're running a 2 day competition in the same database.
    • TODO entrystats does not differentiate between days.
    • entriesbyclub now suppresses comments for withdrawn entries.
    • entriesbyclub updated to show paid flag of withdrawn entries in red.
    16/6/10 Blades Haileybury & University of Kent updated.
    16/6/10 Entry Manager Bug fix in CreateOARAPayments - we cannot mark entries as having paid until they have been assigned to a contact - otherwise, the Payments table includes payments from the System Account. I didn't notice this in May, as Rachel was adding the payments long after I had imported the entries. Whilst taking Hexham's entries I noticed a discrepancy between my data and OARA, though all of the right crews appeared to have been marked as paid. What I should have done was check the Payments table - sure enough, the System Account has 4 payments.

    This bug was found and fixed whilst testing using Ironbridge's data, which they have very kindly given me access to. It was easy to track down this time as only 9 crews have paid so far.

    10/6/10 SourceSafe Now that I have radically altered the installation directory structure, it is time to update SourceSafe as well. There are many redundant projects in here, and the structure is truly dreadful, having grown over the years... It also gives me a chance to get all shared files, and to check that nothing is missing... A few files have so far been found to be missing from SourceSafe, and a couple of shared modules were not linked into the main trunk.
    10/6/10 Entry Manager The 'OverPointed' report really is VERY useful...
    10/6/10 Permissions The Permissions program has been recoded yet again (its only existed for a week or so). The problem is that the VirtualDirectories DLL has no effect on Vista & Windows 7 - as I have moved the ASP files out of inetpub/wwwroot, virtual directories are needed for the application to work. ALL ASP files now use virtual include paths, which allows 'Enable Parent Paths' to be left at its default value - OFF.

    The program creates a batch file, which must be manually executed. Previously, CACLS was called MANY times whenever RaceOptions was run, with many command prompt windows appearing briefly. The problem was that they COULD fail to execute, thus rendering RaceOptions itself unusable.

    A further problem with this approach is that appcmd (used to configure IIS7) takes quite a long time to execute... The batchfile works perfectly, allowing a fully functional installation on a clean copy of Windows 7. I'll be testing on Vista as soon as the 14Gb VHD file can be copied to my laptop...

    9/6/10 ASP ConvertLongTime & ConvertShortTime are redundant - there's an inbuilt VBA function that does the same thing.
    9/6/10 Spider Engine OpenKey is a new feature of RegattaHelper - unfortunately, ASP doesn't seem to like a call to RegOpenKeyEx, which is used in ActivateProfileByID. But, on second thoughts, why does the SpiderEngine need to access the registry at all? Whatever calls it (Regatta Draw or ASP) knows the path to the actual database already. So we might as well break compatibility and pass that in instead. This works a treat.
    9/6/10 Installation I have made MAJOR changes to this...
    • All paths are now defined in the Script file - the only groups not to use these are [Server - Race Manager] [Server - Race Options] as they contain files that need to be installed to different places - ultimately I will separate these out.
    • Redundant file groups have been deleted.
    • The directory structure has been completely overhauled, as mentioned above.
    8/6/10 Ironbridge 'The one area we did feel that the package was underdeveloped was the user interface. The home screen that Jason used was like a session of Windows Explorer with lists of files, folders and executables. I'm still not sure if what Jason showed us was the home screen or just a screen he preferred to navigate from but it certainly made it appear daunting to an average end user like myself.'

    Oh dear. Obviously the demo (not done by me) used Windows Explorer instead of Start Menu items. If this is the case, then its a fair point, as there are a lot of programs in there. So I've completely redesigned the directory structure - this ties in quite nicely with my current feeling that Windows 7 & Vista are VERY protective of inetpub...

    388 errors in the installation package to be resolved...

    • Several PHP files are redundant, and so will not be reinstated. For the time being, the component is not included in the build - nobody has used it to date anyway..
    • ASP files are being added one by one
    • Star found that they were missing from the list in Race Options - this is because Server Settings.ini was not being installed.
    And the battle against Vista continues.
    • Form positions are now saved to & loaded from HKEY_CURRENT_USER, which is always writable.
    • SpiderEngine now uses OpenKey on HKLM instead of CreateKey. However, I plan to change RegattaSelection so that it reads from HKLM (which is installed) and writes to HKCU...
    7/6/10 Regatta Draw
    • After generating the RegattaNames, unnecessary names for fours and eights are removed. I have no UI yet for setting this, but want to be able to condense the names of doubles & pairs as well.
    • The routine for separating entries from the same club works well if there are pairs of entries. Star Regatta this year have one event where there are 16 entries, 8 of them from a single club. It just doesn't work. So I have created a draw.txt file - effectively just an INI file that allows a custom draw to be directly specified.
    7/6/10 Entry Manager When the Masters table is updated, the [Entered] field is generated from the StatusID. Although not currently used (the change made on 4/6/10 uses [Actual]), this allows a new ASP page to display full details of the Masters entries - Star had one four at C and one at E - it turned out that these were in fact E & F respectively.
    4/6/10 Database Obsolete reports deleted - [Generic - Crew Lists for Control Commission]
    4/6/10> Entry Manager Once we have created Handicapped statuses, we MUST append their status to the crew name. This is easy to do by modifying a couple of queries, but does mean that OARAChangeCrewname is called MANY times after entries are closed. It would probably be better to have both crew name routines (big & small boats) add to a dictionary, keyed by EntryID, and then to loop through the entries table, updating records only where necessary.
    4/6/10 Database 2 new queries written to generate Victor Ludorum data. This is what Hexham do - I'd just never thought of it before! A new ASP page has also been written to display this information.
    4/6/10 Regatta Finish It was possible to record crew 0 as having won the race...
    3/6/10 Entry Manager TODOIf small boats are affected by substitutions (at a regatta) then the RegattaNames table really should be updated automatically. And this should be logged to the Alterations table.
    3/6/10 Spider Engine At last! The Regatta font is all but obsolete, as the TXT & RTF files generated by the programme use the Unicode characters from Courier New that are designed specifically for block diagrams. The TXT file needs to be saved in Unicode format, while the RTF file remains as ANSI, but with some bizarre character encodings that have taken me a rather long time to work out...
    1/6/10 Spider Engine I never got around to laying the spiders out in division order; this is now done, just in time for Hexham. However, I think that I'll leave the PHP as it is.
    1/6/10 Hexham We've had problems finding a machine that can run IIS - Hexham's admin has XP Home, which is useless, and Windows 7 Ultimate. IIS failed to install fully on this the first time around, but thereafter worked a treat. Howver, W7 raises a number of issues:
    • All processes run in a limited account, even if you're logged in as the machine administrator. This causes some problems with registry access, as keys under HKEY_LOCAL_MACHINE cannot be created. I therefore propose to continue installing profiles to this key, but to read/write the current profile to HKEY_CURRENT_USER. Obviously on installation this key may not exist - in this case, revert to the installed profile...
    • CACLS has been replaced with ICACLS. RaceOptions therefore needs to be aware of the OS version, though I have for a while thought that it would be better to create a separate utility for setting file permissions.
    • Entry Manager creates Virtual Directories - I'd completely forgotten this. Again, it needs to be run as Administrator in order to do this. This functionality (which I'd forgotten about, and is used in very few ASP pages) would also be better moved to a separate configuration utility. The reason for using virtual directories is that 'Enable Parent Paths' does not need to be enabled...
    27/5/10 Database Following a libellous letter from one crew at the May Regatta, I have created a new table. This records the ARA numbers of problematic competitors, who can be identified with the following SQL: 'SELECT OARACompetitors.MembershipNo, CompetitorIssues.* FROM CompetitorIssues, OARACompetitors WHERE (((OARACompetitors.MembershipNo) ALike "_______" & Mid([competitornumber],8)));'

    In GTD's words, sod them.

    27/5/10 Entry Manager TODO - open frmIE in reverse order. If there are multiple to be opened, then store them in a dictionary. As each is closed, run the underlying query again as it may affect whether the others are needed...
    27/5/10 Entry Manager The order of the routines has been changed, with OARAUpdateDoubling, OARAIdentifyComposites, OARACreateCrewNamesForSmallBoats & OARACreateCrewNamesForBigBoats called immediately after withdrawing entries, but BEFORE runnignchecks such as same division.
    27/5/10 Installation ComCtl32 added to RaceManager component.
    25/5/10 MySQL April 1994 data retrieved from http://web.archive.org and converted to MySQL. October 1993 is the next project...
    20/5/10 OARA crewexport.csv - the first column is now entitled 'CrewID' instead of 'Crew ID'. 'Event ID' has also been renamed. So [OARA2 - Transfer Entries] needs modification...
    20/5/10 Database StatusID in StatusList, Regatta, RegattaFinalsSequence, OARAStatuses & RegattaDraw increased to 16 characters. (Hex database only as yet)
    18/5/10 Entry Manager Masters table is now cleared when deleting data.
    18/5/10 Database RegattaDraw.StatusTypeID removed - this is now held in StatusList. There was no mechanism to update the field anyway... That said, a field in StatusList to show whether or not points cards should be clipped might be useful...
    18/5/10 OARA Results
    • 2 crews scratched after entries closed, but never made it to the draw. In order that their entry fee was not set to 0, I did not reject them. This causes slight issues when generating the results - its not a bug, per se, as I was manipulating the database by hand...
    • Junior 2nd & 3rd VIIIs are run as private matches, since they are drawn on the day.
    • Program icon updated to new British Rowing logo.
    17/5/10 Regatta Server The new code worked well,
    17/5/10 Regatta Statistics Querystring modified slightly so that the footer is not shown.
    17/5/10 ASP The substitutions page now shows scratched crews with a strikeout - Racehl Maltby assumed that the page did not work, as the first crew she looked at didn't show a crew list. Because it had scratched on OARA...
    13/5/10 Regatta Server
    • Following the changes to ForceWinsDueToScratching, I have finally updated UpdateCrewForNextRace to use SQL statements instead of ADO Find & Update operations. This code is very, very old, and was written in a hurry when the regatta code was first implemented. Its never been brilliant, as evidenced by the code comment 'if we have an unknown crew in the plate event, then this will fall over spectacularly' - not really something you need in your most fundamental routine!
    • FinishRace no longer needs to check for 1stGoesTo etc being NULL, as this cannot now happen.
    13/5/10 Database [List - Runners & Riders] modified to not show races running at 00:00. A redundant table join has also been removed.
    13/5/10 Regatta Server ForceWinsDueToScratching now executes a loop, and will carry forward placeholders as well as crews. This is a significant improvement.
    13/5/10 Spider Engine The code has been updated to show Loser of R2 as the winner of a race. This is critical for the first round of a plate, where scratched crews often end up...
    13/5/10 Misc Sponsorship & Trophies still use the vbaccelerator treeview control
    12/5/10 Database Bug found in [Regatta - List Draw by Club on Specified Day], which is used to generate the events in which a club is racing. It wasn't taking into account withdrawn entries, so would show statuses in which the club no longer had an interest.
    12/5/10 ASP
    • Gavin's made a number of suggestions for improving the ASP pages. One that might be quite useful is the ability to click on a club name within the payment page and for it to display (on the same page) all of the crews that have paid. I'm not entirely sure how to do this, so have started by extending the entrystats page. 'Scratched' is now a hyperlink - click on it to toggle the visibility of a DIV element showing all of the scratched crews. The underlying code has therefore been moved into an include file so that it is exactly the same as scratched.asp I have added the same functionality for Withdrawn and Rejected, even though these do not have their own dedicated page.
    • print.css recreated. Not sure how it was lost! It has now been extended so that the menu is not printed out. The footer has also been removed.
    11/5/10 General Bugger. I've lost my main development drive at work. With a lot of code in development and therefore not checked in, I've lost the best part of 3 months of work. Plus all my virtual machines, all my setup information
    10/5/10 Entry Manager After entries close, check gender of crews moved by admin - Rachel got it wrong...
    10/5/10 Spiders TODO - Spider Integrity program MUST check for missing $P codes...
    10/5/10 PHP Unicode characters are now used for the spiders. This is a cosmetic improvement...
    10/5/10 PHP The regatta export code now copes with the Junior 2nd & 3rd eights, which are drawn on race day.
    9/5/10 entry manager bug - if entries closed, then rejected entries shown in alterations table as scratched as well
    9/5/10 Database New query [Mailing - Entry Addresses]. This allows a significant improvement to the system's handling of addresses. Every other competition using OARA mails details to the Club's primary contact. Since this system predates OARA, and is not dependent on it, I have the ability to define an address for each person making an entry. To date, anybody entering on OARA has been defined as using the club's address; the problem with this is that not all clubs even have a postal address, and that often mail going to the club fails to reach the person it was intended for mailing contact details may be redundant now.
    5/5/10 Spiders Spiders & Schemas for 27-31 entries (2 lane, 1 group) have been created. This is because Bedford Regatta has a truly massive entry this year, and may well need the large definitions!
    4/5/10 Database Junior 2nd & 3rd Eights have been marked as Private Matches. I am going to modify the draw program so that these do not generate spiders before race day, since they are 'drawn on the day'...
    4/5/10 Database Telephone number fields tidied up, inserting NULL instead of null string as appropriate, and formatting mobile numbers. TODO - I really ought to do this automatically. I'm also using slightly modified admin databases for Shrewsbury so that contacts are added to Bedford Regatta's database.
    29/4/10 PHP Bug found - see http://www.rowstats.com/regatta.php?id=104&full=1&club=SHR for an example - all races for J14.4X+ are listed twice. Will have to find and fix this later tonight. Or not, given that we have a PAT test tomorrow and I have a huge amount of kit to hide...
    29/4/10 ASP Various improvements made to entrystats - this is turning into an exceptionally useful page!
    20/4/10 Spider Engine Rather obscure bug found and fixed. I'm still not entirely sure what causes it, though I suspect that IIS is now prevented from accessing the registry. EventData.bas wasn't passing the filename to the DatabasePath routine, which caused the code to try and access the registry. This failed, so OCTOBER's entries were used by default.
    12/4/10 Entry Manager [OARA2 - Points - Remove Regression Current] is all very well and good, but Bedford Regatta this year has a competitor whose points are ND. In addition, [OARA2 - Points - Remove Regression Baseline] is totally redundant. Ordinarily, you'd expect ND to apply to coxes - in this case, the existing logic works. But in this case, a rower from Hertord College has not declared her sculling points. Bugger. This suggests that the best solution is to parse the CSV file in VB and remove the crap. But the format of the file is a bugger - write a new query and do it in sql
    12/4/10 Small Boats Head
    • Report [Head - Race Control Summaries] slightly modified to show 'Refund Owed' if appropriate. 'Missing Payment' confuses JKSM...
    • The Regatta version of this report did not provide the same information - this has now been fixed.
    • [3 Lane - Race Control Summaries] may be obsolete, though has been amended as well.
    • JKSM also failed to empty the envelopes properly - a couple of numbers remained and confused us massively when checking the contents of each envelope. The Head Race date has therefore been added to each label.
    • [Regatta - Labels on Back of Numbers] has been overwritten by the head race variant (which was better formatted), and then modified to use a new query that is day specific - this functionality is necessary.
    • winnersbyclub.asp is incredibly slow as it uses 2 queries within a loop. The call to LookupClubName has been removed as it can be done better by modifying a single query and passing in the club name as a parameter to the ShowClub routine. A call to Response.Flush also helps.
    5/4/10 Small Boats Head Many thanks to LMS for helping with the start order. All mistakes are mine/Mingay's.
    2/4/10 Database Masters table added. This holds the category entered, which is what we need to display when doing handicaps... No code exists yet to generate this. TODO - start order for vets
    29/3/10 Database [OARA2 - Points - Remove Regression Current] no longer excludes coxes - its perfectly possible for a cox to have regressed (LMS this year). Further investigation reveals a bug - R12, 12 will be converted to 12, 2. This has now been fixed.
    19/3/10 OARA I'm starting to develop an XSL file to format the results XML in a more useful way.
    19/3/10 Database The report [Doubling - Cross Check Crews after Draw] was written for Kingston to be able to check they'd input all doubling correctly. As such, it is now obsolete, and so has been removed. The following queries have also been marked as obsolete:
    • Doubling - Cross Check Crews after Draw based on crews
    • Doubling - Unlinked Statuses
    • Doubling - Floating Statuses
    • Doubling - Cross Product
    • Doubling - Check if specified combination exists
    StatusesAllowed table has been deleted from the main database. So has Doubling.

    StatusDoubling is almost certainly not needed. The following queries do not seem to be used, so have also been marked as obsolete.

    • Statistics - Doubling subquery
    • Statistics - Doubling
    • Doubling - Counts
    • List - Status Doubling for specified Day
    • Doubling - Create StatusDoubling
    • Other queries already marked as obsolete

    Yet more obsolete queries have been found. We're now down to 507 queries.

    • Timing - Delete TimesElapsed was used by the Server only, and is now done in SQL
    • Entries - Delete Doubling for Entry & Entries - Delete Doubling are obsolete
    18/3/10 Database I have run the Access documentation utility, which has identified another 9 obsolete queries. This means that we're down to a mere 520 queries...
    18/3/10 PHP The folder locations on our server have been rationalised, with blades & css as subfolders of php. And for Kingston, results can now be accessed via rowstats.com...
    18/3/10 Handicaps Veterans are being renamed to Masters.
    • The new table is now official, which means that I can run Veteran Handicap events without Gavin Dods moaning that I'm 'making up the rules as I go along'. Prat.
    • I've completely rewritten the Handicap calculator - it now loads its data from a text file, which means that it can be updated very easily should the tables change again. It loads them into a grid, so you can easily see how the calculation is done. Interpolation between actual data points is assumed to be linear.
    • The biggest improvement, though, is that the program now applies the rules that allow a Standard Time for an Open Eight to be converted to a Standard Time for a Women's Scull...
    • I've brought the code up to current coding standards, with subclassing and window positioning.
    • The installation program has been modified and now installs the 2010 handicap table in the Resources folder.
    16/3/10 RegattaDraw I have gone back to Database version 1, and checked that everything works!
    • Event Numbers are now exported to the MySQL database. One of John White's complaints about last year's Kingston Regatta results (hosted on MY website, for which I pay!) was that Event Numbers were not shown. Nobody has ever commented on this before...
    15/3/10 Regatta Server [Select - Specified Race] needs several TRANSFORMS. However, it doesn't need the full flexibility of [Regatta - List Races] - execution time therefore drops from 360ms to 70ms.
    15/3/10 General Client.bas has always got the HTTPServer from the database. This is actually pointless, as it is the same IP address as the socket uses. The code has therefore been changed.
    15/3/10 Regatta Control The return message from emServer_CrewInfo_Request is not used - it is therefore likely that Regatta - [Select Next Race of Crew] is obsolete. On further investigation, Head Control had not been updated to use a web page for crew details, so was actually using the message. This has been fixed.
    11/3/10 Database Ouch. Apart from the queries used to generate the main website results, there are a staggering 102 queries that depend on the Regatta table. Some of these will be rendered obsolete by the new design, though.
    • control - crew late on start
    • control - generate regattalanes - deleted
    • control - generate regattanames - deleted
    • control - generate regattanames subquery - deleted
    • control - generate regattanames subquery 2 - deleted
    • control - generate regattanames subquery 3 - deleted
    • control - races won by default TODO
    • count - groups per status - obsolete - this information is now held in the RegattaDraw table.
    • count - groups per status subquery - obsolete - this information is now held in the RegattaDraw table.
    • count - races completed - rewritten
    • count - races completed (finals) - rewritten but not tested yet
    • count - races contested
    • count - races contested(finals)
    • count - races less than 3 minutes late
    • count - races more than 10 minutes late
    • count - races uncompleted
    • count - races uncompleted subquery
    • count - races uncontested
    • count - races uncontested subquery
    • count - trophies required (regatta)
    • count - trophies required for plate
    • count - trophies required subquery (regatta) - rewritten, removing obsolete check for NULL group.
    • count - trophies used (head)
    • debug - invalid draw - rewritten - complex union no longer needed
    • display - regatta all crews
    • display - regatta information
    • display - regatta names - deleted
    • display - regatta names 2 - deleted
    • display - regatta names 3 - deleted
    • doubling - cross check crews after draw
    • doubling - cross check crews after draw based on crews
    • export - mysql regatta results
    • list - clubs affected by plate
    • list - collapsible statuses
    • list - collapsible statuses subquery
    • list - comments - deleted
    • list - comments for specified race - deleted
    • list - comments on crew - deleted
    • list - comments on status - deleted
    • list - ignored crews at specified status
    • list - plate events
    • list - race number of crew subquery - obsolete
    • list - races affected by scratchings - rewritten
    • list - races with comments
    • list - races won by default
    • list - regatta entries by specified status
    • list - regatta scratched crews
    • list - regatta winners
    • list - regatta winners by club
    • list - regatta winners by day
    • list - regatta winners of groups obsolete
    • list - regatta winners via OARA
    • list - repechage events
    • list - runners & riders
    • list - sponsors
    • list - sponsors on specified day
    • list - sponsors subquery - rewritten
    • list - sponsorship for ALL statuses
    • list - sponsorship for ALL statuses subquery - rewritten
    • list - trophies for ALL statuses
    • list - trophies for ALL statuses subquery
    • list - winners in lane 1 - deleted
    • list - winners in lane 2 - deleted
    • list - winners in lane 3 - deleted
    • mailing - envelopes (regatta) - needed to check counts - the old query included withdrawn crews. TODO - check if this is necessary!
    • mailing - notification of draw (regatta) - recodded ok - MUCH simpler
    • mailing - notification of entries (regatta) - recoded ok
    • regatta - list draw by club
    • regatta - list races affected by doubling
    • regatta - list races due in next hour - rewritten
    • regatta - list races for specified sponsor
    • regatta - list sponsors races
    • regatta - list statuses with results
    • regatta - list statuses with results subquery
    • regatta - list time between races
    • regatta - redraw
    • regatta - select crew - now has a Day parameter. Most fields removed - lets see what we actually need
    • regatta - select next race of crew - now has a Day parameter
    • regatta - select next race of crew subquery - rewritten
    • regatta - spider
    • regatta - update null races
    • select - last heat won by crew - obsolete - was used for commentary (years ago)
    • select - last heat won by crew subquery - obsolete - was used for commentary (years ago)
    • select - race
    • select - specified race
    • select - winner
    • statistics - club wins at regatta
    • statistics - club wins per day
    • statistics - percentages per station
    • statistics - prizegiving
    • statistics - races completed
    • statistics - regatta summary of wins by club
    • statistics - timing
    • statistics - verdicts - rewritten, though it seems a bit pointless
    • statistics - winners per station - rewritten, though will need more work, as the query does not provide a COUNT.
    • statistics - winners per station in finals - rewritten, though will need more work, as the query does not provide a COUNT.
    • timing - lateness
    • timing - less than 3 mins late
    • timing - more than 10 mins late
    • update - race on course - renamed, rewritten, & now has a Day parameter
    • update - time of race

    • [Display - Last Marshalling Position] deleted as it is obsolete. Same for [Display - Control Position]
    • [Control - Races won by Default] renamed as [List - Races won by Default (to go)]
    • [Update - Race On Course] renamed as [Regatta - Update Race On Course].
    • [List - Qualifying Statuses] modified to link to OARAStatuses via ARACrewID. Previously, it linked via statusid & dayid, which is almost certainly dangerous...
    • [List - Entry Comments] has never been used, so has been deleted.
    • All of the Delete - TABLE queries have been deleted - it is just as easy to do them in SQL, and avoids cluttering up the database with unecessary queries...
    • [Regatta - List Statuses with results] and its subquery are not used, so have been deleted.
    • [Regatta - Specified Status] is not used, so has been deleted.
    • [Regatta - Statuses in Draw] is not used, so has been deleted.
    • [Select - Entry] is obsolete
    • [Select - Specified Race] and [Select - Race] appear to be doing virtually the same thing. One adds a start time, the other a status description. In the new model, the start timehas been added to the RegattaRaces table.
    • [Select - Winner] appears to be obsolete.

    This is a truly massive change - whilst its well worth doing, I very much doubt that it will be complete this year

    11/3/10 RegattaDraw Bug found in NumberRaces - Group should now be calculated from Node.Text, not Node.Tag...
    10/3/10 Database In response to requests from both Kingston & Shrewsbury, both of whom run 2 day regattas, I have started to look at the possibility of Race 1 & Crew 1 occurring on both days. Obviously, this is impossible with the current Regatta table. However, RegattaLanes & RegattaRaces have existed for some time as work in progress. The problem comes from the fact that these tables are fully normalised, whereas the Regatta table isn't. Existing queries would therefore need massive updates to get them to work. Or so I thought. It turns out that I can easily join to crosstab queries, which perform a SQL transform on a source table. As long as I use the * operator to select all columns, I can easily replicate the existing behaviour. To make the database structure fully generic, I have also added tables for RegattaVerdicts, RegattaResults, RegattaTimes & RegattaOutcomes, all of which can be transformed.
    • Its going to take a while to get this going, and I very much doubt whether it will happen this year, as the RegattaServer DLL will also need a major update. In preparation, though, I have added a Database_Version key to the EventData table, which regattadraw.asp uses to determine the correct field.
    • One advantage is that most of the JOINS can be done as INNER joins, since outcomes will always exist.
    • Use of the TimesElapsed tables for Regattas (specifically, overloading the CrewID field) is really not very clever.
    • We need to create a dictionary in the ASP page to determine what columns are present in the results recordset - before race day, for example, RegattaResults, RegattaTimes & RegattaVerdicts will be empty.
    • The RegattaTimes table allows me to get rid of the 'ASP_TimeTaken' key - if the competition isn't recording times, then the table will be empty and the relevant columns won't exist in the recordset. So all we need do is check the dictionary - we now have flexible results!
    The next stage is to populate the new tables during the Draw, which shouldn't be difficult. True, it'll add a bit of time, but this will be negligible in the overall scheme of things. Then I'll need to delete the Regatta table and figure out what queries are needed...

    Forget the Divisional Draw - THIS is the major update of 2010. And its flexible enough to cope with any number of racing lanes, given a bit of thought...

    9/3/10 PHP All of the PHP pages now produce valid XHTML 1.0, ensuring that they render properly in all browsers. I have picked XHTML as it has forced me to get rid of deprecated tags such as CENTER and STRIKE, both of which have been replaced with a vastly improved CSS stylesheet.
    6/3/10 Spider Engine Spider Format should not be in the options - it should instead be used as required.
    5/3/10 Virtual Machine Windows Update has been run on the XP virtual machine on my laptop. I can now test the installation on a totally clean system.
    4/3/10 Entry Manager
    • DivisionID now shown for divisional regattas. This has meant a minor change to the layout.
    • Search form - history combo has never been used, and so has finally been removed.
    3/3/10 Race Options Its now possible to create new entry fees if they are missing from the table.
    3/3/10 Regatta Draw
    • TODO Race Interval (now in seconds) needs to be configurable per division.
    • If it is not a divisional regatta, then DivisionID is assumed to be 1 when accessing the parameters.
    • LockWindowUpdate now used extensively.
    • [List - Finals Sequence for Specified Day] has been modified so that it copes with DivisionID 0. This is so that we can change a regatta's format between normal and divisional WITHOUT having to reimport entries from OARA.
    • AssignGapsForOctuples was hardcoded to look for J14.8X or WJ14.8X. So it won't cope with the new nomenclature for women's events, OR for J15s. A global flag has therefore been added to detect these.
    • Gaps MUST be specified in seconds in the same way as everything else is. Octuple gaps were also incorrectly set as whole minutes, ignoring seconds...
    • Iterations parameter removed, as it is a pointless concept.
    • Gaps for Octuples are of the correct length, depending on Division.
    • Gapping routines merged into one - AllocateRaceTimes. This is a significant improvement, as it allocates race times throughout clash resolution, making debug significantly easier. Number races can use this information instead of having to rely on reformatting the nodes themselves. Ideally, I will modify CalculateClashesInternal to use race times, though this is NOT a job for today!
    • Major improvements made to the UI.
    • Event Numbers - do we order by division? Spiders look odd as the crew numbers depend on division...
    2/3/10 MySQL Race names are now properly escaped - I'm testing using Hammersmith Women's & Juniors' Head (in which I raced)... The idea was to start with a blank database, and to import somebody else's data. I imported an Excel file (Sheet1) into the database, with CrewID, StatusID, ClubID, Name, Secs as the ONLY fields. The following 3 queries enable the generation of results compatible with my database:
    • INSERT INTO Entries ( EntryID, Name, StatusID, ClubID, DivisionID ) SELECT Sheet1.CrewID, Sheet1.Name, Sheet1.StatusID, Sheet1.ClubID, 1 AS D FROM Sheet1;
    • INSERT INTO Crews ( EntryID, CrewID, Scratched ) SELECT Sheet1.CrewID, Sheet1.CrewID, IIf([secs] Is Null,True) AS s FROM Sheet1;
    • INSERT INTO TimesElapsed ( CrewID, ElapsedSeconds, StartTime, FinishTime ) SELECT Sheet1.CrewID, Sheet1.Secs, IIf([secs] Is Null,Null,0) AS S, IIf([secs] Is Null,Null,1) AS F FROM Sheet1;
    You may ask why I'm bothering to do this.
    • Test scenarios are always useful - this one has highlighted the fact the race names MAY need to be escaped.
    • Hammersmith uses sub second accuracy - I need a test scenario that doesn't affect Kingston data.
    • Their results are hard to read - I wanted my crew to be able to browse the results properly.
    • But, most importantly, I'm looking for data on which to base my start order.
    • [List - Results by specified Status] needs to sort on S, not ThisTime... This was highlighted by a status in which one crew recorded a time of under 1000 seconds, and the rest over 1000. The results ASP pages showed the crews in the wrong order. This fix had already been applied to [List - Results by Status].
    14/2/10 February Head
    • Head Finish minimise bug found and fixed.
    • Bogus Time IDs confuse people on Start Timing, so have been removed. One day I'll get round to writing a proper correction system for them.
    • Handicaps ASP page written, though isn't very good yet.
    • Extra filters added to completed.asp
    • MySQL export routines now export TimeElapsed, which is necessary if we're running a handicap system. The PHP code displays the actual time if appropriate. If a handicapped crew has been disqualified (as happened to one of our crews) then the code used to generate the export outputs NULL.
    • Main database converted to Access 2002/3 format.
    11/2/10 Regatta Draw MAJOR FUNCTIONALITY UPDATE

    I have finally coded this. When Hexham first proposed the idea, the only solution was to run multiple Days, which would be combined after the Draw. This isn't really satisfactory, and obviously can only be used if the regatta runs on a single day. Kingston doesn't.

    • pDay was defined as adChar instead of adInteger in several places. Whilst this is unlikely to have an effect, it is a mistake...
    • Entries are imported as normal, though DivisionID is used instead of DayID, which is already used by Kingston.
    • The Race List is generated for each division, with a black node inserted between them. Doubling between divisions can therefore be taken into account.
    Enough Regatta stuff - I have a head race to run in 3 days time...
    11/2/10 Database
    • OARADivisions removed, as all of the data is now held in OARAStatuses. Various queries have been modified to suit.
    • [OARA2 - Update DayID] & [OARA2 - Log Day Changes] have been removed - they only existed to fool the system into thinking a divisional regatta was in fact a normal 3 day regatta... [OARA2 - List Changes (Day)] can go as well.
    • StatusDoubling table is obsolete, as are all of its queries. These related to the disastrous attempt to create a block based draw.
    • [Select - Status of Specified Entry] MAY be obsolete.
    11/2/10 Race Options
    • EventNumbersForGroups removed, as it is always set.
    • Chevron removed, as it has never been implemented.
    10/2/10 OARA Events Now that Race Options supports divisions, its time for this to do so as well.
    • AM/Mid/PM were hardcoded, assuming that ALL divisional regattas use 3 divisions. It's not that simple in practice, so everything now works off the abbreviations.
    10/2/10 Race Options The last stage in the conversion of this program is now complete.
    • It uses g_tEventData and the dictionary instead of a bizarre set of classes. The reason for the change is that I need to code a divisional regatta for Kingston VERY soon.
    • Full UI added for configuring a divisional regatta. I've used a grid control, which makes the code very simple.
    • IWAM_MachineName no longer assigned permissions - this speeds up load time.
    • Load time also significantly improved by removal of the classes.
    • Abbreviation added to each division.
    9/2/10 ASP entriesbyclub now recognises QS_EXPORT - not sure if publishing this is useful. But it has highlighted invalid markup :(
    7/2/10 OARA Events Bug found - VCDE.8+ not generated correctly.
    7/2/10 Database [Statistics - Entry Matrix (Heads)] is a new, very useful crosstab query.
    4/2/10 Installation An install group for Kingston Head has been created.
    3/2/10 Ideas
    • Uncontestedstatuses can show private matches by looking at count or clubid as well as count of entry id.
    • regatta divisional draw needs gap until next start time. suggest a black node.
    3/2/10 Entry Manager The hardcoded list in the payment type combo box has finally been replaced by a query on the PaymentTypes table. Again, this functionality is long overdue, and has been added because the Lea are paying by BACS transfer, which wasn't in the list...
    3/2/10 Kingston We're going to use OARA for the main head this year. It'll be easier to set up, as eights are in the first division, and fours in the other.

    But, the rumour was true - KAR will run a divisional system on both days this year...

    2/2/10 Database OARA now has the ability to 'unreject' entries - ie reinstate them. The database had no way to deal with this, so I have added a Rejected flag, which is set at the same time as the withdrawn flag. This is not ideal, but will have to do for the time being - this winter I will merge both flags into an enumerated column. That's not a change I want to do in a hurry...
    26/1/10 ASP
    • The table generated by divisions.asp is used on our website, and so now validates as XHTML.
    • New page written - entrystats. Its quite useful to see how many entries came in each day...
    • InsertShadedRow function written and used throughout to simplify the code.
    • entryfees now only shows relevant days, and doesn't show day at all if it is a one day competition.
    • Shaded rows are a bit more complex if ROWSPAN is being used. contacts.asp handles this correctly.
    21/1/10 Head Editor It looks like I never finished the new code that allowed renumbering of a single division, as the query was missing a fundamental parameter! The reason for the change was the addition of Head_FirstCrew functiionality for Kingston. If the key is missing, or its value is 0, normal sequential numbering is used.
    20/1/10 ASP
    • Minor fix in the query used for entriesbyclub (List - Head Entries by Specified Club). The last part of the sort order is now DoublingTypeID.
    • Minor fix in alterations - an extra (unused) row was being added, before each normal row. This was only noticed when cutting and pasting to emails...
    • alterations also had a reference to the obsolete ADMIN_BATCHES key.
    • alterations is also useful to email to clubs, so can now have a club parameter.
    16/1/10 Race Options Added the ability to apply a standard seat price. This code is long overdue!
    12/1/10 OARA At last. The ability to edit notes and add crews (first time I've seen either for a Bedford event). Sure, nobody reads notes, but at least we can try to update the information. All that remains now is for the URL text box to be widened - currently, even a tinyurl is too long ;(
    12/1/10 Race Options Need a handler for Day1_BoatClasses etc.
    12/1/10 Race Options Duh. I set up Feb2010 today, and couldn't figure out why divisions were not being imported. What I had forgotten, of course, is that I now have a fully functional division editor (instead of hardcoded functionality), and the database was still set up for KSBH...
    12/1/10 ASP
    • Bug fix in divisions.asp to show the correct divsion number. It was only ever wrong when just a few entries had been received, and so some divisions had no entries at all.
    • The code also now uses text-align to ensure that the exported HTML code works on our website, which uses CSS & XML.
    29/12/9 Kingston A random conversation at Boxing Day Scratch Eights now leads me to believe Kingston are planning to run divsional racing on BOTH days of their regatta this year. On reflection, my current system for doing this (via multiple fake Days) isn't very good - far better to use the REAL DayID, and then make use of DivisionID... This will entail:
    • Modifications to OARA Events, such that it outputs both DayID AND DivisionID.
    • Minor changes to the Entry Manager to cope with the extra data.
    • Changes to Race Options, allowing 1st Crew & 1st Race to be set for each division, as opposed to each day.
    • Changes to the draw - the most complex bit of this...
    9/12/9 Entry Manager
    • Multiple manual entries now works again - result of a function wasn't being set properly.
    • The manual entry code is utter crap.
    26/11/9 OARA Results A number of minor fixes have been made to this:
    • TimeOnly crews that scratched are now marked as DNS, not TimeOnly.
    • Manually entered crews (ie those outside OARA) do not have a StatusPosition, which allows OARA's XML to be imported OK.
    26/11/9 Head Penalties New program written.
    24/11/9 TODO In no particular order:
    • UI for applying Handicaps & Penalties
    • Ability to edit entry fees
    • Display of email addresses within the Entry Manager
    • Addition of multiple manual entries in the Entry Manager
    23/11/9 Entry Manager Since a competition administrator can't scratch crews, we have to reject them. AFTER the draw is published, rejected entries update Crews.Scratched instead of Entries.Withdrawn.
    23/11/9 ASP
    • Results by Club now works again (reason for breakage was the removal of Difference).
    • Results by Status don't cope with decimal places in the times.
    • Response.Flush used in the results pages (club, status)
    • Grid & highlighting implemented for head race pages
    23/11/9 OARA Results Minor bug in the HeadPositions module fixed - DNF crews handled properly.
    23/11/9 ASP racelist.asp removed from the installation, as the table has been stripped down to the bare minimum...
    22/11/9 Star I have no idea why the code didn't work today, as it did yesterday. One of the problems appears is that I cannot use ASP to access MDB files on Chris' laptop (Vista Home Premium, Office 2007). I have installed the software on Vista Business & Windows 7, both of which just worked.
    21/11/9 KSBH Just as well that manual timing exists, since Kingston have had major computer problems - memory stick failure AND missing power supply. So I'm doing their timing on my laptop in debug mode...
    20/11/9 Timing Head Start & Finish now have a manual timing option.
    20/11/9 EntryManager New routine added - OARACreateRaceOrderForNewEntries. Should be self explanatory...
    19/11/9 Database
    • [List - Winners subquery] renamed as [List - Winning Crews]
    • [List - Winning Crews (Head)] marked as obsolete.
    • [List - Winning Times] - ValidResults should be joined to Crews.CrewsID instead of Entries.StatusID
    These changes ensure that TimeOnly crews are not recorded as having won the event...
    19/11/9 Entry Manager
    • Division Changes for KSBH (ie where they are set in the OARA Events program) are now properly logged.
    • [OARA2 - Update Missing Divisions] has been renamed to [OARA2 - Update Divisions (Fixed)] for consistency.
    • Bug in this query fixed - it was joining Entries.StatusID to OARAStatuses.StatusID: in the latter table, StatusID is not guaranteed to be unique.
    18/11/9 Race Options
    • EventData rows can now be deleted via an optional parameter.
    • HTML Insertion file has been removed, as it is only ever set in PHPMyAdmin.
    • Backup folder has been removed.
    18/11/9 Head Editor
    • Enums now used for all of the columns. This is good practice, as it makes the code much easier to read, and allows columns to be eaily reordered if necessary.
    • Both KSBH & Star reported windows being moved off the top of the screen. Not entirely sure what's going on here, but MoveToSavedPosition has been modified to cope.
    • The code in PerformDraw works, but is truly dreadful!
    18/11/9 KSBH A few minor suggestions have been made, all of which will be incorporated:
    • After the draw has been published, allow modification of the Start order, but do not allow the draw to be renumbered. I'm very surprised that I haven't done this already!
    • Add a First Crew parameter to each division. KSBH need this because of the signage in the marshalling area; we could make use of the same feature to use up spare numbers (left over from previous events).
    • Add the number of entries in each status to the racing sequence grid. RR deems this useful, though I can't really see the point. But its easy enough to code!
    16/11/9 PHP The Entries table now has an EventID field, thus allowing me to show the draw for multiple competitions (ie Star SBH & KSBH).
    16/11/9 MySQL The export routines now properly escape apostrophes in crew names.
    14/11/9 Head Editor Draw sequence for fixed divisional competitions such as KSBH can now be modified on a per division basis. This is much easier to follow!
    13/11/9 PHP Results sorted by status do not show penalties
    12/11/9 Race Options The Entry Fees applicable for each day are now shown, though as yet there is no way to alter them.
    12/11/9 OARA Events Veteran Handicap events can now be created. Note that you'll still need to move them in OARA...
    12/11/9 ASP Results shown by time handle TimeOnly crews correctly. Results sorted by Status do not - this is a potential problem, since the list of winners is also wrong.
    12/11/9 Server
    • PHP.bas now included for consistency in the creation of results.
    • If a crew has raced in the wrong division, this information is now updated. The code used to do this, but stopped working when the ApplyHandicaps routine was coded.
    11/11/9 Database Boat Usage query now ignores withdrawn crews.
    11/11/9 ASP Divisions.asp now generates a filter itself from a database setting if the QueryString does not explicity define the filter.
    10/11/9 Database [List - Racing Sequence] wasn't quite right - it was using the HostID as the criterion, instead of in a JOIN, so Star Head lost 95% of its crews during the Draw. Oops. This problem has now been resolved, and the databases for both Star & KSBH (the source of the problem) updated. I suspect that the (so far unresolved) issue in the RegattaFinalsSequence table is directly related.
    9/11/9 Database I have finally bitten the bullet, and rationalised the EntryFees table & those related to it.
    30/10/9 Regatta Draw The loop counters for clash resolution are now Longs, instead of Dates. This change is necessary, as test code done at work some weeks ago proved the Date datatype to be utterly unsuitable for use as a loop counter, due to precision issues.
    30/10/9 OARA Events This program now allows new events to be configured without having to delete the mapping file. This is done by appending new nodes to the XML document. It alos now does what OARA Divisions used to - the division allocation for KSBH, which is rapidly approaching.
    29/10/9 Spider Engine Redundant routines have been removed from this, and all unnecessarily Public routines turned into Friends...
    27/10/9 Regatta Draw Sadly, the VB based TreeView control is just too slow to be used during clash resolution. Even when I took out much of the checking code, it ran over 10 times slower, which is a GREAT pity. To be honest, I'm not entirely surprised, since millions of operations are needed on this control, and VB is hardly a fast language. However, I still reckon that the control will be useful, since it provides a much more intuitive view of the draw, and so should be used for display purposes only, allowing the hard work to be done by the standard control.
    26/10/9 Spider Engine I have finally tracked bown the problems I've been having with Event Numbers. These were cached when the Spider Engine is created; this is not updated when a new draw is done. So, if the events have changed, everything is out of sync.
    26/10/9 Database Key fields should be grouped together at the beginning of a table.
    24/10/9 PHP EventIndex should be a string.
    24/10/9 Database [List - Regatta Winners] & [List - Qualifying Statuses] - DayID parameter removed.
    22/10/9 Race Options Extra UI added:
    • Division entry method: KSBH specfies which statuses race in which division. The key has existed in the database since last year, but was set manually.
    • Host Index: This is a rather obscure parameter, mainly used in PHP code to select the correct stylesheet. Its only real use is to stop Gavin Dods moaning that Bedford Regatta's results pages are indistinguishable from the Club's!
    • Number of Divisions: this has been necessary for years - to date, I have always had to do manual database editing, which is not good enough.
    • Decimal Places: Used for formatting head race times.
    • OARA Payments: Used for Cambridge Autumn Regatta this year, though there are still a few problems with the code.
    • OARA ID: Not currently used, but I requested Alistair Groves to add it to OARA, so I ought really to make use of it...
    • HTML Insertion File: used to add the contents of a custom file into the header section of some pages.
    21/10/9 ASP S_PLAIN & S_NOTITLE are used quite a bit. But the problem is lack of consistency between pages, amplified by the fact that we have a page title, race name, race date, footer and potentially a filter/sort description. All of which are optional - quite frankly, its a complete mess. TitleFromPageID clutters up the include file, and means that it contains a vast amount of code that is completely irrelevant to the current page. Kingston's redirection code doesn't help either.

    • Each page is to have a function called 'GetPageTitle'. This will be called by the include file, which will ensure a standard layout and behaviour.
    • Server.URLEncode is used to allow + symbol in the query string. This allows titles to be more easily produced.
    21/10/9 Regatta Control Crew Details form now uses a web page to view the crew, which is a significant improvement. However, it does not work for manually entered crews.
    15/10/9 Proxy Server Ever since the Target parameter was used to identify a specific machine, there has been a potential problem: if a client socket's handle is the same as the station number, then a message that is intended to be broadcast will only reach this socket, instead of being broadcast. I cannot say whether this has ever happened. The solution is simple - prefix all messages to be sent to a specific client with a non numeric character.

    Ouch. It has (somewhat unsurprisingly) taken me the best part of 11 hours to make these changes, and to get a Head Race start time into the database. I had forgotten about ClientOptions, which still referenced a relative path, even if in debug, and had made a typo in the base clsQueue. Still, it appears to work now!

    15/10/9 Regatta Server This has needed an overhaul for some years!
    • Unused functionality has been stripped out (such as the CheckIn routines). We can always add them in later if required.
    • Since the message nomenclature has been radically altered, it now makes sense to add a few more for clarity. So esCorrectDuplicateStart & esCorrectRaceStarted have been replaced by emRegatta_Start_CorrectRace, emRegatta_Start_CorrectRace_Request, emRegatta_Start_CorrectRace_Reply, emRegatta_Start_CorrectRace_Notification - instead of a message being handled in several ways, depending on its context, each of the new messages has a single purpose.
    • Much of the Queue code merely duplicates common functionality. clsQueue therefore handles this, and leaves the other classes to get on with their own tasks.
    • For some bizarre reason, all processing is carried out by clsServer - all of the client classes merely raise events to this. This methodology actually predates the Proxy Server! Whilst efficient enough, it makes the code extremely hard to read. There's also quite a bit of duplication, with several routines doing the same thing.
    The DLL has been almost completely rewritten. There are now just 58 messages, as opposed to 203 in the previous version!
    15/10/9 Sockets I have broken compatibility on this. There are several reasons:
    • There are many unused messages, mainly due to the demise of the EntryTerminal
    • Messages are poorly named, and some of the ranges overlap (etmRequestCrewNumber needs to be incremented by 700 each time it is used, which is a potential source of errors).
    • A line feed is used as the end of message code, which prevents its use in any messages. This has been overcome by replacing it with a tab character, but this is more a workaround than a proper solution.
    • Message nomenclature has been completely reworked. This makes the code significantly easier to read.
    • Message IDs are no longer grouped into blocks, which guarantees that each ID is unique.
    • Standard ANSI codes have been used as control characters; STX, ETX & GS. This allows line feeds and tabs to be used.
    • Messages are only being added to the enum once I have verified that they are in current use. The server actually uses far fewer messages than expected, despite each Request having a corresponding Reply.
    14/10/9 ASP completed.asp needs some work, as clicking on 'Extracted' moves everything around. Sara Reay found this very confusing... Its better now, as I use named anchors, but still not perfect.
    14/10/9 Race Manager
    • The grid control has been replaced by the new control, which allows much better node formatting.
    • Unnecessary forms have been removed.
    • Subclassing limits the size of the window.
    • frmQuery now hidden when another node is selected.
    13/10/9 Database The new code for TimeOnly didn't work. The problem actually lay in the complexity of some of the queries - calculation of Difference can be done easily in ASP, but makes a query unnecessarily complex, with a resulting Data Type mismatch error.
    13/10/9 ASP timingerrors.asp has been modified to show status & blade colours - very useful if a crew is approaching the finish with no number...
    9/10/9 Database Bug found in [List - Draw]. This needs to get the Start order from the ActualStatusID, but was getting the StatusDescription from the table joined to this field. Another join (on StatusID) has therefore been added to provide the correct StatusDescription. This hasn't been noticed before as the wrong description is only applied (by [List - Draw by Specified Status]) IF the first crew in that recordset has changed status.
    6/10/9 General A number of problems are still outstanding:
    • There is no UI for setting Time Only crews.
    • Time Only was stored in the Crews table, though in fact we often know this information when taking entries - indeed, it would be quite useful to be able to record that a sculler has said he'll go Time Only if there's no opposition. Currently, I have to remember this, and add it to the Crews table afterwards, which isn't really good enough (OK - this functionality was coded in a hurry for KSBH last year). There's also no way for draw.php to show this information.
    • OARA Events isn't really up to scratch. To be honest, it's virtually useless, except in the scenario where multiple OARA statuses need to be created (eg elite & college eights are both ELI.8+, and a Veteran Handicap event really needs to be assigned a separate code so that it does not screw up the StatusList table).
    • Head Editor has needed a few minor tweaks, disabling buttons once the Draw is published.
    • Entry Manager will not allow multiple entries from the same contact.
    • Entry Manager has no concept of multiple email addresses - in fact, it doesn't allow one to be entered at all.
    6/10/9 General Ouch. Our October Head has 424 entries.
    2008 = 320; 2007 = 351; 2006 = 317; 2005 = 277; 2004 = 324; 2003 = 319; 2002 = 281

    This is significantly larger than anything we've seen before on this date - to think that we were thinking of abandoning the event permanently in 2006!

    2/10/9 Treeview I have broken compatibility on this control. This is a deliberate action, since the control was derived from one I use at work (or vice versa - I forget which). Unfortunately their implementation differs, since the work one is unicode, and the regatta one isn't...
    30/9/9 ASP
    • Bug in InsertOptionSession has finally been fixed. This appended the new option to the QueryString each time, with the result that it got longer and longer.
    • QS_PLAIN has been giving problems for a while. I have finally tracked it down - StartPage checked its value before calling InitPage, in which GenerateBase (the routine that actually sets values in the Session object based on the QueryString) is called. Only then was the correct value being set, by which time it was too late...
    29/9/9 ASP boatusage.asp has been written.
    28/9/9 General The Amateur Rowing Association has today changed its name to British Rowing, which actually describes it far better. In my experience, (10+ years) it has had virtually no interest in provincial, amateur clubs, unless they have a high proportion of juniors or potential squad members. Ho hum.
    16/9/9 Regatta Draw This program works, but is very badly written. It has evolved over the last 6 years, but whilst the requirements and input data have changed beyond recognition, the core engine has remained the same. It still relies on node colour and text for its core functionality, though some of the data structures have been improved.

    So why worry? It works!

    Implementation of 3 lane functionality was easy enough to to within the draw program, but made the database virtually unworkable.

    16/9/9 Race Options At last! This is no longer an ActiveX EXE.
    16/9/9 Documentation This no longer tries to process obsolete queries.
    15/9/9 Database Now that Cambridge Autumn is over, I can concentrate on the database again.
    • The first stage is to remove OARACrews.EntryID - this is obsolete, I believe, as ARACrewID is now held directly in the Entries table. The only queries using this field were [OARA2 - Composite Entries], [OARA2 - Append Composites], [OARA2 - Check J14 and below], [OARA2 - List Emergency Contact Details] & [OARA2 - List Emergency Contact Details for New Entries].
    10/9/9 Race Options The Regatta Server has also been updated.
    4/9/9 Race Options References to this have now been removed from OARA Events & the Entry Manager. For the latter program, boot time is now less than 1 second, as opposed to about 4.5 seconds - a massive speed up!
    4/9/9 Entry Manager I have finally got around to writing the Composite management code, which allows me to edit the names of composite clubs.
    3/9/9 Entry Manager Following a discussion with Richard Moseley, I have slightly modified this program to accept payment info from OARA.
    2/9/9 Help So why have I abandoned Microsoft's CHM format, and moved to a WIKI?
    • RoboHelp will not run on a machine that has more than 192Mb of memory. Whilst the maxmem switch could be used to limit the memory that Windows sees, this is not really satisfactory, and limits CHM development to NT/2000. Microsoft's help compiler doesn't suffer from this limitation, but is an absolute pig to use, and hasn't been updated for 10 years or so.
    • A WIKI allows me to easily see what pages do not exist yet - in other words, I can write the documentation as I go, putting in placeholders as required.
    2/9/9 Help I am setting up a new event from scratch, documenting the process via my new WIKI. This has given me the opportunity to overhaul the StaticData database - most fields are now completely redundant, having been replaced with rows in the EventData table.
    28/8/9 Rate Meter I'm very tempted to rewrite this again, since I've now worked out how to install a low level keyboard hook without resorting to dskbhook.dll
    28/8/9 2003 Server
    26/8/9 Installation This has been compiled as version 3.7.11
    26/8/9 Entry Manager
    • The Club Secretary Addresses are now transferred into the database, though no use is made of these yet.
    • AmalgamateFiles & CopyFile now have a Critical flag. Unless set, error messages will not be shown - the Contact Addresses are not used yet...
    26/8/9 Database [OARA2 - Delete Boats], [OARA2 - Delete Competitors], [OARA2 - Delete Divisions], [OARA2 - Delete Statuses] have all been marked as obsolete. They are only called from the Entry Manager, and can be done just as easily with a call to DeleteAllRecordsFromTable.
    18/8/9 Website The website upgrade is now complete. Its running PHP 5.2.10, with MySQL 5.0.81
    13/8/9 Change Log I've spell checked this file...
    13/8/9 Database The following queries have been marked as obsolete:
    • List - Races Contested
    • Statistics - Boating
    • Statistics - Boating Subquery
    • Boating - Last Known Position of Crew
    • Boating - Last Known Position of Crew subquery
    12/8/9 Race Options Whilst this program is due to be converted to a standard executable instead of a COM Server, it provides virtually all of the required functionality and will therefore be kept. So I've made a few improvements to it:
    • Click Handlers have been added throughout.
    • Head Race options have FINALLY been added.
    • Most of the controls in this program would benefit from being converted to the Owner Drawn controls I've written for work. Vertical centering of labels is very useful especially as labels and text boxes don't render the same...
    11/8/9 PHP phpinfo.php has been created, allowing me to check what versions our ISP is using. This is important, as I have requested a server upgrade...
    11/8/9 Treeview The TreeView control is very powerful, but in its original form was full of bugs, and lacked some important functionality. Since I use this control extensively at work, I have been able to devote a couple of days to its development.
    • A SubItem's Text Colour & Text Alignment can now be set.
    • The rather annoying Focus Rectangle can be removed.
    • MoveNode now deals with SubItems internally, which means that program logic can be simplified.
    • SubItems can now have their own picture
    17/7/9 Regatta Helper The CreateOutputStream routine (used to create log files etc) needs to be able to cope with multiple programs trying to open the same file. Since this can't be done, it now uses timeGetTime to generate a unique filename if necessary.
    17/7/9 OARA Results Guess what? OARA doesn't handle multiple winners of a single event (which Kingston had as they split several events into groups). I only found this out when I updated the program, as I didn't have time to code in group handling in May. The solution is for Alistair Groves at the ARA to create new events on OARA, for me to move entries into the new events, run OARA Events to create new statuses, import the new OARA data via the Entry Manager & accept all the status changes. Finally, the Regatta & RegattaData tables need to be modified by hand.
    10/7/9 Server The idea is to get my new server up and running for Sunday's regatta. I've now configured it for VPN access, though have not added the guest user yet as the CMAK profile is on my machine at work.
    10/7/9 Kingston Tony reported that scratching a crew had no effect. Since it worked for me, I had a look at his machine via VPN/VNC. I hadn't appreciated that he was checking the entries by club page, which shows withdrawn ENTRIES struck out. I've therefore modified the page slightly, so that scratched CREWS are shown in red.
    9/7/9 Regatta Server I have finally coded this to take account of Row Overs & Disqualified crews. The Crews table is now modified, based on the verdict, in the same way as I did on 17th June.
    8/7/9 Spider Engine The wretched train I'm travelling on has broken down. However, this has enabled me to get a nice long debug session in.
    • For Kingston, the Event Numbers were not being displayed correctly in the spiders for grouped races. I couldn't figure out what was happening late on Monday night. The clue lies in the database, since event numbers for IM3.1X are not in the Regatta table, though they are for Novice Sculls. Not sure what's going on here. Event Numbers were a late addition to the code and are not done particularly well, since they are stored in the Regatta table, do not depend on the Primary Key, and hence violate basic normalisation rules.
    • SponsorOfStatus is an utter waste of time, since it is called every time a spider is generated. A much better approach is to cache the data in a dictionary object.
    • Bug found in schemas for 20 entries, 3 lanes, no repechage - there are no identifiers for $A or $B. This is why Event Numbers were not generated for IM3 on the Saturday. The SpiderIntegrity program now checks that these identifiers are present.
    • Sunday's problems were caused by a bug in NumberRaces, whereby repechage races were not being assigned an event number. Both of these bugs have been fixed.
    • Not all spiders were being formatted correctly. Why this affected just Kingston and not Quarts, I am not entirely sure, though think it has at least something to do with the length of the crew names. Either way, there was an error in the recent recoded InsertHeatNumbers, which was not setting sFormatted in certain circumstances.
    8/7/9 Sponsorship Manager This made life MUCH easier than doing last year's allocation! A couple of minor points came up:
    • I'd forgotten how to remove a sponsor (easy when you know how). To make it more obvious, the cell's background colour has now been set to red.
    • When adding a sponsor, ensure that the 'Replied' flag is not being filtered out in [List - Sponsors Addresses]. I did this for the initial mailshot - the problem is that the new sponsor was not being displayed, as they did not have an address.
    • When allocating a sponsor to a status at the bottom of the list, it is infuriating that the cursor moves back to the top of the list. This has now been fixed.
    7/7/9 Kingston One day, the Draws for KAR will go smoothly! It is certainly getting easier, though there are still a number of problems:
    • The installation program worked fine, except I'd forgotten to include the databases! Fortunately, this is very easy to find & fix...
    • Adding Gaps in the racing programme for Day 2 did not appear to work. The problem was that gaps at the same time of day already existed for Day 1, and whilst the database tables & queries work correctly in this scenario, the program logic is wrong. It uses a find operation within the recordset - a much better way will be to use a SQL statement. This will then let us edit the length of a gap, which is currently not possible without deleting it first.
    30/6/9 ASP The contacts page has been updated to show ALL known email addresses for each contact.
    25/6/9 Database OARACrews.OARANotes & Entries.OARAComments need to be set to the Memo datatype, as somebody from Molesey has typed in an essay, which is considerably longer than the 255 characters allowed in a standard Text field...
    25/6/9 Installation svCommon was still being set to an long obsolete install path. This is not a problem, as the variable is no longer used, but it should not have survived this long...
    25/6/9 General I have finally figured out the proper syntax for CACLS. It turns out that the order of the parameters is critical.
    • CACLS c:\inetpub\wwwroot\2009 /T /E /R IUSR_ANTARES
    • CACLS c:\inetpub\wwwroot\2009 /T /E /G IUSR_ANTARES:F
    24/6/9 ASP Badges.asp is now day specific, and copes properly with people rowing in composite crews.
    23/6/9 Spiders The formatting of verdicts has annoyed me for a while, as it truncates them. I think that this is now working properly.
    23/6/9 Spiders I have made a slight modification made to the font, so that it looks rather more like traditional braces. It prints well, but doesn't look quite as neat on screen as the standard horizontal & vertical lines. It may help when I add in a proper > angle to the glyph...
    22/6/9 OARA Results For Star Regatta, I manually edited the crews table to set the Started & Finished flags.
    19/6/9 OARA Results I nearly got it right in May, but not quite. The problem was that DidNotStart, DidNotFinish & Disqualified were being overwritten for the crew coming second. This has now been resolved, and the code significantly simplified.
    • All of the queries relating to Regatta Starters can now be removed. They weren't great to start with, and never coped with 3 lane racing properly. Its far simpler, quicker and easier to understand if we use the Started & Finished flags in the Crews table.
    • OARA now accepts J14 and below as qualifying, so [List - Qualifying Statuses] has been modified to reflect the change.
    17/6/9 Server My new 1850 server is now up and running. Its quiet enough that even LMS doesn't object to it, and it is blindingly fast.
    17/6/9 General Default file permissions in wwwroot appear to have changed. By default now, all files have DENY set. To get around this, we need:
    • CACLS c:\inetpub\wwwroot\2009\Star\Star2009.mdb /R IUSR_ANTARES /E
    • CACLS c:\inetpub\wwwroot\2009\Star\Star2009.mdb /E /G IUSR_ANTARES:F
    17/6/9 Regatta Finish A verdict of Disqualified (d) was not handled. Not a problem in itself, really, but the server ALSO needs to know this so that the crew is not marked as having finished... Both programs have now been corrected.
    10/6/9 Vista I've finally got around to installing Vista on a virtual machine for testing purposes. Its the Business edition, which came with my new laptop. Star use Home Premium, and I was unable to get ASP to run on this last night. But I now know significantly more about Vista than I did yesterday...
    • CACLS is deprecated - instead, we have to use ICACLS. The syntax is slightly different. The following calls are necessary to make the EntryManager work:
      • ICACLS c:\inetpub\wwwroot\2009 /grant "USERS":(OI)(CI)(F)
      • ICACLS c:\inetpub\wwwroot\common /grant "USERS":(OI)(CI)(F)
    • Spiders seem to work now, though they didn't when I first installed the software. Not entirely sure why not, and more investigation is required.
    10/6/9 Server My PowerEdge 650 server (P4 2.8 GHz) is incredibly noisy, due to a single massive impeller fan. I've managed to find a reasonably priced replacement for it. The new machine is a PowerEdge 1850, with 2 3.2 GHz Xeon processors, 3 Gb of memory, and 2 36Gb U320 15k rpm SCSI drives. As such, its an incredibly fast machine. Bigger than the old server, it has 6 variable speed fans, which make it significantly quieter.
    10/6/9 Installation This time around I have not installed the software on my new laptop, instead registering the files manually. This has enabled me to track down a number of issues:
    • AccessControl & various Dimaco libraries were being installed, despite the fact that they're no longer used.
    • The custom event log stuff isn't really very useful, and so has been removed.
    • EntryManager uses MSCOMCTL32.OCX though this wasn't being installed.
    • The Spider layouts were being installed to c:\RaceManager instead of wwwroot\events
    10/6/9 Spider Engine
    • RTF files are now created with narrow margins all round, and are in Landscape orientation.
    • Grand Finals have finally been stripped out
    • The option to not display TimeTaken in the spiders has FINALLY been written.
    • Minor fix - if the Station name contains the word ' side', then alter the RTF Header. So it now reads 'First named crew is on Star Side' instead of 'First named crew is on the Star Side station'
    8/6/9 General I have now moved primary development onto my new laptop, though this may change, as the keyboard is horrible. Its about twice as fast as the old machine, which is a bonus.
    8/6/9 Spiders In the mad rush to create Star's spiders for a Primary Regatta, I didn't get round to testing them with live data - they were not formatted correctly.
    8/6/9 Regatta Draw The code has been very slightly modified to allow Star's 2 lane repechage system to be defined.
    8/6/9 Regatta Obsolete Regattas table removed. This also lets me remove the link to StaticData.mdb
    4/6/9 Database [Statistics - Event Details] and all of its subqueries are obsolete - they've never been used, and I'm not actually sure why they were written.
    [List - All Clubs] is also very old, and is believed to be obsolete.
    Ditto for [List - Composite Clubs].
    3/6/9 Database I'm now very glad that I changed the handling of Entry Fees - Kingston are pricing all events at £10 per seat, APART from Open & Women's Senior Eights, which are £12. Previously, this would have been impossible: the new structure allows me to define these as X8 instead of S8, and to apply a special pricing structure to them.
    2/6/9 Regatta Draw The conversion code will fail if a status exists on multiple days - unlikely, but possible if we've not altered DayID on changing status.
    2/6/9 Entry Manager One BIG problem when doing the draw for an event such as Hexham is ensuring that when a crew is promoted to another status, its DayID is also changed. I've therefore had to create a couple more queries to ensure that these are automatically picked up...
    29/5/9 Regatta Draw
    • [List - Finals Sequence for Specified Day] now replaces [List - Finals Sequence Day 1] etc
    • [Delete - RegattaLanes] has been marked as obsolete, as calling DeleteAllRecordsFromTable will work just as well.
    • A new button has been added to clear ALL data - in other words, to clean a draw completely. This can be useful for a multi day competition where a crew has changed day, and so gives key violations...
    • Quite a bit of redundant code has been removed.
    • The turnaround bug has been fixed.
    • Finally, there is a way to convert a divisional competition back to a single day's racing.
    29/5/9 ASP
    • Headers for a divisional competition are now correct on most pages. Inevitably, there will be a couple that I've missed, but its cosmetic...
    • Baseline points (using the new table) have been tested with dummy data, and work as expected.
    • problems.asp now allows you to view all the entries at each status.
    28/5/9 Database [List - Finals Sequence Day 3] is needed. It would be better to do this with a single parametric query - TODO.
    28/5/9 Database [List - Composition of Specified Entry] etc have been modified to include calculated points totals. This makes the logic of crews.asp much simpler, and also gets around the problem of competitors showing in the crew list multiple times if they are doubling up on one day but not on another. And in this case, the ASP was calculating the points incorrectly...
    28/5/9 Database I have not heard from Alistair Groves today regarding the bug, despite having mailed him last night. I have therefore had to write [OARA2 - Points - Remove Old Novice] to work around the problem.
    27/5/9 OARA OK - explain how 201405O1063995 & 201405O1063996 both have NV in their points declaration... On investigation, it turns out that they both come from Nithsdale, an Overseas club (over Hadrian's Wall, actually). They also appear to be new members, and it looks like OARA is not processing their points correctly. Oh well. Yet another bug to report. I only picked this up because the points calculation query threw an error...
    26/5/9 Database I've not noticed it before, but some clubs entering Hexham have cleared their Club Notes. This means that a NULL value will exist when the table is recreated, and [OARA2 - List Changes (Comments)] was failing to spot this. The problem has now been fixed.
    26/5/9 ASP
    • The clubs page has been fixed to allow for Day 0 - ie showing all clubs entering, regardless of Day.
    • The statuses page has been similarly fixed. However, I have had to create an extra query: while sorting by Day, then ResultsOrder is suitable for 2 day events such as Kingston, the opposite order is more useful for a divisional competition such as Hexham. The same logic has been applied to entriesbystatus.
    26/5/9 EntryManager I have today documented exactly what TransferEntriesFromOARA does. A useful exercise, which has identified that OARAAddClubsToList & OARAUpdateClubMailingList do exactly the same thing. [Entries - Mark Clubs making Entries as Active] has therefore been marked as obsolete.

    For completeness, here it is:

    • Firstly, it deletes all existing OARA data from the database. The tables are OARABoats, OARACompetitors, OARACrews, OARADivisions & OARAStatuses. These are effectively just copies of the various CSV files.
    • It then repopulates these tables with the new data.
    • If any new clubs are found in the export files, you will be prompted to add them to the database. This is unlikely to happen, but occasionally I miss the fact that a new club has been affiliated.
    • New entries are then added to the Entries table.
    Now that all entries have been transferred, the software can start to make use of the data. These are mostly standalone operations, which could be called in any order:
    • Any crews that have been rejected (by you) or withdrawn (by the club) are marked as such, and this change is logged to the Alterations table.
    • Default entry fees are calculated. The entry fee assigned comes from the EntryFees2 table.
    • Any comments provided by the club are updated if necessary.
    • Current Points totals are calculated, and any overpointed crews displayed via a web page (more of that later).
    • All clubs are marked as Active in the Clubs table. This is mainly a legacy function, stemming from the fact that the software predates OARA, and can run perfectly happily without it!
    • Entries composed of women ONLY, and entering Open events, are then identified. This is, as I'm sure you're aware, VERY easy to do on OARA, and is rarely deliberate. Any such crews found are displayed on a web page, together with the contact details of whoever made the entry.
    • A checksum of the entry roster is then calculated - this allows crews who have made substitutions after the draw to be easily identified. Changes to crew order are not substitutions, and are thus ignored. The cox is also excluded, as a cox can come from any club and isn't really that important.
    • The checksum is also then used to find any identical crews. This SHOULD be impossible in a regatta, but isn't in a head race.
    • If I'm running a head race, it then checks that no competitor has entered twice in the same division.
    • It then checks for any status changes. The crews themselves cannot change their status, but any OARA admin can. The local database needs to be kept up to date, so there's a web page that prompts you to accept the changes, and logs them to the Alterations table.
    • Now comes one of the more complex operations - identifying who actually made the entry. I use the Emergency Contact for this purpose, which is generally more accurate than either the primary club admin (whose address and telephone numbers are available in another downloadable file, but for students, this is often their home address - utterly useless), or the submitting admin (many clubs use a single account to make entries, and this person is usually unaware of what's going on. The email address of the emergency contact is the key to contact identification. Any entries where the email address is recognised are automatically assigned to the right person; any that are not are displayed on a web page. This lets you either create a brand new contact, or to assign the entries to an existing contact - often necessary, as many people use multiple email addresses. This process obviously only needs to be done once per contact, as all future entries from that email address will be correctly assigned.
    • The OARACrews table is then modified to include the EntryID from the Entries table, which allows some queries to be simplified.
    • The OARACompetitors table is then modified, calculating the age of each competitor on the 1st September preceding the regatta. This is because OARA fails to prevent J14 and below from entering events that are more than one age group category above their own age category and Senior events. Any crews found to be breaking this rule are displayed on a web page.
    • OARA's handling of composite crews annoys me. When you look at a composite entry on OARA (e.g. 111440), it is displayed as such, but the export files do not report this, or the code generated UNTIL you close entries. This, apparently, is by design. So my software now identifies any composite crews, and generates its own club code for them. However, it does not currently generate a full name for them - you need to manually edit the Clubs table.
    • All clubs are marked as Active in the Clubs table (again). Only by writing this email have I found this mistake!
    • The next stage is to update crew names. I've never understood why OARA requires you to enter a crew name for a single sculler - surely their surname is a reasonable identifier? The software generates crew names for pairs, doubles & singles from the current crew lists. The other problem with OARA's automatically generated name for pairs & doubles is that it doesn't change, even if stroke man does.
    • For fours and eights, I only use stroke man's surname if its an automatically generated name. So HEX-HOARE would become Hoare. Anything else I leave alone, as they might use A, B, C internally, or something else meaningful to them. You can always modify the Entries table by hand if you so wish - I personally always do a sanity check before the draw.
    22/5/9 Database A couple more obsolete queries have been identified, and the 2 reports concerned with winning crews in a head race have been deleted as they have not been used for several years. Access' documentation utility now runs successfully for all queries.
    21/5/9 Database A new table, [EntryFees2] has been created. This is used by [Payment - Create Default Entry Fee] to generate the EntryFee due for each entry. This differs from the existing logic, which calculates money due for each entry on the fly. However, this method is both inefficient, unable to cope with different entry fees per day, and also makes applying custom credits/oddities impossible. The oddity happened for us in our April Head, where I failed to notice that some events had the wrong entry fee on OARA, and therefore had to accept underpayment for several boats. To do this, I had to apply credits, which obviously distorted the final payment statistics. By using a stored value, everything becomes simpler. The other problem is that EntryFees is not normalised, so all queries run on it need complex Union statements...
    18/5/9 Race Manager The UI for this has now been almost completely recoded, using a multi column treeview to display connected clients. I've modified both the socket library AND the proxy to pass the client's version number to the server. Until I rebuild all clients, not everything will report this, but an error won't be thrown if the information is missing.
    18/5/9 In memoriam I've just found out that John Lickfold died on Saturday. I hadn't seen John in several months, though was thinking of going to see him just the other day. Hopefully he would have been able to have seen at least some of Bedford Regatta: I remain indebted to him for his patience in explaining how a regatta draw could be done, and would have found the task virtually impossible without his help.
    15/5/9 OARA Events Wow. Hexham seem to have defined every event known to man. I somehow doubt they'll get many entries in Mixed Veteran I Coxed Quads... Still, it has enabled me to debug various aspects of this program - especially what to do if they're adding and removing events all the time.
    • OARA sorts the export files by EventID, which can (obviously) be completely random. So I've changed the column order slightly, added ResultOrder, and then sorted the treeview control (see above) on that value. This significantly reduces the amount of time it takes to set up a divisional competition, and also to check that all events have been defined. And, having run this on Bedford Regatta, where the same status code is used for several events, it does make configuration very easy, as all the J18 eights are grouped together, with their notes clearly visible...
    • 3 day (or division) capability has been added.
    • Divisions.txt now includes StatusID to allow people to check it.
    • Node.Refresh is called when the Division is changed (in MouseUp), instead of TreeView.Refresh
    • Window width has been locked at 1024 pixels
    15/5/9 Treeview I have added a sort routine to this, allowing top level nodes to be sorted.
    I've also added Node.Refresh, which is far better than having to refresh the entire control!
    12/5/9 Regatta Server WHY are Commentary and others PublicNotCreatable? The answer is that RaceManager references various bits of them, but this can be done more cleanly with a customisable method that allows information to be passed to whatever object we want. Its slightly convoluted, in that we pass in a dictionary of collections, with the keys being the message type. However, its extremely flexible and means that only clsServer is now public.

    Race Manager itself could do with a bit of a cleanup

    12/5/9 Proxy Server One useful addition to the code that I write in my day job is logging the IP address that a client connects from, since it enables you to VNC to a machine more easily. Its slightly more complex here, as there is a proxy between the clients and the actual server program. However, the principle remains the same, and should be implemented.
    12/5/9 Hexham Bugger. They're running 3 divisions. Out goes the code that I wrote last week...
    12/5/9 Regatta Server This has been bugging me for a while now. It has barely changed since first written, and much of the database access code is done by opening entire tables and doing a FIND operation. Its neither clever, efficient, or particularly well written. The main problem is that clsServer does everything, so many completely pointless events are raised and consumed
    11/5/9 OARA Results I didn't manage to get the software to implement the new rules for qualifying before the Regatta, so will have to do it now.
    • Simply working out what's qualifying, based on Finishers, is easy. The problem is what we do with Groups. Potentially, we could have 1 group where 2 or more finished, and one where everybody bar the winner scratched. This situation is highly unlikely, so I'm going to ignore it.
    • ResultsOrder is again the key:
      • (Not ALike "%X%") - No Mixed events are qualifying.
      • (Not ALike "%V%") - Veteran events are not qualifying.
      • ((ALike "__UD%" Or ALike "__UC%" Or ALike "__UB%" Or ALike "__UA%") Or Not ALike "__U%")
        J15 and below is not qualifying.
    11/5/9 Bedford Regatta Postmortem:
    • The most serious problem encountered was that running a query terminal caused an exception in the Proxy Server. This has taken me an hour or so to track down, and was caused by the lack of m_aMsgHandlerQuery_OnReceiveSentMessage in RegattaServer. For some reason, MPI throws an exception if an endpoint to one of its methods does not exist. In practice, a query terminal does not need to get any race options, but the event handler has been added just in case.
    • The new code for handling races won by default works better, in that it sets Winner & Second. However, some placeholders are still missing, and I hope to be able to work out what's going on from the various diagnostic databases I saved throughout the day.
    • Some web pages inexplicably lost TimeTaken. Restarting IE fixed this, though the cause remains unknown.
    • New functionality was added to the Finish program - Finish Unlisted Race. This is better than entering dummy info, and then saying that the details were not correct.
    • Start needs similar functionality (TODO) - the ability to start a race whose start time was missed, and hence whose time will be invalid.
    8/5/9 Commentary This has had yet another fairly serious overhaul. The existing functionality remains the same, but the PageUp and PageDown keys now allow the commentator to view previous messages, if required.
    7/5/9 Regatta Server InformCommentaryOfWin has been speeded up. It ran 3 queries - two selecting the names of the winning and losing crews, and one to work out what group they were racing in. Total run time = 240ms. By using dictionaries (possible because none of this data CAN change), the run time is reduced to a more realistic 4ms. I know that a quarter of a second does not sound much, but when the server could more usefully be processing other queries/code, its just wasteful.

    The annoying thing is that I knew about this in June 2006, when optimising the RaceStarted code. Shit happens.

    7/5/9 Database Regatta Runners & Riders report now has a footer that describes the meaning of Bold Type
    6/5/9 General God I'm good. (Quoting a friend).
    6/5/9 Regatta Server I've been hunting a bug (no placeholder) for years, and now have replicated it, BEFORE any races have run. Its due to ForceWinDueToWithdrawal, which is called whenever RaceControl scratches a crew. Its very old code, and isn't very good. The problem arose on my development machine at work when two races included a scratched crew, AND these were meant to race each other in the Plate event. No wonder its taken me so long to find (8 years or so)!
    6/5/9 PHP The PHP code has undergone a major overhaul this evening:
    • Draw by Club has annoyed me for a while, as it only showed races in which the specified club has raced. In other words, it was all but useless. Not so any more. I tried fixing this a while back using a subquery, but unfortunately our ISP is still running MySQL 4.0.24, and subqueries were introduced in 4.1.0 As such, I've had to create a calculated table (statuses_entered), which might be useful for statistical purposes anyway.
    • If showing all the races for a club, then it displays that Club's name in the header.
    • The same goes for a single status.
    • Gavin's Blocks output has been recreated - a list of all races, but sorted by status, and with gaps between them.
    6/5/9 ASP [OARA2 - List Crews with Substitutions] is now sorted by Club & ResultsOrder, which makes it easier to use.
    6/5/9 Entry Manager We have an overpointed crew! And I only noticed this from looking at PDF files. So I've coded the Entry Manager to detect this automatically. The Points table is useful to have anyway, since it holds the points limit for each boat type. OARAPoints is a calculated table, holding the points total for each crew - both the current totals and the totals when the database was baselined.
    5/5/9 ReDraw Manager Ouch. The bloody thing gets stuck in an interminable loop now. Not sure why, and can't be bothered to fix it today.
    5/5/9 PHP Export I wrote a new version of ExportClubs a couple of months ago, but could not find it yesterday. It turned out to be at work. It uses a temporary table, so rather than deleting all existing clubs and then needing to export the entire list (including those that only existed for a single race, 15 years ago), it only adds new clubs. This means that a lot of composites can be deleted from my Access database.

    I have now applied the same logic to the StatusList, with the result that the export file is significantly smaller.

    5/5/9 PHP
    • The MySQL database & PHP have been modified to cope with ProgressionSystemID, and the extra events coded.
    • EventIndex is now used to generate a different footer & background colour for Bedford Regatta.
    4/5/9 Shrewsbury A couple of errors have been found:
    • Status Change slots were only added to Day 1.
    • There was a bug in GetFirstRoundRaces, whereby it calculated MaxLevel incorrectly (it failed to take account of the change to schema structure). Level is now char 2, not char 6. The reason that I've not found this before is that the routine is only called by EnsureStatusChangeInFirstRound, and we don't use status change slots any more.
    • [Draw - Add Missing Regatta Data] failed to add information for Day 2, where the status already existed for Day 1. Basically, I was using 2 OUTER Joins instead of a single one...
    • Event Numbers were not generated correctly for Day 2.
    • Spider output was missing events on Day 2.
    2/5/9 Shrewsbury All is going well. But a couple of problems have been identified:
    • The Regatta & RegattaDraw tables had StatusID limited to 10 characters. The new status names bugger this up, so 12 chars are needed.
    • Statuses racing on BOTH days were not handled correctly. Kingston don't do this, so I'd never encountered the problem before.
    2/5/9 Spiders I have added an interface for a FullPlate competition. This (for 25 entries only) guarantees a second race for all crews, regardless of whether or not they have a bye in the first round. Obviously, this gives some a crews a second bit of the cherry, as it were, but the solution to this is neither obvious nor possible to code in the 2 days I have left.
    30/4/9 Spiders There are still a few spiders missing - basically, if we are running more than 16 entries in a single group, not all of the plate events have been defined.
    • 19, 20 & 26 already existed.
    • I have written 17, 18, 21, 22, 23 today.
    • Bug found in 22 entries, 2 lanes, 1 group - there was a missing crew ID in both schema and spider.
    • I could easily do the lot, but am mindful that in the big events, quite a few crews get byes to the second round, and are hence denied the possibility of a second race. Take 23 entries, for example. 16 crews could go forward to the plate event, 7 can't. They COULD be factored into a Full Plate event, but this would entail quite a bit of work, as losers from the second round of racing would also go forward. To ensure that crews racing in the first round don't get a second bite of the cherry, as it were, I'd have to code it so that progression to the plate in the second round would only happen if it was a crew's first race. And I don't currently know how the database would cope with this.
    27/4/9 General Primary Regattas - what are they? Well, they guarantee 2 races to each crew, apparently. Getting crews with byes into a plate event is not too difficult, but Star have suggested a repechage system. And, believe me, that's horrifically complex for 2 lane racing...
    27/4/9 Installation The main events folder is getting very cluttered, and needs to be sorted out.
    • All relevant JavaScript & icons have been moved to a separate folder. Unused icons have been deleted.
    • Kingston specific ASP files are now only installed if required.
    • Blade colours are now installed to their standard location - same for both client and server.
    27/4/9 ASP
    • statusstatistics had a small error, failing to differentiate between total & live entries.
    • SM has been removed, as I have standardised blade sizes.
    23/4/9 RegattaControls The 'Started' buttons have never been used, and so have been removed. They're also irrelevant now, as the qualifying criterion is '2 to finish' instead of '4 to start'.
    23/4/9 ASP
    • oara_create_contacts.asp has been modified so that contact names span multiple rows if they have 2 or more email addresses. This makes the page a lot clearer.
    • entriesbyclub.asp is now better formatted for multiple days.
    23/4/9 Installation
    • The blade images ONLY are now installed. Previously, all of the old formats and SourceSafe shared folders were also installed, which is rather pointless.
    • The installed web links (in the Start Menu) need a few more parameters, such as force & sm.
    • EntryTerminal has been removed.
    • ARA Rules are now installed.
    23/4/9 Heads HeadStart & HeadFinish have had a minor bugfix in their subclassing code.
    22/4/9 Sponsorship Manager This now contains the same improvements as the Trophy Manager.
    22/4/9 Trophy Manager In the light of my demo to Shrewsbury, this has been completed.
    • Subclassing has been used to set the minimum window size.
    • Buttons to Add/Remove trophies have been added.
    • Race Name now shown.
    • All controls move & resize as the window size is changed.
    • LockWindowUpdate is used to prevent treeview controls from being redrawn during update operations. This looks much neater.
    21/4/9 Database
    • I think that the StatusDoubling table is redundant. I'm not sure, so will leave it for the time being. TODO
    • [List - Regatta Entries by Specified Status] now has an extra parameter (optional) for DayID.
    21/4/9 Race Options
    • The Status Selector controls have been removed, as they're basically redundant. This also allows me to remove the StatusesAllowed table, which seemed like a good idea at the time, but probably wasn't, with hindsight. Its not actually used anywhere. This means that [List - Specified Statuses] [OARA2 - Allow All OARA Statuses] [OARA2 - Update Allowed Statuses] & [Update - Delete Statuses Not Allowed] are obsolete.
    • Bug in RaceShortName fixed - I had a feeling it wasn't behaving properly!
    • Tabs are now enumerated, which makes the TabVisible property so much clearer to read.
    21/4/9 Database
    • [Entries - Race Order] contained an extra space in its name - so what uses it?
    • [Entries - List Competitors] needs to include DayID so that a different checksum can be generated for each day.
    • [OARA2 - Results to be submitted manually] is obsolete.
    21/4/9 OARA Events Minor changes made - a separate file is created for each day, which is then amalgamated by the EntryManager. This has mainly been done for consistency.
    17/4/9 OARA Events This is now a VERY useful program. It allows me to detect duplicate OARA IDs & assign them. If I then save, then they are removed from the list of duplicates, and highlighted if they do not exist.
    17/4/9 Network I have now completed a full audit of my network hardware.
    • I've been given a number of machines this year (2000 Server, XP Pro & 2000 Pro), and have finally got round to configuring them all for my network.
    • 5 machines (including one used in for our Head on 5th April) have been destroyed, as they no longer work. This means that I no longer need a serial mouse, and only 2 DIN keyboards are needed. Memory has been salvaged from the dead machines and used to upgrade the survivors, where possible.
    • All machines are now running the latest applicable Service Pack, with all Windows Updates applied as necessary.
    • Most Windows 2000 and later machines have been defragmented.
    • AntiVirus has been installed on very few machines, due to the low spec of most of them, and the fact that they are run very very occasionally.
    • All MAC addresses are now reserved in my DGFV338 router.
    • All old 10MB network cards have been replaced with 10/100 cards. (Exception - PROCYON, which is clubhouse based, and currently inaccessible).
    • All machines are now on the BEDFORDRC workgroup. Previously, BEDFORDRC, BEDFORD RC, BRC, WORKGROUP & INTEGRAL_UK were used.
    • All machines are labelled with their Name, OS, IP Address, Processor & Memory.
    • I now have 2 spare power supplies, assorted memory cards, 2 cases without power supplies, 2 spare network cards, 3 ATX motherboards (with processors), and many keyboards, mice and hard drives. This should enable me to build another 3 working systems this week, and to get rid of most of the old DIN keyboards.
    • The one item that I am short of is monitors. I currently have 11 working machines (excluding my laptop and the server), with 5 CRT monitors and 3 flat screens.
    • TODO - check all machines are on NTFS...
    16/4/9 OARA Events This program was written in a hurry, and was never especially user friendly.
    • Status codes that are not in the database are now highlighted.
    • 'Generate Defaults' button has been added.
    • Notes from the CSV file are now shown (to aid setting up regattas such as Bedford, where ELI.8+ is used on OARA for both Elite Eights AND College Eights).
    • Duplicate OARA IDs are shown, but no use is made of these (yet).
    16/4/2009 Installation Bedford Amateur, Hexham & Shrewsbury are now ALL included.
    1/4/9 Database
    • Entries.Deleted has been removed. It was the final legacy of Kingston's crazy manual entry phase...
    • Assorted Head Race specific reports have been removed, as they have not been used for years.
    • [Draw - Append Missing HeadStartOrder] written.
    31/3/9 Head Editor Oops. I forgot that the Racing Sequence was now specific to the Host Club, and had not updated this program. To do the draw for our April Head, I have obviously had to fix this...
    17/3/9 Photo Finish Its taken me a LONG time to find the code I wrote for this in 2005. And in the end, it was safely backed up on T drive... But its primitive and will require a complete rewrite to comply with my current coding standards. Happily, most of this has been done at work already, though a live transform into the output image would probably be useful.
    17/3/9 OARA The changes to OARA appear to have gone very smoothly. Rather than recreate everything from scratch, I just imported last year's events (and divisions, as I'm running a head race at the moment) and everything appears to have been converted correctly. OK, I forgot to add J17, but I'm still waiting to see how many crews will request that, and hence whether its worth running at our Regatta.

    The status codes are more long winded than previously. For years, we've shortened them down to the bare minimum, so Women's Senior 1 coxless fours was represented as WS2.4- The equivalent status now is W.IM1.4- Veteran Novice is a beast - I used to use WVN.1X - now its W.Vet.NOV.1X The ARA has requested that we use standard codes, though I'm not sure I want to for combination classes...

    17/3/9 Entry Manager I may have found the problem with Vista. When Micro$oft released IE7, they used the same GUID for IEFrame.dll as the old ShDocVw.ocx yet changed the VTable. Everybody else maintains backwards compatibility, but this requirement obviously doesn't apply to them. So XP systems that have had IE6 installed on them worked fine, because I was linking to the VTable of the OCX, and a TreatAs key sorted it out. Where only IE7 had been installed (Vista and my newly built laptop), the code doesn't work unless I explicitly reference the DLL.
    15/3/9 General I now have converted ALL of our old results to MySQL, and have in the process provided functionality where one of the files was missing. I've also enhanced the functionality of the include file, allowing 'parameters' to be passed to it, and can hence link to the original pages in a standard way.
    11/3/9 General I'm trying to convert the old results (1994 to 2001) into a table that can be exported to MySQL. I have 4814 rows in 17 head races. I've successfully converted & imported all of the club names, though there are a few odd statuses that remain to be identified. For this, I'll have to go back to the results by status, if the pages still exist.

    Doing this has identified a flaw in the database - nearly 30% of clubs listed are composites, most of which only exist for a single crew. I'm therefore going to modify the export routines, so that clubs are only deleted if they are NOT composites. I can then delete all others. But this poses a problem - what will MySQL do if I try to violate the primary key? Will it accept all other additions, or reject the entire upload? Only one way to find out...

    The existing data gives me overall positions - I now need to create positions within status.

    So why am I bothering to do this? Well, it partly stems from the fact that Gavin now appears to have washed his hands of the website - DNS expired yesterday, so the entire site was down until I paid for it, and its taken a day for the DNS records to be updated. I took the opportunity to restructure some of the folders, and the conversion process seemed like a good idea... Its taken hours to write all of the DTS routines, and then validate the data. However, I should now be able to generate VERY accurate statistics on which to base the Racing Sequence, which is still not QUITE right...

    5/3/9 Database [Draw - Add Missing RegattaData] has given problems for a while, since the Documenter tool within Access complains about ambiguous Outer Joins. It turns out that Visual Studio 2003 has the same issue, and so the query has been rewritten. In the process, I've fixed a flaw in its logic, which precluded the same status being run on different days.
    24/2/9 Regatta This year's 'nice to have features' are planned to be:
    • A Bubble Line marking the finish. Gavin & Tony need to experiment with our compressor...
    • Photo Finish. I'm currently modifying pages to display an icon. By doing this, I have found and fixed the problem that I had with the Comments - they were still running off the QueryString, instead of a Session variable, and so the draw by status looked wrong.
    24/2/9 Database The Marshals table has been reinstated, since it is used for the CheckIn system, which we might run this year. I had forgotten that I'd completely recoded this (in ASP as opposed to straight SQL), though it remains 2 lane specific.
    20/2/9 General One of the biggest issues caused by reinstalling my laptop has been that I forgot to copy the SourceSafe database over before formatting the new hard drive. I've therefore been running without it for the last month or so, which is far from ideal. I've now copied the database over from the old drive, and have rebuilt every program as version 3.7.0 This has enabled me to check that all files were in SourceSafe, linked files were up to date, and that everything actually DID build - there were a couple of projects that were not updated when I broke compatibility in October.
    19/2/9 PHP In order that we keep all existing results, we need to modify the StatusList table and add a Legacy field. When we delete from the table (done because we add events from time to time), we will not delete the legacy events.
    17/2/9 General We've just cancelled the head, as I only had 95 confirmed entries. Five minutes later, another 8 eights confirmed, but this still leaves us short of my (self imposed) target of 120 crews. Its time to start writing refund cheques...
    16/2/9 General Hmm. Not looking good. Several of the big clubs, and most of the colleges have scratched, since Trials are on the same weekend, and Torpids start on Wednesday.
    14/2/9 General We have just cancelled Bedford Eights & Fours Head, due to flood conditions, and are desperately trying to reschedule it for next Sunday, by which time the river should be back to normal. Early indications are that many clubs would be interested, including the big ones, such as Magdalen, Wallingford, Kingston, Oxford & Maidenhead.
    12/2/9 General The Handicap system requires me to actually check the code that I wrote in December. And, not surprisingly, it doesn't quite work. The problem is that the handicap will not necessarily be known when the division's results are set. We therefore need to be able to update handicaps separately... The server DLL & Timing Errors have therefore been updated.
    6/2/9 General The Winter's coding has been highly successful. In addition to greatly simplifying the database, I have added a number of new features. A few things now don't work, though:
    • Display of email addresses within the Entry Manager. Very simple when there was just one, or a list separated by semicolons. Much harder now, but the change is worthwhile.
    5/2/9 Handicaps With 1 VD, 1 VE & 2 VF eights, I'm going to run a handicap system. Bugger what Gavin says - any complexity is mine, and mine only. It doesn't affect him or anyone else. And therefore I WILL do this. Our own Veteran crew requested it in the first place; rather appropriately, the handicap will now work in everyone's favour apart from theirs as they are the youngest crew (VD).
    5/2/9 General What was to be a quiet night's coding after our outing was cancelled has turned into an oarsman's 21st birthday party. The alcohol is flowing, and the scenery is absolutely wonderful (and yes, snow does lie on the ground).

    And yet, despite all the distractions, the planned coding session is going well - in fact, better than anticipated. True, I haven't yet coded the Composite Manager, but all the pieces are in place, and several other little enhancements have been added.

    5/2/9 ASP
    • Divisions now has an optional parameter (SC) to set the scaling factor for the bar graphs. These where fine until Bedford's new website was built, with very limited width columns...
    • Contacts now has an extra column, for 'Details Verified'. Basically, this is because I usually mail people on receipt of their entry, but am not always in a position to do so, and inevitably miss a few, not least because I forget who I HAVE contacted. This allows me to easily see those people whom I need to mail...
    5/2/9 Database The Officials & Marshals tables have been deleted. Never used, they were there purely for the checkin system, which is not 3 lane compatible anyway. It would be simpler to start again.
    5/2/9 Entry Manager An extra query has been added, allowing me to check for doubling in the same division. OARA prevents this for crews, but doesn't for boats.
    4/2/9 ASP entriesbystatus.asp & entries.asp now have a filter that allows me to hide withdrawn entries. Note that this will hide rejected entries as well.
    4/2/9 Entry Manager Rejected crews are now logged to the Alterations table as rejected, instead of withdrawn. I've been meaning to do this for a while, but haven't quite got round to it before.
    28/1/9 Entry Manager I've added a menu item allowing composite clubs to be renamed.
    28/1/9 Entry Manager The Assign Payments form has annoyed me for a while, since it requires you to assign payments individually in the case where you have multiple payments, all of which bar one have been fully assigned, AND the balance matches this payment. This has now been fixed. At the same time, I have added an extra grid allowing payments to be unassigned from entries. This may be due to an error, or because they have scratched and want to transfer the payment to another entry.
    21/1/9 Commentary LMS has had a couple of ideas, which complement what I've been thinking:
    • Suppress the irrelevant messages - vital if a close race is coming. This is almost exactly what Gavin was after, and which I think I've sorted out.
    • For finals, provide extra information - ie who each crew beat in order to reach the final. This was in the original version, but was taken out at some point because people thought it was unnecessary verbiage. But for the finals, I rather agree with LMS.
    21/1/9 ASP I'm amazed. racelist.asp did not support a HOST querystring! And on further investigation, StaticData.mdb has survived, unchanged, since its creation in 2002. That means lousy logic and redundant columns. Plus all of the old shared tables. All in all, it has needed a fundamental overhaul.
    20/1/9 Rule Changes On 1st April this year, the ARA Rules of Racing are changing. And this time, its a major change to the points system, qualification rules and even the nomenclature of statuses.
    19/1/9 Database J14 and below age checking added. The code calculates AgeOn1stSeptember (1st Sep in the year preceding the event) and stores it in the OARACompetitors table. The subsequent query ignores coxes, and looks for any competitor aged 13 or below. It then looks for the absolute difference between this and the Junior category in the StatusID (or if Senior, 0). Any difference of 3 or more years is illegal and is reported on a webpage. To be perfectly honest, I shouldn't have to do this, as OARA itself should enforce the Rules of Racing. Dream on.
    18/1/9 Database I'm starting to test the regatta code again. And have found a potentially serious bug in [OARA2 - List Doubling between Crews]. It was failing to record crew doubling for an oarsman who was both coxing AND rowing. This has now been fixed.
    15/1/9 Entry Manager This has been modified so that it looks for StatusList.csv in the OARA folder defined in the database, instead of c:\OARA. This allows me to administer multiple events simultaneously.
    14/1/9 ASP Once all contacts have been identified, oara_create_contacts calls [OARA2 - Update Contact Last Entry]. The Entry Manager also does this if it has managed to recognise all contacts!
    14/1/9 PHP Whilst I'm on the subject of stylesheets, blades.php has been fixed and now uses the standard routine used by every other page...
    And $_SESSION['host'] has been fixed.
    14/1/9 ASP A separate folder is no longer required for the stylesheets used by the pages in the Help folder. Instead, all pages use ../events/<stylesheet>.css This ensures consistency.
    13/1/9 ASP oara_status_changes.asp now logs any changes made to the Alterations table.
    7/1/9 ASP entriesbyclub has been modified to provide far more information, such as Division & OARA ID of the 2nd crew. This is useful, especially if sending out to clubs to confirm their entry. The changes were prompted by Wallingford's entries, where a cox is in ALL 7 divisions, and they were the first crews to enter. Having the 2nd crew's entry number before their status confused me, as I was expecting to see a division instead. So what was displayed didn't tally with their comments. The new code has also been tested for a Regatta.
    18/12/8 PHP At least one page has $_SESSION['host']=='brc' instead of 'BED'...
    18/12/8 ASP Head Race results viewed by either Club or Status take a VERY long time to generate, as a separate query is executed for each club/status as appropriate. It would be far better to run a single query and format the results. This is a non trivial change, but would be well worth it.
    18/12/8 ASP The various results pages have been modified to cope with WinningTime in seconds.
    18/12/8 Regatta Server The code used to generate Kingston's results has been imported. What I had forgotten, though, is that for Bedford events, TimesElapsed is a calculated table, and any penalties/handicaps applied will be lost at the end of each division. A new table [TimingPenalties] & the corresponding query [Timing - Append Penalties] solve this issue.
    17/12/8 ASP Competitors.asp & the menus have been modified so that the sorting/filtering are no longer mutually exclusive.
    17/12/8 Regatta Server The code is being modified to work off ElapsedSeconds. Unfortunately, VB has had a hissy fit (Duplicate declaration in current scope) and so the machine needs to be restarted, which is a pain, as I'm in the middle of a rather large download.
    11/12/8 Database [List - Results by Status] now truncates the Difference to a maximum of 2 decimal places.
    10/12/8 Database I really must try to get hold of the current ARA database again. The following members are listed as Male, whereas their names suggest otherwise... 200805C1030968, 200702B1032347, 200704S1033422, 200802S1032527, 200704B1033581, 200804J1021384, 200904D1033523. Only the last is a problem, as she's a current member...
    10/12/8 Database Now that I'm feeling better, its back to coding this system. NOTE - All development will now be done on the Feb2009 database. [List - Racing Sequence] needs to be used (with an OUTER JOIN) in all queries that currently reference RaceOrder.
    10/12/8 General I'm still feeling ill, but am significantly better than I was. I think I've had a mild form of 'flu - no normal cold would have made me feel as unwell for so long...
    29/11/8 Database One problem that came to light at KSBH is the vastly different interpretations of a Head Race Start Order. To date, I have not bothered much with this, as the database has only been used for Bedford events. Not so any more, and Kingston's was radically different to mine, due to extensive intervention from their head coach. Interestingly though, the event organisers agreed with me in the relative order of 95% of statuses, which rather confirms that my gut feelings are valid :)

    This means that [List - Racing Sequence] needs to be modified, plus several others yet to be identified. The easiest way to modify these queries is by joining to [List - Racing Sequence], which now returns the correct sequence for each host club.

    28/11/8 PHP The PHP code has been modified for KSBH, showing any crews to whom a penalty has been applied, and splitting the results by Division.
    27/11/8 Database The code that I had written for Handicaps & Penalties would have worked perfectly. The problem is that Kingston time to under a second's accuracy, and MS Access cannot cope with this. The TimesElapsed table has therefore been modified extensively, with the Time field being replaced by ElapsedSeconds. This makes many of the queries significantly simpler, though does make sort orders slightly more complicated. Given that I was adjusting query logic, the changes already made to the OARA Results program were still valid, and I was able to produce an XML file for Kingston with very little trouble.

    I have also amended the Crews table, adding a TimeOnly field. This allows me to denote an individual crew as racing for Time Only - in Kingston's case, this is because it entered after the Draw; in Bedford's case, it can apply where a crew is racing twice at the same status. We have always said that they have to denote one of their races as Time Only, BEFORE they race, but to date the database has been unable to handle this.

    27/11/8 General My first day back at work today - I hadn't realised on Saturday just how ill I was...
    22/11/8 KSBH I was coxing both divisions today. But after the first, I felt so bloody awful (coming down with a cold, I think) that I went home, leaving Lesley Clinton to cox the second one. At least she knows the course reasonably well!
    18/11/8 ASP Crew.asp has been modified - it now has a column to indicate whether an oarsman is doubling up. This was originally done by just hyperlinking those that were doubling up, though this must have been confusing/unclear, as ALL names are now hyperlinked. On reflection, I think that the change was made because it's useful to be able to see what division somebody is racing in, even if they're not doubling up.
    15/11/8 ASP Server.URLEncode should be used throughout to get rid of sFilter, used to pass a + symbol in a query string. This bodge arose because I didn't know ASP when much of this was originally written...
    12/11/8 Database [List - Completed Events] looks overly complex. In particular, it uses [List - Winners subquery], which does not appear to be used elsewhere and is too convoluted to be easily debugged. I suspect that it is a legacy query that could be easily replaced. TODO However, it MAY be that complex in order to identify dead heating winners - either way, the join is now WinningTime->AdjustedTime instead of WinningTime->Time.
    12/11/8 OARA Results One aspect of the system that has been ignored until now is Handicaps & Time Penalties, mainly because Gavin Dods does not believe in running ANY Veteran Handicaps. To cope with this, I have modified the TimesElapsed table, and the queries that refer to it.
    12/11/8 Installation Handicap Utility added.
    12/11/8 Head Editor Minor changes made so that it can cope with NULL RaceOrder.
    11/11/8 General This program now has a vast list of contacts. Sure, it grows every time a race is run, but it is beginning to pick up many of the current OARA admins automatically - PCRC have entered Kingston, and therefore are instantly recognised...
    11/11/8 PHP The head race PHP code needs modifying to be host specific, in the same way as the regatta is.
    11/11/8 Database The [TimesElapsed] table has gained [Handicap] and [Penalty] fields. I now need to code them...
    11/11/8 Head Editor Minor bug fix - NULL RaceOrder fields in the StatusList table gave problems...
    11/11/8 Kingston Well, the installation program screwed up. Or rather, I think that Windows did. It refused point blank to run the new install, instead running 3.4.0. To diagnose & fix this, I gave Tony VPN access to my server, then used VNC to connect to his machine. Crude, but extremely effective. Deleting all relevant keys from the registry sorted the problem out, though this is not a route I'd recommend to anyone who didn't know exactly what they were doing...
    6/11/8 General There's an incoming enquiry about the system, according to the ARA. I've therefore set my server to a genuine Head Race.
    6/11/8 Kingston Yet another OARA issue - it lets you define divisions, but doesn't allow you to assign them to statuses. I've therefore had to write custom logic to get around this and provide the functionality that I expected OARA to.
    6/11/8 Kingston Tony & RR threatened it, but as I had had no correspondence with them, I assumed that Kingston SBH was going to stay with manual entries. Wrong. KSBH is running on OARA, and my system is going to manage it. Whilst it has run Head races since OARA was first created, I'm slightly concerned, as Kingston don't run the 'free division' model that Bedford does, instead specifying which division each status runs in. I have no download data for this, and so cannot predict how the system will run. Tony is going to add me as a competition admin, so I should be able to sort this out fairly quickly...
    6/11/8 Website The ARA Club Codes have changed a lot over the last few years, and as a result, Bedford's results have suffered, as I use the club code to identify each crew. For example, Putney has changed from PUT to PTR, and so the results pages failed to display the club name and blade colours.
    Until today. Bored at work, I have run database queries to find the old club codes, and have then updated them to the latest codes. A few composites were completely missing, as were a few clubs that have disappeared. These have been added to the database, though as the update code drops the table, I think I'm going to have to add an include file...
    21/10/8 ASP
    • completed.asp now has a 'Not Extracted' filter, as suggested by Lesley Clinton.
    • Fixed bug in InsertOptionSession. The most obvious effect of the bug was that S_PLAIN had extremely odd behaviour... Unfortunately, while the fix works for this option, other options
    14/10/8 Website Sod it. I'm going to do what Gavin has suggested, and put crew lists on the website as well
    14/10/8 General Bedford RC has what must be unique in the country - race results dating back to October 1994...
    14/10/8 General I am becoming increasingly worried. Just as John Lickfold found with his system, I am the only person who understands how this software works. It is necessarily extremely complex, but now has got to the stage where very few, if any, direct database edits are required. True, I do alter the Times table during a Head Race to correct start timing errors, but this is just a shortcut to functionality that exists elsewhere.

    I need a backup. Or, more accurately, the Club does. Were I to fall under a bus, Bedford RC events would be screwed. Perversely, Kingston would be OK, since Tony Gordon knows most of the system, as does Richard Moseley at Cambridge '99. But nobody in Bedford does.

    14/10/8 ASP ResultsByStatus has been speeded up by removing [Lookup - Head Status Name]. All of the required information is contained in queries that are already being run. DrawByStatus has also been modified to remove this query so that it can be deleted.
    14/10/8 MySQL
    • The SQL script now deletes the relevant entry in the Races table, and replaces it with newly generated data, including the EventComplete flag. If set, then Draw.php automatically redirects the user to results.php, which saves me from having to update the links.
    • The EventHost field in the [races] table has finally been fixed (it was brc, and is now BED).
    12/10/8 Database [Export - MySQL Head Results] is necessary after all. However, today's Head race went off without a hitch.
    8/10/8 Database As expected, the Checksums table was not referenced in the relevant queries. Bugger - Star's two Women's Veteran Novice Coxed Fours (now racing at WN.4+) are in fact the same crew, with the seat order swapped around. In this case, I'm not going to make a fuss, as they haven't a chance in hell of winning the event, and am happy to take their entry money...
    8/10/8 Database [OARA2 - List Doubling between Coxes] - This does not need list - rowers doubling up
    ERROR - COX' is only checked on one side of the join...
    8/10/8 Database Somehow, the OARA table is still linked. Removal of this has identified another 10 obsolete queries.
    8/10/8 Entry Manager One of the issues left to deal with is that of crews added after the Draw. In this case, we have one that Star forgot to add, and two that they scratched and then decided to reinstate. I therefore have 3 extra crews to add to the Draw. This poses a number of problems:
    • Identify that there are extra entries. This is actually performed easily by checking rst.EOF after running [OARA2 - List New Entries].
    • Create names for Small Boats.
    • Add to the Crews table
    • Update the Race Order for Head Races
    • TODO I will need to log these in the Alterations table...
    4/10/8 General There was an old version of RegattaHelper on my machine, causing random compilation errors. To be on the safe side, I have recompiled EVERYTHING as version 3.6.0, breaking compatibility. I have had to unregister all DLL, OCX & EXE files, then scanned the registry for orphans.
    3/10/8 Entry Manager A minor improvement has been made - OARACreateCrewNamesForBigBoats. This strips off the default club code and hyphen from entry names, and then correctly capitalises them. So BED-EVERITT becomes Everitt.
    3/10/8 Database 4 more redundant queries (relating to Head Race division statistics) have been identified as obsolete.
    2/10/8 SQL Server Despite removing over 100 queries from the database, I still feel that it has become too complex for Access to handle. In addition, Access 2003 is now 5 years old, and will not be supported by Micro$oft indefinitely. Access 2007 is a dog, consuming far more resources than all of its predecessors put together, and greatly limits what can be done (for example, right clicking on a column and entering filters on the fly no longer works). The Ribbon works very well for presentation based applications such as Word, but is utterly useless in a database. But the thing that annoys me most is that you can't view objects such as queries in a list - you only get large icons, which means that you can only see 8 or so at a time.

    So what's the solution? Tony Gordon would like this to move to a fully Open Source database. Whilst MySQL 5 has support for Stored Procedures, they're very much in their infancy, and there is (to my knowledge) no decent GUI for designing and maintaining them...

    My employers face the same problem, since all of our inspection results are currently saved to an Access database. In fact, most of their front end AND web pages were ported directly from the Regatta software, so they share history as well as look & feel. I have decided to port my employer's database to SQL Server 2008 (Express Edition), and have been pleasantly surprised as to how painless the migration has been. It is true that there are only 60 odd queries in that database, and none of them even closely resemble the complexity of [Mailing - Notification of Entries (Regatta)], which has to be the most complex bit of SQL I have ever seen, let alone written. This gives the lie to a rather disparaging comment from one of our members (Dan Bridgman), to the effect that Access can't be used for anything serious.

    Porting the queries into Views & Stored Procedures is the easy bit - learning T-SQL, and the improvements to the logic that come from it, is not. Many times I have rued Access' inability to do even basic flow control logic in queries, and have thus had to resort to multiple subqueries and external database logic. T-SQL can really help here. So I've bought a couple of books (on expenses, I hasten to add).

    I've really taken Access to its limits, and feel that this winter's development should concentrate on the migration.

    That said, most documentation on Access' limits refer to its performance in a multiple user scenario, when clients connect to it over the network. This was the fundamental flaw I found after writing the very first version of the Regatta software - a slow network would cause a client to be unresponsive, which is a show stopper when running a realtime timing system. The current implementation does not suffer from this flaw, since there is only ever one process writing to the database (OK, a few ASP pages also write data), and the database resides on the machine that this process is running on. So network problems are irrelevant.

    So much for my intelligence. I've spent the week working, supposedly on SQL Server 2008, and racking my brains as to why the RANK() function was unavailable. What I'd done was create the database on an old instance of MSDE 2000 by mistake - the upgrade procedure only upgraded the SQL Server 2005 databases, leaving 2000 alone. DUH. Still, now that I've found the problem, and have dropped the old databases, I have a much cleaner system...

    2/10/8 Database One unexpected benefit of the new Documentation utility is that it has enabled me to track down the last few queries that used the LIKE operator, and were hence impossible to run from ASP. To be fair, none of them were being called from ASP, but that's not the point.
    25/9/8 Database The 52 obsolete queries found in the last phase have been deleted. This means that a total of 95 queries have now been removed
    17/9/8 Entry Manager clsEntryServer and everything relating to batches has now been removed, giving a 20% reduction in the size of the compiled executable.
    17/9/8 Database [Regatta - List Races more than 10 mins late] was written for use in ASP, but was never added to the menu structure. It has therefore never been viewed, and is therefore obsolete
    12/9/8 Entry Manager All code to create the StatusDoubling table has been removed, as it has no place here and is instead done during the draw.
    12/9/8 Database
    • [Display - Audit Numbers] is proving hard to remove, as it is used in SO many places...
    • [Export - MySQL Regatta Results] is obsolete, as the MySQL export is now done in code. In fact, ALL of the export queries are obsolete.
    • The [Doubling - Cross Check Batches before Draw] & [Doubling - Cross Check Batches after Draw] reports have been removed.
    • I have also removed [Generic - Labels for Posters (Repeat)] as we do not use it any more, and nobody else ever has...
    • [Generic - Audit of Entries] has been removed, as it doesn't work & is better done in other reports.
    • [Generic - Blade Colours] predates the new blade icons, and has never been used anyway. So it has also been deleted.
    • [Display - Club and EntryNames (short)] is obsolete.
    • Another 48 queries have so far been identified as redundant. Some may be reinstated once I fully analyse which of Kingston's reports (and their many sort orders) are of any use.
    • The [Results Order] module has been removed.
    • The doubling queries worry me. There are several of them doing the same thing, or almost so. TODO I will have to debug a single base query, and then use that for all operations, instead of creating a new query each time... This process caused a problem at Kingston this year, as the boat doubling that was added manually did not appear on both sides of the query...
    11/9/8 Database The main Regatta table has caused problems since it was first written. Originally designed for 2 lanes only, it became far more complex when 3 lane support was added.
    • SELECT DISTINCT Clubs.ClubID, Clubs.ClubName, IIf(regatta.raceno Is Null,IIf(regatta_1.raceno Is Null,regatta_2.raceno,regatta_1.raceno),regatta.raceno) AS RaceID, IIf(regatta.time Is Null,IIf(regatta_1.raceno Is Null,regatta_2.time,regatta_1.time),regatta.time) AS RaceTime, Contacts.ContactName, Entries.ClubID AS EntryClubID, Entries.ContactID, Entries.ContactID AS Link, Addresses.Address1, Addresses.Address2, Addresses.Address3, Addresses.Address4, Addresses.Address5, Addresses.Postcode, StatusList.ResultsOrder, Entries.StatusID, Entries.EntryID, Entries.Name, [Count - Entries per Status].CountOfStatusID, Crews.CrewID, [Payment - Money owed per entry].Due, [List - Day Ticket Billing Totals].Due AS DTs, IIf([SumOfPaymentAmount] Is Null,0,[SumOfPaymentAmount]) AS TotalPaid, IIf(entries.paymentid<>0,True,False) AS Paid, Entries.FormsOK, Entries.Received, Entries.DayID, [Statistics - Entry Summary for Contact].AllPaid, [Statistics - Entry Summary for Contact].AllFormsOK FROM StatusList INNER JOIN ((((([Statistics - Entry Summary for Contact] INNER JOIN (((Contacts INNER JOIN ((Clubs INNER JOIN (Entries INNER JOIN [Count - Entries per Status] ON (Entries.StatusID = [Count - Entries per Status].StatusID) AND (Entries.DayID = [Count - Entries per Status].DayID)) ON Clubs.ClubID = Entries.ClubID) LEFT JOIN [Mailing - Payments] ON (Entries.ContactID = [Mailing - Payments].ContactID) AND (Entries.ClubID = [Mailing - Payments].ClubID)) ON Contacts.ContactID = Entries.ContactID) LEFT JOIN (Crews AS Crews_2 LEFT JOIN Regatta AS Regatta_2 ON Crews_2.CrewID = Regatta_2.Crew3) ON Entries.EntryID = Crews_2.EntryID) LEFT JOIN [List - Day Ticket Billing Totals] ON Entries.ContactID = [List - Day Ticket Billing Totals].ContactID) ON ([Statistics - Entry Summary for Contact].ClubID = Entries.ClubID) AND ([Statistics - Entry Summary for Contact].ContactID = Entries.ContactID)) LEFT JOIN Addresses ON Contacts.AddressID = Addresses.AddressID) INNER JOIN (Crews LEFT JOIN Regatta ON Crews.CrewID = Regatta.Crew1) ON Entries.EntryID = Crews.EntryID) INNER JOIN [Payment - Money owed per entry] ON Entries.EntryID = [Payment - Money owed per entry].EntryID) INNER JOIN (Crews AS Crews_1 LEFT JOIN Regatta AS Regatta_1 ON Crews_1.CrewID = Regatta_1.Crew2) ON Entries.EntryID = Crews_1.EntryID) ON StatusList.StatusID = Entries.StatusID GROUP BY Clubs.ClubID, Clubs.ClubName, IIf(regatta.raceno Is Null,IIf(regatta_1.raceno Is Null,regatta_2.raceno,regatta_1.raceno),regatta.raceno), IIf(regatta.time Is Null,IIf(regatta_1.raceno Is Null,regatta_2.time,regatta_1.time),regatta.time), Contacts.ContactName, Entries.ClubID, Entries.ContactID, Entries.ContactID, Addresses.Address1, Addresses.Address2, Addresses.Address3, Addresses.Address4, Addresses.Address5, Addresses.Postcode, StatusList.ResultsOrder, Entries.StatusID, Entries.EntryID, Entries.Name, [Count - Entries per Status].CountOfStatusID, Crews.CrewID, [Payment - Money owed per entry].Due, [List - Day Ticket Billing Totals].Due, IIf([SumOfPaymentAmount] Is Null,0,[SumOfPaymentAmount]), IIf(entries.paymentid<>0,True,False), Entries.FormsOK, Entries.Received, Entries.DayID, [Statistics - Entry Summary for Contact].AllPaid, [Statistics - Entry Summary for Contact].AllFormsOK ORDER BY Clubs.ClubName, Contacts.ContactName, StatusList.ResultsOrder;
    • SELECT DISTINCT Clubs.ClubID, Clubs.ClubName, RegattaLanes.RaceID, RegattaRaces.Time AS RaceTime, Contacts.ContactName, Entries.ClubID AS EntryClubID, Entries.ContactID, Entries.ContactID AS Link, Addresses.Address1, Addresses.Address2, Addresses.Address3, Addresses.Address4, Addresses.Address5, Addresses.Postcode, StatusList.ResultsOrder, Entries.StatusID, Entries.EntryID, Entries.Name, [Count - Entries per Status].CountOfStatusID, Crews.CrewID, [Payment - Money owed per entry].Due, IIf([SumOfPaymentAmount] Is Null,0,[SumOfPaymentAmount]) AS TotalPaid, IIf(entries.paymentid<>0,True,False) AS Paid, Entries.FormsOK, Entries.Received, Entries.DayID, [Statistics - Entry Summary for Contact].AllPaid, [Statistics - Entry Summary for Contact].AllFormsOK FROM StatusList INNER JOIN (((([Statistics - Entry Summary for Contact] INNER JOIN (Contacts INNER JOIN ((Clubs INNER JOIN (Entries INNER JOIN [Count - Entries per Status] ON (Entries.StatusID = [Count - Entries per Status].StatusID) AND (Entries.DayID = [Count - Entries per Status].DayID)) ON Clubs.ClubID = Entries.ClubID) LEFT JOIN [Mailing - Payments] ON (Entries.ContactID = [Mailing - Payments].ContactID) AND (Entries.ClubID = [Mailing - Payments].ClubID)) ON Contacts.ContactID = Entries.ContactID) ON ([Statistics - Entry Summary for Contact].ClubID = Entries.ClubID) AND ([Statistics - Entry Summary for Contact].ContactID = Entries.ContactID)) LEFT JOIN Addresses ON Contacts.AddressID = Addresses.AddressID) INNER JOIN [Payment - Money owed per entry] ON Entries.EntryID = [Payment - Money owed per entry].EntryID) INNER JOIN (Crews INNER JOIN (RegattaLanes INNER JOIN RegattaRaces ON (RegattaLanes.DayID = RegattaRaces.DayID) AND (RegattaLanes.RaceID = RegattaRaces.RaceID)) ON Crews.CrewID = RegattaLanes.CrewID) ON Entries.EntryID = Crews.EntryID) ON StatusList.StatusID = Entries.StatusID GROUP BY Clubs.ClubID, Clubs.ClubName, RegattaLanes.RaceID, RegattaRaces.Time, Contacts.ContactName, Entries.ClubID, Entries.ContactID, Entries.ContactID, Addresses.Address1, Addresses.Address2, Addresses.Address3, Addresses.Address4, Addresses.Address5, Addresses.Postcode, StatusList.ResultsOrder, Entries.StatusID, Entries.EntryID, Entries.Name, [Count - Entries per Status].CountOfStatusID, Crews.CrewID, [Payment - Money owed per entry].Due, IIf([SumOfPaymentAmount] Is Null,0,[SumOfPaymentAmount]), IIf(entries.paymentid<>0,True,False), Entries.FormsOK, Entries.Received, Entries.DayID, [Statistics - Entry Summary for Contact].AllPaid, [Statistics - Entry Summary for Contact].AllFormsOK ORDER BY Clubs.ClubName, Contacts.ContactName, StatusList.ResultsOrder;
    This is [Mailing - Notification of Entries (Regatta)], before and after making use of the new tables. I've picked this as it is particularly complex, requiring numerous LEFT JOINS just to find the first race of each crew.
    11/9/8 Spider Engine Spiders no longer display correctly - the crew names are not displayed. This is fairly important functionality! On investigation, it turns out that this is caused by the removal of the key from the start of each schema definition - 'H01:L01=C01&C02' is now just 'L01=C01&C02'. I'm hardly surprised that this is a problem - one of the purposes of the change was to find unnecessary code.

    However, further reveals that the code used to generate the spiders is abysmal:

    • There was one completely redundant loop, which iterated through the schema until the right heat was found. Since Heat numbers have been stored in the database for some time, this is utterly pointless.
    • Far too much pointer dereferencing was happening: whilst getting an string from a dictionary is fast, a better method is to store that string in a local variable, as it is not going to change...
    • 4 lane code has never been fully implemented, so why are its identifiers searched for EVERY time?
    • I've moved the header generation to a separate routine for clarity - the routine was too unwieldy to be easily understood.
    • It appears to be faster, though its hard to tell without explicitly timing execution, and I did not do that before making the changes.
    11/9/8 General I am rebuilding all executables as 3.5.0 Obviously, RegattaSpiders & SpiderEngine are incompatible, though I have also taken the opportunity to strip out some redundant code from RaceOptions, thus making it incompatible as well.
    • RegattaProgress & RegattaStatistics used very old code, with no support for either ToolTips or the standard RegattaClient. This has now been fixed.
    • TODO One problem noticed at Cambridge is that the Finish program always asks for a time taken. There really should be a way to disable this behaviour.
    • Programs that use web pages need to be aware of the new methodology - ie using opt=blades&val=1 etc...
    • RegattaControl has a problem - when you change the time of a race, the original time is not displayed. The problem is actually in RegattaControls, which does not expose this data.
    • The Regatta Editor needs some serious work to make it use the standard RaceDetails control.
    • List - Statuses affected by Scratchings - Grouped -> Groups
    • [List - Day Ticket Billing Totals is obsolete], though is used by [Mailing - Notification of Entries (Regatta)]. [List - Day Ticket Billing] & [List - Day Tickets] should also be removed
    • [Regatta - Select Next Race of Crew subquery] would benefit from including [Time].
    • [Doubling - Cross Check Crews after Draw] - RaceComplete will ALWAYS be 0, as Winner must be 0 elsewhere in the query... The logic can therefore be changed slightly, and the 2 joins to the [Regatta] table removed.
    • [EntryDoubling].[FirstRoundOnly] should be deleted.
    • [Entries - List Doubling subquery2] is made unnecessarily complex by the Audit numbers. Bin them. In fact, bin them completely. The following depend directly on batches
      • Entries - Lock Batch
      • Entries - Unlock Machine
      • List - Batches
      • List - Batches subquery
      • Statistics - Batches subquery
      • List - Crew Details for Specified Day
      • List - Regatta Details
      • List - Regatta Entry Details by Day
      • List - Withdrawn entries that have paid
      • Payment - Statistics per Entry
      • Statistics - Batches
      • Statistics - Batches by Club
      • Statistics - Batches subquery
      • Entries - Select Entry by Encoded BatchID
      • Display - Audit Numbers
    • [Entries].[Checksum] & [Crews].[Checksum] are obsolete
    • [List - Regatta Index] and its subquery are almost certainly obsolete
    • [Regatta - Make Crew Numbers] is obsolete
    10/9/8 Database Another 3 queries marked as obsolete have been found - this is made easier by searching the names of the ASP files for '*old*.*;*obsol*.*'
    10/9/8 Spiders Now that the new structure has been proven to work, it is time to break compatibility. The new version will be 3.5.x
    10/9/8 Database The next stage is to start removing Kingston's moronic Batch system...
    10/9/8 Database 43 redundant queries have so far been identified. They will continue to exist in Cam2008Admin, but will be removed from Oct2008Admin. All development from this point will be on the October database.

    I have written a database documentation utility. It is based on the AddIn that I wrote in January 2005, but generates ASP pages instead. The actual table & query definitions are stored in an INC file, thus allowing them to be regenerated at any point, while any comments added to the ASP files will persist. That's the idea, at any rate. I've also put hyperlinks throughout, so you can drill down and see what queries are using, and what they in turn are being used by...

    10/9/8 Database Having purged a lot of the queries, I am now running Access' Documenter. Whilst I don't really care what it produces, it is an easy way of verifying that all queries actually exist, and will run correctly. It has found just 11 problems, all of which have now been fixed. Rather unsurprisingly, the majority of them relate to Head Races, which I have not even looked at since April, though [List - Crew Composition] will need to be checked, as the [DoublingUp] field no longer exists in [List - Competitors]. The RTF file that it has generated is a staggering 4236 pages long!
    10/9/8 Regatta Draw The critical test for the new schemas & spiders is whether the number of iterations required to solve Cambridge's draw has stayed the same. Fortunately, none of the bug fixes affected schemas used in that regatta, so we really are comparing like for like. And, happily, the code passes the test, with 2160 iterations required under each system :)
    9/9/8 Regatta Draw This has now been recoded to cope with the changes to the schemas. By and large, the changes have been trivial, and will help in removing the code's dependency on a TreeView control.

    The next stage is to remove the Plate & Repechage flags from the RegattaDraw table. The ProgressionSystems table has existed since January, so let's make use of it!

    9/9/8 Spiders I've bitten the bullet, and have recoded these. Instead of 2 monolithic classes for 2 lane and 3 lane definitions, there are now 31 classes, each handling a particular number of entries. They are Public (non creatable), and implement a variety of interfaces, depending on whether Plate/Repechage systems are supported. At the same time, I have written a comprehensive integrity checking program:
    • Numerous errors have been fixed in the spiders for 2 lane, 17-32 entries. These have (with a few debugged exceptions) never been used in anger, so I'm hardly surprised that there are problems.
    • Plate events now are coded at a reduced level - ie the plate final for a grouped event is usually at Level 0. Previously, this was done in code.
    • A number of schemas had the wrong outcomes, or crews listed twice.
    • Where a Plate exists, the main race contains the data for 2ndGoesTo in ALL cases.
    • For 3 lane racing the schemas now refer to the outside lanes themselves. This is significantly better than before. For 2 lane racing on a 3 lane course, [NumberRaces] still needs to do a bit of juggling.
    • Schema definitions are no longer prefixed with their key (eg 'H01:L01=C01&C02' is now just 'L01=C01&C02'. The original definition was left over from the time when the schemas were defined as collections, and was necessary then as there is no way to iterate through the keys of a collection.
    • Grand Finals have been removed for the time being. They needed a huge amount of extra, very rarely used code, which can be generated automatically from the existing schemas & spiders, though this has not been written yet.
    3/9/8 Database My cleansing operation resumes. To aid this, I have converted the database to Access 2002 format, which allows object dependencies to be viewed.
    • [List - Race Number of Crew]. Its subquery has a comment stating that it duplicates something else, though this has long since been removed. The query itself is used by [Control - Check In Null Races], [Count - Active Lanes in Race] & [List - Race Details for Specified Crew]. None of these are used very often, if at all. [Control - Check In Null Races] is no longer called by the Regatta Server, so can be removed, as can all of its precedents.

      Note that its subquery was used by [List - Comments]. I can't tell what the purpose of this was, as it is a UNION. For the time being, it has also been removed.

      and reinstated

    • [Payment - Money owed per Entry (Regatta)]. This was originally designed for automatically applying surcharges to entries made on OARA. It has only been used once, and will not be again. [Mailing - Notification of Entries (Regatta)] is the only query that uses it. However, examining this query shows that it joins on StatusID & ClubID, which is moronic - if used at all, then the join should be on EntryID!
    • [Payment - Entry Fees] also had the remnants of the surcharge. The difference is that it uses a more efficient UNION, instead of a complex IIf clause.
    • [Statistics - Contacts] has NEVER been used, and there are several queries written just to provide it with data. So [Count - Entries Paid per Contact] is now obsolete as well. As is [Count - Forms OK per Contact], [Count - Scratched Entries per Contact] & [Count - Withdrawn Entries per Contact].
    • [List - Clubs not Affiliated] has never been used. If I want the functionality, its easier to write ad hoc SQL than clutter up the database.
    • The 3 LOOKUP queries were a mistake. A bad one. They are called by ASP pages only. Basically, each time a loop encounters, for example, a ClubID, it calls [Lookup - ClubName]. And guess what? Its far quicker, and simpler, to do a JOIN in the original query! 2 queries have therefore been removed (Lookup - Club Name is actually useful). And on investigation, it turns out that most of the pages that have lookup functions don't actually use them after all...
    • [List - Long Distance Clubs] was created for Cambridge. It was designed to ensure that clubs travelling a long distance got byes. I don't believe that this is a fair methodology, and so the code has been commented out ever since it was written. So the query is obsolete...
    • [Regatta - List first Round] was written for a report, but showing all the rounds is actually much better. The query is therefore obsolete.
    • [Count - Income Due] is not needed. Perversely, [Count - Income Paid] was. It is used by [Statistics - Total Income]. But that is also redundant...
    • [List - Banking Details] & [Statistics - Cheque Summary] were written because the late David Easterbrook believed that we had to sort cheques paid in by Sort Code. This is utter rubbish.
    • [List - Clubs making Entries] didn't appear to be used by anything. But the Entry Manager uses it...
    Bed time. In the last 2 days I have removed 42 redundant queries, and greatly simplified several more.
    2/9/8 General Cambridge has really thrown a spanner into the works this time - we have split a status into 3 groups. To get it working, I've hardcoded it (24 entries, no plate, 2 lanes). But I really should take note of this, and recode the Spiders. Yet again.
    2/9/8 Database AddressIDs 2356 - 2368 were added by Richard Moseley. Most are junk and should be reviewed.
    2/9/8 Database I've spent much of this evening hunting for a bug in [Entries - Payments for Specified Club]. It turned out to be because of a missing RIGHT JOIN, deep within one of the subqueries.
    [Entries - Payments for Specified Club] 	[Entries - Payments for Specified Club subquery]	[Payment - Totals]	[List - Contacts making Entries]	Contacts	Entries	EmailAddresses	[Count - Entries per Contact]	Entries	Clubs	Contacts	[Payment - Money Owed per Contact inc DTs]	[Payment - Money owed per contact]	[Payment - Money owed per entry]	[Payment - Entry Fees]	Entries	EntryFees	StatusList	Clubs	EntryFeeTypes	EntryFees	StatusList	Entries	Clubs	Entries	Contacts	[Payment - Money Owed per Contact inc DTs subquery]	[List - Day Ticket Billing Totals]	[List - Day Ticket Billing]	DayTicket	DayTickets	Entries	Crews	Entries	[Payment - Money paid per contact]	[List - Contacts making Entries]	[Count - Entries per Contact]	Contacts	Entries	Clubs	Contacts	Entries	EmailAddresses	[Payment - Money Paid per Contact subquery]	Payments	Clubs	Contacts
    To be honest, I'm hardly surprised - this shows the structure of the query and what it depends upon. Whilst I have known for a while that the payment queries were overly complex, this is worse than I had expected - surely the structure can be simplified?

    • Much of the complexity arises from the original design of the Entry Manager, which was cobbled together in a hurry. It uses grids to present data, and hence all of the information has to be present in a single query. Subsequent development has concentrated on moving the logic to ASP pages...
    • Day Tickets have gone, and are unlikely to be replaced, at least in the short term.
    • Payment is now crew based, instead of contact based.

    So what should be done? Firstly, we can remove [Payment - Money Owed per Contact inc DTs subquery]. [List - Contacts making Entries] is not needed at the top level either:
    [Entries - Payments for Specified Club] 	[Entries - Payments for Specified Club subquery]	[Payment - Totals]	[Payment - Money Owed per Contact]	[Payment - Money owed per entry]	[Payment - Entry Fees]	Entries	EntryFees	StatusList	Clubs	EntryFeeTypes	EntryFees	StatusList	Entries	Clubs	Entries	Contacts	[Payment - Money paid per contact]	[List - Contacts making Entries]	[Count - Entries per Contact]	Contacts	Entries	Clubs	Contacts	Entries	EmailAddresses	[Payment - Money Paid per Contact subquery]	Payments	Clubs	Contacts	Contacts

    Another problem that we've had for a while is Part Payments. These are needed to balance the books when payment is Club/Contact based. [Payment - Money Owed per Contact inc DTs] is proving a pain to get rid of, as it is used extensively. We're down to [Payment - Refunds], [Payment - Statistics] & [Payment - Total owed by Contact for Entries]. And now none.
    Another iteration sees [List - Contacts making Entries] removed completely
    [Entries - Payments for Specified Club] 	[Entries - Payments for Specified Club subquery]	[Payment - Totals]	[Payment - Money Owed per Contact]	[Payment - Money owed per entry]	[Payment - Entry Fees]	Entries	EntryFees	StatusList	Clubs	EntryFeeTypes	EntryFees	StatusList	Entries	Clubs	Entries	Contacts	[Payment - Money paid per contact]	Contacts	Entries	[Payment - Money Paid per Contact subquery]	Payments	Clubs	Contacts	Contacts
    So why have I gone to all the trouble of refactoring this query? We ran the Draw for Cambridge Autumn Regatta today - unfortunately, because I wasn't expecting to do an upgrade this year, I was in the middle of a development cycle - the EmailAddresses table. [List - Contacts making Entries] joined to this with an INNER JOIN instead of a RIGHT JOIN, with the result that no Entry fees were displayed in the Entry Manager. And it took quite a while to track down the problem...
    20/8/8 Redraw Manager TODO
    • Write the new LEVEL to the database.
    • Get the undo buffers working again.
    • Add the ability to delete negated races once we're happy.
    • Add the ability to expand a draw.
    20/8/8 Trophy Manager Again, this has been on my TODO list for several years. I've modified the database, replacing the redundant RegattaID field with a DayID, and have modified the queries to match. Although there has never been a requirement for separate trophies for grouped events, I've followed the same design as used for sponsorship, with an allocation table.
    12/8/8 Redraw Manager I've done a bit more work on this, though it still cannot expand a Draw.
    12/8/8 Sponsorship Manager I've been meaning to write this for years, but have never quite got round to it. Sponsor's names still have to be added to the database manually, but the UI for setting Sponsor1 & Sponsor2 is now fully working. The impetus for writing it came from having to manually assign everything for Kingston, which exposed the omission. Since I only ever use it for Quarts, I've always managed without it...
    22/7/8 Entry Manager
    • The new Checksums table is now working properly.
    • Better handling of name capitalisation.
    • Checksums table cleared when deleting all data. In addition, the Times table is also cleared - this was a bug found whilst administering Kingston...
    • Rejected still needs to be logged correctly.
    • Search for ARACrewID implemented.
    • RaceType MultiDay is actually redundant, as this info can be deduced from the number of Days. So it can now be removed from RaceOptions.
    • Email addresses are a problem, as each person can use several. A new table is therefore probably necessary.
    15/7/8 ASP Spiders now correctly handle viewing the entire weekend.

    On some of the compressed options, the verdicts are truncated. If Time == NTT, then I'm sure that this can be easily sorted out...

    15/7/8 ASP The Additional Menu (togo, gone, on course etc) would be better handled by sorting menus
    12/7/8 Database Bug found in [Doubling - Cross Check Crews after Draw]. For doubling added manually, use of the EntryDoubling table itself is insufficient - there MUST be an intermediary UNION query to merge the data. For the time being, I have created a test query. TODO.
    11/7/8 ReDraw Manager I've not touched this in the last 2 years. It has worked perfectly well in the past - the only changes required have been to get it to work on both days, and actually showing the SAVE button when available!
    11/7/8 ASP
    • The menu options now work correctly.
    • Verdict 2 is now shown for 3 lane racing.
    • Couple more hard coded constants removed.
    11/7/8 Regatta Start The Next Race, Verdict, Time Taken etc controls have been hidden as requested in May.
    7/7/8 Kingston After the debacle that was the Quarts Sprint, I have now turned my attention to Kingston. They are using OARA for the first time, which has been virtually painless. The day specific import code was written for Hexham, and everything else is standard.
    • This means that I can remove all of the code associated with their Entry Terminals (which wouldn't have worked too well, as AddressID has not been implemented since I knew they were moving to OARA).
    • Their ridiculous Batch system is now redundant, meaning that MANY queries can be removed from the database.
    • Most of the KAR specific pages that I was forced to write last year are now totally redundant. This is exceptionally frustrating, since I took a week's holiday in order to write the wretched things. However, all is not lost, as some of them would be useful to me anyway, and can be converted to a non batched system.
    • Many of the menu options do not work properly under the new Session based model. This MUST be fixed before the event.
    • The Draw_Published setting in the EventData table is not really sufficient. By replacing it with an enum, I can remove the QS_ENTRIES, QS_CREWS & QS_DRAW parameters, so that the behaviour of the links remains consistent throughout. Event_Stage is the solution...
    • alterations.asp modified to show ARACrewID.
    • crew.asp was throwing an error when trying to view a crew where an oarsman who was racing for 2 or more clubs had been substituted. This is now fixed.
    • I'm not sure how to write the results to XML for multiple days. It may be perfectly straightforward, but will have to wait a week so that I have some REAL data to test with.
    • substitutions.asp incorrectly lists crews where the status has been changed AFTER the last import. This is due to the way that the checksums are calculated - originally they were designed to identify complete crews racing twice at the same status in a Head Race. The ability to ALSO identify substitutions there requires a checksum to be generated without referencing the status. The new OAARChecksums table will do this, though as yet no code has been written.
    • They're also using my PHP code for the first time. This has been updated to include the schemas and spiders for 3 lane repechage racing, and also to get 2 lane racing to use the outside lanes. The QueryString now includes a Day parameter, and the pages have the ability to switch between days.
    • One of their committee (no names mentioned, but you can guess who) has complained that the link to the 'Race Programme' takes you to the spiders, while the link to the 'Race List' takes you to the timetable of racing. In the 4 years or so that this code has existed, nobody has ever complained before, and judging by our server logs, everybody so far has managed to figure out how it works. But I've changed the nomenclature, which should keep somebody happy.

    Given that every other Regatta in the country (to the best of my knowledge) publishes the Draw as a PDF, Excel file or static webpage, the ability to drill down to individual statuses is a fairly major improvement. I doubt it would be unreasonable to state that beggars can't be choosers...

    1/7/8 Quarts Sprint We have just taken the decision to cancel the regatta. Even with straight finals included, we only have 130 entries, so it is not worth running. Unlike Star Regatta, we have a reputation to maintain, and so have decided that it is probably better to have no racing at all than poor quality racing. And for this, you can blame Bedford Borough Council, who have moved their biennial River Festival to the weekend that this regatta has occupied for the last 28 years - Henley Sunday is not a popular date for a regatta.

    Were we to run it, we'd have just 97 races, which gives slightly under 5 hours of racing at a 3 minute pitch. Any interval longer than this is ludicrous on a sprint course, and would draw comparisons with the aforementioned farce, which is prone to adding 20 minute gaps in order to fill a day's racing. 115 pots would be needed, at a cost of £2530, while entries would bring in just £2688. Sponsorship is reasonable (though nowhere near the levels seen in the last couple of years), but I'm not prepared to virtually con people and companies out of money for sponsoring a shoddy little event - the sponsorship is meant to be there to defray the cost of the pots, NOT to be the Regatta's main source of income.

    I've tried cutting the Draw in several ways - maximising number of races, maximising qualifying events and making assumptions about what status changes would be agreed to. But the long & the short of it is that we would need another 50 entries (at least) to make this a viable regatta. Otherwise, quite frankly, there's little point in wasting the time of crews, marshals & the highly pissed off Events Committee.

    26/6/8 Entry Manager *Placeholder for comments on SMTP*
    26/6/8 ASP The Event Stage has now been coded, and allows far better control over the menu structure. Note that RaceOptions has not yet been built, as a certain TG is far too busy in the Remenham bar.
    26/6/8 ASP The recoding of the website is now complete. I have found several options that were never set! In addition, I have replaced QS_DRAW & QS_ENTRIES with a proper EVENT_STAGE setting, to be held in the database. This ensures consistency of links, whether in the Entry Manager or elsewhere. This has been a problem in the past.
    18/6/8 Entry Manager I have promised Tony that I'll code up the 'Remove Doubling' functionality. This has necessitated a minor change to [OARA2 - Append Doubling] to make use of the IGNORE flag. This ensures that any doubling that has been manually removed is not re-added when entries are next imported from OARA.
    12/6/8 ASP The QueryString has become unmanageable. I therefore propose to use it to set Session parameters instead. QS_GRID is the first candidate, since its not really that important. The main advantage will come when we start using the sorting options as well. QS_HIGHLIGHT has also been done, with QS_FULL, QS_PLAIN & QS_BLADES next on my list. Fortunately, VC++ has a decent Find in Files capability...
    12/6/8 Entry Manager
    • The ability to add cox doubling to a coxless crew has been removed. Tony Gordon pointed this one out...
    • rstEntries_MoveComplete modified slightly so that Contact Details, entry fees etc are displayed correctly on startup.
    • If we are amalgamating OARA export files, and a file is empty, an error is thrown. Again, Tony managed to screw up his data transfer, so I've got to code around him...
    4/6/8 PHP The problem with the spiders is almost certainly do to my having screwed around with the data during testing. Once I do a real draw again, I'll be able to see properly. I might use Hexham's data to generate test spiders...

    On the plus side, I have significantly speeded up execution of the page. It is cheaper to do 3 LEFT JOINS than to run many SELECT statements - and here, many means one per crew, per race.

    Note - the MySQL database is not day specific, and I do not want to assign multiple EventIDs that do not correspond with those in StaticData.

    3/6/8 PHP The PHP version of regattadraw.asp now works perfectly, though there is still an issue with the spiders that I cannot find.
    30/5/8 Regatta Draw
    • The [FinalsSequence] field is no longer up to the job, since we may well need different orders for different days in order to fully optimise the draw.
    • [List - Entries at specified status] is used to generate the draw, but was not taking account of Day...
    30/5/8 Entry Manager
    • grdOtherEntriesAtStatus was giving the recordset movement error if we navigated to any status where all the entries had scratched. This is now fixed.
    • Boat & cox doubling can now be added.
    29/5/8 ASP For a 2 day regatta, it is useful to see the number of times a person has entered per day. This means that people are listed twice, but I think that the information is useful.
    29/5/8 Spiders Bug found in schema for 19 entries, grouped. And 23 entries, grouped.
    29/5/8 Entry Manager Whilst the ASP page to create new contacts is useful, it has always needed to be run multiple times, and applied just to the currently viewed entry. Whilst I'm used to doing this, its far from ideal, since its not an obvious step for most users. I have therefore amended the page so that it allows you to add all the contacts required - every time one is created, the page refreshes until there's nothing left to do, at which point it prompts you to close the page. Additionally, it now allows you to create contacts for a composite crew, since the first named club is the one that entered it.
    28/5/8 OARA Joy of joys - test data from another regatta! This one highlights another problem - boat doubling within the same status. [OARA2 - Check for Doubling within Status] therefore checks for this, though as yet the software does not call it.
    23/5/8 OARA Events This is now complete. Subclassing is now used to limit the width of the window.
    22/5/8 OARA Now that we can identify which day each status belongs to, we really need to modify the Crew & Competitor import routines. Once this is done, Kingston 2008 can be run off OARA. OARAAmalgamateFiles has therefore been created, though since its nearly midnight, will have to wait until tomorrow to be coded.
    22/5/8 OARA Events The code has now been modified to work off 2 separate XML files. These are now saved to named files (the same nomenclature is used for the results), to make them easy to differentiate between, whereas the CSV file contains data from BOTH days, and is named StatusList.csv - this is what we will be linking to.
    21/5/8 OARA One of the problems with running a 2 day regatta off OARA is identifying which entries belong to which day. I therefore need to modify the OARA Events program so that it generates CSV files, which will then be read by after [OARA2 - Transfer Custom Event IDs] is executed.
    13/5/8 Regatta Finish One of my helpers was a Bedford Modern School parent, whose job is software testing. He didn't like the fact that the next race, lanes etc were displayed at the finish, since they are irrelevant to that position. This is a fair comment, which I must address. And I suspect that he'd have made the same comment about the Start program.

    In addition, the confirmation message box should really give full information in the message, instead of forcing the user to look at the race details on the main form. Again, this is a valid comment!

    13/5/8 Regatta Server Subtle bug found in m_Finish_RaceFinished. During the day, I noticed that some results were not being carried forward to the next round correctly, and when generating the results, I found that none of the finals had the second placed crew recorded. This allowed me to find the problem very quickly - as finals do not have a next race, the recordset was not being updated correctly - the update was happening after setting the winner. Second place was being ignored.
    13/5/8 OARA The code to generate regatta results is now complete. However, it does not cope with grouped events. The solution may be to assign multiple 1st places - at least this would not require the ARA to generate a new event...
    13/5/8 ASP Payment Details are only really useful if the name on the cheque is also displayed!
    11/5/8 General I can honestly say that Bedford Amateur Regatta 2008 was the best run regatta I have ever attended (as opposed to Cambridge, where I was today, which was running an hour late after just 3 hours of dismal racing, and eventually finished nearly 2 hours late). The weather was nigh on perfect, the draw seems to have worked reasonably well, and my total efforts on race day amounted to keeping a printer supplied with paper and getting slowly drunk...
    7/5/8 PHP The PHP code has been massively updated, so as now to display the spiders for ALL 2 lane combinations. Ideally, I should recode it to cope with 3 lane racing, but am reluctant to make a start on this until after Bedford Regatta!
    7/5/8 ASP Bug fix in crew.asp - it failed to correctly highlight changed rowers where the crew order had changed as well. This was actually due to the fact that the names in the original crew roster were highlighted - this roster needs to be generated BEFORE any data is output.
    24/4/8 Regatta Draw That wasn't the only bug. The second loop wasn't adding to the clash list in all circumstances. Whilst not fatal, this wasn't helping its performance...
    • So I have taken the plunge and rewritten the routine. To be honest, I should have done this a very long time ago, as much of it was comprised of the original development code. It used the Node tags as the source of doubling information, which is a slow and costly process, as each tag needs to be split into a Variant array, which is then parsed. Far better is to use a Dictionary object...
    • The other advantage of a Dictionary is that it allows me to implement the full Clash Resolution algorithm that I've been trying to write for several years. The code written this time last year, but which I couldn't quite finish in time, successfully parses the Node tags and converts them to temporary Dictionaries, which are then used to rebuild the tags. The obvious development from this is to build a global Dictionary holding the doubling information for ALL races.
    23/4/8 Regatta Draw Hmm. Nasty little bug found, whereby the scan DOWN the race list was not executing, because the Time Counter had not been reset after scanning UP.
    23/4/8 Database Comments field added to the EventData table to allow me to document (and remember!) some of its more unusual sections.
    23/4/8 ASP
    • regattadraw now links to clubs from the blade image itself. This will free up the Club Name to allow me to link directly to the crew roster.
    • competitors has been modified to show the number of times each person is competing. This then allows every ARA number to be hyperlinked. badges (kar 05.02) has been written. Its OK, but would probably benefit from showing the number of badges pr contact.
    23/4/8 2003 Server IIS 6 runs off parent include paths by default. I will have to fix the #include statement syntax at some point, but for the moment, I've turned it on. The fix is actually very simple - create a virtual directory, and then change #include file to #include virtual
    19/4/8 OARA Met with Tony Gordon today. I need to update OARA Events (or similar) to define which DAY an EventID applies to. However, currently the import code deletes OARAStatuses, and the information needed does not exist in the export file. This will require a bit more thought...
    17/4/8 Spiders The new implementation of the SpiderEngine now displays correctly on Windows 2003 Server. Whilst this doesn't sound like much, it is both a significant step forwards AND a great relief. I plan to run Bedford Regatta this year (just over 3 weeks away) from the server, which has lain virtually unused since I bought it over 2 years ago. The advantages are:
    • My laptop will be freed up for debugging, enhancing client programs, and modifying ASP code. It is always dangerous to do any of these on the live system, but to date, I haven't had any alternative.
    • Websites are FAR better managed in a proper server OS. If something causes a website to crash, it merely takes out one thread, and hence can be recovered without requiring a reboot.
    • My server now has 1.5Gb of RAM, and a 3GHz processor. As such, it is significantly faster than my laptop.
    17/4/8 General I've arranged a meeting with Tony Gordon on Saturday, and this has provided me with the impetus to get the Draw working. Since I've had to break compatibility on the SpiderEngine, I've also broken the Spiders themselves. The reason for this is that every time a draw option is added (the last one being the repechage), I've had to alter the function declarations of the IDefinition interface to include a new boolean variable. The obvious, and much simpler, method is to use a binary enum - adding extra members to this will merely change compatibility, not break it.
    16/4/8 ASP entries by club & entriesbystatus have been modified to make them work for a single day regatta. This was one of the problems for the Quarts Sprint - the code was broken by Kingston, but, since only I ever saw the pages, I never got round to fixing it. Bedford Regatta is different, as Rachel Maltby is the Entries Secretary, not me.
    15/4/8 Sockets I've installed the Platform SDK at work, and have begun some rather interesting experiments with MSMQ. It would seem to be an easy to use, reliable and hence viable protocol. Once I've got it working to my satisfaction, I'll recode the Proxy Server so that it can handle MSMQ connections as well as basic sockets.. TODO - search for 'stack' in this file!
    14/4/8 General Bedford Regatta is almost upon me, and I still do not have a working draw program.
    14/4/8 Database We're unlikely to see them again, but the code used to generate the names for Small Boats has been updated to work for coxed pairs...
    10/4/8 TODO
    • Rebuild SpiderEngine.dll and ensure that it works with 2003 Server.
    • After the Head, fix the substitution bug found yesterday. Note that both the query AND the VB code will need to be modified.
    • Get an NTP Server working again. This is critical to the Head Race running correctly.
    10/4/8 Entry Manager Imports from OARA after the Draw has been done also update the crew names of any pairs/double sculls which have been affected by substitutions.
    9/4/8 Entry Manager I have found a subtle bug in the code used to generate the list of crews who have made substitutions. The symptom was that it often included crews where a membership number had been renewed (but never did for single sculls). On investigation, I find that the query is sorting by ENTIRE membership number, and the code then removing the first 7 characters. Obviously (with hindsight) this is wrong. Since I have done the Draw for my current Head Race, I am unable to fix this bug for a week or so...
    8/4/8 Head Editor Tooltips have been written, and the ability to lock the Draw added. As far as I am concerned, this program is now complete.
    8/4/8 PHP drawbyclub & drawbystatus have been amended to show correct blade sizes, and also contain a link to our course map.
    27/3/8 Entry Manager Its all very well identifying identical crews at the time of the Draw, but it would be far better to do this whilst taking entries. The Entry Manager has therefore been modified so as to generate the crew roster checksum for each entry, which can be subsequently checked to identify crews entered twice at the same status. A web page has also been written, which allows me to easily contact the person responsible...
    14/3/8 Server The SYSTEM LOG now reports 'The machine-default permission settings do not grant Local Activation permission for the COM Server application with CLSID {904E0015-E73C-4E42-877D-81B484144B30} to the user BEDFORDRC\IUSR_BRC SID (S-1-5-21-66226394-2579045519-718349289-1147). This security permission can be modified using the Component Services administrative tool.' This CLSID belongs to RaceOptions.clsRaceOptions, so I will do as it requests...

    Well, it doesn't crash any more, but then again, it doesn't do anything either...

    14/3/8 General Time to go - F1 Grand Prix preview coming up...
    13/3/8 Spiders Spiders are still giving me grief.
    • The error message is 'A trappable error (C0000005) occurred in an external object.' which does not really help, though I suspect that RaceOptions may be the culprit.
    • I have therefore removed the multicolumn treeview (which is not used) from there, but to no avail.
    • However, modifying LogError to use a standard MsgBox if in HTML mode seems to have done the trick - the question is whether or not this is a coincidence, since it is not being called, as far as I can tell.
    • clsCrewNames removed. This breaks compatibility, though that's probably not a bad thing in the circumstances. The class is not used in SpiderEngine, though it MAY be used during the draw - I'll have to check.
    13/3/8 Regatta Editor Hmm. This has been decimated, and will need to be virtually rewritten :(
    13/3/8 Regatta Controls RaceDetails did not cope with non numeric race numbers...
    13/3/8 Regatta Helper The ConfirmAction dialog has had a layout bug for a long time. This goes some way towards addressing it, but I will need to step through each of the permutations tomorrow...
    13/3/8 ASP
    • RegattaCompleted has now been updated to include the 'Prizes Collected' logic written for head races.
    • It also contains links to crew.asp
    • Boating added to the menu structure.
    • Some pages use ASP_TITLE, some do not. I really must sort this inconsistency out.
    • Investigate whether IUSR_WPG needs any access permissions (via CACLS) on Windows 2003.
    11/3/8 OARA They have finally acceded to my request and added each competitor's gender to the export file. This now allows me to check for women's crews that have been inadvertently entered into Open events - a MAJOR bonus for the Regatta. When the Entry Manager encounters such a crew, it brings up a web page with the crew details on it, including the contact details of the person whose responsibility this is...

    Gender is now available on the crew & competitors pages.

    11/3/8 Spiders I am still having problems. The original issue has now been tracked down to a bug in the code, with a multiply dereferenced pointer not being set, and with no ErrorHandler to trap it. But it still seems unreliable
    5/3/8 VPN I am really rather impressed with this. I can log on to the Rowing Club's network via VPN, and even when using a dial up connection, there is still a useable connection speed. Once I have the VPN in place, I can use Remote Desktop Connection to get to the Server itself, VNC to any other machine, or use a web browser to access the various routers on the network.
    • Tomorrow, I will install the latest version of the Race Manager on my server. This could be done by a straight file copy (to 192.168.2.11\Setup), but I'll probably just run the setup program.
    • And then what? Let's try running a regatta, in real time, over the internet.
    • Why not create a SPECIAL version of the Race Manager software that allows access to a test regatta, for Kingston and others to play with???
    • This will need to listen on separate ports, and also use separate message queues. This will ensure that the functionality could be terminated during a live regatta, and also that any changes made can have no effect on the REAL data.
    • Coupled with a CMAK installation, this will be an incredibly useful procedure...
    • My day job is currently going berserk again, so I won't have time to investigate this properly.
    • Sod it. Why not?
    • Use conditional compilation to define the alternate queues and sockets. In this way, the only change that needs to be made is to define a separate VBP file.
    5/3/8 Server Remote Desktop works significantly faster than VNC on this machine.

    Now I need to run CMAK at work to create a connection setup program. All VPN-PPTP traffic is being forwarded to 192.168.2.11, which is one of the IP addresses currently in use. Note that Gavin is trying to get routers to connect to each other; this will work independently, as they use IPSec...

    5/3/8 ASP The scrolling code is rather neat, but has always suffered from having a pause at the bottom, but none at the top. To get around this, I currently use an empty table with 12 rows to pad the page out - however, this looks crap, and is limited to resultsbytime, as resultsbystatus has 27 blank rows, which is the sort of fudge factor I can well do without. Andy Corner (who speaks without thinking) has mentioned this, so I have modified the JavaScript code to do it properly.
    3/3/8 ASP The Boating page is now fully working, including waiting times. These are greatly simplified by using the Time() function instead of Now().
    28/2/8 Database I have added over 100 club addresses to the database, and have also added a couple of new clubs. This means that I now have the address for every club listed on the ARA website.
    27/2/8 General On 23/6/2005, I noted that entry fees need to be Day specific. This has still not been done BUT, with hindsight, could provide a rather neat way of handling late payments & Time Only events. Currently, late payments are not implemented at all, and Time Only is done by manually appending a credit to the system. But what if the Entries table had a field for Entry Fee?
    • On doing the Draw for a Head Race, any Time Only events would update this for the relevant crews.
    • Similarly, the system could be made to apply the Late Payment fee at the appropriate time.
    • Withdrawn crews would need to set it to 0.
    • WHY are division weightings held in the Entry Fees table??? The answer is that they can be, since they depend on BoatSize as the primary key. But once DayID is appended to the key, this assumption goes out of the window...
    27/2/8 Check In Neglected for several years, this is now being recoded. The main difference is that boating.asp will now perform the logic, instead of an incredibly complex query, which eventually crashed Access 2000...
    27/2/8 Commentary Gavin has now seen a beta version of this, and is happy with it.
    • His only issue is that once a race has been on the course for a minute or so, it should not be announced as having just started. This will be fairly trivial to fix.
    • One problem that has bugged me for a long time is that the server is actually formatting the commentary message, thus wasting valuable time.
    21/2/8 Installation This has been updated to include the new controls and libraries
    21/2/8 SocketLibrary The connection problem has been a beast to track down, but finally I understand what is happening. In order that I do not flood the network with connection requests, I no longer call Initialise every time ShowProgress is called. This means that m_Sink is not necessarily set in ISocket_Initialise. If the connection cannot be established immediately, a timer is activated that checks whether the connection has been established yet. If it has, an event is raised to the socket class that activated the timer, and at this point we MUST set m_Sink...
    21/2/8 ASP
    • BUG in StartPage found and fixed - even if the menu structure was not being used, mmItemActivateByText was being called, which gave a JavaScript 'Object required' error.
    • Scrolling code now works in FireFox as well. The problem was that document.images was not recognised - document.getElementById should be used instead.
    20/2/8 General All Head Race programs have been updated to the new logic. There is a slight problem in the SocketLibrary, whereby an error is thrown if RaceControl tries to send requests before the server has finished booting.
    18/2/8 General I am not sure if the StatusBarEx control actually provides any benefit. So I have removed it. However, I have decided that it would be best to encapsulate all of the connection, message handling and tooltip functionality in a shared class, which should greatly reduce program complexity.

    Many of the forms need to be able to vary in height, but not in width. Previously, I have used the Form_Resize event to limit this, with the form flickering badly if the user tries to resize it beyond the limits I have set. But not so any more. By subclassing WM_GETMINMAXINFO, I can define the Max & Min window size, which are set before Form_Resize is fired.

    14/2/8 ASP Many of the Regatta pages have been updated to the new logic. I've also started getting rid of obsolete include files, such as gavin, kbnet & dev.
    13/2/8 ASP StartPage was written last year for KAR, with InitialisePage being the legacy function. To ensure that all pages look the same, the latter routine has been renamed to InitPage, thus ensuring that all pages will have to be updated to comply. All Head Race specific pages have now been updated, though some of the more peculiar sorts have not been documented yet.
    • TODO - work out why resultsbytime does not scroll in Firefox. I managed to fix this on 17/1/5, but did not document how...
    13/2/8 IDEA During Division 1 of a Head Race it might be quite nice to show what is currently on course. And an intermediate time would also be good...
    13/2/8 General What a bloody waste of time Belfast was. Our meeting was with somebody who's been off sick for a week...
    12/2/8 Head Editor Due to other commitments, I did not have time to complete the Substitution List code before this Head Race. The way that I propose it working is as follows:
    • A completely new program will be written to generate this information.
    • On creating the Draw, for either a Head OR a Regatta, this program will be run.
    • It will add the checksum to the Entries Table, and then LOCK entries. It will also copy OARA Competitors to a new table.
    • When I close OARA for substitutions, I will run the program again, which will then update the Crews table.
    • We will now have 2 checksums, which will allow us to view the differences.
    [List - Composition of Specified Crew] has been modified to display the checksum where there is a difference between the Crews & Entries tables. And a very minor modification to crew.asp lets us view both sets of details, highlighting in red the names who are no longer in the crew. All I really need to do now is to flag these on the reports generated for Race Control...

    I'm actually rather pleased with this code. More work will need to be done on the ASP pages to highlight crews which are known to be affected by substitutions (so they cannot go to Race Control & change more than 50% of the crew), but that can wait. I'm due to leave for a day trip to Belfast in 5 hours time...

    And what would be REALLY nice is for Race Control to actually make substitutions, which are then logged to the database for future upload. Of course, that assumes that the ARA trusts Competition Administrators do to what they have done perfectly well for many years. Somehow, I doubt that crew list upload will happen.

    11/2/8 Postmortem The February Head went extremely well, with very few issues being picked up:
    • Start failed to work initially, because the person using the machine failed to spot the 'Start Division' button. Duh.
    • Oundle RC no longer exists - crews actually entered from Oundle Town. Blade image has therefore been redesigned.
    • The PHP generation code incorrectly output disqualified crews. This was only noticed (by V Dods) because the disqualified crew would have won...
    • The PHP code has been modified to correctly display the new size blade images.
    • Scratched.asp modified to work with Head Races as well.
    • OARA Results program modified slightly to deal with both Disqualified & TimeOnly crews.
    8/2/8 Race Options I hate to say it, but OARA has better functionality than my own code. The FilterStatuses routine was modified on 25/1/6 to allow individual statuses to be defined, though it was a manual process, augmented by anything defined on OARA. I've now taken the idea from OARA, and designed a grid based control that allows me to specify exactly which statuses are running. So I can say that S1.4- is acceptable on Day 1, but not on Day 2, and that WS1.4- is not acceptable on either. etc.

    Even better is the ability to clearly indicate which statuses do not exist in the StatusList table. Note that the EntryManager will require a bit of recoding, but I've finished doing entries for this Head...

    7/2/8 Race Options This now has a DrawPublished, allowing any imports from OARA to update the Competitors & Crews.Scratched ONLY.

    At the same time, it has been updated to the latest coding standards, with tooltip & saved positions.

    6/2/8 General Another, rather cosmetic change will allow me to identify the machines on the network that are capable of running the Race Manager software. All machines are therefore being renamed. You may see a pattern developing...
    Old Name Now IP Address OS Purpose
    YAKKO SIRIUS 192.168.2.29 XP SP2 My Laptop
    WILL BETELGEUSE &nbsp; XP SP2 Dimaco development machine
    SILENCE CAPELLA 192.168.2.14 W2000 SP4 Not really used much for events
    BRC2NT SPICA 192.168.2.16 NT4 SP 6a Head Start Timing
    QUERY PROCYON 192.168.2.9 W2000 SP4 BRC TV Output
    6/2/8 NT4 One of the biggest concerns in updating the client programs to use nice features such as tooltips and statusbars is whether these would actually run on my network. The lowest spec machine I have is BRC2NT, which runs Windows NT 4.0 with just 32Mb of RAM. Its nothing special, but can do Start Timing perfectly well... And the new code works without any problems at all :)
    5/2/8 General I'm nitpicking now, really. The core functionality works, and works extremely well, so niceties like the checksum algorithm are now the main focus of my development efforts.

    It has now been almost 5 years since the first stable release of the database system was introduced, and the database structure has changed very little over the years, with December 2005 being the last really major structural change. On the other hand, the software has changed beyond all recognition, with increasingly sophisticated functionality and many improvements to ease of use. Ideally, I'd like to get this to the point where I am no longer necessary - the fact that Kingston can run it at all is some proof of this. However, I reckon that I will need to make considerable improvements over the next few months if this is ever to happen.

    Current TODO list (in no particular order):

    • Amalgamation of Veteran statuses, together with the ability to view handicaps. I rather suspect that Bedford's refusal to allow Veteran Handicaps is more to do with somebody's 'f**k them' attitude (you know who you are, Trevor) than any genuine problem.
    • A proper Check In system to be used by Race Control. Note that this mainly applies to regattas, but will also be useful for head races.
    • Sponsorship Editor
    • Trophy Editor
    • Review of the Doubling table.
    • Remove the OARA table.
    • HasRaced flag.
    • Multiple finish terminals
    5/2/8 Head Editor PHP Export code has been added, thus making my life significantly simpler. The change was prompted by my forgetting to install PHP & MySQL on my laptop...

    The next stage in its development (which actually also applies to regattas) is to generate an MD5 checksum of the ARA numbers. This is in fact the ONLY way that I can think of to check whether an identical crew is racing twice at the same status, regardless of crew order. I need to give some thought as to when to check this, since its actually more a function of the Entry Manager than the Head Editor. It does work extremely well, with [Entries - List Identical Crews] picking up the necessary information. Fortunately (since I've already published the Draw for this Head Race), I have picked up all problems by checking each likely looking crew manually. Loughborough Students & Downing College tried this on.

    30/1/8 Entry Manager One problem that caught me out in May was changing a status on the database, making other changes on OARA, and failing to correctly reconcile the two sets of changes. The Entry Manager has always prompted me to run [OARA2 - List Changes (Status)] when a discrepancy is picked up, but in May I incorrectly assumed that I knew what was going on. I had, however, forgotten that the Entries Secretary had reverted to a database backup... There were discrepancies, which I ignored.

    I have therefore created a new ASP page to guide the user through these changes. So far, it only displays information - ie the OARACrews table joined to Alterations. With a bit of work it should prove extremely useful.

    30/1/8 Race Manager There is absolutely no need to send the Runners & Riders for each division to the Start Terminal, as it makes no use of them - indeed, it has not done so for several years. The relevant code still exists, but has been commented out.
    30/1/8 Sockets Unbelievably, the code STILL isn't too clever.
    • Each Client tries to initialise the connection even if its current state is Connecting...
    • The application never receives a formal notification that the connection has been established.
    29/1/8 Database [OARA2 - List Composites subquery] modified so as not to list people who have no club assigned. However, OARA treats ABN/Null as a composite...
    28/1/8 Database TODO We need a query to identify identical crews racing at the same status.
    icon for photo finish TODO - warning.gif & info.gif from my old drive.
    25/1/7 General I have now written a rather nice ProgressBar control for my company, which should prove useful in many of the applications. They all reference RegattaHelper.dll, which contains an extremely crude ShowProgress method. This displays a rather annoying form, containing a label and a VB Progress control. Every program calls it, with the same arguments, when trying to connect to the server. A much better method would be to use the standard VB StatusBarControl (which is NT compatible) with a panel dedicated to the ProgressBar. This would be far less intrusive, though would still attract the user's attention.

    One of the main problems with the existing control is that it grabs focus. The idea of a single window having focus (ie responding to keyboard events) is alien to many of the people I have seen use this system over the last 5 years, so anything that avoids the main window losing focus has got to be beneficial!

    So I'm going to start implementing this for all of the client programs, starting with HeadStart (the most basic of them all). I've got to recompile them all anyway, as the call to tooltips changed on 18/1/2008... The client programs also need the ability to turn tooltips off.

    So I hit another problem - the statusbar control's panels do not act as containers... So I'm going to have to create another control from scratch...

    24/1/8 Entry Manager At work I have come across a rather peculiar bug in VB. After installing IE7, any navigation action within a WebBrowser Control produces an untrappable error (-2) that crashes the program and returns VB to Design Mode. Fortunately, this seems to only affect the IDE - a compiled executable does not suffer from the same problem. I have been unable to find much information on this, though one article did suggest to delete ieframe.oca
    I have never quite understood the function of OCA files. But sure enough, a new one was generated - interestingly enough, referencing a different type library. The old one was {2B442FFA-220D-488F-AC66-3A8AEFFF5F86} and the new one {76469EF7-DEC8-461E-B11B-55C6060C21B2}. The correspond to _ PBrowse1 & IWebBrowser2 respectively.

    So why mention this? Well, since recreating the OCA, the error has been trappable, with an error number that starts at -2, and decrements by 2 every time the error is thrown. VERY odd...

    And then I found this explanation (http://www.cfdan.com/posts/Visual_Basic_6_And_Internet_Explorer_7.cfm):On the development machine, the VB6 IDE threw a strange error after the Navigate2 method is called. This error was something like "Runtime Exception -1 (FFFFFFF)". I couldn't figure out what it was because when I compiled the app and ran it outside VB IDE I didn't get the error. After a while I remembered that when I installed IE7 (I did this twice to see what would change on my machine) it reset some basic security settings. One of these is "Allow scripting of the WebBrowser Control". This was the culprit. If I checked this on, the IDE didn't throw the error.

    And still I'm getting problems. Might need a reboot though...

    24/1/8 OARA I may have found yet another bug. The problem is, I destroyed the evidence before I realised what I saw. LMS added a Favourite Crew, including Lianne Higgins, who was in the process of renewing. When I looked at the crew in the Favourite Crew editor, her old number was listed - presumably she had not renewed when LMS created the crew? When I used this crew to populate an entry, her name was missing from the list. Since I screwed up by updating the crew, I now hope that Hugh Maltby renews his membership at some point - it is due to expire at the end of this month.
    23/1/8 Blades All 57x33 blade designs have been added into SourceSafe, and shared between projects.
    23/1/8 Database [Entries - Create Contact at Club Address] should prove to be a useful query.
    22/1/8 Entry Manager Whilst I am perfectly happy to delve into the database to create contacts who cannot be recognised from OARA, this is not really a satisfactory solution. I can't really see (and nor do I want) the Entries Secretary for Bedford Regatta to be doing this. I therefore will write a UI for performing this whilst taking entries for this head - if it doesn't work, then I'll have to fix it!

    But it does. Very nicely, in fact. I've done it as another web page. More details to follow.

    22/1/8 Database Clubname is now transferred to the OARACrews table, as unidentifiable clubs need to be identified. In this case, Wallingford's ClubID had changed...
    18/1/8 Generic To ensure consistency, form positions etc are now saved under the Application Title (a constant defined in every program) instead of the name of the executable, which may be changed. This ties in with the nomenclature used in tooltips.

    SourceSafe is now an absolute godsend. I've changed Generic & ToolTips - a recursive GET operation updates these files in all projects... So when I next build them, the inconsistency in ToolTips will force me to include the menu structure that turns them on/off.

    17/1/8 General TODOWe need to have a UI for amalgamating Veteran Statuses.
    17/1/8 Database
    • The macros have been obsolete for several years, and have finally been deleted.
    • The table relationships have been updated to accurately describe the current database design.
    11/1/8 Rate Meter This was recoded on my development machine, so the code does still exist, which is a relief! However, because the {Escape} key is used regularly, the Escape function
    11/1/8 Installation On the plus side, it builds!
    • RegattaControls & Tooltips will need to be added to many of the components.
    • Several files have been renamed, so the installation has been altered to match.
    • VDCreator is redundant and has been deleted.
    • The installation path has been changed to c:\RaceManager
    • Extra ASP files will need to be added.
    • Default database & registry will need to be set.
    10/1/8 General Virtually every program now supports tooltips, and has been reversioned as 3.3.2 This was done without breaking compatibility, and was done at the same time as a MAJOR update of SourceSafe, which had become woefully out of date in the past year or so.
    10/1/8
    9/1/8 General I've had an enquiry from Hexham Regatta...
    9/1/8 Entry Terminal Sadly, I fear that this is broken yet again. As yet, I'm not entirely sure of the cause, but should be able to get it working in the next week or so...

    MAJOR problem - I appear to have lost my new version of RateMeter...

    9/1/8 Networking For the last 3 years, the Bedford Regatta Committee has thought that it would be far better to run the Regatta from BRC. For this to work, we would need a wireless LAN covering the 1400m course.

    However, there is now an alternative - VPN. Using a 3G USB device, I can attempt to establish a connection from my laptop to bedfordrc.gotdns.org This points to the public IP address of our broadband modem, which then forwards all VPN traffic to my Dell Server, which is running Windows 2003 Server. Once the user's credentials are established (using standard Windows authentication), the server assigns an IP address to my laptop, which then has full access to the network.

    Given that the 3G devices are expensive, we would need to share them - Gateways, perhaps?

    9/1/8 Regatta TODO - Automatic sanity check of Race times to stop our commentators from announcing rubbish.
    9/1/8 SourceSafe This is hopelessly out of date.
    9/1/8 Entry Manager
    • When editing contact addresses, great care must be taken not to inadvertently change the Club's address. frmModifyContact now provides the option to either modify the club address, or create a new one for the contact. The ContactDetails control has been extensively modified, and now ensures that fields are updated only if they have changed.
    • The ContactDetails control now capitalises on the KeyPress event instead of the change event, thus slightly speeding up resets.. Note that this change was made as a result of reviewing the comments made on 21/1/6. It will also ensure that c/o is not incorrectly modified to C/o...
    • Tooltip support has been greatly improved, allowing multiple controls on one form to use the same tooltip text, which may even be loaded from a different file:
      [txtAddress1] Text=This grid holds the address of the current contact. [txtAddress2] Link=txtAddress1 [chkARAFormReceived] Link=frmEntries.chkARAFormReceived [chkEntryFormOK] Link=frmEntries.chkEntryFormOK
    • However, a problem arises when adding tooltips to a form that is repeatedly loaded (eg frmNewEntry) - the tooltip windows are never destroyed. The solution is to use a separate tool manager for each form, which will then be destroyed when it goes out of scope. And again, frmNewEntry gives a problem, because there was not an object variable of that type. Since this is poor programming practice, only possible because Visual Basic can treat a form as both an instance and a class, the appropriate variable has been created.
    • TODO - get tooltips working for UserControls.
    9/1/8 Proxy Server
    • The Proxy Server handles all inbound communication from client machines, and therefore the Windows Firewall needs to allow incoming traffic on certain ports.
    • I have written a very simple C++ dll to do this, which is based on the one I wrote for my employer last year.
    • The Firewall was added in Windows XP SP2. The Proxy Server currently only acts on this, since I do not yet know enough about Vista. However, this should be relatively easy to test on somebody's laptop...
    • RegattaFirewall.dll has been added to the installation.
    8/1/8 Database I've got to get the OARA Results program fully working before February's Head. To aid with this, I've added a StatusPosition to the TimesElapsed table, which gives useful information. A bug has also been found in the code creating the overall positions, which is duplicated elsewhere.

    There are a number of problems with the export:

    • If a status has been run,
    • It is not really feasible for somebody to manually correct the database unless they have a thorough understanding of its structure. I have therefore created a new ASP page (oara_update_head.asp) which provides detailed instructions on how to coerce OARA into accepting results.
    • And after all that, OARA crashes. It really is absolutely SHITE.
    7/1/8 Database
    • ProgressionSystems table added. This is intended to simplify the structure and usage of the RegattaNames table. The actual problem lies deep within Spiders.dll - if a new progression system is added, the function definition needs to be updated, which is not advisable.
    • [List - Clubs on Mailing List] renamed as [Mailing - Club Addresses] & [List - Addresses of Contacts with Unknown Club Address] renamed as [Mailing - Contact Addresses]. This is for clarity, and has been prompted by a thorough dig out within the Addresses table. Address6 is redundant and so has been deleted, whilst ALL postcodes have been moved to their own field.
    • [List - Addresses of Entries] appears to be redundant.
    • [Mailing - Club Addresses] finally modified to give a boolean flag for OxBridge. This has been on the development list for years!
    • Virtually all of the reports have now been modified. The labels for mailing addresses now take advantage of the ClubPostalName field, which needs to expand abbreviations such as BC, RC etc.
    • The Sponsors table has also been converted to use AddressID. A few of them are in fact shared with the Contacts table anyway, so it makes sense to standardise.
    4/1/2008 General Happy New Year! I suppose that I'd better get back to development after a nice long break...

    I have reinstalled the laptop from scratch. There have been a few problems:

    • Worst of all is that the SourceSafe database had become corrupted, so could not be archived. On investigation, it turned out that the datafile for our old friend dskbhook.dll was missing (I reckon that the virus scanner is to blame). By creating a dummy copy of this file, ANALYZE was able to repair the database, which then allowed it to be archived.
    • The MultiColumnTreeview could not be loaded by RaceOptions.exe though a recompilation of the exe appears to have fixed the problem. Once SourceSafe was back in operation, it was clear that the GUID of the OCX had changed, though why remains a mystery.
    • DimacoControls also complains in the IDE. Given that it is only used for the keyboard (which is not really helpful), I have now removed the reference.
    • On a clean install, it is likely that RaceOptions will be run BEFORE RaceManager. ModifyACL should therefore be called by this program in order to allow IIS to create the LDB file. This solution works.
    • What seemed to be at first glance a bug has been found in completed.asp - Operation must use an updateable query. In actual fact, the query is fine: the problem again lies in the IUSR_MachineName account not having write access to the MAIN database. RaceOptions therefore sets the correct permissions on all databases within the folder containing the Admin database.
    23/10/7 Rate Meter AVG now defines dskbhook.dll as part of a virus. Not surprising really, as it is a keyboard logger in the making. However, I have now recoded this program using Windows HotKeys, which means that the potentially dodgy DLL is no longer necessary.
    18/10/7 Server MySQLExport is no longer necessary for Head Races. Every time a Division's results are set, a MySQL 4.0 compatible script is generated in the Output folder. Again, I'm surprised that its taken me so long to get round to doing this - the export process used to date has been somewhat painful, since it required going through an intermediate MySQL database on my server. Not any more.

    The PHP code could do with a slight change to differentiate between DNF and DNS. I can't be bothered at this time in the morning.

    16/10/7 Website
    • completed.asp now has a column for 'Prizes Collected', and the same update logic.
    • resultsbystatus.asp now has the correct order - DNF comes before Scratched crews. This comes from a minor change to [List - Results by Status], which used to use a Time of '99' to signify scratched crews. This was one of the last relics of Lickfold's system. How it has survived this long is a mystery!
    16/10/7 Head Timing The Server now calculates Overall Positions itself, rather than having to go via MySQLExport for this. This is a significant improvement. However, it would be EVEN better if the code could generate MySQL 4.0 SQL itself...
    11/10/7 OARA There has been a major bug in the OARA export, whereby division changes were not showing up in crewexport.csv To fix this, the ARA have removed the ability for clubs to alter their divisions. Apparently this is because competitions are not aware of a change having been made. Instead, if a division change is needed, the crew must be withdraw and re-entered. Utter madness.
    5/10/7 Database [Payment - Statistics] was broken by the Multi Day code. I believe that this is now fixed. Obviously, it needs testing, but I'm starting to question the logic behind ALL payment queries.
    4/10/7 Entry Manager
    • Assign Payments now automatically assigns if there is one cheque and its for the right amount. Obviously, this could be extended further...
    • OARA division changes are now logged & updated as necessary.
    • frmNewEntry needs contact addresses - badly broken.
    • Add Payment - wrong contact shown. This was when adding entries from Star (Durrant), when Callow had already made entries...
    • I have added a link to a new PROBLEMS page. This shows the uncontested statuses, along with club notes & my comments. This means that crew.asp really wants to be linked from EntryID...
    • crew.asp & rower.asp link to EITHER crew or entry, depending on what is available.
    29/9/7 Database , Any query parameters which refer to OARA Crew ID or EventID must have a datatype of long, not short. Access calls these Long Integer & Integer respectively, while ADO's adInteger can be used for both.
    28/9/7 OARA2 This now has the ability to enter results by uploading an XML file. Unfortunately, changes to Status have to be entered into OARA manually, which is supposedly safer than allowing me to upload a list of corrections to both crews and oarsmen. As if. The ARA does not, it seems, trust competition administrators to be able to perform checks themselves, instead forcing us to use a very slow method of doing crew substitutions.
    • That said, the upload IS a major improvement.
    • There is no schema, which was in the original specification. So I don't know whether a position of 2= is valid, or whether I should deem multiple crews as finishing in second place, or whether the positions should be unique.
    • It has no support for crews that did not start, which I will be raising with them next week.
    • I have written a new program that generates the XML file automatically. It requires the user to download a template XML file, but actually uses this only to get the CompetitionID. The rest is generated directly from the database.
    • For those unable to write code to generate the XML from a database, XML Notepad may be useful.
    27/9/7 Entry Manager Day Tickets have gone. Probably. I have removed the form itself, and have removed the code via conditional compilation. So if they are reinstated, all I need do is add the form, and change one variable...
    27/9/7 Entry Manager Under the previous version of OARA, calculating the doubling was painful to say the least. This was partly because the legacy =x=y syntax had to be modified in a hurry to be compatible with the EntryDoubling table. Now we have all the data easily available, and can just run an update query based on [OARA2 - List Doubling].

    However, getting the system to DELETE OARA doubling is rather more tricky. We have to use the Ignore flag as part of the table's compound key, and then only show records where First([Ignore])=Last([Ignore]). This is actually a rather elegant solution as the flag is a boolean.

    So why do we need to delete OARA doubling at all? Surely the whole point of OARA is that it is accurate? Well, yes and no. It is true that all members of a crew as entered into the system are ARA members, and that they collectively satisfy the requirements for entering a particular status. The problem is that some of them are invariably just placeholders in crews whose composition has not yet been finalised, or standing in for a somebody who has forgotten to renew their membership. Often, these bogus crew members are mentioned in the club notes.

    22/9/7 Database Ouch. I have finally bitten the bullet and deleted ALL addresses form the Contacts & Clubs tables, Why?
    • The addresses in Clubs & Contacts are often the same.
    • Since multiple people can use the same address, the old design violates normalisation rules.
    • Under the new ARA policy, each contact can be a member of up to 3 clubs. The ultimate goal is to delete ClubID from the Contacts table, and move to an AffiliatedClubs system. Obviously, this is a very radical design change, which will take a considerable time to implement.
    • Now that the same field name is being used throughout, many of the mailing queries can probably be standardised.
    • All reports have been updated.
    • Most of the queries have been updated.
    • TODO - Entry manager contact sharing dialog.
    • Editing addresses now poses problems - should ALL contacts be sharing an address?
    • There were over 300 duplicate addresses, and several clubs with no address at all...
    21/9/7 Database OARA2 import is now complete.
    • We now have a way of identifying existing contacts from their email addresses. This has caused some problems in the IDE, with a fatal untrappable crash at times. The compiled code worked fine. I have slightly altered the query in case Nulls were the problem, but remain none the wiser.
    • Composite entries are now handled correctly, with the composite club ID being generated automatically. In theory, OARA is meant to do this itself, but doesn't as yet...
    • My main concern is that all the on day queries will need rewriting.
    • Hmm. [List - Draw by Specified Division] does not use a base query...
    • TODO - create composite club...
    • [List - Composition of Crews] is now very simple. I have to use it as the base for all related queries. I would do this now, but the bottle of red wine is beginning to have an effect...
    5/9/7 Database We now have 626 queries. I suspect that most of my development time this winter (OK, after OARA2 is complete) will be spent documenting these...
    5/9/7 OARA2 Crews, Statuses & Competitors are all transferred now. A lot of work still needs to be done, particularly with regard to the ARA's EventID field, but I should be able to get this running properly in the next couple of days.

    The new export model will make many of the joins significantly easier...

    23/8/7 Regatta Statistics This drove me round the bend in May. And it has done for the last 3 hours. Access correctly calculates the statistics, but when they are displayed in a web page, the numbers are different. The problem actually lay in [List - Winners in Lane 1] etc, which use the LIKE operator with * as the wildcard. Of course, ASP requires ALIKE with %...

    On the plus side, the SQL has been significantly improved, using a UNION query. Note that this will have to be ported to the current database (Oct2007). The ASP code has also been improved, though will have to handle 2 day racing.

    22/8/7 OARA2 Its looking good.
    20/8/7 General I am now working through each program in turn, bringing them up to my latest coding standards. This is Version 3.3.0.
    • Check In has not been looked at since first written over 2 years ago. I can't test it yet, as I have no regatta data any more, though the code has been updated so that it at least compiles & connects...
    • Commentary has been recoded in line with Gavin's wishes. It needs comprehensive testing, again once I have some regatta data with which to test.
    • Email is redundant, and will be deleted.
    • Entry Manager has a few forms which are centred by VB on load. I'll have to review whether I want to continue with this policy.
    • Head Start is primitive. Its just about all that remains from my original concept, way back in 2002...
    • And so ends tonight's coding... I've managed to standardise all of the Head Race specific programs
    • ReDraw Manager will not compile
    • RegattaControl has undergone major work and will need to be completely retested. The problem was that it did not use any of the standard user controls...
      Most of the variable declarations are now redundant, but have been left in so that I can see the original purpose of the functions.
    • MANY of the forms would not respond correctly to a request from the TaskManager OR Windows itself to shut down.
    • Sponsorship & Trophies MUST be coded this winter!
    • I think that's the lot. Not all have been reversioned yet, but this can wait until each program is rebuilt.
    26/7/7 Database The method of selecting allowable statuses is great. Assuming, that is, we're running a 1 day regatta, and that we do not have a set list of events. In other words, its now all but useless. A better method is to specify whether we are running freeform entry, and if not, to define the EXACT status list. Freeform entry (used by 4 of our 5 events) has not been coded yet, though day specific statuses has...
    26/7/7 OARA Version 2 is now undergoing beta testing.
    • Schema.ini can no longer be used, since all fields in the CSV file are quoted. This is actually in some ways an advantage, since ALL fields are now defined as text. I had to use the file originally to STOP Access from assuming that a field contained only numbers, since this could be true at the start of the file, but not at the end, leaving Access making an incorrect assumption...
    • I'm going to have to rewrite the import routines. I am assuming that I will be using the new version of OARA in October - however, it would be safer if [EventData].[ADMIN_OARA] recorded a version number instead of a Boolean value. This breaks compatibility, but is well worth it...
    • eventidmappings.xml is new. EventID="35771" EventIdentifier="E 8+" CustomEventID="E.8+" - what do these mean? I can upload a new file, with new CustomEventIDs AFTER entries have opened
    25/7/7 General All of the programs should really store the position of their forms in the registry.
    24/7/7 Commentary One of Gavin's biggest problems with the regatta system is the inability of commentators to announce what they see in front of them, instead just relying on the messages
    19/7/7 Regatta Finish
    • Only being able to finish the FIRST race in the tree is a problem if some idiot has started the wrong race and not corrected it/informed me. The Finish program now uses the currently selected race regardless...
    • Tony reported not being able to enter the winning time. This surprised me at the time, since I was sure I had coded this functionality, and it works perfectly for me...
    • 1 lengths typo has been fixed.
    • Entering 'nro', 'ro' or 'ft' no longer screws up!
    19/7/7 P(r)oxy Server The messages coming in from MPI & Sockets have ALL been converted to generic functions. This ensures consistent behaviour, which has been needed ever since asynchronous messages were added on 29/3/6...
    17/7/7 Regatta Finish
    • Verdict 2 is hidden if the race has just 2 lanes.
    • Form expanded to display the RaceDetails control correctly.
    • The network does not cope with 2 instances of this program. This caused me problems, since I wanted to remove a race from Finish (where Start had screwed up, and started the wrong race). The bug actually lies deep within the Proxy - whilst arguably the most important part of the system, it is very poorly coded, relying on duplicated code. clsRegattaFinish was using the old code model - ie before emfMessageTarget was set to clsSocket.IncomingHandle. In addition, the server DLL was overwriting this in SelectRace.
    • Fixing these issues resolves the problem, though races are not deleted from the OnCourse control when another instance of the Finish program is run. This should be easy to fix, but not at 2am...
    • Only the Proxy's Start code differs from the standard implementation of m_LocalMR_OnReceivePostedMessage. This is probably a mistake anyway, but will need testing before the October Head.
    • Standardisation will give a few short term headaches, but will prove invaluable in the long run, especially when I move to Named Pipes and MSMQ...
    17/7/7 Sockets The only software problem at Quarts Sprint was that Commentary was getting 'Subscript out of range' errors. This was actually due to a subtle bug in the SocketLibrary - it uses CHR$(10) as its end of message identifier. Unfortunately, sponsorship messages use vbCrLf to improve presentation. It also explains why the May Regatta did not suffer from the same problem (it doesn't have sponsors), and why sponsorship details were not being provided to the commentator.

    I am unwilling to break compatibility, so have to modify both the Proxy AND Sockets to get around this one. By the way, its taken me nearly 3 hours to find this!

    TODO - it may be worth looking at Dimaco's socket code, which handles fragmented packets correctly.

    17/7/7 Race Manager 2 years running, Tony has phoned in a panic on Sunday morning, having forgotten to set ActiveDay. RaceManager now sets this if relevant.
    16/7/7 Regattas Phew. Bar a couple of minor glitches, all three regattas went well.
    7/7/7 Database [List - Rowers Doubling Up] and [List - Competitors] have been modified to show manually entered competitors. [Oara - Doubling] needs to calculate the 'Cox' field. This now allows me to automatically work out doubling without having to manually check every bloody entry form.
    6/7/7 Assorted
    • User Control draws correctly if a different event is acted on. Bloody VB.
    • Withdrawals made via OARA are now logged.
    • Entry Manager doubling grid suffered from the EOF bug - clicking on a doubling instance now moves between records, as it should have done in the first place!
    • Extra menu added for spiders.asp, allowing us to choose different display options.
    5/7/7 Entry Terminal
    • ValidateStatus now works, as the Statuses relevant to each day.
    • A rather crude implementation of Withdrawal has been added.
    • Not satisfied with the crude implementation, I have done it properly. The idea is that withdrawals (and other changes, for which the message framework has already been added) will be sent to the server immediately. On receipt of an acknowledgement, this will be logged. The only problem is that the user control is not drawing correctly, though this may be an artefact of my laptop's rather dodgy touchpad. I'll try with a mouse in the morning.
    • OK - later this morning then...
    • For all its faults, I like OARA - I've had 150 valid entries so far, and have yet to see a single entry form :)
    5/7/7 Regatta Draw Level is now added to the database. In addition, a few minor issues with the same status running on multiple days (KAR don't do this, I think)
    4/7/7 Entry Terminal
    • All pieces are now in place. I can create batches, view them and assign payments. I suppose that at some time I ought to add the ability to make entries... And to pay for them!
    • EventData is now being downloaded correctly, but statuses aren't (NEED number of days from EventData), so cannot validate status.
    • The UI is still fairly clunky. This will change, but I have to get it working first!
    • Payments can now be added.
    • eetCreateBatch now returns the Club & Contact names (for existing batches). This allows users to check that they are adding a payment to the right person, on behalf of the right club.
    2/7/7 Entry Terminal Given the vile weather at the moment, I doubt I'll be going to Henley this year. Which is just as well, given that I'm still coding this wretched program. I had forgotten quite how complex it was...
    • All the functionality for creating a batch is now in. Clubs can be added to the list, Composites created, Contacts created/modified.
    • The UI for Doubling has been radically improved, with the ability to add and remove selected doubling pairs from the list.
    • Since most doubling occurs within a single batch, there is now a way to enter this rather more quickly.
    • The old Entry Wizard had problems when it came to working out whether doubling needed to be saved. I've therefore made this explicit.
    • Nasty bug found in MSHFlexGrid - if the recordset is at EOF, then subsequent EnterCell events are not fired. This may explain some of the odd behaviour found in the EntryManager.
    26/6/7 ASP mmpagehighlighter.js allows me to correctly highlight the current page within the menu structure, even if a redirect has been applied.

    I really ought to apologise to Tony at some point for my comments last night. I needed to blow off some steam, and he was the unfortunate recipient.

    • To hell with it. I said I was not going to implement the sort orders, but have done so. QS_SORT has been added, with several possible values, such as SORT_AUDIT. This then allows me to use a simple Select... Case statement to pick the required query. Those pages that implement custom sort orders use the sExtra parameter on their menu item to specify the default, while the available sort options are contained in a separate menu.
    • Note that the column order has to stay the same for the time being, as otherwise the code would become virtually unmanageable (OK, even less manageable than it is now).
    • To hell with it. I said I was not going to implement the sort orders, but have done so. QS_SORT has been added, with several possible values, such as SORT_AUDIT. This then allows me to use a simple Select... Case statement to pick the required query. Those pages that implement custom sort orders use the sExtra parameter on their menu item to specify the default, while the available sort options are contained in a separate menu.
    • Some of this sort code will actually be useful to me...
    • Custom sorts have been applied to KAR10.01 (ie regattacompleted) as the page has supported this for several years (since a request from LMS during a regatta some years ago, and coded immediately), though the move to a menu structure meant that the hyperlinks were lost.
    • As Tony is probably realising by now, my concern with these sort orders was the implementation of some form of viable framework from which they could be selected, and also the display of what sort order was actually in effect. Now that the framework is in place, additional sorts become trivial...
    • Accordingly, John's requests for 09.01 have been implemented.
    • regattadraw.asp will need some serious work after July's regattas are over, since the code is like spaghetti when it comes to defining query parameters. It works, but will be a bastard to maintain.
    25/6/7 Database [Mailing - Envelopes (Regatta)] did not cope with 2 day racing properly, since the way that payments are handled has had to change. This has now been resolved, though will need manual checking against payments.asp to ensure consistency. One bonus of checking this query is that I have found it contained MANY totally unnecessary joins, which can now be removed
    25/6/7 ASP I have taken the week off work. Not to go on holiday, but to attempt to finish Kingston.

    I've gone through all of the reports, checking that each behaves as expected.

    • One of my main problems has been keeping titles correct for KAR even when a redirect is being done. The InsertOption & InsertSpecialOption routines now use QS_WENTTO & QS_CAMEFROM to ensure that this works correctly.
    • regattacompleted.asp now has the ability to update the Checked & Extracted flags in the same way as the head races do. To be honest, I'd assumed that this functionality already existed! This allows the UI for RegattaControl to be simplified slightly.
    • KAR 01.02, KAR 01.03, KAR 01.04 all need (apparently) extra sort orders. These are not really very high on my list of priorities.
    • KAR 10.03 works nicely now, but all the links move to pages that do not show sponsors. This is actually because I have no wish to modify the base query at this point - I am not sure what performance impact it will have.
    • The purpose of KAR 07.02 has changed, so it has had to be rewritten.
    • Its rather like killing the mythical Hydra at the moment - every time I update the ASP, yet more requirements are made of me. Were this my full time job, then I'd have no cause for complaint. But for someone working evenings & weekends, and now a quarter of their annual holiday, its getting rather tiresome. That said, I wouldn't mind too much if I could see the point of these extras - its as if nobody knows what they really want, so they dream up every sort/filter permutation possible in the hope that somebody will find what they want amongst the mass of paperwork...
    22/6/7 Kingston Had a useful chat with Tony on Wednesday night (glad my employers are paying the phone bill). He likes the new UI to the Entry Terminal, even though it is nowhere close to being a finished product. We also went through several of the ASP pages - most were good, though KAR12 was missing titles, and KAR07 formatting was incorrect. Both of these problems have now been fixed.

    KAR10.04 has been written tonight to show Sponsors' races. After a major panic where I forgot that most of my data was deliberately incorrect, this now works very nicely.

    However, the spiders refused to display correctly. This might be a permissions problem, which can be fixed with CACLS. If not, I'll have to investigate further. On my machine, spiders are shown, but verdicts are not formatted correctly.

    WHY does the registry ActiveEvent determine the layout of spiders?

    22/6/7 General Its 1am, yet again. And guess what I'm working on? Quarts Sprint? Maybe not. Kingston B****y Regatta? What a surprise.

    I've now taken a week's leave to get this sorted out - there is a limit to what I can write in my spare time after working 10 hours per day on my actual job...

    16/6/7 Entry Terminal OK - here we go (in no particular order)...

    Far too many recordsets are being transmitted across the network. If a contact's details have not changed, why resend them? Both client & server would benefit from using the client's local copy. And the same methodology can be applied to many other recordsets.

    The new UI is going to be radically different. At the moment, I'm fast coding, so no executable is possible. I have an idea in my head, though it will be several days before all of the pieces of this rather complex jigsaw actually fit together.

    All messages from the terminal asking for info are to have, at the very least, 2 forms: a request and a reply. A request message will have a [necessary] flag as its first parameter. This means that the terminal will need to know the name of the XML file that will be sent to it - unfortunate, but inevitable. To aid coding, a shared module is preferable. The problem here is that the server uses MPI, while the client uses socket based messages. I therefore propose that all messages received by the entry server are converted via ConvertMPIToSocket in the same way as the Proxy Server does. However, unlike the proxy, the IncomingHandle can be safely ignored, since MPI will be taking care of that in the background, and clsMessage is used here for convenience only. The code is:

    ConvertMPIToSocket pIn, aMsg Set aReply = ProcessMessage(aMsg) Set ppOut = ConvertSocketToMPI(aReply, esEntries)
    To determine which files it needs to write, ProcessMessage uses
    Set cFiles = XML_Of(aMsg)
    At the moment, the code does not use the [necessary] flag, though I'm working on it...
    Whilst this may seem a rather convoluted approach, clsMessage provides a far more intuitive coding model than StdMPIMessage does, and so will make my life easier in the long run. It is 1 based as opposed to 0 based, so debugging messages sent & received will be MUCH simpler. And we have an AddItem method, instead of having to manually keep count of the current item index.

    For the likes of Tony, who's probably reading this log in detail, I wrote both StdMPIMessage and clsMessage.

    • StdMPIMessage is a multithreaded, queued, low level object, written in C++. Horses for courses - this object is vital in that it ensures that messages will be queued while the server is busy, and then processed.
    • clsMessage is written in Visual Basic, and, while based around a dictionary, it ultimately defines a string that is sent over a TCP/IP socket. It is very simple, and very easy to work with.

    The Proxy Server is the clever bit, converting one to the other. And if a client program were to use MSMQ or Named Pipes, then a trivial change to this program would enable the server to work with it without any changes to the server itself.

    15/6/7 Database The Trophies table worries me. It does not reference DayID, but instead uses the obsolete RegattaID...
    15/6/7 Database In September 2005, we had 358 queries in the database. This has now grown to 588 queries, making it the most complex MS Access database I have ever seen...
    15/6/7 Regatta Draw Its no good ignoring this, as it is not going to go away. For that matter, nor is the bloody Entry Terminal, which hindsight reveals to have the UI from hell...
    15/6/7 Query Terminal Here's an odd one - FullScreen only has an effect if it is set AFTER TheaterMode when running IE7...
    15/6/7 Race Manager Whilst there has been support for query terminals showing different pages for some time, the default page has always been hard coded, and some of the more obscure parameters can be hard to remember. Not so any more - we now have an INI file that can be used to define any number of possible pages. Head Race/Regatta specific pages are, of course, only listed if relevant to the current event.
    14/6/7 RegattaHelper Unknown to me in all the years I've been coding, VB's Label controls have a UseMnemonic property that controls whether or not to treat ampersands as denoting keyboard accelerators. RegattaHelper has therefore been recompiled to make use of this in its various message boxes.
    13/6/7 Regatta Editor Since Kingston are likely to be using this, it had better be updated to use the standard RaceDetails control. The problem is that the control was never designed for this application, and so requires quite a few properties to be made gettable. Since it already handles all layout, not using it would be crazy...
    • On the server side, the new swap routine is far more intelligent, since it copes with Kingston's Outside Lanes, and corrects plate/repechage events as well as the normal progression. This is only recently possible, as I no longer have to infer the loser from the crew that did not win... The only problem comes if the next round already has a winner set - I don't really know how to handle this one.
    • Both verdicts can now be modified, using pretty much the same code as found in RegattaFinish.
    • The winning time can now be edited (new functionality). NTT is also supported.
    8/6/7 General John Smith's funeral is today. He died from stomach cancer, which his doctors told him 2 years ago that he would die from in 3 months. He was a great friend, a good oarsman, and will be sorely missed. Again, the dress code is Henley.
    7/6/7 ASP
    • 01.04 uses a query (List - Regatta Full Audit By Day) that depends on the draw having been done. This is probably a mistake on my part. The query has therefore been renamed as [List - Regatta Full Audit By Day Old], and a replacement created.
    5/6/7 ASP Payments.asp has been radically improved.
    • Day Ticket information now depends on 'Event_DayTickets' so can easily be added back in if the ARA reverses its decision. There is no UI for this in the Option Editor, as there is no prospect of this happening at the moment...
    • Payment Due is day specific, so is shown as such. All other data are contact specific, so may span 2 rows.
    • I've also started to look at a way of reusing the existing web pages where they exactly correspond to one of Kingston's, but with the appropriate titles added. This will enable me to quickly write the majority of John's reports with very little effort...
    • 10.05 & 10.01 BOTH redirect to regattacompleted, as we can only mark a race as qualifying once it has been completed... But the redirection code gives them different titles ;)
    • refunds.asp does not work properly yet.
    • All of the pages (apart from KAR12) now support the new framework, though they may have lost titles in the process. This is easily resolved, but not at midnight in Holland...
    1/6/7 General Dick Garrett's funeral is today. He died, totally unexpectedly, from a series of heart attacks last Tuesday. Dress code is simple: deck chair blazers :)
    31/5/7 KAR ASP
    • 12.02 - Statistics for Women now calculated correctly - the (known) bug was that the variable was not being initialised.
    • One issue that I have identified is that several of the reports contain both day specific AND summary information. I should really be displaying the day specific data based on the DayID held in the querystring, unless otherwise specified. This is now possible with a new menu, though support for QS_SUMMARY has yet to be propagated to other pages.
    • What John has probably not realised yet is that the pages benefit as much from filters as they do sorts.
    • I can just see it happening - John decides that one of the reports should be renamed, or that ALL of the page titles should be formatted slightly differently. So I've defined m_sPageID, and a series of functions that work off this. I can now guarantee that any page that supports this methodology will have menu, page title & page heading all set to the same. All menus have now been restructured in this way - the main advantage to this is that the code is now significantly easier to read!
    • John's requirement that report should be titled Kar xx.yy instead of KARxx.yy is now a single line change.
    • 12.04 now supports highlights
    • All pages now support m_sPageID. This will make the creation of future pages easier, as there is a common standard.
    • BUG Payments.asp does not cope with multiple days! The problem lies in the calculation of refunds - [Due] is day specific, whereas [Paid] is not...
    24/5/7 Entry Manager After 4 hours of coding a conceptual design, I am extremely relieved that the Entry Terminal is now able to modify the EntryDoubling table. The algorithm is in fact rather nice, and deals with deleting BOTH sides of a doubling link, which was one of the biggest problems with last year's Terminal.
    24/5/7 Entry Terminal Using MSHFlxGrd for doubling makes life quite a bit easier.
    • New doubling records have their EntryID in col 1, and nothing in Col 0
    • Conversely, deleted doubling has nothing in col 1, and the current entry in col 0. The row is also hidden to keep the user happy :)
    • Any doubling that is added and removed without saving to the database merely deletes the new row.
    • After ANY doubling operation, Row is set to 0
    The terminal should allow post draw operations - TODO

    24/5/7 Entry Manager This now copes with batch based doubling again. The Entry Terminal doesn't yet deal with the extra file, but I'm working on it.
    24/5/7 Entry Manager One of the problems at Bedford Regatta was that the doubling for entries received manually was only recorded in the database if done from the main screen - ie not from frmNewEntry. I cannot be certain what effect this had, as no data exists! And I'm certainly not going to ask Rachel, since then I'd have to explain...
    23/5/7 Database The Sponsorship table has been renamed as SponsorshipAllocation, and a new Sponsorship table created in its place. The reason is that we need to define what people have sponsored (ie 2 eights & a four) BEFORE assigning them to particular events. It also allows us to determine when we have allocated the correct number of events to each person.
    15/5/7 ASP
    • QS_GRID & QS_HIGHLIGHT added as menu options, since I am reluctant to code too much that is specific to Kingston. I will eventually add support for these to all pages.
    • Session("RaceIsRegatta") finally removed.
    • The reason that John reckoned that fewer pages worked than I had said is that many of them depend on batches, which did not exist in my test data. To debug this, Bedford Regatta now has batches, with all women's crews racing on day 2.
    14/2/7 Installation OARA schema.ini added
    12/5/7 Regatta Server Bug found - using m_dStatusNames is a good idea, but we MUST use a string as the key - if we use aRST("StatusID") then we add an empty item to the dictionary. I just wish our commentators had reported this problem 7 hours ago...

    New ASP page added to show all crews that have scratched. Amazingly, in all of KAR's reports, they never wanted this one. This highlights the difference between data needed to run a regatta, and reports that somebody thinks would be useful.

    9/5/7 ASP regattadrawbyclub has been annoying me for a while. It duplicates the code found in regattadraw.asp but without using any of the speed optimisations, and also fails to display blades correctly. I've therefore added support for specified clubs into the main regattadraw code, thus greatly simplifying maintenance, and allowing extra features to be applied in a standard manner across all pages.
    5/5/7 ASP
    • print.css added to ensure that the background is set to white when any web pages are printed. Normally, this would not be a problem, but John White wants to have alternating row colours to make printed reports easier to read, and Firefox can only print these if it prints the page background colour as well.
    30/4/7 Regatta Draw Fundamental changes to the algorithm at this late stage were never a particularly good idea. I've just found a bug in the doubling code, whereby only the last instance of doubling was utilised. As with Kingston last year, the only way I found this error was from the doubling ASP page
    26/4/7 Website Gavin Dods wants to have a machine for the Finish Judge, allowing him to see the races that are currently on the course. This functionality already exists, but what we need is the ability to automatically refresh the page after a set interval has elapsed. META HTTP-EQUIV=REFRESH CONTENT=5 does this - brilliantly simple...
    This method should also let me produce better management pages.
    • regattadrawbyclub should be obsolete - I'm sure I can replace it with another variation of regattadraw...
    26/4/7 Regatta Draw I've imported all of my new controls into the debug version of the Draw program - basically, this is one cluttered form that shows EVERYTHING!
    • tvEntriesDoubling_NodeClick has now been coded to show boat/cox & crew sharing
    25/4/7 Regatta Start If only 2 lanes are being used, then calculating the number of starters in each event is easy - basically, we just look at row over verdicts. However, 3 or more lanes present a problem - a row over means that 2 crews have scratched, but what if only one has? The only way to handle this is for the start terminal to record who has actually reached the Start. As yet, I'm not sure how to process the information, but the database tables ARE being updated correctly.

    An obvious development of this approach is to modify the crews shown in Start & Finish treeview controls, showing only those crews actually on course. The problem comes when we started the wrong race - we can't set HasRaced to False, as the crews named in the erroneously started race MAY have actually already raced.

    25/4/7 RegattaServer
    • m_dEventData is no longer case insensitive
    • Only Lane Info up to Max_Lanes is transmitted.
    25/4/7 Regatta Draw I've now modified the code so that the new doubling algorithms work in the original draw program.
    25/4/7 Entry Manager Version 3.2.1
    • frmQuery has finally been removed.
    • frmReports has also been removed - it gives no benefit now that ASP pages can display the output of so many queries!
    • The UI for doubling has been sorted out - it uses the old =x=y format, but stores this data in the new EntryDoubling table.
    • Payments cannot be assigned to the System Account
    • Single entries can be moved from the System Account to a real contact.
    • DT button removed from the toolbar.
    • Tooltip support greatly enhanced - instead of sections [Control 1] etc, the sections are now the name of the control. This makes the file smaller and easier to manage.
    • Virtual Directory creation has been improved by a proper implementation of ModifyACL. The IIS account is also given full control over the TEMP folder, so that when we compact a database, IIS can still access it.
    25/4/7 OARA I've just received the Project Definition Document (1.2) for the new version of OARA. After a quick scan, it looks to be very good indeed, addressing most of the known problems. More comments to follow...
    17/4/7 Database I have decided to merge StaticData with the main database.
    • There's really no reason to separate them.
    • Referential integrity cannot be setup between tables residing in different databases.
    • Backup becomes easier.
    • We may get slight performance improvements.
    28/3/7 Entry Manager
    • Bug found in frmNewContact.cmdOK_Click: deleting contact detail fields had no effect.
    • All Day Ticket code disabled as DTs don't exist any more. However, I wouldn't be at all surprised if this decision was reversed at some point.
    • Updating the main recordset no longer throws an error if no entries currently exist in it.
    27/3/7 Regatta Draw (NEW) I am starting to become deeply worried. Not only can I not produce a valid block based draw, but I have also broken Bedford Regatta's draw. That said, our doubling problems are significantly more complex than anything that Kingston has to worry about, so its probably best that I'm testing on the worst case scenario...

    If I cannot solve this very soon, I'll have to revert to the standard algorithm

    16/3/7 Regatta Draw (NEW) So why have I recoded the Tree? The answer is simple - it provides a VERY good UI, with drag drop capability and multiple columns to display (and, more importantly store) information. Clashes are currently denoted by node colours - whilst this works, its not very intuitive. Columns will allow me to show not only that there IS a clash, but also which direction it lies in, and how far away it is...
    16/3/7 Treeview The VB Accelerator MultiColumn Treeview is a brilliant control, despite being slightly slower than the native one (hardly surprising, as its written in VB). However, it suffers from a number of bugs, which have now been fixed...
    • Nodes.Count now calls ctl.NodeCount, which works properly.
    • SubItem.Text is now the default property.
    • FirstSibling no longer returns the first node in the array (which may not be the first sibling any more), but instead checks whether PreviousSibling is valid. If so, it moves up until we get to the REAL FirstSibling. The problem is that the Treeview control has TVM_GETNEXTITEM, but not TVM_GETPREVIOUSITEM... Or, if it does, then the control does not include its definition - I'll have to check the latest SDK for this...
    16/3/7 Regatta Draw (NEW) I've added a lot of versions to SourceSafe.
    14/3/7 Regatta Draw (NEW) Following an interesting meeting with Tony Gordon (who just happened to be working in Bedford) tonight, I've made some progress with the new draw.
    1/3/7 Regatta Draw (NEW) The time has finally come. EntryDoubling & StatusDoubling have now been coded, so I can now write a block based draw. The key to it is figuring out the finals sequence automatically, though the first stage will have to be getting it to work with the default sequence.

    I have deliberately deleted Entries.Doubling so that errors are thrown - the code compiles, but ADO complains that the Doubling field does not exist. The queries to resolve this will take quite a bit longer to execute, but will be worth it in the long run... Note that OARA data allows me to find the 'worst case' scenario automatically, though I still have no way of manually appending doubling info, or of using worst case data.

    The existing draw is actually rather crude (in terms of coding), using parsed strings within the Tag property. Whilst this works, it is extremely difficult to change, and gives no easy way to denote that a doubling relationship exists between coxes only - ie the turnaround time can be shorter (we coxes generally don't need as much time to recover as oarsmen do).

    So how am I to code the draw? It would seem sensible to determine a finals sequence, based on the blocks, and inserting unlinked events at random. Then to move, based on what?

    28/2/7 Database [Doubling - Create StatusDoubling] created. Note that it only fills in one side.
    16/2/7 Regatta Draw Too tired to work out what to do with the new doubling methodology in some of the routines.
    15/2/7 Entry Manager I am still working on removing frmQuery...
    15/2/7 General Coding for just 2 hours? The number of requests I've had for changing trivial layouts in ASP is quite staggering. The problem is, each takes a significant amount of time, and I do this coding after work, coxing etc. Sleep is also required occasionally...
    15/2/7 Database The last structural change that I believe is required for Kingston's Draw & Entry Terminals concerns doubling. The current Entries.Doubling field is not really good enough, as it can only be interpreted in code, and not in SQL. A far better methodology is to have an EntryDoubling table, with a UNION query combining the fields.
    • This has a very useful side effect - MatchDoubles becomes completely obsolete.
    • Only one side of the relationship needs to be specified, as the query handles the rest.
    • Deleting doubling via the Entry Terminal becomes significantly easier, as one simple query can be used. We also don't need to worry about two separate fields containing different versions of the same data (as Doubling & BatchDoubling do).
    • The BatchDoubling field was a bodge, which I will be very pleased to delete!
    So what effect will this have?
    Existing queries will not be affected, as they are currently unable to parse these fields. MatchDoubles goes, which means that a slow, complex operation is removed. The Draw algorithms will need to be rewritten, but that is necessary in any case.

    The longer I consider this, the longer I wonder why its taken me 5 years to change this functionality! The Entry Manager shows FAR more useful information, though as yet I have not put in place any way of adding or removing doubling. That said, I've only been coding for 2 hours!

    14/2/7 Personal This time last year, I was in Norfolk, and she was in Manchester. This year, I'm in Bedford, she's skiing, and didn't tell me which hotel she was staying in. No flowers this year then...
    8/2/7 Database [Entries - Payment Missing] no longer shows withdrawn entries. [Count - Entries Assigned Payment per Contact subquery] also takes this flag into account.
    8/2/7 Database I've added a [HasRaced] field to the Crews table. This will allow me to more easily determine the number of starters in a multilane regatta. 2 lane racing is much simpler, since if one crew scratches, and the other rows over, you know that one crew started. The same does not necessarily follow for multilane regattas...

    Note that this functionality is not implemented yet, the field being merely a required placeholder...

    7/2/7 Handicaps Veteran Handicaps are always a nightmare to calculate - your regatta rarely has an exact standard time... Handicaps.exe provides a simple means of calculating the handicap between any two veteran statuses, with any standard time up to an hour...
    6/2/7 Head Control This is being brought up to date:
    • Support for ASP menu structures has been added
    • The ARA Rules of Racing now link to the correct URL
    • frmClubs is obsolete and has been removed.
    • frmCrewDetails lists crew composition in the correct order. I'm still unsure as to whether this should be completely replaced by ASP.
    • Both crews.asp & statuses.asp now support QS_ENTRIES. The question remains though - is this actually useful?
    • [List - Completed Events] now uses the Crews table for Checked & Extracted, and so do the update queries.
    • LMS has asked several times why there needed to be separate buttons for changing the 'Checked' & 'Extracted' flags. The reason was that it provided a visual check of the crew, but everybody I've ever seen just hits OK without thinking (maybe not LMS, in case she ever reads this)! So I've given this functionality to the ASP pages instead... We'll have to see what people think of it.
    • The added advantage of this methodology is that we now have the ability to correct mistakes...
    • The buttons are still useful, as they allow the flags to be set before the status is complete. But the captions are wrong, as this flag now toggles.
    • The 'Show Blade Colours' option is redundant since the menu structure came in. Unfortunately, it is still required, as the program does not know about m_sBase. Yet...
    Entries.Checked & Entries.Extracted can now be safely removed...
    6/2/7 Website alterations.asp is being coded at the moment.
    2/2/7 ASP entriesbyclub should show blade colours.
    2/2/7 Entry Manager frmQuery should be removed - all it does is show a grid, and would be FAR better handled with ASP. There are actually a surprising number of queries used in this way, but I genuinely believe that they should be done via ASP.
    1/2/7 Entry Manager Exactly HOW did I mean to do private matches? The answer is simple - the database was written, but no UI was added to RaceOptions. This is where the flexibility I coded into RaceOptions really makes a difference - the new option can be easily coded, just by cut & paste... Using Associations is really rather nice, as I can now specify which results should not be sent to the ARA.
    30/1/7 Entry Manager Since the ARA changes club codes on a regular basis (Pembroke Oxford are now PMB instead of PEO), I have had to add yet another data validation check, allowing the user to add the new club...
    28/1/7 Entry Manager The Head Race draw code has been removed, since the new HeadEditor does it all. Just getting rid of the form significantly improves program load time! There are also quite a few routines used for this only - there is no reason why they should be in the Entry Manager at all...
    28/1/7 Website paymentdetails.asp & refunds.asp written. These will form the basis for several of Kingston's reports.
    28/1/7 Database
    • Comments field added to Cheque Details.
    • Banked field added to Payments.
    • These should make tracking payments slightly easier.
    28/1/7 Entry Manager If the current contact is SYSTEM, we now have the ability to transfer all relevant entries to an existing contact. The Other Entries & Payment grids are updated properly - this should have been done a long time ago!
    26/1/7 Head Editor
    • The owner drawn Treeview is very nice, but does suffer from bugs. I have already fixed NextSibling, while FirstSibling remains a problem.
    • Looking on the bright side, I have got a truly excellent renumbering system fully working
    • A major consequence of writing this program is that I have to redraw all of the blades. As is happens, 33x57 is very close to the on screen display of the full sized blades - the reduced sizes look significantly better! I might also add a loom to them now, so that collar colours can be shown.
    26/1/7 Installation Support for the Head Editor has been added.
    26/1/7 Entry Manager A way of logging Division Changes would be useful.
    25/1/7 Head Editor Since April 2005, I have had the ability to modify a Head Race Draw sequence via the Entries.RaceOrder field. However, this has always been a manual, time consuming option, and required a direct database edit. Not so any more - the new Head Editor does this with a simple GUI. It uses an owner drawn Treeview control with multiple columns, and DragDrop operations make use of an insertion mark - very easy to use! Note that only the GUI works as yet...
    23/1/7 TODO Use CACLS to ensure that database permissions are set correctly.
    23/1/7 Entry Manager Access Control has been removed.
    23/1/7 Database
    • [List - Clubs on Mailing List (Repeat)] has been modified so that clubs who have already entered are not included.
    • [Update - Mark All Paid] is obsolete, since Entries.Paid no longer exists. The menu structure in Entry Manager has therefore been removed.
    22/1/7 Database There is, of course, a MUCH better way of handling the OARA table. If we insert 2 extra fields (EntryID & Manual Entry) then we can enter the data on the ARA forms received by post, so that ALL crew information is available. This requires a lot more typing, but ensures that Race Control has instant access to everything...
    All of the queries used by the ASP pages have been slightly modified to take advantage of this change. Crew.asp now shows total points.

    An obvious development to this will be the ability to substitute rowers on race day. I really need to look at the ASP code for this!

    19/1/7 Entry Manager
    • The Update button on the entry form no longer moves the cursor to the last record in the recordset - instead, it moves back to the currently displayed entry. This is a huge improvement :)
    • If entries have been received from OARA, then the current ContactID is 1 (System Account). The menu that normally lets us transfer an entry to a different (existing) contact has an extra option in this case, allowing us to add a new contact to the system. It then asks whether to transfer all unassigned entries from the current club to this new contact. If the current club is a composite, then no action is taken.
    • BUG found - if importing from OARA, make sure the club is in the list! A new query [Entries - Mark Clubs making Entries as Active] resolves this.
    • Note - manually assigning the same OARA ID to 2 entries (ie they subsequently decided they wanted to race twice) does not show them as doubling up in competitors.asp - this is a very artificial scenario, caused only by the fact that the ARA charges us money for each crew that uses OARA. I'm not going to do anything about this.
    • Its not really important, but the ASP page listing the crews that a competitor is racing in (OARA facility) does not work for Head Races. As you may have noticed, I'm currently tying up loose ends in my own system before getting to grips with Kingston's Draw methodology. I have agreed to not make major changes without their approval (ouch), but they don't use OARA, or run Heads with this software :)
    18/1/7 Entry Manager
    • One of the problems I had over the summer was that I'd made a mistake when defining the statuses within OARA. From memory, I'd used WS4.8 instead of WS4.8+ This caused significant problems, since I had to manually change each entry, and was not aware of the issue until runtime errors appeared during the draw.

      This has now been resolved - if an invalid status is found, the user is prompted to correct it. If the correction is not carried out, then OARA import will not continue.

    • The query [List - Duplicated Division for Competitors] now ignores Division 0, and no longer relies on the Crews table. It is run ONLY if OARA is enabled.
    • The Weightings form is obsolete, since I radically overhauled divisions.asp in October 2006. It has therefore been replaced with the web page. This removes the dependency on MSCHRT20.OCX The page has been slightly modified for use within the Entry Manager - it can now display stats BEFORE the draw was been run - ie including Division 0.
    16/1/7 Entry Manager
    • If we change the Contact of an entry from the menu structure, the correct contact is now shown in the menu bar.
    • In MoveComplete, UpdateContactCombo was failing to execute as m_fCodeCall was set. This prevented the list of contacts from the current club from being updated if the user was navigating between records by clicking on the grid. This has now been fixed.
    • BUG - School/Junior can be deselected in the Option Editor. But this seems to be classified with just plain Junior :( On investigation, it transpires that the keys in the StatusList table were wrong...
    • I'd better add support for U23, just in case Kingston request it...
    13/12/6 Database [List - Event Numbers] is now Day aware. It still contains repechage & plate, as I'm not sure what uses it yet...
    12/12/6 Database Functionality of [List - Sponsors] changed. This will therefore generate an error when running the draw, reminding me to make the code day specific. The old query is now called [List - Sponsor Details].
    10/12/6 ASP I have started work on Kingston's requirements for ASP based reports. Some of these are trivial, since the queries already exist. Others are in fact stats that Gavin Dods has requested in the past. The rest provide, in my opinion, a lot of complexity without conveying any useful information...
    10/12/6 Database Bug found in [Count - Trophies required SubQuery (Regatta)] - it included repechages...
    9/12/6 KAR
    • Provide details on setting up a LAN, including the use of DHCP.
    • Entry Terminal to be entirely keyboard driven - cmbRaceNames for example currently poses a problem.
    • eetRequestEntriesMade message added.
    • Priority goes to the EntryWizard & its doubling functionality. This to be complete by 24th Feb2007 - also sort out Draw Collapse. The block based draw is ongoing. Then 14th April, then 26th May???
    9/12/6 Database The Sponsorship table needs to be Day specific
    26/11/6 Regatta Draw Tony Gordon has now fully explained the way that Kingston's Block based draw works. Its actually quite a nice idea, and is based upon groups of statuses that do not clash AT ALL with each other. The StatusDoubling table is the key to this (hence the bugfixes to StatusOfEntry), though I'm currently only working off doubling pairs instead of the full node diagram that Kingston use. I've yet to work out how to create such a diagram, or what benefit it will give. However, the order of the doubling list IS critical to my algorithm: I am currently sorting by complexity - ie the number of entries per status, multiplied by the number of statuses it is doubling with. This produces the minimum number of groups, compared to any other sort applied yet. Tony says that the fewer groups, the better.

    Alternatively, I can select pairs at random, and stop once certain criteria are met. I suspect that I will need to take into account the number of rounds, and actually to lay out a draw each time...

    On reflection, Tony now says that more groups of the same size are better...

    26/11/6 Entry Manager Bug found in StatusOfEntry - iDayID & fWithdrawn were being passed in ByVal instead of ByRef
    24/11/6 Client Options
    • This now uses INI files, and upgrades properly from the old registry keys.
    • Conversion to INI files has identified a potential issue with the EntryTerminal, SponsorshipManager & TrophyManager - all of these would use the default ports ONLY. This has now been fixed.
    • One advantage of using INI files is that I can now specify that this file should only be installed if it does not already exist. Sadly, InstallShield does not afford this flexibility to registry keys...
    24/11/6 Regatta Helper INI file handling functions added. The reason is that Kingston dislike having a registry key for the Server IP address, and on reflection, I agree with them...
    20/11/6 ASP Network links added to the admin menus.
    20/11/6 ASP resultsbytime.asp no longer assigns a different place to each crew; however, I cannot easily generate = symbols...
    17/10/6 Database
    • [Timing - Errors subquery] has been slightly modified so that it ranks problems in order of importance. [Timing - Errors] is a UNION query as well, showing ALL times.
    • The Times table has been altered to allow null values for times. The reason, highlighted on Sunday, is that you may want to delete a start/finish time for a crew.
    12/10/6 ASP Divisions.asp has been overhauled. One of the first pages to be written, it has never really provided sufficient information on its own - other queries have been used to generate reports.
    • A count of boats per class in each division is now displayed, and highlighted if greater than a predefined limit (held in EventData, and specific to each size of boat). The layout has also been modified, with the bars running horizontally. This looks significantly better, and also simplifies the code.
    • One of the problems has always been the hard coded weighting multipliers. The original query is therefore no longer used: instead, the calculations are done in code, based upon data held in the EventData table.
    • weighting.asp finally replaced - divisions.asp now uses values from the EventData table.
    7/10/6 ASP Some fairly major changes have been made to the Head Race ASP files:
    • I'm starting to create a menu structure, and to make the selectable options (eg Race Title) work properly. The JavaScript has also been slightly adjusted so that the Home page is not highlighted when selected.
    • dev.asp contained InsertResultsAreReady only, which was commented out. The file is therefore obsolete. I think that I have updated most of the pages that called this, though I'm sure a few are left!
    • Scrolling code is now automatically inserted in InitialisePage. Again, I'll have to check that the variables are not redefined.
    5/10/6 Entry Manager
    • In frmNewEntry, clicking on the address fields threw an error if no contact had been selected.
    • Bug found - when entries are made, the menus do not change.
    • Bug found - contact details not displayed when the program loads.
    • Bug found - ActualStatusID not being updated on status change.
    4/10/6 Entries I've taken a break from coding - nothing done in nearly three months :)

    • The Entry Manager now supports Payment Assignation. Lack of this facility was the reason that Cambridge Autumn was not upgraded this year.
    • Both the Manager & Terminal recognise that if a contact has made only a single payment, then that's the one you want to assign to an entry...
    13/9/6 General The PLA have produced a very useful booklet covering Rowing on the Tideway. They've even got an Appendix listing the blade colours of all Tideway Clubs. These look very familiar... To be fair, they had tried to contact me via an outdated email address, and retrospective permission has of course been given ;)
    18/7/6 General Review comments from 18/9/5
    18/7/6 Regatta Control The ASP pages are now fully Day specific, so this program now uses an appropriate QueryString. It also enables menus by default.
    18/7/6 Regatta Finish
    • Kingston reported a problem with the display of the Winner's name. What was actually happening was that the control was displaying the name of the last crew that was input - so first it showed the winner's name, and then second place's name if the race had 3 lanes. In actual fact, the winner's name is now obsolete, since we have labels for position. All that it needs therefore is a couple of extra fields adding to the message if a winner has already been recorded. In addition, this allows us to view BOTH verdicts, if applicable. (Note that this is only ever applicable if somebody is querying results via the Start program!)
    • TimeTaken can now be entered even if no start time was recorded (ie somebody was using an old fashioned stopwatch).
    13/7/6 Spiders The schemas for a 3 lane repechage event with 7 entries were wrong. This has now been resolved, and a new debug function created to automatically perform the check.
    4/7/6 Database Bug found in [Mailing - Notification of Draw (Regatta)] - There needs to be a join between RegattaDraw.DayID & Entries.DayID to prevent duplication of rows where the same status runs with 2 lanes on one day, and 3 lanes on the other.
    4/7/6 Draw Engine Judicious caching of options reduces dramatically the number of inter-process calls. During clash resolution, processor loading for RaceOptions.exe drops from 26% to just 2% - this has significantly speeds up the process! During sequence checking, this increases to 15%
    • Bug found in Day1 Multilane.txt - if we swap crews around after the draw, this file is not updated correctly... The problem is that the code actually uses cached lookup tables to quickly get crew names. If the routine is run without doing a draw, then this table is regenerated, and everything is fine.
    • The same problem affects the Doubling table, which is generated during a draw. Again, run the routine on its own...
    4/7/6 Quarts Sprint I've now assigned all payments that have come in, and have sorted out the contacts for everything that entered online. Its now draw time...
    4/7/6 Kingston Regatta Its now 1:10 AM - at least I've got home much earlier than last year!
    Overall, the system performed very well, with 3 people simultaneously making entries. Inevitably though, a few minor glitches/omissions were found:
    • On adding a new contact to a Club, you would expect it to be automatically selected when you move back to selecting contacts.
    • On adding a subsequent contact, the address fields were not being cleared out, and so still show the address of the last contact whom you added
    • When modifying entries, there was no way to finish that task and create/edit another batch.
    • Rather more serious was the inability to add anything to an existing batch.
    • If BatchIndex is a multiple of 10, the current batch label was being formatted incorrectly.
    • Similarly, to was impossible to add a doubling reference to a entry where the referenced BatchIndex was a multiple of 10.
    • The payment grid in the EntryManager has required a serious edit. The problem is multiple days - payments are not day specific, so money due per day is not really useful, as there is no way of telling what money has been paid per day. You could do it off payment assignation (to each entry), but this would hide the fact that not all payments are for the correct amount. The solution is not ideal, but is the best available.
    • The £ symbols are missing from the new query...
    • When entering doubling, the users were doing a lookup, adding to the list, then looking up the next entry. Unfortunately, this was not the workflow that I had envisaged, so nothing was being saved. Happily, this was caught before too much work was wasted, and their workflow method was changed. However, their assumption is not unreasonable, and the code has therefore been modified accordingly.
    All the above have been fixed; however, a few things still need to be sorted out:
    • The EntryTerminal really needs some form of login capability - its all very well saying that a Batch is locked by a certain machine, but it is useful when checking entries to see who actually put the data in...
    • It would be useful to have an option to allow cheques to be added to the system without specifying a Drawer.
    • If PaymentAmount is 0, don't bother adding anything to the database.
    • Deleting entries appears to be bugged - CHECK
    • [Statistics - Event Details] is obsolete, as it references the obsolete [Regattas] table. This table should be removed immediately, and the query rewritten to reference the much more flexible EventData table.
    • Multiple Clubs can occur within a single batch, especially if Composites are involved.
    • If all doubling is deleted from an entry, nothing is saved, since the grid is empty. We really need an IsDirty flag.
    • Since doubling still ultimately is done via EntryID, even deleting both sides of a doubling relationship (and there's no way to do this automatically) has no effect once MatchDoubles is called. In a batched entry scenario, the [Doubling] field can be assumed to be calculated, and its existing contents deleted within MatchDoubles.
    • New queries required:
      • [Count - Entries per day]
      • [Delete Null Payments]
    • If there is only ONE Payment from a contact, AND its value matches the total of all payments required for that contact, then it should be possible to assign all payments via a single query.
    • The method of assigning payments that I wrote for Quarts (ie the unbatched system) is significantly easier to use...

    The most significant change to be made over the last 12 hours was the addition of a doubling report. This is possible by generating the [Doubling] table at the same time as [StatusDoubling]. This requirement was actually highlighted on 10/7/5, but was missed from the new version. Once this table is calculated, it is trivial to write a report that lists all doubling, whether Batch or Entry based.
    An added bonus of this table is that it should then be possible to create an ASP page to be used on race day that shows the doubling issues affecting any races that need to be retimed: the system already knows which crews are left in the regatta (ie CrewID<1000 AND Winner=0), so it therefore can deduce what effects retiming will have... I'm going to have to give this one some serious thought.

    Bed time - I can't think of anything else. Besides, I've got to do the draw for Bedford Quarts Sprint in 7 hours time :)

    27/6/6 Entry Terminal I've added the ability to assign payments to entries that were not made using the Batch system. The UI is not as polished as the main program, but only I will see it for the time being...
    27/6/6 Entry Manager
    • If batched entries are being used, then it is really not appropriate to sort the main recordset by EntryID. Many people may be making entries, so navigating between records could cause unnecessary database access, since Club & Contact IDs could be changing between what would normally be consecutive EntryIDs. A better solution is to sort by BatchID, BatchIndex whenever the recordset is explicitly refreshed.
    • Kingston want to be able to assign Lane, Repechage & Plate info before doing the Draw. This is a slightly odd one for me, since Bedford generally run free statuses - enter what you want, and we'll run it if we get enough entries.
      However, they do have a valid point here. I have therefore added 'Create Default Lane Info' to the Regatta Tools menu.
    27/6/6 Entry Terminal
    • When a club is chosen/added there is no way of seeing that the contacts from whom you are choosing actually belong to this club. This could potentially cause confusion. The status caption has therefore been changed to 'Select Contact from Club 'XYZ'.
    26/6/6 Entry Terminal A couple of minor issues have been identified by Kingston:
    • When adding a Club, you cannot type in a letter to navigate to the nearest match; however, you can when selecting clubs. This is inconsistent, and is caused by use of a MSHflexGrid instead of a DataList control. An advantage of using the DataList is that we can now use the double click event...
    • DayID could be 0. This happened if you added more than 1 entry, and did not explicitly select a Day for any entry apart from the first, instead leaving it to the default. The Click event was therefore never fired, and m_Entry.DayID was not being set.
    • When we try to select an entry for modification, Kingston report that 2 entries do not allow the first to be selected. This is in fact only half of the story: the problem is that the control automatically sets its Row property to 1 on loading from a recordset. Clicking on this row does not therefore generate an EnterCell event. The solution, of course, is grdSelectEntry.Row = 0 (ie the title) immediately after the recordset is assigned.
    • Apparently, it is possible to assign payments when the value of the cheque was insufficient. This highlights a fundamental problem of software testing - the developer knows how it works, so always does things in a certain order. I was refreshing the recordset periodically, so always saw the correct information; however, John White continued to assign payments to entries without doing an explicit refresh. The solution is to send the message instead of merely posting it, and to return the same information to eetAssignPayment as eetRequestUnpaidEntries would have done.
    • Now for the big one - the Payment Grid in the main EntryManager does not show payments received correctly if multiple entries have been received for a contact on different days. This grid has probably given me more problems than any other over the years... Since its now well past midnight, I think I'll leave this for later.
    There are still a few problems with the navigation sequence, though Kingston seem happy to accept these for the time being. I'd prefer to get it sorted now, though they want to lock functionality ASAP...

    Overall though, the 3.1.6 build seems to provide the required functionality, subject to the bugs listed above being fixed

    25/6/6 StaticData The Regattas table is obsolete, having been replaced by EventData. The only problem is Trophies, which are still not specific to Day (or Regatta, for that matter). On the plus side, Kingston do not present trophies, so I can ignore this fault for the time being; however I really need to sort this out in August... At present then, I will not code the Trophy Manager.
    25/6/6 Proxy Server New classes added for the Sponsorship Manager & TrophyManager. These will follow the object model of the EntryTerminal, with downloadable recordsets and messages to post to the main Entry Manager.
    25/5/6 Sponsorship Manager This is not really relevant to the main Entry Manager, so has been removed.
    25/6/6 RegattaStart
    • OnCourse races are handled in the same way as the Finish does.
    • Lane Order is now saved to the registry.
    25/6/6 Regatta Finish
    • OnCourse control now raises a NodeClick event, allowing us to display the appropriate race.
    • On startup, any races that are currently marked as being on course are sent here by the server in start time order. This allows the program to pick up again after a crash...
    • Lane Order is now saved to the registry.
    • We can now click on a race and abandon that one without iterating through all races in order.
    25/6/6 Regatta Server
    • SelectCrew is called every time a race starts. If is very wasteful, since it involves unnecessary database access. A far better method is to use the various dictionaries that are now being cached on startup. It does not sound like much, but each database query takes 50ms of valuable time, as opposed to about 1ms of dictionary lookup...
    • AbandonRace calls MarkRaceOnCourse
    25/6/6 OnCourse
    • Vital ErrorHandler missing from ImageExists.
    • Minor bug in AddBlank fixed.
    22/6/6 Entry Manager
    • The Search window is a nice idea, but has not really changed since first envisaged. Whilst it contained enough logic to interpret what has been typed in, subsequent searches made via the history merely used the currently selected option. This is now resolved, since I now set ItemData=ListIndex...
    • Tools - Assign Payments form has been removed. Once
    22/6/6 Entry Terminal This program has undergone a substantial rewrite in order to provide most of the functionality that Kingston require...
    • Granular Payments are finally in. At the moment, you have to assign each entry in turn, though I hope to be able to provide the ability to update multiple entries at the same time by the end of this weekend.
    • Entries can now be edited via the terminal.
    • Start screen greatly simplified - the code is capable of determining whether a batch exists already, so why have separate buttons?
    • I do not have any UI for withdrawing an entry yet, though the code DOES actually support this...
    21/6/6 Regatta Helper CapitaliseText added as a global function.
    21/6/6 Entry Terminal
    • The EventData table is now being downloaded, so m_fUsingBatches can be set properly. This also gives us the ability to test against ANY of the options held on the server.
    19/6/6 Entry Terminal
    • Payments are now saved as soon as you make them, instead of as a block. This does entail slightly more network traffic, but allows us to use the listview to display previously entered payments. I've also added a payment total to the list for clarity.
    • Redundant pages within the wizard are no longer displayed.
    • Batch lookup now copes with alphanumeric BatchIDs.
    • On adding a new entry, the Navigation History is cleared. This ensures that the code does not erroneously add multiple entries if the user goes backwards and then forwards again.
    • Ignore locking if the lock has been set by this machine!
    • UseBatches property added to RaceOptions. This will ultimately allow me to use the very useful EntryTerminal without Kingston's horrible batch system...
    • That said, batches might provide me with a better way to cross check between Mingay's manual records and the database.
    • Granular Payments are now a necessity.
    10/6/6 Entries
    • We can now search for entries within the Manager by encoded BatchID. The routine that does this maintains a lookup table so that database access is minimised, and the navigation routines also add to the lookup table.
    • DayTickets now work from BatchIDs
    • Since all of the internal code still works off the EntryID, I'm starting to put in flags to enable either input method.
    • Redundant controls have been removed from the terminal.
    • Batch settings are now more prominent - using the window's caption was not really sufficient.
    10/6/6 General Went to Reading Regatta today - very enjoyable, just a shame that my crew got thumped in the first round.
    9/6/6 Entry Manager
    • Kingston have reported that adding a Club to the list takes a VERY long time. This was in fact wrong - the problem was that the list was not actually being refreshed.
    • Another problem is that there is no Batch unlock code yet
    • £ symbol in payments causes a problem apparently. However, I can find no trace of this.
    • Entries in alphanumeric batches were not being added correctly.
    • Batches for machine 'xyz' are now unlocked when an Entry Terminal starts on that machine (just in case there was a network problem/crash that caused the terminal to exit without cleaning up after itself.
    • If a batch is locked, then the machine name is displayed instead of a cryptic IP address.
    9/6/6 ReDraw Manager This actually works. I'm not entirely surprised, since the pieces have been slowly falling into place over the last few months. But its a very satisfying improvement!
    • The SpiderEngine has needed a minor modification, since the ReDraw Manager is actually cleverer than the SpiderEngine is when we allocate 2 crews in a 3 lane race to the outside lanes!
    • I do not yet know how it will cope with multiple redraws of the same status. Actually I do - it will fail, since I am negating race numbers for the old races (these being the primary key) to give a very simple undo mechanism.
    • Day 1 is currently hard coded - this is trivial to fix, but at 2am, I can't be bothered.
    • RegattaNames tables needs to be recalculated - at the moment, this is manual.
    • It will NOT work if any races have already been completed, as it deletes all existing races at the redrawn status. If Kingston want this functionality, then they'll have to wait until 2009!
    • At the moment, this program deals with draw collapse ONLY. However, it should not be too difficult to expand the concept so that crews added after the Draw has been done can be included. Thus would have been very useful to Bedford Regatta 2006...

      Again, if Kingston want this, then they'd better have a very good reason, as otherwise it will have to wait until 2010.

    • I've broken my own rules on procedure length - the redraw routine is over 300 lines long.
    8/6/6 Entry Terminal It is with great relief on my part that Kingston were able to install and run this tonight...

    A couple of minor issues were found:

    • [Entries - Select Entry by Encoded BatchID] was still referencing BatchIndex as a LONG. This prevented me from demonstrating the Doubling routines.
    • One SetFocus call to a hidden control was found.
    8/6/6 Installation This works better now, though a few shortcuts were missing:
    • RegattaControl
    • RegattaEditor
    • RegattaStatistics
    • Commentary
    • Checkin
    • Progress Monitor
    • Query Terminal
    All of these were missing Install Conditions...
    7/6/6 Redraw Manager 11 months after this functionality was required, I am now capable of doing it! The code now allows me to allocate crews anywhere within a new spider, and to allocate which races will actually run. Note that some races might not actually happen in a redraw situation.

    The system is inevitably slightly cryptic, as it is manipulating the low level code that is actually used to generate the database tables. As such, a conventional 'undo last action' system is insufficient, as the user may realise that he has made a mistake several steps ago. The undo mechanism therefore allows any action to be undone, without affecting subsequent actions.

    6/6/6 Spiders I now have sufficient data for a 4 lane regatta to do a draw for most entry counts :)
    6/6/6 Installation Couple of minor issues found with the installation, and now fixed:
    • Threed32.ocx was not being installed. Until I do another hunt for references, this will have to stay in the generic windows file group.
    • include.asp missing.
    • DHTML menus missing.
    • Entry terminal shortcut missing.
    • Shortcut to this file contained a typo.
    • AccessControl is a pain to have to install separately. I suggest a new build, based around version 1.1 of DAC...
    5/6/6 Entry Manager
    • The payment grid now reflects the Day Tickets relevant to each day, rather than lumping them together.
    • Day Ticket code has been moved to separate routines so that the Entry Terminal has access to it.
    • The Entry Terminal now supports Day Tickets, though as yet it still uses EntryIDs, not BatchIDs...
    31/5/6 Entry Manager
    • MatchDoubles has been rewritten from scratch to cope with Batch Doubling.
    • Batch IDs are no longer auto generated. Batches are now locked by a single user whilst entries are being made. As yet, though, there is no way to unlock the batch once the user has finished making entries!
    • Primary BatchID is now alphanumeric, as is the secondary. Kingston actually waived this requirement, but I've had to add it due to a problem in Access 2000. When I divide 4 by 100, I expect to get 0.04, not 0.39 recurring. In order to guarantee lookups working properly, I'm now using string concatenation...
    • MatchDoubles has been tested with alphanumeric BatchIDs.
    • Batch editing is getting there - I can now view all entries within a batch in a grid.
    • Another problem that Kingston had was that they were unable to install the Entry Terminal. This was due to 2 problems. Firstly, I had omitted to actually include the executable! Secondly, and more serious, was that the installation reported that a number of RRA files had failed to register correctly. Initially, I thought that this was Windows XP file protection playing up, though a quick search on Google revealed the real cause of the problem. RRA files are created by Installshield when it tries to install a locked file. The parent of the component was installing the communications subsystem, and the Entry Terminal component was also attempting to install the same subsystem, thus creating a bogus locking situation. Installshield should be smart enough to figure this out, but obviously it is not! In practice, the files were being installed correctly, so the Entry Terminal would have run if it had actually been installed in the first place... This issue is now resolved.
    • The order of the wizard steps has been changed slightly so that DayID is now entry specific, rather than batch specific. This is how Kingston actually work, though they had agreed to change their operating procedures to cope with the software. However, given the major functionality changes that are currently being made, I decided to do this properly!
    22/5/6 General
    • Check In Club now works again. However, it would be significantly better if we could specify
    20/5/6 Kingston I met with Kingston Regatta's Race Committee today in order to review & test the software. A number of minor issues were identified:
    • If we delete an entire status due to insufficient entries being received, we MUST log this to the Alterations table. DONE
    • Regatta Control DOES, after all, need to request race details - if we're trying to reschedule a race, we need the old time! The problem was that the message format had changed, since I now include club names. DONE
    • A very useful report would be a summary of statistics - eg scratched pre draw, scratched on race day, statuses running, null events, row overs etc etc etc. This would be easiest to do as a web page.
    • Regatta.css would be better with hyperlinks displayed in black, or, even better, customisable via the OptionsEditor. The ASP code now supports this, so I'll have to recode the options...
    • OptionsEditor has a few controls that don't work.
    • If I compile RaceOptions as a Standalone ActiveX EXE, we can do away with the RaceOptionsEditor program. Another benefit is that it appears in the TaskBar... Note that in order for it NOT to be shown when a consumer starts up, we must check the StartMode property in Sub Main().
    • The spiders would be significantly better if races were shown in ascending order, rather than in the current descending order. The reason for this is the way that I lay out the events, working from finals backwards. However, merely changing the direction of the loop for laying out each level fixes this.
    • If we're running EntryTerminal on the same machine as the EntryManager, we cannot download files. This is due to a subtle bug, and was the reason I went to Kingston today! The problem is that the XML file is saved correctly, but when FTP tries to download it, it sees that the target file exists, and so deletes it before downloading. Unfortunately, its just deleted the source file... Trivial to fix, just incredibly annoying.
    • If no spider exists for a particular combination (eg 22 entries, no repechage, 3 lane) then we MUST raise an error. The following are missing:
      • 3 Lane no repechage: 19 entries, 21+ entries
      • 3 Lane repechage: 18 entries, 19 entries, 22+ entries
      • All statuses with >15 entries are automatically grouped. This is not necessarily right... TODO
    • Reverse ASP pages no longer worked under the template system. However, templates make this a trivially easy task now!
    • Race History names now work properly.
    • Day1 Multilane.txt contains a few races that seemingly only contain 1 crew - how? The answer is actually quite simple, as we found this on my laptop - Kingston had created new contacts, which I did not know about :) Name mapping works off [List - All Entry Details]...
    • Day1 Multilane.txt is also rather difficult to use, since a single tabstop is used for several fields.
    • If a race rows over the course, I should probably automatically scratch the other crews in it so that qualifying events work properly. TODO
    • Club Check In is required. I have not really concentrated on the CheckIn system, as it was, initially, far too complex, as I tried to do the logic with table joins, which often failed completely. So I'm going to have to revisit this... TODO
    • [Statistics - Audit of Entries] query created as requested.
    • [List - Statuses in Draw on Specified Day] query created as requested.
    • They want to use the Finish terminal, but without Start. However, they do take times (stopwatch in Umpire's launch), so want to be able to enter this.
    • Entry Terminal should provide post draw functionality as well - ie allow an entry to be modified to show its form as having been received, or money having been received.
    • Talking of money, I really must get PaymentID assignation working. I was horrified when Marcus declared that this was too much detail, given the complexity of the changes required, but the others soon informed him of his error!
    • This file is very useful, so is now included in the installation.
    • ASP would benefit from a DHTML menu to define the querystring. I've started coding this, and now wonder why it has taken me so long to do!
    Kingston's big problem arises from their processing of entries, which seems to me to require an excessive amount of people, and to introduce extra possibilities for making mistakes. As each batch of entries comes in, each entry is written on an audit sheet, and things like form missing/invalid recorded. At this point it is assigned a major Audit Number. They also assign a minor number, but I believe that it would be better to do this when entries are put into the database, as this provides a cross check that the entry has in fact been made. The next stage is to pass this sheet to someone else, who actually makes the entry using an Entry Terminal. The sheet then goes to another person, who sorts out the doubling, before finally handing it over to somebody at another Entry Terminal, who actually records the doubling information in the system.

    Overall, they seem quite happy with the Entry Terminal, though its going to have to have a fairly major increase in functionality, such as manual BatchIDs, easier lookup of crews, Day Tickets etc... Some of the button / mouse combinations are tricky to use, and there are no keyboard shortcuts or tab orders in place yet.

    18/5/6 ASP One problem that Kingston had last year was the layout of results when listed by status. Events are laid out by group; if there is a repechage running, this would mean that any repechage races would be listed at the end of the status. A small mod to the base query has fixed this.
    18/5/6 OARA Having looked at my doubling, as generated from OARA, I can see that Substitutes could pose a major hazard. In theory, somebody could be entered as a substitute into every crew entered by his/her club. TODO - don't include subs in the doubling tables...
    18/5/6 ASP Gavin's latest suggestion is to use the Doubling table. For any crew, we'd like to see what are the doubling issues with any crews left in the regatta. I'm going to need to be significantly more sober to work this one out!
    18/5/6 ASP Using ROWSPAN was great in theory. However, comments from our Start Marshals show that the table borders are confusing if multiple crews are listed. So I've abandoned ROWSPAN, and used BR statements instead. This also makes the code significantly simpler for a 3+ lane regatta!
    17/5/6 ASP Gavin's idea to replace 'Winner of' with the crew possibilities is nice, but there were a few problems with my implementation on race day. What I had forgotten is that the Start Marshals are primarily going to be looking for a crew number, and the sub tables I used for this functionality meant that crew numbers were rather hard to find. In addition, Next Race information & Time Taken is not necessary, though verdict is (as we include Row Overs).

    Adding this functionality has been extremely difficult. The main problem was that the code has evolved over the last few years, and much of it (especially the blade handling) was unnecessarily complex. So I've bitten the bullet and rewritten it to use, effectively, a row template. This allows me to keep crew numbers in their own separate column, since sub tables are no longer required. Instead, we use ROWSPAN functions.

    A bonus arising from separating CrewID and Crew Name is that we can use different hyperlinks on them. The CrewID now points to crew.asp (to show the crew composition), while the Crew Name points to club information as before. This is a significant improvement, as the intermediate code written last month was more confusing than useful!

    Another comment from the Start Marshals was that it is vital that station names are printed on every page. Whilst HTML has significant advantages over Access reports, it does not have any pagination capabilities, so this is impossible. What can be done, however, is print the table headers every n lines. This is perfectly satisfactory.

    NB: Once I started adding TH tags (for sorting), headers are printed automatically...

    Only the main RegattaDraw page has been converted to a row template system, as it is the only page that will be used for printing update sheets for Start Marshals.

    14/5/6 Regatta Postmortem Inadvertently I ran the whole day in debug mode - apart from hitting the occasional breakpoint, this appeared to have no adverse effects!

    A couple of minor problems were encountered, some of which were fixed as I went along:

    • RegattaControl complained that retiming races was not working - it was, but did not cope with colons in the new race time. And I thought I was making life simpler by ignoring punctuation!
    • Messages from Control were not reaching Commentary - this is the reason that I started in debug mode! For some reason, iTarget is not being set correctly - this is a probably a problem deep within RegattaProxy - not something I want to debug on Race Day.
    • FTP download of blades was unreliable on one machine, but then again, I've never been able to get even VNC to work on it...
    • The main problem was RegattaStart's handling of missing blades (ie for Composites & Norwich School) - it tried to add another xyz to the ListImages. If it already existed, an error would be thrown, which would not be caught, as the routine included a Resume Next statement, and hence a default ErrorHandler had not been generated. The error handling would therefore be done by the previous routine in the call stack, which would drop out before actually notifying the server that the race was on course. I fixed this code about half way through the regatta, and everybody was much happier :)
    • RegattaFinish was not affected by this bug, as it was never told that the race was on course! However, it had its own problems. If a race started whilst a race's finish was being recorded, the race displayed in the main panel would change, and we could get an erroneous message that the winning crew was not in the race (since the displayed race was not the race that had just finished). To fix this, I set the displayed race to OnCourse.FirstRace whenever a RaceStartedEx message is received. This guarantees that the correct information is processed.
    • RegattaControl does not use the standard RaceDetails control - a mistake whilst converting the code. This meant that it was unable to correctly process the message, with the result that I had to comment out the code :( However, the code does not actually appear to be useful any more - if you're rescheduling a race, you get a confirmation anyway, and the code didn't display any UI. In other words, no great loss :)
    • INTEGRALU is the lowest spec machine on the network. It was been unreliable for some months, and finally died yesterday, due to an occasional inexplicable lockup. It's probably a memory issue... We installed XP on one of the spare machines - it had 98v2 on it, but I don't carry OS CDs for this, and so couldn't get the DLink network card to work with 98.
    • LEMON needs a network card as well, though I'll probably put 2000 onto it.
    • BRC2NT is missing a hard drive...
    • WILL is missing a hard drive, network card, memory & fan!
    • RegattaFinish would be better if the crew numbers were shown in the treeview control. The OnCourse control needs a few fixes - LabelEdit is now set to manual, and I'm generally tidying it up.
    • For 2 lane racing, we MUST add code to record second place as well. This is needed for the ARA return...
    • And HOW can we possibly submit the ARA return within 48 hours of a Saturday regatta???
    10/5/6 General I'm tempted to use my nice new Dell Server as the file server for Saturday's regatta. Its the fastest machine available to me, and frees up my laptop for admin tasks such as development and printing.
    10/5/6 Redraw Manager This really does need writing ASAP. Most of the code is there, but the final database update code still needs checking. The reason that I mention it at this point is that I inadvertently scratched one of Star's crews, so have had to insert them as an extra race :( A way of doing this automatically would be rather nice.
    10/5/6 Regatta Server One of the problems we have had in the past with plate races occurs when a crew in the main event scratches. Obviously the plate race now has a 'winner' as well, but the code failed to address this. I have now written the code to handle this scenario. Obviously, it only applies to 2 lane racing!
    5/5/6 Spiders Why do we always split events with more than 16 entries into 2 groups? The answer is that John Lickfold's system was unable to do anything else, and I just followed the same rules. Technically though, there is no reason to continue with this, so we are now running College eights with 26 entries in a single group
    25/4/6 ASP Gavin Dods has reminded me of one of his best ideas - Start Marshals (and the Starter) may not have received the update sheets in time, and so only know that a race includes 'Winner of Race xxx'. So they have to hunt back through previous sheets, hoping that they can find the right information. I therefore have a new 'history' flag, which allows us to list which crews might have got through to this race...

    NB: The flags are now getting rather complex, so should ideally be done as definitions.

    Whilst nice descriptive names are convenient, short names are preferable. Unfortunately, I have over 200 definitions to replace, which will inevitably take some time :(

    22/4/6 General I've finally qualified as an ARA Multilane Umpire. This is why development has been somewhat slow of late!
    14/4/6 ASP Spiders Couple of slight modifications to Grand Finals have been made - the really nice thing is that the ASP code has picked up that I'm debugging the DLL, and so is letting me debug my ASP...
    14/4/6 Regatta Draw This is now working properly for a 2 day regatta.
    6/4/6 Entry Manager AssignPayments is flawed, since it generates inconsistent results once withdrawals have been made.
    6/4/6 Database [List - Addresses of Entries] requires work. It was written for the Summary of Entries report, but doesn't really fit the bill. As such, [IsClub] is just set to TRUE. The mailing queries are in the process of being simplified, as new queries now exist for payments & day ticket calculation. [Mailing - Envelopes] should not have to reference the highly complex [Count - Contact Statistics]. [Statistics - Entry Summary for Contact] is a far more elegant solution, since it does not require any joins, merely the SQL MIN operator...

    Hindsight is a wonderful thing. All of the original queries worked, but were written before I had finalised the database design. As such, many of them are slow, inefficient and needlessly complicated. All queries used by reports should be suitably prefixed - the 'Mailing' prefix is now obsolete.

    4/4/6 Entry Terminal Now that I have done the Draw for our forthcoming Head Race, I can safely code up the Entry Terminal's main functionality.
    • We can now make entries to the database. Although I'm fairly confident of this working properly in a multiuser environment, I am unable to test it on my own, and therefore will need to do a synchronised test between multiple machines over a network, with 3 or 4 people trying to make entries at the same time.
    • The BatchDoubling field will be populated by the code, but at present the Draw program does not interpret this field and converts it to standard doubling information.
    • Code to actually add payments to the database needs to be written, but I first of all need to finish this head race.
    30/3/6 Entry Terminal Iteration 4 is a wizard.
    • Batch creation works, though won't be used until I can make entries!
    • The user can add clubs to the visible list & create composites in exactly the same way as EntryManager does.
    • Payments are recorded when the batch is created, but before any entries are made. This should help considerably when assigning payments.
    • New contacts can be created, and the details of existing contacts modified.
    • Since I am actually running a head race at the moment, and taking entries, I have not written any code to transfer these payments to the server
    All that I need to do now is create entries, as the hard stuff has been done!
    I was extremely concerned that I'd bitten off more than I could chew by promising this to Kingston Regatta for delivery (and testing) in early April. However, now that the complex bits are working, I am confident that I can make my (self imposed) deadline!

    Whilst I can't actually MAKE entries yet, all of the groundwork is done - it is actually quite easy, since all of the necessary code exists somewhere within the main Entry Manager. Note: this would have been virtually impossible without the move to ADO!

    30/3/6 Database [List - Competitors] suffers from the fact the OARA does not think to provide us with the gender of competitors, just the gender of the crew. We therefore have to list just the first gender encountered, otherwise crew lists may contain multiple rows for coxes and members of mixed crews... Another problem is that they can now be registered to up to 3 different Clubs!
    29/3/6 Proxy Server emfMessageTarget has never been used properly. I now use it to allow asynchronous posts...
    29/3/6 Entry Manager fValidRecordset function created to check BOF & EOF.
    29/3/6 Entry Terminal I am now on the third iteration of this program, and have made a significant development. The first iteration failed because my SocketLibrary failed to cope with messages of over 8Kb in length. This was actually by design, since the code had been ported from my employer (with permission, I hasten to add). Iteration 2 was purely a development project, and examined file transfer. However, at the time, I had no reliable way of copying files over a network - file permissions got in the way yet again!

    The answer, of course, is FTP. Now that I can create Virtual Directories programmatically, and hence can FTP files from arbitrary locations, I can save recordsets as XML and transfer them to client machines. However, to reduce load on the server, I'm going to have to devise some form of incremental procedure for use when contacts are added. It should be quite simple, so I hope to get a working prototype running tomorrow (or rather, later this morning).

    29/3/6 Entry Manager Minor bug found & fixed - if we used the grids to navigate between entries, txtEntryFeePayable was not being updated. This was partially caused by an omission from the MoveComplete code, and partially by the routine's reliance on txtEntryID, which is not updated immediately by the new ADO code.
    29/3/6 Regatta Finish Both RegattaStart & RegattaFinish use the OnCourse control to download blade images. The trouble is, all download calls are on Debug.Assert statements, and are hence not compiled. Very clever - the code will work perfectly during testing, but can't when installed!
    27/3/6 Entry Manager The OARA Manager was only ever a development project. The time has come for it to be integrated into the main Entry Manager. We therefore have a new menu (under Tools), with all the required functionality.
    • Since OARA has never really understood that a Sculler's name is his crewname (pretty obvious really), I now generate crew names for small boats directly from the OARA table.
    • Doubling data is also now generated. Note that OARA does not support boat doubling, so we have to retain any information that is already held in the doubling field.
    • TODO Parsing of composite crews is not yet supported.
    • The Comments field has been increased to 255 bytes. The reason is that we have no control over what people type into this field within OARA. St Neots have written an essay for some crews! See the Met's comments for 2005...
    26/3/6 Entry Manager
    • Address import combo contains a blank entry.
    • Day Ticket database queries now work. The key to this is assigning a DayTicket to a particular contact, so you can bill this person. However, each DT will only be billed once, no matter how many times the oarsman is racing.
    • frmNewEntry now moves to its saved position on load.
    • Day Tickets now have a full UI, allowing a DT to be assigned to/removed from an entry. The code has been tested for 2 day events, and works perfectly :)
    • Day Tickets can now be applied to composite crews. At the moment, though, the user needs to understand club codes. I really can't be bothered to change this at present!
    21/3/6 Entry Manager
    • Adding a new contact from frmNewEntry now allows address import.
    • Option Editor can now be viewed.
    21/3/6 Race Options The CommonDialog control returns colours wrongly. For example, Red is &H0000FF instead of &HFF0000. The code has therefore been modified to cope with this Microsoft cockup. ASP background colours now behave as expected - ie if you select yellow, then you get yellow, not blue!
    14/3/6 Entry Manager Payment IDs are getting there. If the total paid is the same as the total due, its obviously easy. If paid>due, AND only one payment has been made, its also easy, as we can just keep running the routine and it will update accordingly. This allows us to put in a payment and keep making entries without having to worry about which cheque corresponds to which entry. The problem comes when multiple cheques have been submitted (eg University of Kent ALWAYS pay for each crew individually, so we might get 15 cheques). We're going to need some form of UI for this.

    Note that one of the big changes to come out of this is that payments are no longer directly related to a Club. This solves the constant problems of assigning a payment to a composite crew when it is entered in the same batch as normal entries. The code now relates a payment to a single person, irrespective of what Club they belong to. This has the added benefit of removing the requirement that a contact belongs to the club for whom he is making entries.

    7/3/6 Regatta Draw Controls are now updated from the Option Editor's events
    4/3/6 Entry Manager UpdateContactCombo functionality restored.
    4/3/6 Installation MDAC 2.8 required - why? 2.5 is installed on XP by default... MSDATLST.ocx missing from EntryManager
    4/3/6 Regatta Control
    • UI for Official Warnings has finally been added. A new query [Regatta - Select Next Race of Crew] has been added. Instead of showing the FIRST race of a crew (as a time), it now shows the next race. This is a substantial improvement.
    • Limited support for tooltips has also been added.
    3/3/6 Installation I have broken compatibility in order to debug the installation. There were many problems in it; files being copied to the wrong place, DLLs not registered, shortcuts missing or invalid, files copied from the wrong location...

    The compatibility change was a significant task, since I deleted all of the old information from the registry. I can therefore guarantee that there are no redundant versions registered on my laptop.

    2/3/6 Entry Manager
    • CreateUnionStatement was passing in the ClubID by reference. This may explain some of the more unusual bugs in this section!
    • Day Tickets are being radically changed. Its not really good enough to record that a club needs 5 DTs - what we really want to know is what their names are, and what crews they are meant to be racing in. For composite crews, this becomes even more important, since they may be rowing in both a composite and a normal crew. And, by definition, Day Tickets last for one day only... I suppose that the database ought to support this!
    • WhatsThisHelp is a nice feature, but is rather limited, and requires the Help files to be compiled EVERY time that a change is made. A much more powerful method is to use ToolTips, loading the strings from an INI file. I've used XP style ToolTips, since I have full control over their size, colours, icons and visibility.

    2/2/6 Entry Manager Creating a new contact is now much easier, as you can select an existing address from a dropdown list. Note that telephone numbers and the email address are not copied over, since they will be contact specific. The list also includes the Club's address, where known.
    27/2/6 PHP The Head Race pages (results & resultso) are now W3C HTML compliant. This should really have been done from the outset!
    16/2/6 ReDraw Manager Following a call from Tony Gordon last night, I'm starting work on this application again. I have put off writing the UI for a while, since the new OptionEditor was not ready. However, all the pieces are now in place. The [Regatta - List Statuses in ReDraw on specified Day] query is missing from the current database, so needs to be regenerated from September's data - not something I can do tonight...
    16/2/6 SpiderEngine clsRaceOptions is only created once, so the application shuts down correctly.
    16/2/6 Regatta Draw We can now add a single gap to the racing programme.
    14/2/6 Reports The February Head has gone extremely well, with 134 eights and 110 quads competing. However, the report generated for the marshals was wrong, since it sorted by ActualStatusID instead of the new improved RaceOrder. This has now been rectified, but meant that Nephthys' S2.8+ started behind Magdalen's E.8+, which is plain crazy! Nephthys went on to take the top 3 positions, rather as expected...
    8/2/6 Enquiry I've had an enquiry from Stratford-upon-Avon regarding the Regatta Management software.
    7/2/6 Database I have encountered a very odd error tonight. After compacting the Admin database manually, the Entry Manager stopped working. Every query that was executed failed. Opening each of them in Access solved the problem. I can only assume that the queries have failed to compile properly. Worryingly, a compact operation after this worked fine. I have therefore modified the error handler to provide better information should this error ever occur again.
    7/2/6 Database Since I didn't have time to assign PaymentIDs to entries automatically, I have had to do it by hand. This has taken ages, and has to be absolutely correct, since I have deleted [Entries].[Paid]. To help track down potential problems (there weren't any), I have written [Check - Payments assigned]. This allows us to identify any entries that have been paid by the wrong person or the wrong club. Use this with care, since it should highlight [...]
    4/2/6 Entry Manager Head Race draw renumbering now works properly, allowing me to move individual crews.
    4/2/6 OARA The system is virtually impossible to use for an event administrator.
    • How can I send out important information to competitors when I don't have the contact details of whoever made the entry? I have 'PRIORY VIEW EAST HARLSEY NORTHALLERTON N' for one club. The person who lives here is the submitting OARA Administrator. But a large part of the address is missing.
    2/2/6 Entry Manager Another problem is that this program has become extremely complicated in the last few months. There is now functionality available that I had completely forgotten about...
    2/2/6 Entry Manager One of the issues that has annoyed me for a while is the list of clubs displayed when adding a new entry. Its far too long, since it contains all clubs that we want to mail details to. Sadly, not all of them enter crews! In addition, every weird and wonderful composite club that has ever entered is listed.

    The solution is really quite simple: we include a [Listed] field in the Clubs table. Composites and Clubs are therefore treated in the same way, and can be removed from the list without affecting the mailshot. So when we come to add a new composite, we really don't care if it exists already - all we have to do is set its Listed flag...

    1/2/6 ASP
    • All OARA links (including doubling) now working again.
    31/1/6 Entry Manager TODO
    • Add New Club
    • Add New Composite
    • Log Division Changes
    • Alter Status / Correct Status
    • Payment ID assignment
    27/1/6 Entry Manager Its 4am. Funny how often I seem to be coding at this time of the morning!

    But, if you're on a roll, why stop?

    26/1/6 Database
    • [List - Payments not applied to Entries] created. This should allow us to assign payments fairly easily.
    • Division Weightings queries will need checking to ensure that they handle scratched crews correctly - TODO
    • frmRaceSequence - need to find a different way of reordering the sequence, as MSHFlexGrid does not make changes to the underlying recordset.
    26/1/6 Entry Manager
    • Why do we unload frmNewEntry every time that an entry is made?
    • grdOtherEntries needs to work
    • grdOtherEntriesAtStatus needs captions & column widths to be corrected
    • TODO - Head Race ActualStatus has been accidentally deleted - we no longer get 'was this an error'
    • Many of the _Change events can now be deleted, thus giving simpler, faster code.
    • CrewName capitalisation is now done on KeyPress, not Change. This means that it will not be called every time a move occurs.
    • AccessControl users are now created according to the Host Club. AccessControl has never been implemented fully, though will come into its own once I get a distributed Entries system working.
    25/1/6 Entry Manager It was always going to happen at some point. I sit down with Mingay to make entries onto the system, and find that I have forgotten to update the program. It doesn't work at all. Some of the errors were due to the changes to RaceOptions, while others seem to be caused by usage of the intrinsic data control. Since this is deprecated anyway, I first tried to move to the ADO model on 28/7/5, albeit with disastrous results. This time some planning has gone into the conversion, with the result that most functionality is working again:
    • I can make entries. Pretty fundamental requirement, so top of the priority list ;)
    • FilterStatuses now allows individual statuses to be selected - eg we can offer J.4-, S2.4-, S1.4- only, instead of allowing all senior & junior coxless fours. I can't yet specify that WS1.4- is the only relevant women's crew, but that is a refinement that will only really come into effect once the regatta season starts.
    • With the demise of the intrinsic data control, the Validate routines become redundant. Much of the database code was written to get around 'This action was cancelled by an associated object' errors, which do not apply to the ADODC control.
    • Another advantage of the move to ADODC is the MoveComplete event. Previously, any grids (such as other entries & payments) that applied to the current entry were refreshed when the appropriate control's value changed. This causes a major problem when navigating between records, as controls (obviously) change their values one at a time. So for Entry 1, Club=BRX, Status=N.2X we could move to Entry 2, Club=BED, Status=E.8+ and update one grid when the club changed. This would then fire a series of related events, which might cause other grids to be updated. Then their controls would change, and the grid would be updated again, needlessly. To overcome this, m_fCodeCall was used extensively - the problem with this variable was that it contained no history, and did not record nested calls properly.
      Note that the problems found when navigating through records by clicking on a grid cell (see 4/7/5) were actually caused by multiple navigations being carried out - row 3 in grdOtherEntries could contain a completely different entry at different stages of the code executed by RowColChange. Tracking this down has caused significant grief!
    • MoveComplete is completely different. It is called BEFORE any controls are updated - in other words, it is called when the underlying recordset has completed a navigation between records. At this point, one the recordset contains an entire record, as opposed to individual controls containing parts of 2 different records. Grid update code therefore needs to reference the recordset itself, since the controls still show the contents of the previous record. Only one grid update call is necessary, since we know which controls differ from the underlying data.
    • The downside to ADODC is that any Find operations need us to explicitly move to the first record to begin with. A new flag (m_fAboutToFind) prevents the MoveComplete event from updating any grids when a MoveFirst is called for this reason.
    • Find operations are therefore quite complex.
      • Save textbox values to their tags, and set AboutToMove
      • MoveFirst
      • Unset AboutToMove
      • Do the actual Find operation
      • Unset the tags
    The MoveComplete routine will update grids on the tag values if they are set; otherwise, it will use the text values. This is now reliable code.
    • DBCombo controls have been replaced by the ADODC compatible DataCombo. Sounds insignificant? We set the recordset of a combo on the NewEntry form to a ADO recordset (which may or may not be generated by a parametric query), first having navigated through that recordset to an appropriate row, the combo will automatically show the contents of that row - so much simpler!
    • rstPerson is redundant. So is rstContacts. So are ALL of the recordsets on frmNewEntry. We save a lot of memory...
    • If the LIKE operator is used in a query used to fill a DataCombo, it will fail. Instead, use the ALIKE operator with the appropriate wildcards...
    • Full update of a recordset is no longer necessary on (for example) WithdrawEntry. Instead, we can just update the field that we are interested in.
    • MSHFlexGrid.Redraw is very useful - we can turn it off whilst updating colour information to avoid the cells being seen to become white momentarily. (WM_PAINT ignored)
    ADODC provides me with significant benefits. The program now contains fewer bugs (undocumented features!) and is significantly faster, as many redundant operations have been removed. It also has a smaller memory footprint, as fewer recordsets are required.
    2/1/6 ASP Spider generation is now working from ASP. The code was mainly correct, though clsSpiderEngine.ActivateProfileByID required a call to m_Globals.Initialise. Note that clsSpiderEngine.ActivateProfileByID needs to interrogate the Registry as before - I do not see any way around this.
    The only change to the ASP was to set the relevant DayID.
    2/1/6 Database Official Warnings now record who gave it, when and why. The ASP code now shows this; however, there is still no UI for setting this information.
    17/12/5 Regatta Draw I really should be Christmas shopping at the moment...

    This now works for multiple days! One database ONLY...

    • Its been quite difficult to adapt the database so that it can deal with multiple days. Note that very few changes were required in code - almost all changes have been to the query definitions.
    • RegattaNames may be impossible to generate reliably if we are swapping the number of lanes around, since we will get key violations. There isn't really a solution to this at the moment.
    • TODO Get spider generation working under ASP.
    15/12/5 Database
    • Primary key on the Entries table has been simplified.
    • Scratched & Suspended fields have been moved to the Crews table
    • All queries have been checked for consistency.
    • Regatta ASP code no longer needs vastly complex queries for the name information - instead, [Display - Regatta Names] is cached in a series of dictionary objects, which are significantly faster than multiple joins.
    • TODO - ensure the reports still work (many use their own joins still, which is a bonus)
    • regattadrawbyclub.asp is now 3 lane compatible. It also shares most of its code with the main regattadraw page via the include files.
    • [Mailing - Notification of Draw (Regatta)] copes with missing lanes.
    • Group field now defaults to a hyphen. The reason is that [List - Regatta Winners] and others cannot join on a null.
    • [Regatta - List Races] now has a parameter for DayID. What I wasn't aware of before was that the parameter would filter down to the base query where it was defined. This is a huge relief.
    10/12/5 Database One of the main problems with this system is that it has evolved over the last 4 years. The client programs have benefited from a radical overhaul in the last few months, but the underlying database structure remains much the same as ever. The other main problem with the system is that its foundations were laid when I knew absolutely nothing of database design (apart from what I had been taught at university, which amounts to three fifths of two thirds of rock all). See where I'm going? At the heart of the database lie some pretty fundamental errors:
    • The Entries table has a compound primary key, when it has a perfectly good AutoNumber field. This IS included in the key, thus making ALL of the other parts of that key redundant. Certainly some of them would benefit from being indexed, but that's not the point.
    • The Entries table also contains the Scratched & Suspended fields. These have absolutely nothing whatsoever to do with an entry, since they only apply to crews. Why not move them to the Crews table?
    • Many of the Regatta based queries are incredibly complex, and duplicate what other queries do. For example, [Regatta - List Results so far] does not work any more - it gives a 'No current record' error after tentatively moving the scratched and suspended fields - whereas [Regatta - List Races 3] does. I have not analysed the subtle differences between the two, but the point being made here is that they are meant to perform exactly the same task.
    • Which leads me onto another gripe. Why do they need to be so complex? Now that we have fields for 1st, 2nd & 3rd placed crews, why do we bother to list the Winners name? If it was that important, why not also output 2nd place's name? And, to be perfectly honest, there's little point in having so many complex OUTER JOINs just to get these names - both the client programs and the website could be served equally well by caching the new RegattaNames table.
    • The RegattaNames table should really be renamed as CrewNames, since that's what it holds. Since Head races are a fairly low priority (only run by my own Club on this system), I am happy to ignore a normalisation issue or two - at the moment, I'm holding Lanes in the RegattaNames table so that we don't have to do an expensive JOIN to RegattaDraw on the textual StatusID field.
    • If you can follow this you're doing well - it's taken me several weeks to analyse my own deficiencies :)
    9/12/5 Regatta Finish The RaceDetails control now fills in the crew positions. For 2 lane racing this is not really important, but is obviously vital for 3 lanes! It also does a bit of inference to fill in last place. Now that the 2 lane code is proven to work, and is checked, we can start to extend it to 3 lanes...
    9/12/5 IIS VirtualDirectories.dll & VDCreator.exe written. The executable should be run on the web server, and creates a [blades] Virtual Directory, with read-only permissions. This allows the blades to be transferred via FTP.
    8/12/5 Database [Display - Regatta Names] is used extensively. The problem is, it takes around 560ms to execute [SelectRace]. This is down to poor query design, with multiple IIF statements. Since the RegattaNames table exists, we should use it in the subqueries! This drops it to about 450ms. However, [Display - Regatta Names] itself is inefficient, as it has redundant WHERE clauses. Doing these in the subqueries drops the execution time to a staggering 285ms - almost exactly double the speed of the original query! Note that [Control - Generate RegattaNames] must still use the old slow code, as it can't reference itself...

    Unfortunately, the UNION query [Display - Regatta All Crews] needs to be calculated every time, since it is used to get the Lane Number that each crew is racing in.

    8/12/5 Regatta Finish
    • The same controls are now used for this program as well, improving the look and feel of the application.
    • Decimal verdicts (eg 0.25) are now converted to fractions
    • esRaceStarted message now returns a message in the same format as SelectRace. This may slow the message generation down slightly, but allows all of the information to be retrieved rather than having to parse a very badly formatted treeview.
    8/12/5 Regatta Start The aim now is to work through each program in turn, making it fully functional. The Start program has never quite been right, so its a good place to begin.
    • Two new controls have been added - [RaceDetails] & [OnCourse]. These do pretty much what you'd expect from their names, and encapsulate all of the logic that was previously cut & pasted between applications, with the inevitable inconsistencies.
    • The controls also allow the first named crew to be in Lane 1 OR Lane 3. Its no good having it at the top of the screen regardless, since this may not be what is actually visible when looking at the river.
    • OnCourse now shows blade colours. However, rather than having to install all of the blade images (several hundred of them at present), we just get them from the server as and when needed via FTP. This methodology has GREAT potential. However, since the images lie under the wwwroot folder, not ftproot, we need to set up a virtual directory.
    • If you correct the Race Number, then the OnCourse control updates to the new information - the old treeview merely showed that you had corrected it, but didn't show which crews were racing. This has been on the TODO list for quite some time.
    24/11/5 Race Options I'm slowly working through the EventData table, making sure that ALL entries are modifiable. The only ones left are the Head parameters, marshalling (as its still under development), HostClub, Associations (soon to be obsolete), and the HTML insertion file (never implemented).

    Folder selection is done properly via a Shell32 object, though file selection still needs to be coded.

    3/11/5 MSDE This is yet another database engine. Note that it uses Port 1433, running under the local system account.
    3/11/5 MySQL Also released this month is MySQL 5.0 - this has support for Stored Procedures. Whilst conversion to this database engine is a significant task, it should certainly be considered.
    3/11/5 .NET 2005 Well, its been released. I can connect to my employer's version of SocketLibrary (funnily enough, it started life here) from .NET, though as yet I can only send data, not receive.

    This introduces significant possibilities, including the use of MSMQ, integrated database reports (via CrystalReports XI) and the new, vastly improved user interface controls available. I particularly like docking, whereby controls automatically resize when the form is resized.

    I think that I'll start in a very simple way, converting just one project. The obvious candidate is RegattaControl, since it is generally run on a high spec machine, and has numerous controls.

    2/11/5 General The laptop has slowed down massively over the last two years. I have therefore bitten the bullet and reformatted the hard drive. This provides an excellent opportunity to ensure that all programs reference the right libraries, without any previous versions cluttering up the registry. Build 3.0.0 is therefore a matched set, compiled against ClientOptions & RaceOptions. The Regatta Draw is still broken...
    22/10/5 RaceOptions Multiple instance support added via internal reference counting.
    18/10/5 ProgressMonitor Shutdown now implemented correctly.
    18/10/5 Commentary egEcho is now implemented again, so that the server can send it messages.
    17/10/5 ClientOptions The original MPI based system had a method for getting options from the server. This was removed when we moved to Socket based communications, but the requirement remained. Why should each client machine have to have the right server and RaceID stored in the registry in order for it to connect to the correct ASP pages?

    ClientOptions has therefore been created. This very simple DLL gets the Server's IP Address, and the right TCP/IP Port from the registry. No other settings are required on the Clients, since other settings can be retrieved via messages.

    So far, I have converted TimingCorrection (which used hardcoded values originally!) and Control. The big change to Control is that it is now implemented as two separate projects. Bedford RC is the only user of the Head Race system, so this should not affect anything else. The actual reason for the split is simple - ercConfiguration must NOT be loaded from the local registry, so we cannot decide on which form is to be loaded before a connection is made. At that point, it is too late. Theoretically, we could create an intermediate form to handle the initial connection, but this does not seem worth it.

    Note that RegattaOptions is now redundant.

    17/10/5 Rate Meter Gavin Dods had an idea some months ago - provide the functionality to calculate a crew's strike rate simply by pressing a single key 3 times. The problem that I ran into, of course, was window focus. The new program installs a low level keyboard hook that intercepts just the {F12} & {Escape} keys, regardless of which window currently has focus.
    11/10/5 Admin [List - Status entered within Club(Distinct)] and [List - Missing Names (4s and 8s)] modified to ignore deleted crews.
    10/10/5 Entries We have 2 problems with the new grids. The first is that the payments grid is not always updated properly, since it draws its data from ADO, whereas the main databinding uses DAO. The second one is potentially more serious, since JET often complains that 2 users are trying to modify the same data. This is a load of rubbish, but unstoppable whilst we continue to use mixed mode database access. Fortunately, I did a full checkin before modifying anything, and have just labelled the checkin as 'pre MSHFlexGrid'.

    Ultimately, I want to convert the entire project to ADO. This is a major change, but one that should prove beneficial. A proof of concept has been done - all that remains is to delete rstEntries, and to to recompile.

    9/10/5 Entry Manager
    • Grids tidied up slightly - we don't need to show SCRATCHED, as this program no longer has any way of modifying it.
    • Deleted entries are no longer shown in the grids, though they still appear in some of the ASP pages. I'm modifying these as and when I come across them...
    • The contents of the Alterations table can now be viewed from the Auditing menu.
    • The OtherEntriesAtStatus grid has been changed to an MSHFlexGrid control. This removes the RowColChanged problem, which has driven everyone round the bend.
    • The Payments grid has also been converted. The advantage here is that we can colour individual cells, based on whether the payment is accurate, overpaid or underpaid.
    • The address of a contact only needs to be displayed when creating a new entry - at this point you have the entry form (and hence address) in front of you. Thereafter, who cares?
    • frmNewEntry tab stop order fixed.
    • EnterCell event added for the payments grid. This allows us to navigate to the first entry made by a contact.
    25/9/5 StaticData One problem that has affected me in the past is CRA conflicting with College - the Associations flag was insufficient. StaticData therefore holds a new Associations table, with a corresponding foreign key in StatusList. This should resolve the problem.
    25/9/5 Race Options I have been unhappy with the OptionEditor for some considerable time. It is hard to use, and has several known bugs. It also can't cope with 2 day racing, and is entirely registry based.

    A new program, RaceOptions, has therefore been created. This is standalone at the moment, but will eventually be either a COM DLL or a COM EXE. It ignores the registry completely - all of its information comes from the EventData table.

    We can now specify different statuses on each day of racing. There is no support yet for this in the Entry Manager.

    It will probably take me some considerable time to get all of the ASP pages to reference the new keys in EventData.

    How on earth do I do reports? Ideally, a single report should cover all days of a regatta

    19/9/5 P(r)oxy Server If the server name held in the registry is invalid, the software would crash with an error that was impossible to diagnose. I wasted at least 90 minutes on site hunting for this! Since the Proxy is only ever used on the server, and this machine only ever communicates via MPI with itself, we can safely ignore the value that previously we stored to the registry, and use COMPUTERNAME instead, as stored under the SYSTEM\CurrentControlSet key.
    19/9/5 Kingston
    • [Statistics - Regatta Summary of Wins by Club] created, showing number of wins & number of trophies.
    • MAJOR change - RTF Spiders are now created. This proved significantly easier than feared! I've used ARIAL, since it is probably the least intrusive of the 'common' fonts.
    • Many of Kingston's problems in 2005 were caused by Station names. The update sheets differed from the printed programme. The RTF therefore has a header, showing which station the first named crew is on. In the case of a 3 lane regatta, the last named crew's station is also output.
    • Handed reports now need to be created - I suggest naming them as [3 Lane - Runners and Riders - 1st on Right] & [3 Lane - Runners and Riders - 1st on Left]
    • BUG - Trophies not shown for Groups
    • Entry Terminal did not work on site - I suspect that the packet length was not maximised at 8192 bytes. I therefore need to modify the data header to include both a checksum and the expected length of the message. Obviously, both extra fields will need to be length padded in order for the checksum to be valid.
    18/9/5 Kingston On site again...
    • How would we scratch an entire event, and ensure that they got money back?
    • Undelete ability!
    • as display payment id, show drawer/cash
    • on withdraw update fee payable
    • Kingston - frmNewEntry - fraDoubling.visible=0
    • frmNewEntry tab order is crap
    • Audit number if floating point. We must ensure that it is eg 1.01 for sorting purposes. Ctrl A to create a new batch. select club & contact (& create composite based on this)
    • frmNewEntry.cmbContactName should really be sorted by surname
    • ClubRepeatMail could be set automatically
    • UI for Authorised by
    • Able to redraw plate only
    • Redraw - keep final at end or bring forward???
    • Lane 1 on right for start, lane 3 on right for finish (handed reports again)
    • Implement Verdict2
    • Here we go - spiders - output in RTF. I've not written RTF by hand for at least 7 years, so I'll have to work out the format from scratch again...
    • regattacompleted.asp to do
    • List - Regatta Winners for 3 lanes
    • Summary of wins by club, including pots per club!
    • Winners by station
    • Entries reports need draw to be done
    • Statistics - winners per station to be for lane 1 etc
    • [list - summary of entries report] - RIGHT JOIN onto Entries - show rejected crews, with payment as 0, checkboxes hidden & status in italics
    • Count - Bums per major audit number!
    • Installation - do NOT set server name! See next comment
    • ProxyServer - use a proper machine name function - we are only running DCOM on the local machine...
    17/9/5 ASP Page footer changed to show actual event Admin's name & email address.
    Scrolling code fixed for Firefox pages.
    16/9/5 Sockets Unbelievably, all messages sent were being doubled up! So a message of xxx10 was in fact sent as xxx10xxx10. This doesn't really pose a problem until you start sending very long messages (ie >4096 bytes). I knew that the code would not handle messages over 8192 bytes in length, but they were not going to be that long. Unless you double up...

    The library now copes with multipart messages, though it assumes that they have arrived in the right order. I know of no way to check this, and could really do with a CRC checksum for stability.

    16/9/5 ASP Yet another requirement from Kingston is a comments field that can be accessed from the results pages. If the comments flag is set in the QueryString, any comments on the race (including Status/Crew/Race/Warnings) will cause an Info icon to be shown. Click on the for a popup window containing any applicable comments.

    If one of the Crews in this race has an Official Warning, a warning symbol will be displayed instead of the info symbol.

    16/9/5 Mailing Many of the mailing queries ignore Bedford RC (for labels etc). If we rollout to other regattas, this is not acceptable. We now have a host club field in EventData (not used yet).
    16/9/5 StaticData Addresses table created. Ultimately, this will hold both Club & contact addresses - the idea is that when creating a contact from scratch, you can specify that it will use the Club's address... For example, 12 different people at Bedford RC have mail sent to the Club - why should we have 12 separate addresses?
    15/9/5 ASP regattadrawbyclub bug fixed - Crew2 Scratched was never being shown, due to a typo.
    15/9/5 ASP Since not all Regattas record TimeTaken, this can be turned off via the EventData table (ASP_TimeTaken=vbnullstring). Ideally, the spiders should also reflect this...
    15/9/5 Reports Kingston's Entry Audit report added in - it is actually quite useful!
    15/9/5 Misc Crests now available for Kingston, Bedford & Cambridge 99.
    15/9/5 ASP Stylesheet, BackColour & Crest (if needed) are now loaded from the EventData table instead of being hard coded in ASP. This gives a much more flexible approach...
    15/9/5 Admin MySQLExport.mdb is probably worth keeping, as it holds very specific information. However, the export queries should really pull their data from the [EventData] table.
    15/9/5 IDEA I really must make a list of all the queries that are called in compiled code.
    15/9/5 Database Since we can't either join or group on a null value, Regatta.Group now defaults to '-'.
    15/9/5 Admin All of the unused modules have been removed.
    15/9/5 Reports For clarity, left and right handed update sheets should be printed - what the starter sees as a race disappears into the distance is of course exactly opposite to what the finish judges see as the race approaches them... This comment has been made before by Gavin Dods.
    15/9/5 Reports At Cambridge Autumn, Ian Schofield complained that the station names were not repeated on every page of the update sheets. This is fair criticism - I'm amazed that nobody has complained before (including me).
    15/9/5 Admin At last! All databases have been merged into a single file. This makes deployment and management so much easier - no longer do we have to worry whether each database has the latest version of a query!
    • One of Kingston's criticisms was the lack of footers on most of the reports - you've printed out reams of paper, but which report was it??? Hard coded text is not really sufficient, since the chances are that you'll either rename the report, make a spelling mistake, etc. A much better way is to have an unbound textbox, whose value is set on the fly to Report.Name - thus ensuring that the information is always correct.
    • All embedded images have now been removed.
    14/9/5 Main Database Having the [Scratched], [Suspended], [Ignored] fields in the entries table is just plain wrong, violating 2nd normal form. They have therefore been duplicated in the [Crews] table, though won't be removed from [Entries] until after the October Head (because I have a LOT of queries to rewrite). The advantage is that many of the regatta queries require a join into [Entries], which is in fact now redundant.
    14/9/5 Reports There is really no reason to have multiple copies of the same report - all that generally differs is the crest. By linking this to the EventData table and deleting the embedded images, we can not only simplify the database by removing redundant reports, but also trim over a megabyte off the compacted database size.

    Ideally, I will merge this with the Admin database. I realise that care has to be taken when copying reports, but the benefits of having a standardised query list by far outweigh the problems caused by Access 2000.

    I have also started to rename all reports, making them easier to differentiate. For example, [Winners List for ARA (Regatta)] becomes [Regatta - Winners List for ARA].

    The Groups have also been renamed:

    • Preparation
    • Pre Draw
    • Post Draw
    • Race Day
    • Results
    6/9/5 EntryManager (old)
    • Active & TimeOnly menu items now work.
    • Withdrawn is now logged, instead of Scratched. The menu has been changed accordingly.
    • Delete Entry added. This will update both the Withdrawn & Deleted flags.
    • DoubleCheck is now specific to the new KINGSTON Group within AccessControl. This methodology gives much greater flexibility when configuring users.
    2/9/5 Databases The change to the database structure has been painful, but I am sure that it will prove beneficial in the long run. Racelist, Regatta AND ASP have all gone. I suppose that I had better update the registry now :)
    2/9/5 Databases One change that I have been meaning to make for a considerable time is the removal of the databases folder. It was also a legacy of our old ISP, and is doubly confusing, as a profile now would have to install databases in separate paths. This has also been resolved.

    However, I am increasingly of the opinion that the ASP database (at the very least) should be merged into the admin database. I can no longer justify having separate copies of many standard queries, each of which has to be modified on a change. The hard part comes when queries have the same name, but differ slightly in their functionality - eg [Count - Entries per Status] displays withdrawn crews in the Admin database, but doesn't in the ASP database. What effect will merging the databases have?

    • As it happens, this was the only query to differ between ASP and ADMIN. The downside is that the Admin database now has 277 queries! With the Regatta database merged as well, we have 358 queries. In this database, [List - Statuses in Draw] differed radically, since the one in the admin database had been modified to show only head race problems.
    • TODO - the Boating queries are extremely complex, and do not really work very well. It's not even worth documenting them, as they take to long to analyse!
    • The benefit of merging everything is that all queries are now located in a single file (apart from mailing), thus making any necessary changes easier to implement. On the other hand, an error in a single query now has far reaching consequences.
    • I therefore intend to make far greater use of SourceSafe...
    2/9/5 ASP RaceList.asp has been extensively modified. Next Race & Last Race were only applicable when the system was hosted by an ISP, while the NRL has not existed for many years. Since only the [List - Races in Specified Year] & [List - Years] queries are necessary, they have been moved to StaticData, thus removing the need to install RaceList.mdb... The page title and heading have also been modified.
    2/9/5 Installation The installation has been insufficient for some time now, and was highlighted by Kingston Regatta a couple of months ago. Why should we install server components such as ASP files on the client machines?

    The answer is simple - a basic setup, installing everything, is significantly quicker & easier to write! However, I have finally bitten the bullet and produced a fully customisable setup. The Compact, Typical & Custom setup types have gone, and are replaced with a standard component tree, with descriptions of each object in the hierarchy.

    Each profile now exists as a separate component, and installs its own registry settings. However, the Start Menu is poorly constructed at the moment (Kingston found it very confusing), and at the moment takes no account of installed components - everything is included. This is probably going to be tonight's coding session.

    The first time this was run on site (Cam 2005) worked well. OK, a couple of files were missing, but in general, it did exactly what I needed it to

    1/9/5 Entry Manager
    • Surname support added - when a new contact is created it is generated automatically. This makes ordering some of the reports better.
    • StatusDoubling table can now be generated within the EntryManager. I'd like to get doubling Chains working, but cannot figure out the best way of doing this at the moment.
    27/8/5 Entry Manager
    • We can now withdraw all entries at a specified status (on a specified Day, if applicable). This was requested by Tony Gordon.
    • One of the biggest problems encountered by K2005 was the inconsistency caused by the RowColChanged event on all the grids. Basically, DAO is not up to the task. Using the ADODC control makes life significantly simpler, in that we need only one data control. But the major bonus is that the MSHFlexGrid supports ADO recordsets, and hence can be passed the result of a parametric query. This means that the complex SQL strings are now redundant - queries are much easier to understand, and can be changed far more easily. The downside is that the code requires a fundamental rewrite, as DAO & ADO are very different.

      MSHFlexGrid navigation is even better than I had originally realised - with the CellEntered event, we can navigate using the Up/Down keys.

    • There is still an update bug in ADO (last tested under MDAC 2.8 SP1). However, it is easily resolved - just issue rst.Move 0
    • One of the problems with the EntryManager is that is slows down significantly as more entries are made. This is caused by a number of factors, not least the updating of each grid when a property is changed. I have therefore changed the code for chkPaid_MouseUp (others to follow) to amend the Grid directly, thus removing the need for a potentially costly trip to the server. This is possible, since the MSHFlexGrid is read only when populated from a recordset.
    • And then we hit a problem - changes to the data are not reflected in the bound controls...
    • So we unbind all controls! I can navigate through records, but nothing can be added yet... The main advantage of unbound controls is that we can specify exactly when the grids are updated, and thus ensure that they are not updated multiple times...
    • Cam2005 cannot have this code - it is far too unstable! However, Oct2005 will use it. If it screws up my own data, at least I can only blame myself.
    27/8/5 General Windows supports custom error logs. The documentation on these is woefully inadequate, but we now have an event log in addition to the standard Application log. Ultimately, I plan to log all messages that are passed through ProxyServer.
    27/8/5 General Sadly, I have a job to do, so have not had much chance to work on this of late...
    21/7/5 General
    • MAJOR CHANGE - I have swapped the Withdrawn & Scratched fields. This will entail checking every single query, but will produce a more logical nomenclature.
    • [Ignored] flag added to the Entries table. This will enable redraws to be done automatically.
    10/7/5 on day Need to view doubling (see 1/9/5)
    10/7/5 Race Manager ability to view multiple day reports. have a default day settable as well
    10/7/5 Databases compact on exit
    10/7/5 Control BUG - if crew numbers START at 500, requesting a crew below this (eg 5) throws an error.
    7/7/5 Spiders Missing right angle character found in Group A of a 24 entry race.
    4/7/5 General I have a problem with grouped events - the spiders are not being generated correctly. Times are inserted properly, but not heat numbers. This was because heats were not output for 17+ entries!
    • We have a major problem with the grids currently used by the Entry Manager - the RowColChange event does not always return the correct row value. So clicking on an entry can give unpredictable results. The problem is almost certainly related to VB6's 'associated object' error, which occurs with the intrinsic data control.
      The solution is to move to ADO and the MSHFlexGrid control. The advantage of using ADO is that the error does not apply, and also parametric queries can be used. The control provides significant extra functionality, including the ability to apply font styles and background colours to individual cells.
      As soon as both Quarts & Kingston are over, I need to convert the Entry Manager.
    • Selecting DayID for each entry is a pain in the neck.
    • We should be able to filter entries to show Day1, Day2 or both.
    • We need the ability to scratch entire events.
    • The Draw program should notify us when there are less than {n} entries in an event, and give us the option to scratch all of them automatically.
    • If the Regatta table is rekeyed on RaceID & DayID, we can have a single table for both days. For this to work, the Crews table will also need a DayID field as part of its key.
    • Day Tickets need to be day specific (obvious, really)
    • Need to be able to differentiate between which entries were scratched because they were duplicates, and which were genuine scratchings.
    • I finally left Kingston at 3:15 am..
    3/7/5 Draw Engine I've finally worked out why crews from the same club are not always moved to opposite ends of the draw as expected. It is because crews are allocated by heat number, whereas the split routine works off crew number. Consider 5 entries. Crew 3 will be Bedford, and Crew 5 also Bedford
    1/7/5 Spiders Kingston now want a change to the way that Plate events work - ie for 5 entries, the first round losers go through to the plate as normal, but the crew that gets a bye ALSO goes through. This will require a new enum, ePlateFormat, with epfIgnoreByes & epfIncludeByes as the values.

    I have implemented this for 5 entries, and it works perfectly. For 6 & 7 entries it gets more peculiar. In order that the main schema remains the same, crews in the first round go through to their normal plate event heat number. The crews with byes fill in the additional slots.

    1/7/5 Regatta Server
    • SponsorOfRace is now cached. This provides a slight speed up, since we no longer need to execute the query every time a race finishes.
    • UpdateCrewForNextRace is now used for 2 lane races as well, since the code is substantially faster.
    1/7/5 Commentary I have finally started the long awaited overhaul of this program. The problem is simple - we might have the most exciting race of the day approaching the finish line, only for the commentator to announce, completely deadpan, that someone is rowing over in a heat of Women's Junior 13 sculls. Nobody in the finish area cares - all they want to know about is the race that is approaching them at high speed, with the crews separated by less than a canvas...

    The idea is in fact quite simple. Instead of stacking messages and displaying each in turn, the Commentary program actually needs to monitor a race's progress. If a race is flagged as approaching (based on a standard time, which I have calculated for this regatta last year)

    1/7/5 General Station Names are now retrieved from the Server for Start, Finish & RegattaEditor. They are actually stored in the EventData table as Lane1, Lane2 etc... Note that we may want to swap the positions of the controls on the various forms to make it look like what is actually visible!
    1/7/5 Proxy Server Purely cosmetic changes have been made - we now have a Tray icon, displaying Balloon Tooltips when Clients connect/disconnect.
    1/7/5 Entry Manager
    • Check boxes for Scratched, Paid etc are now replicated in the menu structure.
    • Scratch/Reinstate is now logged.
    • A rudimentary Options form has been created, but does not yet have sufficient functionality to justify showing it.
    • Form layout changed yet again, this time so that an [Entry Fees Payable] text box can be shown. Note that this cannot be linked to rstEntries, as it would make that recordset non-updateable.
    • For the sake of speed, I intend to make things like OtherEntriesAtStatus invisible and not updated. This setting will be toggled within the Options form.
    1/7/5 Entry Manager We can now alter the Contact of an entry. Again, the contacts are listed in a dynamic menu... This automatically handles the part payments required.

    I plan to add the functionality for moving an entry to a different Club at some point today...

    30/6/5 Entry Manager Kingston are also concerned that there is no way of relating a payment to an entry. I must admit that I have never really seen this as important, though the current [Entries.Paid] flag is not especially well implemented. I have therefore added a PaymentID field to the Entries table, though as yet there is no code to support this. If the payment exactly matches the entries made by that contact, then we should be able to update this field automatically. Note that it might also be possible to automatically handle part payments for composite entries.
    30/6/5 Entry Manager Kingston, quite rightly, have complained that the Reports available for viewing within the Entry Manager are too restricted, and also do not include their variants (see 21/6/5). I have therefore created a customisable menu structure, where up to 3 databases may be selected. For each database, any number of reports may be selected. They can even have their own icon on the menus, though as yet there is no way to do this except by editing the Registry.

    This is a major enhancement. Being profile based, reports can now be selected on an event specific basis - change the profile, and get completely different reports :)

    23/6/5 Database Kingston need a Verdict2 field. Fortunately, MPIServer already has the message hook for this
    23/6/5 Reports Runners & Riders created for 3 lanes. The backend code is much better than that for 2 lanes...
    23/6/5 Control Scratching crews now carries forward a winner - IF it is the only one left in that race.
    23/6/5 Databases Day Tickets & Entry Fees need to be day specific
    22/6/5 Regatta Server Scratching crews now works for 3 lanes
    21/6/5 General This may seem like an awful lot of work, just to get a 2 day, 3 lane regatta to work. However, it has exposed the flaws in my current system, and has suggested a few new ideas. It is therefore worth all of the effort, regardless of how many hours need to be spent... Would I ever have thought that Star's draw (which they couldn't get to work) was possible?
    21/6/5 General
    • Context sensitive help needs to be written for ALL programs.
    • The installation should really give the ability to install parts of the system, not just the whole lot. For this to be viable, the directory structure needs to be changed again - the ASP databases should reside in the same folder as the main database. If I want to be really flexible, then I should be able to define switches for database version number, and have the ASP code call the appropriate routines...
    • IDEA - It has been suggested that we should have the ability to fix races in the schedule - eg the Watermen's races, times at certain intervals throughout the day. I suggest that we allow the Draw to continue as specified, and then add in EXTRA races before writing to the main Regatta table. Obviously, doubling up consideration would be easier if these were factored in from the outset, but I have no idea how to fix specific races within the racing schedule...
    21/6/5 IDEA Instead of having hard coded reports in the Entry Manager, how about a dynamic menu that is based around an INI file? Database name and Report name would be configurable...

    This is worth following up, since Kingston have already indicated that they intend to clone the reports database, delete what they don't need, and modify/add as they think applicable.

    For this to be viable, we need to have sub profiles defined - we can then specify a different database for EACH day of a regatta. In order to get Kingston 2005 to work, this can't be implemented now, but I suggest rewriting the OptionEditor from scratch - maybe even splitting into a different class to handle profiles.

    21/6/5 PHP TODO - PHP classes to emulate spider engine
    20/6/5 Control Tony Gordon reported a few problems in the software:
    • Scratching does not work. I know - that's tomorrow's work.
    • Disqualification - similar. This has always been a slight issue - I suggest that we show the font with a lighter weight, if possible.
    • Retiming 3 lane race does not work ???
    20/6/5 SpiderEngine ActivateProfileByID method added. This is necessary for the ASP code, since it only knows about the 'ID' parameter in the QueryString - it does not actually know about the registry - more specifically, it does not know what profile is currently selected.

    Spiders & Schemas created for 3 lanes (no repechage) for 16-18 entries inclusive

    17/6/5 Installation Big changes have been made, mainly to do with the new directory structure.
    17/6/5 RegattaDraw Arbitrary first race number & first crew number added. Note that there is no checking made on either yet - TODO

    Can delete all gaps at once

    17/6/5 Databases Multi Day Regatta structure
    7/6/5 Spiders Bug found in 3 lane draw repechage event for 5 entries
    6/6/5 General Following a lengthy call with Kingston's Tony Gordon last night (and part of this morning), a number of changes have been made:
    • EntryManager
      • If a club with no contacts is selected (when making a new entry), the contact address is now cleared out.
      • mnuToolbox reflects its state on initial load.
      • TODO - highlight where payment is not right - whether more or less than expected. Simple Green or Red will do.
    • Mailing database
      • All reports now include a footer, showing the report name.
      • 3 lane support added to any pages that showed the draw...
      • [RegattaNames] table used where applicable - this avoids the use of nested (and hence slow) IIF statements...
    • ASP
      • Station Names are now generated from the database.
    • Installation
      • Help File missing
    4/6/5 TODO The EventData table really needs an Editor. OptionEditor is Registry based - not really good enough
    3/6/5 General One of the major problems that has come out of the last few weeks is Station Names. At the moment, they are loaded from the registry for client programs, but from the database for reports. The database is by far preferable, since it is centralised for all machines on the network. We'll need an extra message to be passed to the server.

    A thought occurs - if we have 3 lanes for some races, AND 2 lanes for others at the same regatta, then presumably the outside lanes are used for 2 lane racing? if so, then eg Lane2 is not sufficient - we need [2 Lanes - Lane2] & [3 Lanes - Lane3]

    This format will also solve the problem I had in May - printing 160 pages of Bedford Draw data, with stations being set to Surrey & Middlesex... (That's what debug code can do :)

    This is actually a fallacy - the schemas are wrong...

    3/6/5 General Start & Finish now cope with 3 lane racing. Sadly, we no longer have a standard version build - just 9 hours after starting out :)
    3/6/5 Installation The installation has been tested on \\FISH. This machine has XP Pro installed, as well as Office 97. Obviously the Access 2000 databases could not be opened themselves, but entries could be added to the system, and a draw made regardless. Control & RegattaEditor were also tested in order to validate the messaging system on a clean install.
    3/6/5 General Compatibility broken

    Technically, there was no reason for me to do this; however, both the Proxy Server and the Helper DLL contained significant amounts of completely redundant code, together with the old message enumerations. These have therefore been removed, and the whole system recompiled as version 2.6.0

    1/6/5 XP Home Since Kingston will trial this code on XP Home edition, I have now found the code required to enable IIS under XP Home - basically some of the Win2000 ini files are needed. Unfortunately, the ones from XP Professional do not work...
    1/6/5 Installation Since National Schools Regatta was suspended on Saturday, I have had a chance to rewrite most of the installation code. All it needs now is a dry run.
    1/6/5 Databases [Display - Regatta Names] radically altered, providing more flexibility. However, this comes at the price of speed - I suggest a temporary table to store its current output, which the query then references. The problem is down to nested IIF statements...
    1/6/5 Regatta Editor Now copes with 3 lane racing
    1/6/5 Control Event ID can now be obtained from the server. However, if comms have not been established, it uses its default registry value
    1/6/5 Spider Engine Couple of minor bug fixes made to the definitions
    7/5/5 Entry Manager
    • Rachel's idea of being able to search by Club Name is now coded.
    • Search by club code is now obsolete, and has been removed
    • TODO - get DisplayLongComboText working for DBCombo controls.
    • IDEA - some way of managing Part Payments
    • IDEA - create new status eg (in this case) School 3rd Eights...
    • IDEA - Allow entry fees to be set in a single action (ie on a per seat basis).
    7/5/5 Regatta Draw
    • Separate Numbers for groups now work. The main problem was that the order of steps in the wizard was wrong - NumberRaces was called before we were given the option to generate separate event numbers
    • Plate events run in conjunction with Groups now decrement the Level of the Plates, thus ensuring correct sequencing. This has an obvious benefit, in that the race list is better from the outset, and thus contains fewer clashes.
    • DragDrop icons need sorting out - tv2Lanes, tv3Lanes & tv4Lanes are correct, but the rest are rubbish...
    • Grouped events that are ALSO running Plates have been defined for 12-16 entries inclusive.
    • I believe that the 'A' schema tag is now redundant, and can be replaced with 'W'.
    7/5/5 General TrophyManager & SponsorshipManager would be useful. There is little point in these running out of the main Entry Manager.
    6/5/5 RegattaDraw The following bugs have been found:
    • Separate numbers for Groups no longer work
    • Plates at end have a large vbcrlf gap
    • Full clash resolution can generate cyan, despite no clashes below. I suspect that we are starting at the final, and descending down each branch, even if irrelevant. So we need to start at the bottom and work up. This is not a job for now...
    6/5/5 Regatta Draw
    • We can now add & remove Status Change placeholders.
    • We can see at a glance which statuses will be grouped.
    • Grand Finals can be enabled on a per event basis (note - only grouped statuses are available).
    • Groups can also be enabled on a per event basis.
    • Limited support for Grouped events that are ALSO running Plates has been added. The main problem with this (see 13 entries) is that the first round of the plate can exist on the same level as its previous race. Not good. I'm not too concerned at the moment, since this scenario should never be used in anger (but somebody's going to try it at some point!)
    • A similar point is that Grand Finals should be on level 0 under the current format. Plate Finals should also be on Level 0 if grouped.
    • Race List Composition has therefore been modified to cope with Level 0 races.
    6/5/5 Entry Manager Couple of points raised by Rachel Maltby:
    • Search should allow you to search for a club by its actual name, rather than the club code, which we rarely know!
    • Need some way to alter the Club of an entry if you make a mistake. Note that we may also need to change contact and payment data.
    • It would also be useful to be able to copy an existing address when creating a new contact. This is a common scenario for the colleges, where club captains change at least once a year...
    3/5/5 General The directory structure has annoyed me for a long time - basically it is a legacy of a sponsorship deal we had some four years ago. Separate directories for the main databases and the website databases are a particular problem. I have therefore decided to radically alter the structure, also bringing the ASP and PHP folders into line. In addition, profiles are needlessly complex

    29/4/5 ASP The new code was surprisingly painless. ASP now shows the draw in whatever lane format we like, without ANY additional coding...

    However, the main problem is that we cannot compile SpiderEngine if it has been used in FireFox :(

    BUG clsStatus.Grouped is never set!

    29/4/5 RegattaDraw I've taken a day off work to get this working!

    • Gavin Dods has requested that we print sheets for the progress boards. This sounds simple - just print the spiders as generated by ASP. However, what is really needed is the ability to print only those events that have changed since the last printout. For this to be possible, we need to have a Report that can display spiders. The [Changed] flag has not been coded yet, but should be relatively simple to do.
    • For the report to fit on a page (even in Landscape view), we can't display winning Crew names. Instead, we just display the winning Crew number
    • One of the biggest problems with the ASP code is that it duplicates the code from RegattaWizard. A change to the algorithm therefore needs to be reflected in ASP, which generally doesn't happen immediately, hence leading to potentially embarrassing differences.
    • Programme.txt was being generated twice - firstly in NumberRaces, and then after Spider generation.
    • I've now split RegattaWizard in two - the SpiderEngine handles all spider generation, while the program concentrates on the Draw itself. This has involved a MAJOR rewrite.
    • The idea is that we use the new SpiderEngine to generate HTML - why should we have to use interpreted code? Compiled code is significantly faster. Even better would be to cache the spiders, based on the value of the [Changed] flag.
    • Programme.txt now shows the race number of not just the next race, but also the Plate race, if applicable. For this to work, cls2LaneDefinition has been slightly modified (Note - 17+ entries are not done yet)
    27/4/5 General All common routines have been moved to RegattaHelper. This simplifies and standardises the client programs. Start, Finish, Commentary, Query, Control, CheckIn, Progress, RegattaEditor & RegattaStatistics now ALL use the new model, but the functionality of Regatta specific code has not been tested.
    URGENT TODO See comment for 1/3/5
    9/4/5 IDEA Multiple day racing is actually very easy. We make entries to a single database, but set a flag to indicate which day the entry applies to. Entry Manager provides multiple options - 1/2/Both/Multiple. Subprofiles define the actual database to link to, but instead of an [Entries] table, we have an [Entries] query, which references an [AllEntries] table, filtered by the appropriate day.

    This allows entries to be made easily, and centralises payments. It should also be possible to handle the possibility of status changes (where the entry is for Both/Multiple).

    9/4/5 Mailing Database
    • [Labels - Entry Forms] now sorts by EntryID instead of CrewID - hopefully they will be in the same order as the forms! (Jo Lemon, Nicky Cooper, Stuart Lewis, Chris Hemingway & Jon Vendy should be happier!)
    • [Labels - Entry Forms] ignores withdrawn crews.
    • [Labels - Back of Numbers] ignores withdrawn crews.
    • [Control - Safety Plan Signatory Sheet] does not print clubs where all entries have withdrawn. I appreciate that we have not used this for a while, but it should be kept up to date!
    8/4/5 ASP Lets say the pages show S2.2X Bedford RC Hardy/Williams. What would be REALLY nice would be to link to the club AND to each individual rower, if they are doubling up...
    But what do we do with eights and fours?
    8/5/4 Mailing Database With hindsight, excluding OARA entries from the mailing list was not a good idea. Some people were entering by both methods, and having only part of their entry displayed was confusing.

    In addition, the envelope cover sheets were bugged, due to a missing INNER JOIN from the new queries that calculate entry fees. We had to reprint and reaffix every single one.

    Why did the Regatta Envelopes exclude Withdrawn???

    6/5/4 Admin Database [List - Missing Names (1s and 2s)] no longer shows scratched crews. 8s & 4s are harder, and I will not attempt this until sober!
    6/4/5 ASP NB: Payments.asp still uses queries without surcharge.
    5/4/5 ASP Scrolling results are generally shown in an enlarged font for clarity. A new [bladesize] flag has been added to the QueryString to enhance this. Note that this flag is Global once set.
    5/4/5 Entry Manager The menu structure has been modified, since it was rather clumsy in places, and hard even for its author to navigate through!
    5/4/5 Head Draw Traditionally, the method for tweaking the Draw has been to modify [ActualStatusID]. Before we had the Alterations table, this caused me problems when printing. We often want to promote a crew that is known to be fast, and may want to insert it at a specific place in the draw. Alternatively, we may want to split entries made by the same club.

    The Entries table now contains a [RaceOrder] field. The first stage in the Draw will be to Initialise - ie to populate this field with the global RaceOrder for the relevant status. Once we are happy that the race order is correct, we can tweak individual entries before the final renumber. Note that this code is untested - obviously, having just done the Draw, I can't run it now! TODO

    Note that I forgot this functionality existed in October 2005 - one of the problems of not documenting features correctly.

    The Draw no longer uses DAO - this was legacy code.

    4/4/5 OARA How can 200503S1006113 enter a race in April? The answer is that he/she is paying the ARA by Direct Debit, so they assume that the number will be renewed.

    What is WorldPayStatus=P ??? And why does it appear as a separate record in ExportedEntries?

    4/4/5 OARA Technically, under the ARA Rules of Racing (5-2-3 d), No person may be entered more than once in the same event at a regatta. Whilst it is true that unless otherwise specified, the rules should be interpreted in the same way for a regatta as for a head race, I believe that this rule should apply only to Regattas. I have now spoken to a senior multilane umpire, and have requested that the rules should be clarified. After all, Heads are used as training events (hence coaching is allowed) and are not really considered by the ARA as being important (although any crew that has won the Jackson Trophy would disagree!)

    The OARA system applies this rule, and does not allow a competitor to enter the same event twice at a head race. This is a major inconvenience to Divisional Head Races such as Bedford, which generally interpret the rules rather more loosely. Alternatively, we could argue that we are applying Rule 6-1-8, overriding the Rules of Racing.

    2/4/5 Main Database In the [Regatta] table, [LateCrewID] is now superfluous, and should be removed. The [Plate] field is also redundant, have been replaced by enhanced groups.
    2/4/5 Entry Manager Layout of the main form has been slightly modified. I need to show ARACrewID, but fraOptions was too large, and badly laid out.
    2/4/5 ASP crew.asp & rower.asp have an extra flag to denote whether they are being linked from a draw page or a results page.
    2/4/5 Control We rarely have an up to date almanac - Control now provides a link to the current Rules of Racing on the ARA website.
    2/4/5 Admin Database [Update - Credit Card Payments] query added. This parses all entries made online, works out what they would have paid, summarises this, and adds the sums to the [Payments] table.
    2/4/5 Mailing Database [Mailing - Changes] report modified to use the new AuthorisedBy field. It's all very well knowing that I made a change, but what we really want to know is who told me to! (NB - 2010: nobody cares)
    1/4/5 OARA One problem that I've only just thought about: Suppose yesterday we had 100 entries. OARA listed 100 entries. Today, 10 of those scratch, but another 10 enter. OARA still lists 100 entries, so I don't bother to get the export file. Tomorrow I do the draw, and 10 paid up entries are missed out...
    1/4/5 OARA Import Scratched crews are now imported (NB: the ARA calls these Withdrawn!) This is, perversely, so that I can calculate the amount of money paid via WorldPay, and hence the amount of any refunds payable.
    • It is also necessary to update the PAID & SCRATCHED fields, since these may change on OARA.
    • If I scratch an entry, but OARA still lists it as valid, keep my data.
    1/4/5 Admin Database The nested IIF statements in [Payment - Money owed per entry] were getting unmanageable. A much better way of doing this operation is via a UNION subquery. The reason that the change is needed is that we are now taking credit cards via WorldPay for any entries made online. These have a small surcharge applied per seat.

    This should also allow me to apply late fees eventually. These were in the initial specification, but have never been implemented.

    1/4/5 OARA Import Once we have imported the entries, I generally go through and squelch any meaningless names. However, it is fairly common that names for scullers, pairs and doubles are not in my standard format, so they end up as null as well. This is not a problem however - all that needs to be done is to subsequently execute the UpdateNames procedure. This creates the actual name of the crew, and amends the Entries table.
    30/3/5 OARA Yet more problems.
    • The lack of Division is causing problems, as few people are reading the notes. Maybe notes should be on an initial screen, highlighted and in BOLD???
    • From the Event Admin's point of view, there is little point in going through all of the screens once the event has been opened for entries. All we really want to know is how many entries have been received.
    • WHY do they have to input a unique name? For single sculls, this is ridiculous. For Pairs & Doubles, it is customary to list the names, so also ridiculous. Larger boats really only need a name if 2 crews of the same status have been entered by the same club.
    • Contact addresses are shown on one of the reports, but are not exported. Surely a better way would be to have a separate export of contacts, together with a ContactID. This could then be keyed properly.
    • The following table shows how I think that the exports should be made. Note that there is a vast amount of redundant data in the current export file - it does not even conform to First Normal Form...
    • Status Export File
      • EventIdentifierID
      • NumberRowers
      • Sculling
      • CoxedEvent
      • Gender
      • EventType
      • MaxAge
      • SubCat
      • MinAge
      • ARACrewStatus
      • Lightweight
      • BespokeClassification
      • BoatName
      • AllowQualify
    • Crew Export File
      • EventIdentifierID
      • SubmittingClub
      • SubmittingClubIndex
      • ARACrewID
      • ARACrewName
      • CrewPriority
      • DateSubmitted
      • Paid
      • PaidDate
      • WorldPayCartID(ifavailable)
      • Withdrawn
      • Scratched
      • OARAAccepted
      • Refunded
      • Rejected
      • EmergencyContact
      • EmergencyContactMobile
      • EmergencyContactEmail
      • Coach
      • BoatingPermissionClub
      • BoatingPermissionClubIndex
      • Composite
      • CrewNotes
      • AdministratorID
    • WorldPay Export File
      • WorldPayCartID
      • WorldPayTransactionStatus
      • WorldPayAmount
    • CrewList Export File
      • ARACrewID
      • BowNo
      • MembershipNo
    • Rowers Export File
      • Surname
      • FirstNames
      • DofB
      • Weight
      • RowingPoints
      • ScullingPoints
      • Cox - Is this obsolete, given that the same data is held in [BowNo] ???
      • MembershipNo
      • MembersClub
      • MembersClubIndex
    • Administrator Export File
      • AdministratorID
      • SUBMITTINGOARAADMINISTRATOR
      • SubmittingOARAAdministratorHomePhone
      • SubmittingOARAAdministratorWorkPhone
      • SubmittingOARAAdministratorMobilePhone
      • SubmittingOARAAdministratorEmail
      • Other fields eg address!
    30/3/5 OARA Import
    • As well as importing new entries, I will also need to update the [Scratched] field.
    • Need to have some way of importing WorldPay data.
    • I think that it would be useful to import the time of entry for any crews entered via OARA.
    30/3/5 Admin Database [List - Statuses in Draw] now uses a subquery, so that it can show the club name of any entries that have no opposition. It also shows any comments, which will be useful when bumping up entries to the nearest acceptable status.
    30/3/5 Entry Manager
    • Status Change Logging added. At the moment, all changes are made by me, and there is no option to add a comment. Hopefully I can get this written in the next few days.
    • If we are running a Head Race, allow us to search for Division 0 automatically. All other divisions can be searched for as well, though you need to specify that you are searching by division and not Entry/Crew number.
    • Now that we have an Alterations table, and automatic logging of changes, we really need an Access Control Module. I have written something similar in the past, though it will need to be extensively modified in order to be fully applicable to this application. This is a major change, but one that has great potential.
    • Gavin Dods apparently requested this functionality many years ago, but nothing was ever done about it.
    27/3/5 General After this race is over, I propose to alter the directory structure. The separate folder for the ASP databases is an anachronism, dating back to the time when we used KBNet for ASP based results. This was some 3 years ago.

    Currently, a profile holds multiple database paths, plus a few folders. I see no reason why this cannot be condensed to a standard format, comprising year & profile name. The downside is that database names would then need to be standardised, but since I do this anyway, there shouldn't really be a problem.

    Whilst considering profiles, it is worth mentioning 2 day events. At the moment, these are not supported, though Kingston will need them in July.

    • The easiest option, at face value, would be to have an extra option in the Entry Manager, allowing you to specify which day an entry was to be applied to. This would utilise a field in the main entries table.
    • On closer inspection though, it can be seen that this methodology would involve a fundamental rewrite of virtually every query in the database, with potentially catastrophic results in the short term. Whilst I admit that this would have been a better model from the outset, Bedford RC's events have never had this requirement, and so the initial system specification omitted it.
    • A better solution, therefore, will be a modification to the profiles, specifying the Day Index of a race. Obviously, this will normally be Day1. We will need to create Control Arrays of all databound controls, and modify the queries to use separate databases. Hence, when an entry is made, it will be added to the appropriate database instead of the default as at present.

      Note that Kingston 2005 was pretty disastrous, since the number of databases required to implement this idea was excessive. December 2005 has seen the advent of proper multiday functionality.

    • It would be nice to have the option of adding an entry to multiple databases.
    • Payments might have to be split to a separate database. I need to check whether a single cheque is usually received for both days.
    27/3/5 ASP Some of the ASP specific queries were out of date of Head Races (eg OARACrewID). These have now been fixed. Note that ASPKingston2005 is the master copy for the time being, so any changes made to ASPApr2005 must be exported...
    27/3/5 Entry Manager
    • AddComposite bug fixed - very minor problem, since the form was being unloaded instead of hidden.
    • Navigate method now supports QueryString data
    • New Entry form now displays the correct New Entry Number. This is not ordinarily a problem, though is extremely annoying if I'm testing and forget to compact the database before going live ;)
    24/3/5 CheckIn 'Cannot open any more databases' error occasionally seen in ASP output. The problem is that the nested queries to do Check In properly were far too complex, with much of the logic being performed with multiple IIF statements. These are slow anyway, so all of the output logic is now handled in ASP - the SQL just provides raw data.

    It turns out (19/12/5) that this error is due to Access being unable to open any more tables - the limit is 2048. To reach this limit should be impossible, but, give the complexity of these queries, and the fact that the design had not really been thought through properly, I breached it :(

    18/3/5 CheckIn The database code has now been changed to take Race Control into account. The idea is that those crews that have picked up their numbers are recorded. These won't be displayed on the output pages until their opposition checks in at one of the other positions.

    To make the queries simpler, I propose making Scratched a marshalling position. This allows the pages to display which crews have scratched.

    [List - Null Races] is now required so we can show those races that are not going to happen at all. Another bogus marshalling position can then make use of this information. Null Races therefore need a MarshalID of -1, and Scratched as -2. [Control - Check In Withdrawal] and [Control - Check In Null Races] in the front end provide the database logic.

    18/3/5 Proxy Server ConvertMPIToSocket has been changed so that emfMsgID becomes MessageType
    16/3/5 OARA One of the problems I faced in February was importing the OARA data into a new table. The number of columns had changed, and there were typos in the field names - hardly very useful, or easy to import regularly. A better way would be to link directly to the text file using a TEXT ISAM driver. Field names and data otherwise contained in an ImportSpecifiction (Microsoft Access) are held in an accompanying SCHEMA.INI file, which is automatically referenced by the ISAM driver. As far as the user is concerned, we have just another table. Unfortunately, this is not updatable, so we still need to copy everything to our internal OARA table.

    I believe that this methodology is still worthwhile, as it removes the need for manual import of the text file into a temporary table. Once there, we can generate the actual OARA table, and then modify it as required.

    Note that the ARA export function is very poorly written.

    • Spaces in field names are a pain in the neck at the best of times.
    • There is no export of the Composite club code.
    • We have no way of identifying a contact. Presumably they have a key - if so, it would let me reference other details that I hold - such as postal address
    16/3/5 General ADO 2.8 is the latest release. We should therefore ensure that all programs reference this
    13/3/5 ASP Database [Display - Club and Entry Names] includes both long and short variants. I am also considering a further abbreviation for small boats.
    13/3/5 CheckIn I have spent all weekend writing this. Fortunately, Gavin Dods has taken the time to look at the output, and has suggested several significant improvements:
    • Hugh Maltby (I/C Start) needs to know what races are coming up, as well as those where crews have boated.
    • He also needs to know which races should have gone already, but haven't for some reason.
    • However, the person running CheckIn only needs details of what is currently on the water.
    13/3/5 Sockets The existing socket library has a serious shortcoming, in that there is no way of telling which clsSocket sent a message. This could be rectified by breaking compatibility, and changing the RequestArrived event. However, for added flexibility, I have added an IncomingHandle to clsMessage
    12/3/5 Regatta Database Unbelievably, [Regatta - List All Results by Status] was still keyed by EntryID! Changing this has meant a severe rewrite of many queries; however, we now have increased simplicity, and hence speed...
    12/3/5 Control
    • Blade toggling option added to the regatta control form. The code has also been slightly modified to cope with pages without any parameters...
    • DestroyObjects unloads all forms correctly.
    • New button added to show boating and checkin information.
    11/3/5 CheckIn
    • [Boating - Race Status] is the final iteration of this query. Although it has no information on waiting times (to be provided by a separate query), it does show what the opposition is, where they are, and the overall status of the race.
    • The code for this query evolved, and could do with refactoring.
    10/3/5 CheckIn New tables, [RegattaCheckIn] & [Marshals] have been created.
    • RegattaCheckIn is keyed by the crew number and marshalling ID. We don't need race number, since as soon as a race leaves the start, we can delete any checkin data information relating to the crews in that race.
    • We have multiple checkin positions, one of which is denoted in EventData as being the LastMarshal
    • One query that I have needed for a while is to work out what race a crew is going to be in. This allows the starter, or any other terminal, to see what crews are on the water, who their opposition should be, and what time they are due to race.
    • [Boating - Completed Races] allows us to see what races are likely to happen in the near future - ie where BOTH crews in a race have boated, and can therefore be expected to arrive at the start soon. It even tells us where they were last seen!
    • [Boating - Crews in Marshalling Area] gives how long crews have been waiting in the marshalling area - the idea is that we have a max waiting time - after that, they can have a Row Over. The query is quite complex, as it also tells us who they are waiting for, and where that crew was last seen, if applicable.
    • What if they turned up before the allocated race time? The opposition should not be penalised for this! TODO
    • None of this works perfectly for multilane racing, as the logic testing whether an entire race is on the water is merely checking for Duplicate RaceID. [Count - Active Lanes in Race] provides this.
    • [Boating - Crews] fixes this. Basically, it groups by the crew that has got closest to the start, and then lists whatever other crews that crew is waiting for...
    9/3/5 ASP The ASP code now works for any combination of Lanes.
    • Plates generate an extra horizontal rule. It's late, and I can't be bothered to find out why.
    • We can easily use the REGATTA font - just modify the stylesheet to override the PRE tag... My comment regarding nonbreaking spaces (15/12/4) was obviously due to a lack of sleep!
    • Better use has been made of the Dictionaries via the Keys & Items arrays. This should be ported back into clsRegattaEngine.
    • Hyperlinks have been removed for clarity during development
    1/3/5 RegattaDraw Early implementations had the draw itself as a separate DLL. This was abandoned since it was incredibly slow. However, putting the schemas themselves into a DLL does make sense, as the overall execution time has now been proven to remain constant.
    • The main reason for doing this is to simplify the ASP code. Ideally, we should be able to provide a formatting engine that will output valid HTML; in the meantime, however, it is of major benefit just to remove schema and spider definitions from the publicly accessible ASP code. It also means I have several thousand lines less duplicated code!
    • Since ASP is a very weakly typed language, we need a public property to access the internal IDefinition interface, which can then be used via late binding.
    • One point that has come out of the port is that Grouped & GrandFinal support is missing. TODO - this must be rectified before the May Regatta.
    21/2/5 General For a multilane regatta to be run properly, we need more than just a Winner field. Ideally, it should be renamed as 1stPlace, and then 2ndPlace & 3rdPlace fields added. NB: we can, of course, extract this information from the crews competing in subsequent heats - if the schemas are public

    There is also an argument for including a Level field to complement Heat, though we'll have to see what surprises block based draws throw up.

    21/2/5 General More use has to be made of the EventData table, including many of the parameters currently held in the registry. Quite honestly, there is no reason why all data apart from database paths should not be stored in this table, thus making deployment significantly easier.
    19/2/5 Installation DBGrid32 was missing from the installation supplied to Kingston Regatta.
    19/2/5 RegattaDraw Before my meeting with Kingston, various points were discussed:
    • Race Programme for multilane had no crew numbers. This was an omission, and is now fixed.
    • They want the ability to collapse the draw to take account of any scratchings. This will be relatively easy, and would have been written on the train if I had remembered to charge the laptop!
    • They also want to keep heats of one status together. Unfortunately, the draw algorithm does not provide for this directly, though heats do start off as being consecutive, and are only messed with due to doubling.
    • limit how far apart heats can go
    • remember to record the finish order for 3 lane events
    • Add the level identifier to the main regatta table
    • debug function - write doubling columns
    13/2/5 General Bedford Eights & Fours Head 2005 went extremely well, despite the truly vile weather.
    13/2/5 Timing Correction This program had not been converted to Socket based communications, and so was rewritten about an hour before the first division.
    11/2/5 Sockets The first attempt at resuming from a dropped connection worked, at least on the client side. However, when the same library was used on the server, multiple connections were made, and the response time nosedived. Given that we have a major Head starting in 36 hours time, I feel this is not the time to debug a development library. As it stands, comms are at least as reliable as they were under DCOM. The advantages though are:
    • Killing a client process via TaskManager no longer requires a reboot of that machine.
    • Setup is significantly easier, since multiple accounts can be used.
    • Windows 95, 98 and ME can be used.
    The development code allows messages to be cached locally whilst the server is rebooted. Note that egMachineName should never be cached in this way.
    9/2/5 Networking The best way of using my laptop on the day will almost certainly be to apply 192.168.0.x on every machine, with a USB network connection linked into our broadband router. I will also borrow a KVM switch from work, allowing me to run MASTER and SILENT together.
    9/2/5 Sockets Whilst the Server is notified immediately when a Client connection is dropped, the same does not apply in reverse. This is a major problem, but I think that it can be overcome by essentially returning a result from every message that is posted. If (on the client side) no reply is received within a brief period, we can raise the ConnectionLost event. Note that the client socket will return sckConnected regardless.
    9/2/5 StaticData All redundant contacts (ie have not entered since 2002, when my system took over) have been deleted from the database. A few typos in the existing addresses have been corrected.
    9/2/5 Main Database PaymentMade field added to the Payments table.
    8/2/5 RaceManager
    • BUG - Query Terminal Full screen was not terminal specific. RegattaServer.clsServerQuery.FullScreen was at fault, failing to pass on the handle.
    • TODO - click on a node for which there is no specific UI, and the right hand panel should be cleared to the admin.asp page...
    • I now have 3 machines working (JL, QUERY, INTEGRALU). MASTER should be easy, while I will use SILENT for Finish timing and for Internet connection (requires a second network card).
    8/2/5 Installation A full build has now been done, versioned as 2.2.0 - this allows a working installation to be built. Various libraries were missing, including WinSock!
    6/2/5 Entry Manager Rather than amending entries on the main display, I could do with an editor form. This would allow me to search for an entry, and then provide the following:
    • Assign to a different club
    • Assign to a different contact
    • Mark all entries from the contact as paid/unpaid
    • Change status
    • Change division
    • Change racing order
    6/2/5 IDEA
    • At some point I really should port the entire database structure to MySQL
    • Experiment with using PHP Sockets. There may be something useful in there!
    • Why don't I use AccessControl to determine who has authorised a change?
    6/2/5 OARA Not bad for a first attempt, but there are several issues which the ARA needs to resolve:
    • The export function is defective - one crew is missing, and many rowers are missing. The PDF is correct, which proves that the data exists... This is a serious bug - thankfully, I checked every single entry...

      The PDF summary needs the ARACrewID to be listed.

      It would be useful to have a top level option so that crew name becomes optional.

    • It would be really useful to have comments printed on the PDF entry forms, especially since divisions are not yet implemented as we would like.
    • Contact Details on the PDF entry forms should have the 3 telephone numbers on separate lines, since at the moment the Emergency contact's mobile number is truncated.
    • How are substitutions to be handled?
    • Will substitutes not present in the original entry be possible?
    • Composite ClubID is not exported, though it is calculated by the system
    About 10% of our entries have been received via OARA. This is not a huge takeup, but is about what I was expecting for a first run. Our decision not to take online payment was a mistake, with hindsight.
    6/2/5 Mailing Database [Mailing - Notification of Changes] query was unnecessarily complex, having been adapted from something far more complex. I have now changed it so that it supports the new Alterations table, which provides significantly more information.

    The new report is a huge improvement.

    6/2/5 Main Database One of the main deficiencies in the system is the lack of an audit trail. All too often we look at the entry forms, and have no idea why a change was made, when or by whom. The old StatusChanges table was meant to address this, but was never implemented, and fell short of the mark anyway. I have therefore created a new Alterations table, with a corresponding AlterationTypes table in StaticData to handle lookups.

    Unfortunately, I will now need to modify the EntryManager to automatically log changes.

    3/2/5 Socket Library One of the biggest problems that has faced me to date is determining when a client machine has lost its connection to the server. Both Client & Server now detect this automatically. The Server removes the relevant icon, while the Client displays a progress box, indicating that the connection has been dropped. Once the link has been re-established, connection is made automatically.

    Obviously, a further development of this would be to implement a stack - any messages that could not be sent would be stored, and sent once the connection was re-established. Unsurprisingly, its well past midnight, so I really can't write this now :(

    11/1/5 Mailing Database Having looked closely at the AFBR files, it seems that the large size of this file is almost exclusively due to the embedded graphics files. Linking would therefore be much better. The best method would be via yet another record in the EventData table.
    11/1/5 ASP PHP code to interrogate the OARA data would be very nice. Since stored procedures are not supported, I will have to do some initial parsing of this table to work out which rowers are doubling up.
    11/1/5 Databases The EventDetails class needs to explicitly check for NULL in value entries.
    11/1/5 OARA The ARA has now provided me with an updated export file. This is a substantial improvement over the original version (as used by HoR 4s 2004).
    • One of the major improvements is the inclusion of each crew member's ClubID, since composite entries can not be differentiated from normal entries (they both share the ClubID of the ARA administrator who entered them). At the initial demonstration I was told that they would be deliminated by a slash character in the same way as I have always done.
    • This is not a major problem, since I have already written parsing code that interrogates each composite and works out what the ClubID should be. As yet, I have no facility for automatic generation of composite club names, and will probably require a User Interface for this.
    • The output data is in CSV format, not XML as originally indicated. From an import point of view, this is easier, but it would have been better had each field been quoted. As a suspicious programmer, I will try to break it by including an emergency contact (a required field) where a full stop has been erroneously typed as a comma. Maybe the ARA's development team have thought of this, maybe not!
    • Multiple OARA contacts are now possible for each club. This is a big step forwards, and integrates better with my system.
    • Contact email addresses are provided, as well as 3 telephone numbers. This is exactly what I store already.
    • I have written a query to automatically identify OARA contacts who are already listed in my main Contacts table. This will help to prevent duplication.
    • Unfortunately, there are quite a few fields that remain a mystery. WITHDRAWN & SCRATCHED are still undefined, and I must check their functionality instead of making blind assumptions. My gut feeling though is that they probably have exactly the opposite of their roles in my databases.
    • My biggest concern is the lack of a field for DivisionID. This is essential for Head Races, though sadly these are not a priority for the ARA.
    9/1/5 Regatta Demo What a shame that I published the demo setup (all of two days ago)! Since then, I have added loads of extra functionality - the most important being a 4 lane draw.

    Lets go for the full scenario - a 6 lane draw...

    No good - I can't stay awake any longer...

    9/1/5 General Its 4am. I'm coxing at 8am. But when developing code, its best to keep going whilst an idea is fresh in your mind...
    9/1/5 RegattaDraw Many of the clashes are due to race interval only. Ideally, these should be sorted out before clashes are resolved.
    9/1/5 Font The $ character is slightly too narrow. It's not noticeable on printouts, but VDUs show a 1 pixel error. I doubt most people would care, but I do.
    8/1/5 RegattaDraw Funny how the best ideas seem to come after a few beers! Why can't we include a doubling viewer, showing not just all of the crews that are doubling up, but also their doubling type - crew/boat/cox. This is a highly advanced feature, as there is no provision (yet) for different doubling scenarios. The output looks good, and may be helpful for reference. In addition, the new classes may simplify other routines.
    8/1/5 RegattaDraw Since I now have a demo program, I might as well go for broke and write a 4 lane regatta.
    • &nbsp;A new ? code has been added to =&%
    • I don't know whether the crew finishing 4th can ever go through to a repechage. If so, I need to add a new code on top of >}]
    • The schemas that I wrote originally are far too complicated. We don't need to know the outcome, since this can be calculated from later schema items, if required.
    • Spiders ARE possible, despite what I thought when I first considered this. eg:
       (49) Warwick University---------------------------------------{
      |
      (50) Sons of the Thames (B)-{ 1st in R 12 |
      | ----------------$
      (51) Univ of York-----------$ 2nd in R 12 ~----------------
      ~--------------- ----------------$ Race 28 10:54
      (52) Bedford High School----$ Race 12 09:22 3rd in R 12 |
      | ----------------}
      (53) St Edwards School------}

    To get the spider shown above to work, I have had to add several extra formatting codes. FXY extends W. Don't confuse FXY with WUD - they refer to completely different scenarios.

    I'm now very glad that I used interfaces throughout the code. Adding in support for 4 lanes has taken just under 3 hours, though obviously it will take considerably longer to write the schemas and spiders. The RegattaEngine itself doesn't care how many lanes are being used - doubling up, race list composition and spider generation work regardless.

    8/1/5 RegattaDraw Bug found in schema for 3 lane, 6 entries, no repechage. I have therefore written a debug function, VerifyHeats, to catch this.

    Missing Repechage flag found in 3 lane, 5 entries, repechage. VerifyRepechage catches this.

    7/1/5 RegattaDraw frmRecordset has now been removed. I have now tested the program without ANY database, and all of the functionality works :)

    I have also created a setup program. This has been tested under Windows XP Pro SP1 and Windows NT4 SP6a

    7/1/5 RegattaDraw The references to VBE etc in the project file are superfluous, and can be removed. We should also check whether the code runs properly under ADO 2.8 - after all, 2.5 was released a long time ago...
    7/1/5 RegattaDraw Its 3 in the morning, yet again :( But I now have a fully working Demo program. It has a separate project file, which uses conditional compilation to set its mode. Virtually all of the XML was generated automatically, but SpiderBase.xml needed the Name fields to be modified so that rs:writeunknown="true" was set. If this is omitted, a multiple operation error is generated, which is extremely hard to diagnose :( It should be possible to add this via XSLT, though I am unfamiliar with the technology. All of the existing functionality is present, apart from the following:
    • Sponsors for Groups and Plates are shown as the default value.
    6/1/5 RegattaDraw The system, as it stands, is pretty good. However, it is impossible to demonstrate the RegattaDraw system without shipping the underlying databases. There are less than a dozen places where database access is required: I therefore am working on new functionality that allows a demo to be run from saved recordsets. The idea is that I run in debug mode, saving all recordsets to XML files. Then I can build a demo system that uses these files instead of having to access a database. It may be some time before this can be fully implemented, but I am sure that it has huge potential. Obviously, I don't really want it to be fully functional, so there will have to be some careful protection code built into Entries.xml

    This involves a major change to the structure of the code - every command, recordset and parameter needs to use one of the new generic functions

    5/1/5 General I've had a problem for a while in some of the databases, saying that functions such as MID and FORMAT are missing. This is actually a completely bogus message - what it actually means is that we have a missing reference in the VBA Editor... The comment for 24/8/3 was almost certainly due to this.
    5/1/5 General NextRace & PlateRace fields have now been removed (see 5/12/4). All databases and libraries have now been modified to take these changes into account. The reason for the change is simple - 1stGoesTo & 2ndGoesTo are better field descriptions, given the possibility of running a 3 lane Regatta, and the fields are thus uniformly named throughout.
    5/1/5 RegattaDraw
    • Groups can now have their own event numbers eg A=15, B=16
    • Plates can come at the end of the event number sequence eg S1.8+ = 2, S1.8+ (P) = 34. The code to make the spiders reflect this is rather ugly, but does work - essentially, we put a special marker in, and write all of the plates to the stream at the end of processing.
    • One problem that has hit me several times is an out of date RegattaDraw table - if it does not contain the right data, the draw will miss out some statuses and have non sequential event numbers. I've therefore added an extra query which will add any missing data to this table. Note that it does not matter if there are redundant rows in this table, since the Draw itself uses List - Statuses in Draw throughout.
    • Extra DragDrop checking code has been added to ensure that Plates & Repechages only apply to statuses with more than 3 entries.
    5/1/5 Databases I have now found the solution to backing up database objects, and being able to do a meaningful comparison on them. There are several completely undocumented functions, which I have now incorporated into an Access AddIn (just figuring out how to write one of these took the most time!) We have a slight problem exporting some Table definitions, so this feature has been disabled for the time being.
    4/1/5 RegattaDraw All schemas and spiders for 3 lanes have now been written and tested. Kingston have no data for Entries = 16 though...
    1/1/5 General Happy New Year!
    31/12/4 RegattaDraw Now that the Thames club has sent me some old programmes, I have an idea as to how to do a printed programme for a 3 lane regatta. This should be nice and easy...
    31/12/4 RegattaDraw IDEA - if we swap crews, then we should save the changes in a table and rerun the draw, with these loaded immediately after PopulateRaceList. We can then ensure that the changes do not create clashes.
    • Clash Resolution can now run in one of three modes - 1st Round ONLY, 1st & 2nd Rounds, or ALL Rounds. The original check box has therefore been replaced with a series of option buttons.
    • Obsolete controls for Gap specification have been removed, as we now use a far more powerful methodology.
    • StatusesIgnoredForPlate removed. This was very awkward from the beginning, and has now been replaced by a more flexible system. We'll have to check that the ASP code still behaves properly.
    31/12/4 RegattaDraw The sequencing bug is still there. I have caught the reason for this occurrence - it was an incorrect Level tag, which put a repechage at the same level as its outcome. Fortunately, this happened early enough in the clash resolution to be caught. We now have a checking function to ensure the validity of a schema. This runs in debug only, and ensures that this bug can never occur, since I always run in debug when creating a new schema.
    30/12/4 RegattaDraw GTD has just made an interesting observation - statuses that are collapsed on race day are non qualifying, in his opinion. We'll have to check the rules in detail on this one...
    • Finish timing done at the finish should be done in conjunction with the radio link, at least to begin with, to compare and contrast.
    • Star Club CheckIn position to be coded for the Regatta. We also need some way of showing what time the previous rounds actually raced, so we can determine which crews are almost certain to be late.
    21/12/4 RegattaDraw A conference call with the Thames Club tonight has confirmed that several ideas that have been in the pipeline for a while would actually be useful! The main problem with adding extra functionality is that I don't really know whether the new features will benefit anything beyond my imagination...
    • Shorter turnaround times for coxes. Only really possible under OARA, as it will be very difficult to implement with manual entry. Not impossible from a coding point of view, but very confusing for whoever is taking entries.
    • Status Collapse. If multiple crews scratch on Race Day, it will be fairer to the remaining crews to redraw the status. Race Control now has the functionality to view which statuses can be collapsed, but the actual code requires reference to the schemas, which are not at present available within MPIServer. An alternative would be to build RegattaDraw as a COM object, thus exposing its methods to other programs. This would be preferable, since it would remove the need for code duplication and hence the possibility of compatibility problems.
    • Proportional fonts would be nice. The key to this is an API call, GetTextExtentPoint32. It should be possible to define an em space of minimum unit width in order to preserve formatting. This will be extremely difficult, but probably achievable.
    • IDEA - instead of trying to resolve ALL doubling, why not just the first two rounds??? This is resolvable, whereas the full resolution is almost certain to fail. All I need do now is to work out a good method of specifying this...
    15/12/4 RegattaDraw Gap details are now loaded from & saved to a new table (RegattaGaps).
    15/12/4 ASP The new Regatta font now overrides $ to sort out multilane formatting. It is now complete, so we need to retrofit this (ie -| becomes -$). This can be most easily done in FormatEscapeCodes. In order to get this output on a website, we need to convert all spaces in the spiders themselves to nonbreaking spaces. The advantage of this is that we no longer need PRE tags, so can format headings in whatever way we like.
    11/12/4 RegattaDraw
    • NumberRaces & CheckSequence have been extensively modified, now using common functions. This allows future developments to be made consistently throughout the application.
    • Spiders for both 2 and 3 lanes have been modified to use the new Regatta Font. Ideally, we should include an option to turn this off. A boolean variable exists, but there is no way of altering it. This should be implemented at the same time that ISpider is stripped out.
    • The R tag has been removed. My next target is the A tag, which should really be W.
    • Scrolling pages do not work under Mozilla Firefox 1.0, though everything else appears to be displayed properly. ScrollWindow is called just the once, so it appear that SetTimeout is not firing. I need to check HTTP_USERAGENT to catch this...
    9/12/4 RegattaDraw The code changes made over the past few days probably represent the most significant development of the Regatta Draw system since work started in April 2003. The entire sequencing engine has now been rewritten in order to provide maximum flexibility. Extensive debugging will be required, but I have nearly 5 months before this system is to be used in anger.
    • Turnaround time is now specified internally in minutes rather than in terms of races. In itself, this has no benefit, but allows other functions to be implemented.
    • Statuses can have custom turnaround times. This will probably be of little use generally, but does allow such things as tub pairs to be scheduled correctly (where there are only a couple of boats available).
    • A further development from this (yet to be implemented) is a variable race interval. For example, the first hour's races could go off at a 2 minute interval, and then 2.5 minutes thereafter...
    • One of the biggest problems with the draw system to date has been the gapping. Gaps could be assigned on one hour increments after the Start Time only, and would be of a fixed duration throughout the day. Since Turnaround time is now defined as a time, clash calculation is by necessity time based - hence gaps of variable length can be handled, and do not have to be multiples of the race interval.

      The current build includes 2 gaps, of 15 and 30 minutes. Now that the functionality has been proven to work, I can now write a gap editor.

    • Decorated spiders should now be recreated. The font has been further enhanced with the -#- sequence replacing -|- This gives properly formatted output on 3 lane spiders.
    • Potential flaw found in CalculateClashes: Cyan was being used to denote a compound clash, even when multiple clashes in the same direction were detected. This could allow the system to erroneously move a race down, when in fact it should have gone up (down taking precedence), and hence cause uneccessary complexity.
    • TODO - AddClash should allow resolution of multiple clashes generated by the same race.
    • Much of the new functionality should be optional - we will probably want to keep to a standard Race Interval, for example, in all but a few regattas.
    • TODO - I don't think that %A or %R can actually occur. Also check whether %W+1000 is valid.
    • Gap Editor is now working, though it MUST save to somewhere. I suggest a RegattaGaps table???
    • ALL of the schemas for Plate events need modifying so that they know where the loser is going to... See code comment #101204-0139
    • The R schema tag is now redundant, and should be replaced by U throughout. With this change, many of the complexities occasioned by Plates can be removed, and will become a standard part of the repechage system.
    • AssignHourGaps bug fixed - gaps no longer have to be added in chronological order! The bug caused non ordered gaps to run consecutively!
    • The new sequencing engine gets stuck more easily, but has not been known to cause the sequence error so far (see 4/6/3). If this error can be proven to have been eliminated, then the checking code can be safely removed - after all, NumberRaces does do a final check :)
    • Several minor improvements have been made to the clash resolution. In particular, we no longer move any cyan items, since a movement in either direction will not help.
    9/12/4 RegattaDraw The Thames club has thrown a real spanner in the works - they run 3 lane events for some statuses, and 2 lanes for others. This was impossible to accommodate with the existing object model, and so the object model has been completely rewritten:
    • Previously we have created a separate class for 2, 3 and 4 lane regattas. All of these have now been replaced with a single RegattaEngine class.
    • The RegattaEngine is a great improvement. Polymorphism sounded like a good idea at the time, but required much of the code to be duplicated between the three classes, hence making bug fixes/enhancements harder to retrofit.
    • clsStatusList is a new class, holding a collection of clsStatus objects. These are self aware, and so can have independent lane patterns.
    • A few plate events have been implemented for 3 lanes, just to provide proof of concept. I'll probably tackle these in full later on (its 3am).
    • Extra steps have been added to the wizard, allowing full configuration of Lane, Repechage and Plate combinations. The functionality is implemented via DragDrop for ease of use.
    • The event numbering code has been tidied up, since many of the assumptions made for 2 lane events do not hold when we move on to 3.
    • TODO - GrandFinals and Groups should really follow the same UI model.
    • Many redundant classes (eg clsProgress) have been removed for simplicity.
    • TODO - ISpider & IRegattaParameters have no purpose, and should be removed: there is no need for an interface any more.
    • Many of the collections eg m_cStatusesIgnoredForPlate should now be redundant.
    5/12/4 General I'm dammed if I'm going to take this crap from the bar staff. I will work at home from now on, save myself a small fortune, and make my club slightly poorer. No matter what they think, this is a rowing club, not a private drinking club. Today has been a slight exception from the norm - ie I am coding for myself, not for the Club, but who cares? I put enough time and effort into this place! Whether or not I have been out of order, I have apologised. Since that apology was not accepted, Dottie can go to hell.
    5/12/4 Database NextRace field is virtually obsolete. PlateRace was an improvement, but 1stGoesTo, 2ndGoesTo & 3rdGoesTo are more flexible. All I need do now is modify the various queries (and the cls_2_Lanes code) to take advantage of the new fields. This also removes the requirement to have a separate MultiLane table. Extra queries are needed for any race with more than 2 lanes, but this does not pose a problem.
    5/12/4 StaticData All clubs in the current list (supplied directly by the ARA) have been entered. Most of these were Scottish & Welsh clubs, for which I have no blades yet. (Or rather, I've ignored them, as I didn't have the codes!)
    4/12/4 Regatta Draw Following a query (from a Thames based Club) I have developed a 3 Lane Draw, including support for Repechage or Plate events as applicable. The spiders need to be extensively modified in order to cope with a repechage system, but are certainly close to working eg :
    							
    45) Veteran C Sculls

    Guildford RC (P Hopkins) (173)-----
    |
    Nottingham & Union (Stevens) (174)-|---------------------------------
    | Race 1 09:10 |
    Guildford RC (Woowat) (175)-------- |
    |
    3rd in Race 1------------------ |
    | |
    2nd in Race 3------------------|----------------|
    | Race 41 10:34 |
    3rd in Race 2------------------ |
    |----------------
    Nottingham & Union (Murch) (176)--- | Race 96 12:32 |
    | | |
    Bedford RC (Dickens) (177)---------|--------------------------------- |
    | Race 2 09:12 |
    Norwich RC (Kippin) (178)---------- |
    |----------------
    Star Club (Parker) (179)----------- | Race 145 14:18
    | |
    Nottingham & Union (Chmiel) (180)--|--------------------------------- |
    | Race 3 09:14 | |
    Guildford RC (Larcombe) (181)------ | |
    |----------------
    2nd in Race 1------------------ | Race 98 12:36
    | |
    3rd in Race 3------------------|----------------
    | Race 42 10:36
    2nd in Race 2------------------

    This was generated by the system after about 7 hours of formatting information going in, and a few beers whilst recoding the sequencing engine :) Very little change was required to the engine itself, merely a few extra codes for the repechage, which the existing code interpreted without problems.

    One slight issue was the layout of the spiders, which ideally should show a repechage at a level between the heats and their next round. The spiders themselves follow standard formatting rules, while the code takes care of the indented layout. This seems substantially easier than rewriting the formatting engine, and adding extra layout codes to the spiders...

    Schemas have been defined for 2-9 entries, while the spiders are still subject to revisions, since I was not aware of the existence of Plate events when I started writing them (and the fact that its been less than 36 hours since the club proposed the idea!)

    Amazing what a few beers and a good selection of music can achieve. All spiders and schemas up to 11 have now been written and tested. The full output, including winners, is rather hard to interpret at the moment - the spiders may well have to be amended to make them display slightly better.

    Although I have data for 13 entries, I won't bother with it for the moment, as the battery on my laptop is running out, and what I've written so far provides a more than adequate proof of concept. At the moment, all statuses use the repechage system, though we must eventually take into account the plate events.

    I think I have the blades for all clubs who entered this regatta in 2004. Apart from Calpe, whoever they might be. (NB: They are based in Gibraltar)

    27/11/4 General The rewrite has been extremely successful - I now have Query, Commentary & Control running, though the full functionality of Control has not been tested yet. Since the framework for the others exists already, all I really need to do now is to modify the client programs.

    OARA integration is proceeding very well, with several new ASP pages:

    • CREW.ASP: All pages provide links that allow the composition of a crew to be viewed. If a rower/cox is doubling up, then their ARA number will be a hyperlink to ROWER.ASP
    • ROWER.ASP: This shows all statuses that a specified competitor has entered, and provides full hyperlinks to the main results system.
    • COMPETITORS.ASP: This shows all competitors (that have been entered via OARA), and allows sorting by either ARA Number or Name.

    We now have unprecedented functionality: potentially, we can automatically determine doubling up (boat sharing is not available in the Fours Head data, but should be included in OARA 3.0). This removes what is probably the most difficult task in dealing with postal entries for a regatta - working out the doubling up. Very few clubs provide accurate doubling information, so at present I have to manually go through each entry form, checking it against all the others. Unsurprisingly, this takes a very long time, and has a high probability of my making a mistake...

    So how to deal with this information? As I will need a macro to import OARA data into my main entries table, I can also create the doubling information. However, we will need an additional field to record any extra doubling information, such as boat sharing or doubling with crews that have been entered manually.

    26/11/4 General The ARA have kindly provided me with the data output from the OARA system for the Fours Head 2004. This should allow me to develop the system prior to OARA 3.0 going live on 17th January 2005.
    25/11/4 Race Manager Nearly forgot to mention this! My employers have decided to change the look and feel of our server application (funnily enough, it started life as a port of MPIServer & Race Manager). Feedback from our customers has been very positive, so I've rewritten the user interface for the RaceManager. (No doubt some of my enhancements will filter back to my job!) It now uses an MDI form, with multiple child windows, each representing a different client application. It is easier to configure and use, and also gives scope for future enhancements, such as client specific homepages for the query terminals.
    25/11/4 General DCOM has proved highly unreliable over the past few events. Once it is up & running, everything is fine, though an unexpected termination of the server requires a reboot of the entire network (since the GIT - Global Interface Table - points to a section of invalid memory). This is unacceptable.

    However, I am reluctant to lose the obvious benefits provided by MPI, namely the existence of multiple, independent message queues. I have therefore begun work on a completely new communications model, which uses TCP/IP sockets to communicate between the various machines on the network. MPIServer remains largely intact, though none of the clients now reference MPIClients. Instead, they communicate directly with a proxy server over TCP/IP. This proxy incorporates all of the classes of the now defunct MPIClients DLL, and communicates with the server via MPI as before. We therefore retain queue based messaging, but with considerably more reliable communications.

    A further benefit of the new communications model is that we are no longer reliant upon Windows NT (and its derivatives, such as 2000 & XP). Providing that TCP/IP is installed, the new client programs will work under Windows 95, 98 and ME, which remain widely used in home computing. Theoretically, clients could also be written for UNIX derivatives such as LINUX, MAC OS, Windows 3.11 etc. - though this is beyond my remit!

    Obviously, we will need to comprehensively test the new system. Commentary & Control are already working, though are limited to a single instance until I sort out the keying system. Skeleton code exists for all of the other classes, though the internal sockets remain unaware of the significance of the MessageTypes being passed to them. This may not actually be an issue, since ConvertSocketToMPI allows automatic conversion of messages (its 2am at the moment, and I don't have a network on which to test this).

    This is probably the most significant change to the system since the advent of MPI in mid 2001, and the subsequent move to a distributed system.

    5/10/4 Admin Statistics - Divisions created. This is the first query that really makes use of the new EventData table, giving an obvious indication of how full a division REALLY is - not just Mingay's opinion :)
    5/10/4 ASP 369 blades now listed. I've run out of BigBlade photographs and club websites - any further development will be significantly slower. In addition, there is the concern that BigBlade may show borrowed blades, of which I am unaware. Further amendments will be required, I am sure...

    However, this gives me the unprecedented ability to show blades of ALL clubs entering the event, even when 2 of them have never entered before :)

    5/10/4 Mailing All reports now use EventData instead of RegattaOptions.
    5/10/4 EntryManager The mouse buttons on my laptop are playing up - need to check that basic operation of the entry system can be performed with keyboard only.
    5/10/4 Admin New query added to show any statuses that are running as a private match.
    5/10/4 General Numerous small changes have been made, which are listed fully in SourceSafe. They include:
    • All programs have been reversioned, allowing me to diagnose installation errors.
    • PHP code has been upgraded to show blades throughout, and to use global $m_sBase as the standard request parameter.
    • Obsolete linked tables have been deleted.
    • Full ARA Club Codes imported, and the delisted clubs noted. For this, we now have Registered and Ceased fields in the Clubs table - allowing me to track ARA registration status.
    18/9/4 General RegattaMessages.dll now used to display properly formatted error information in the Windows Event Log. Some support has been added into the installation program, but so far, only the EntryManager implements this. TODO
    18/9/4 OptionEditor Output & Backup folders are now displayed correctly from the profile. In addition, selection now uses a proper folder listing, instead of my previous clumsy workaround.
    18/9/4 Start & Finish The system will now cope with running a race where either or both of the competing crews are unknown - ie they are shown as Winner of Race 97 etc. As a further enhancement to this, the server will automatically fill in the relevant data if the result of that race is subsequently entered. We can now, therefore, enter race results in any order without the system falling over :)
    18/9/4 Start Regatta Start now has an option to invalidate a Start Time, entering it as NTT regardless. Full code has been added to both the Client and Server to handle this.
    18/9/4 EntryManager Menus for Sponsors & Division Weightings are shown/hidden according to whether or not the event is a Regatta.
    18/9/4 EntryManager Head Race Division Weightings have been causing a compile error for some time, plus a RunTime Error on display. This has now been fixed. The problems were several: missing database at compile time; missing database + invalid SQL at load, and missing ENTRYINFO table in the SQL.
    17/9/4 ARA Its here at last - the much vaunted, and much anticipated ARA entry system.

    The Head of the River Fours has been chosen as the pilot event - I hope for their sake that the system is as good as its meant to be! I'm not knocking it, but know how hard it is to roll out a brand new system when nobody's told you the full story...

    Ideally, I'd like to trial this for the Eights & Fours Head in February 2005 - given that most of our entries come from schools and colleges (who are meant to be IT literate, according to the Government), we have a reasonable chance of a high take up rate. Unlike HoR 4s, we can't demand that all entries are made in this way, since we have a harder time attracting entries than they do :( I'm hoping that the ARA will let me create a dummy event, hidden from the general public, and experiment with the various options - particularly in how I can interface it with my existing Entry Manager, and the complex database system required to run & administer an event on Race Day itself.

    The ARA's idea is brilliant - anything that takes some of the hassle out of running an event is to be applauded - but it must be remembered that there is a lot more to a system than getting the entries in and outputting the results (which the ARA claims will be its main benefit). (NB - this section is being forwarded to the ARA for comments). HoR 4s can specify that all entries will be taken via the OARA system, which means that they can do their draw, and have a simple mapping function (between crew and entry numbers) to output their results.

    But what about the rest of us? We'll be taking entries by post, as well as via OARA. Cambridge Autumn Regatta even takes telephone calls! Many crews will not have a full complement of ARA numbers - either because their members are new to the sport, or because they haven't renewed (mine expires at the end of this month, and hence I don't appear in the OARA system as eligible to race in HoR 4s - should I be prevented from entering simply because my renewal is currently being processed?).
    NB: Online renewal works extremely well: within a few seconds of WorldPay validating my credit card, I was eligible to enter the Fours Head via OARA. The only problem is that my membership number is no longer 48907 :(

    Note: I still haven't received my new ARA card, and its now 25th November...

    Do we, as event organisers, have to manually input the ARA numbers and Day Ticket numbers (at the moment a necessary evil) into the OARA system in order to submit our results? If so, then this system, which has SO much potential, will fall flat on its face - anyone reading this page (as an event administrator) already has too much work to do!

    And what about those events who don't have access to online payments? The OARA system will, in that case, be as much of a nightmare as telephone entries - you have a statement of intent to come, but very little comeback if the crew decides not to turn up after all. Do we say that all entries must be confirmed in writing, with payment, for a place in the Draw (as otherwise we'd effectively be denying places to crews who genuinely intended to turn up)? If so, what benefit over the existing method of making entries does the OARA system provide?

    This section has gone on long enough! I'm prepared to trial the system, and genuinely hope that it succeeds. But the ARA must remember that there are other Heads & Regattas out here apart from HoR 4s and the like - the majority of events in this country are run by small provincial clubs, often on a shoestring budget.

    17/9/4 RegattaDraw Cambridge Autumn Regatta has proposed a radical change to the draw system. Rather than have fixed intervals between races, they would like to be able to specify, for example, that all heats run at 2 minutes, but finals have a 3 minute interval. AND there'll be a 15 minute gap before the finals take place.

    Is this possible? We have two options:

    • A manually created schedule is imposed after the draw has taken place
    • Custom timing is incorporated into the race list, so that doubling resolution can take account of it.

    Its obvious which is better - however, getting the race list to do this will be a significant change, and will significantly complicate the algorithm, since we'll no longer be able to rely upon adjacency.

    17/9/4 Mailing List - Runners & Riders has been a big problem in the past. It's now been amended to show Row Overs, but to exclude them if the next round has taken place. This preserves the existing functionality, but prevents ancient history from remaining on the update sheets... Don't even try to edit the SQL by hand, as its rather complex by now :)
    16/9/4 ASP 290 blade colours are now included.
    16/9/4 ASP TODO - PHP needs the latest spiders, which have been heavily modified recently
    16/9/4 ASP PHP schemas modified to correct the bug in {3}
    11/9/4 ASP ASP code modified to use the latest versions of the spiders.
    11/9/4 General Regatta Font created to allow seamless display of spiders. Our printers can use any TrueType font, so this will let me display the spiders better - ie the lines will be continuous :)
    11/9/4 RegattaDraw Spiders for 3 entries have finally been fixed, so as to use standard formatting.
    5/9/4 RegattaDraw Icons added for swapping, and the Next button changes caption.
    5/9/4 EntryManager frmComposites no longer unloads itself - this was a problem as it wasn't recaching its data.
    5/9/4 RegattaHelper Code modified to prevent the above crash.
    5/9/4 EntryManager All message boxes are now flagged as Important. This is necessary, since otherwise a "can't show non-modal form while modal form is displayed" error will be thrown, which calls LogError, and a stack overflow occurs.
    3/9/4 Database EventData table added. This contains key/value pairs, and ultimately will replace much of the information currently held in the Profiles. It also allows a database to be self aware - ie it knows which mySQL EventID to export etc. The other big advantage is that this removes the need for the Mailing Database to reference regattaoptions.dll - instead, a class module can do all of the work for us.
    3/9/4 General The system has now been tested under Micro$oft Office XP, and appears to work without problems.
    3/9/4 RegattaDraw Clubs are keyed in lower case to ensure that the upper case search & formatting codes work properly.
    3/9/4 RegattaDraw Couple of bug fixes made within the spiders:
    • They were assuming that GrandFinals existed for 12-16 entries, whereas the schemas did this properly (see comment 2/9/3)
    • Spider13 contained H.11 instead of H11
    • When asking whether we want GrandFinals, check the parameter value, not a hard coded 16
    3/9/4 RegattaDraw New page added, allowing you to swap the order of crews within the Spider (and hence within the racelist itself)
    3/9/4 Help System The way to get around RoboHelp's memory limitation (see 18/7/4) is to use the maxmem switch within BOOT.INI This limits the amount of memory that Windows can use. 190Mb works fine, and at a reasonable speed.
    20/7/4 RegattaEditor Program created and support added to both MPIServer & MPIClients. This should prove very useful for the Cambridge Autumn Regatta, which is happening very soon
    18/7/4 MPIServer
    • Crew name repeating bug fixed (applied to commentary)
    • When we take up a status change, we should withdraw a crew, not scratch it. TODO - payments will now be wrong.
    • LastWin information removed from commentary.
    18/7/4 IDEA It would be really useful to have a Regatta Editor, which would allow race verdicts/outcomes to be modified. This would also serve as the Offline method of entering results - vital for those Regattas which do not run a full network on Race Day.
    18/7/4 StaticData Compatibility broken

    In order to make the system easier to distribute, I have rekeyed the Clubs table so that it uses the standard 3 letter club codes published by the ARA. This will take a bit of getting used to, since virtually all of them have changed - Bedford Rowing Club is now BED instead of the old brc. However, I believe that this change should prove useful in the long run.

    Update Since the Salvage Report, all boats racing on the Tideway require a unique name, which has been agreed by the ARA to begin with the Club Code. Familiarity with these is now extremely useful!

    18/7/4 Mailing New report has been created to print off a sheet of labels to be affixed to the Entry Forms. These show the crew number in bold, as well as the status at which the crew will actually be racing, which may be either very difficult to read on the form, or completely different to the status that was entered. This makes Control significantly easier.
    18/7/4 Intranet Winners can now be sorted by Club, if required (request from LMS).
    18/7/4 Entries Main screen layout has been changed yet again, following comments from Gavin Dods. Many changes:
    • Other entries at status added. This is especially useful when a status is nearing capacity.
    • Withdrawn checkbox removed - we don't need to be able to modify this whilst doing entries - it also removes the possibility of confusion over my nomenclature.
    • Statuses menu added - this allows us to alter the statuses accepted. This was an omission that was highlighted whilst I was in Australia - Gavin was unable to enter any eights into the system without a registry modification.
    • Age calculator finally works properly.
    • Sponsors names are now sorted by Name instead of SponsorID. This makes adding sponsorship details MUCH faster!
    • Search form amended so that statuses can be searched for. This functionality was there before, but the automatic interpretation of search criteria was defective.
    • The EntryManager no longer requires the Server to be running - this was not a problem for Heads, but caused all entries at a Regatta to need a Division. Again this was picked up whilst I was in Australia, as Gavin carefully closed the Server, which ran automatically on logon! This may also have been contributory to my being unable to get the system running on Windows ME in September 2003...
    18/7/4 OptionEditor New function allows a single step only to be shown. With this we can modify, for example, the statuses without being able to change profile or alter the database paths.
    18/7/4 Intranet The results pages displayed on our intranet on Race Day itself have been modified to include blade colours. This is now possible since I have drawn the colours for virtually every club that commonly enters our events, plus many that don't. At last count, the list included some 240 clubs, and is growing steadily :)

    In March 2006, over 450 blades were defined!

    In February 2012, 622 blades were defined!

    18/7/4 ASP After Bedford Regatta 2004, I have extended my list of blade colours. Now at about 240 clubs, it would appear to be the most comprehensive UK listing available. All are signed as Havox Software Development, and have as small a palette size as possible in order to reduce download time to the bare minimum.
    18/7/4 Regatta Statistics A new program has been created to view Regatta Statistics - Gavin Dods' long awaited management screen.
    18/7/4 ASP All of the display functions have been ported to PHP running off a MySQL database. This allows quick and easy porting to a commercial website, few of which support Microsoft Access (without my paying serious money).

    18/7/4

    General

    Since the help compiler refuses to work on machines with more than 192Mb of memory, this file has not been updated for a while.

    NB Its no longer used at ALL! This page has been standalone for years...

    23/10/3 OptionEditor Need to ensure that all movement between pages works correctly. Ever since I added an extra page in the middle, its been completely messed up...
    13/10/3 ALL Bedford Autumn Fours & Small Boats Head went very well. The software worked perfectly, with no runtime errors or other glitches
    10/10/3 MPIServer CrewWithdrawn bug fixed - if we are running a Head, why would we want to carry crews forward to the next round?
    10/10/3 TimingErrors Minimisation error fixed.
    10/10/3 Entries frmEntries.chkARAFormOK now updates the grid on the fly.
    10/10/3 Entries frmNewEntry.chkPaid now works. The problem lay in ADO's handling of default values, coupled with failing to notice IsDirty... See the code for further details.
    10/10/3 Entries PerformDraw now deletes any Times & TimesElapsed before attempting to delete the Crew Numbers. If we didn't do this, the deletion would fail.
    9/10/3 ASP Completed Events modified yet again, this time to take disqualified winners into account...
    9/10/3 Admin There are many obsolete queries in the admin database. I have renamed them under the OBSOLETE prefix, but will not delete them for the time being.
    9/10/3 HeadRace A Head Race Draw is now randomised, so that a large block of entries at each status (from the same contact) do not necessarily race in procession. The RNG is seeded from the Entry number, so the process remains repeatable... It doesn't always help, but is at least better than before :)
    9/10/3 ASP Head race results pages standardised, so that DNF is shown properly. I'm still not entirely happy with the plethora of closely related queries, and all the complex and time consuming type conversion that has to be done - there MUST be a better way of doing this?
    9/10/3 RegattaDraw Since the Head race has a couple of events with more than 16 entries, I thought it might be a good idea to test the RegattaDraw again. Sure enough, it fell over, due to my overlooking the fact that plate events where there is no grand final need to have race numbers decremented by 1. Unfortunately, this requires a major change to the schemas, though the spiders can be modified in code. This has now been tested for 17 & 25, and works perfectly.
    8/10/3 TimingErrors Web page now updates immediately, and doesn't show crews with negative numbers (new feature to avoid record deletion & hence crashes).
    2/10/3 ASPDatabase [Payment - Statistics] modified so that it shows payment info for contacts who have not yet paid anything. This allows payments.asp to function correctly...
    2/10/3 Entries Bug found in AddDTs. When you made the first entry for a contact, and add DTs before making the entry, the person's details appeared correctly, but the DT request was made to the last contact used (ie the one shown on frmEntries). This has now been resolved.
    2/10/3 Entries Bug Fixed. It was caused by the QueryUnload function, with UnloadMode=vbFormOwner. I've put in a workaround solution, which is not very elegant, with an error message in case it fails.
    1/10/3 Entries RTE 91 in AddPayment. It happened every time a payment was made last night, but I cannot reproduce the error today. It has created the payments, but not recorded any cheque details... For some reason, m_rstCheques Is Nothing, even though it is being initialised correctly. I've put in error messages to warn of this, and hopefully some code to trap it. It may be better to do the whole thing properly with an Update Query...
    1/10/3 Installation
    • Splash screen created
    • Custom types dialog now working, though the descriptions could do with being somewhat more helpful
    • Full menu structure created
    1/10/3 ALL With just 10 days to go until the next event (why do I always seem to make major changes at the last minute?), this will need yet another round of extensive testing. However, since all of the objects now follow a uniform connection methodology, any change to one should be directly applicable to the others. It appears to work perfectly for single instances, though multiple instances will probably require a bit more testing...
    1/10/3 MPIClients, MPIServer The reason for breaking compatibility was to improve the RaceManager. Previously, each client would add an item to a standard ListBox control, and would set the ItemData property to try to identify multiple instances. This worked, but relied upon a resource file, which could not be updated by anyone apart from the programmer. A much better method is to use each program's icon in a ListView control, though for this to work properly, we need MPIServer to be able to report to RaceManager which machines it is currently communicating with. We can then key by machine name, plus a new unique ConnectionIndex. This replaces the previous methodology for multiple clients of the same type.
    1/10/3 MPIServer Compatibility broken yet again.
    1/10/3 MPIClients Compatibility broken yet again.
    26/9/3 ASP Database [List - Qualifying Statuses] no longer lists any Juniors below J16 as qualifying.
    26/9/3 ASP Database [List - Regatta Winners] converted to a UNION query. The problem lay in groups with a Grand Final, which would cause the same crew's name to be listed twice. By creation of a new [List - Regatta Winners of Groups] query, we can put in the special case, UNION the two together
    26/9/3 Help Statistics generated. This serves no actual purpose, but does give (for the very first time) an indication of how large this project has become:
    • 12 Programs
    • 4 DLLs
    • 37532 lines of code
    • 6647 lines of ASP code
    • 26 database tables
    • 365 database queries
    • 29 database reports
    26/9/3 OptionEditor The table links in the ASP database are now refreshed.
    26/9/3 OptionEditor We now have the ability to specify a folder for backup databases to be copied into.
    26/9/3 ASP Databases It also seems that where there were differences, it was normally because of improvements to one or the other. Generally, the regatta stuff is more up to date, especially concerning payments, and has also been more thoroughly optimised. The standardisation process has therefore been extremely helpful in ironing out various inconsistencies, so hopefully the website code will now be substantially more robust. All queries have been verified - the only slight danger is that some of the queries may reference a generic query instead of a new Head Race specific one...
    24/9/3 ASP Databases We could really do with combining the two different sorts of ASP database. Many of the commonly named queries differ very slightly in the fields included, so we might as well standardise as much as possible. ASPCam2003 now contains everything - there's only about a dozen queries that differ in output, so it should be quite easy to accomplish.
    24/9/3 ALL All programs recompiled as Version 1.4.1
    24/9/3 HeadFrontEnd All queries checked for syntax. I think that everything now works as expected.
    24/9/3 HeadFrontEnd [Timing - Mark TimeID as invalid] query created so that we don't have to delete TimeIDs, which can, under exceptional circumstances, break MPIServer. The query sets the Crew number to a negative number - NB: it does NOT toggle polarity.
    24/9/3 Database [Timing - Errors] query modified so that a non-matched Start/Finish pair does not flag the Duplicate Numbers reason as well as the missing timing info. This makes it quite a bit easier to read, and is done with a couple of subqueries on the first clause of the UNION statement.
    24/9/3 Timing TODO: we ought really to check that the TimeID that we are amending is in the list of errors!
    24/9/3 ASP ResultsbyStatus now loads MUCH faster, as the query looks for what statuses have raced so far, and ignores the rest :) It also now uses 80% width <HR> tags to avoid the club crest.
    24/9/3 ASP InitialisePage now takes a parameter to denote whether to write the stylesheet info. This is important, as it allows us to do page redirection more easily. If we don't have to do a redirection, we then call InsertStyleSheet.
    24/9/3 Microsoft Access Here's an odd one: if you create a query called, for example, [Select - Crew from TimeID], Access complains that the input table or query cannot be found. What its doing is interpreting the query name as a valid SQL command - get rid of the FROM, and everything works OK...
    24/9/3 MPI clsTiming created. I now need to code the MPIServer to handle its requests.
    24/9/3 Timing With hindsight, it would have been better to implement Timing as yet another MPIClient. The main reason for this is to guarantee that only one object (the Server) actually accesses the database, and also means that we can run Timing Correction on any machine on the network. Judging by the presence of the esTiming identifier, it looks like this was Work in Progress...
    24/9/3 Timing Head Race timing is completely obsolete. The HeadStartTimes & HeadFinishTimes tables no longer exist, so none of the timing correction queries work. This is going to involve a major rewrite, which now takes precedence over ALL other jobs. The code appears to have been written in a hurry just before the February Head 2003, and bears no resemblance to the coding standards adopted elsewhere. As such, conversion is probably going to be extremely difficult, and will require extensive testing in order to guarantee success. However, some complexity can be removed, since we no longer need to generate intermediate files for Lickfold.
    23/9/3 Database TODO: EntryInfo could do with an additional field to denote that a confirmation of entry email has been sent to the relevant contact.
    23/9/3 Email Email program now picks up the Race Name & Date from Globals.

    This has been useful, if only to be able to purge non existent email addresses from the database!

    TODO: I've included a REMOVE option on the email - we need some way of specifying that a contact does not wish to receive mailshots, but is happy to get entry information on email...

    23/9/3 OptionEditor etc We now have a new interface - IStatusOptions. This allows us to see what statuses are valid under this profile. The Entry Manager now only accepts these statuses as being valid. One bonus of this is that ValidateStatus no longer requires a costly Data control, but can get away with using a Dictionary.

    Compatibility damaged!

    23/9/3 Entries PARAMETERS sAssociation Text ( 255 ), sClass Text ( 255 ), sSex Text ( 255 ), sAge Text ( 255 ); SELECT DISTINCT StatusList.StatusID, StatusList.ResultsOrder FROM StatusList WHERE (((StatusList.StatusID) ALike "[" & [sAssociation] & "]%") AND ((StatusList.ResultsOrder) ALike "[" & [sClass] & "]%" And (StatusList.ResultsOrder) ALike "_[" & [sSex] & "]%" And (StatusList.ResultsOrder) ALike "__[" & [sAge] & "]%")) ORDER BY StatusList.ResultsOrder;

    This gives unprecedented control over what events are available, allowing you to select ARA/CRA, Age, Sex & Boat Class - any combination can be selected. For example, sAssociation= !C, sAge=T, sSex=W,sClass=A selects all Women's Veteran Eights under ARA rules...

    22/9/3 Email A new application has been created, which allows us to send a mail shot to all contacts with an email address. Nobody really knows whether or not this will be successful, or indeed popular :)
    22/9/3 Databases The wildcard problems can be solved by using the ALIKE operator instead of LIKE. Undocumented, this has the same effect in Access 2000 as it does in ADO, and hence ASP! See [ms-help://MS.MSDNQTR.2003APR.1033/dnima01/html/ima0601.htm] for details. Why doesn't Micro$oft document useful features like this?
    17/9/3 ASP [List - Qualifying Statuses] now works on the website as well as within Access - the problem was forgetting to replace the [*] wildcard with [%]...
    17/9/3 Control New buttons added to the Head Race interface to record Forms checked/extracted. The Completed events page now shows this information.
    10/9/3 ASP / Mailing New query added [List - Crews winning a Round]. This allows us to modify [List - Qualifying Statuses] to cope with a crew racing once, then scratching - they will still be counted as a starter. The logic of the previous query was not nearly as robust, as crews do from time to time scratch even after having won a round!
    10/9/3 ASP Veteran events are no longer listed as qualifying. This works in Access, but not on the website.
    10/9/3 MPIServer Removed obsolete m_lConfiguration, which caused Regatta software to fail as the variable was never being initialised...
    10/9/3 ASP [Regatta - List Results so far] modified to use Groups, as it should have done previously!
    10/9/3 Control Fortunately, the transition to Crew based keying does not seem to pose as much of a problem as originally anticipated, since most of the hard work is done in the [Select - Crew] query. I'm now able to scratch crews once more, and have the right one carried forward to the next round.
    2/9/3 RegattaDraw BUG: even if we specify no Grand finals, they will be inserted into the Spiders. We should be able to get rid of this quite easily.
    2/9/3 Entries Removed the ability to modify actual status
    2/9/3 ASP Payments.asp needs to show what's due from people who haven't made ANY payment yet. Fixed 2/10/3
    2/9/3 Entries Main screen tidied up again.
    2/9/3 Entries ValidateStatus has a flag to prevent unnecessary recursion
    2/9/3 Entries On making entries from a different contact, the contact details on the main screen DO change
    2/9/3 Entries DBCombo boxes are now list boxes to prevent overtyping, and support extended searching instead of just first letter.
    2/9/3 Entries New Entry form now centres so that details of the last entry made can be seen.
    2/9/3 Entries SetupRecordset now used on each connection into the database, which guarantees the recordsets are refreshed.
    1/9/3 RegattaDraw The rollout to Cambridge 99 worked, though they wanted assorted new features:
    • Regattas now use sequential Crew Numbers. Note that this has far reaching consequences, which mean that the entire race day front end will need to be rewritten...
    • Spiders have the option to place crew numbers before OR after the crew name.
    • It would be VERY nice to be able to edit the Draw AFTER everything has been generated.
    • TODO - option to allocate crews coming a long way a Bye!
    • TODO - for telephone entries, we need an additional boolean field to record not only whether the form is valid, but also whether we received one in the first place!
    • Bug in Spider & Schema 14 fixed
    • All statuses now have a corresponding CRA status...
    29/8/3 RegattaDraw Instructions frame now resizes to accommodate the logo.

    Next button is now default

    29/8/3 RegattaDraw Graph now only shown once all clashes have been resolved. This actually speeds up execution significantly. It is also then resized to exactly fit its data.
    29/8/3 OptionEditor TODO - we really do need a backup folder for each profile...
    29/8/3 Entries All of the database links removed. This prevents startup errors if the databases are not found.

    NB - The Weightings form uses ADODC, so the link is still there :) However, this does not give an error.

    29/8/3 OptionEditor Owing to a demo tonight, a few things need tidying up, especially for creation of a new profile...
    • Station names can now be changed within the Editor
    • On creating a new Profile, the databases specified will be linked together automatically
    • If we modify an existing profile and change the databases, then the linking also occurs.
    25/8/3 StaticData Clubs' addresses substantially modified. Many Clubs added to mailing list, and about the same number (coincidentally) removed. 288 are now on the list.
    24/8/3 Mailing The Mailing Database uses the [Trim] function for labels. For some reason, this cannot be found any more on the BRC Server machine. The only thing I can think of is the recently applied hotfix for the Blaster worm... Or, maybe, look at MSDN Article KB199355 - it sounds familiar :) Look at 5/1/5 for the solution!
    4/8/3 RegattaDraw Cambridge 99 RC split statuses with 12 or more entries into Groups. Support for this has therefore been added into the wizard, with Spiders & Schemas to match.
    1/8/3 RegattaDraw We can now eliminate ALL clashes throughout the day, taking into account the winners of each race! This is phenomenally complex, typically taking tens of thousands of iterations and hence a very long time to execute. At the same time, I have finally resolved the bug that resulted in (occasionally) an invalid sequence being generated. It happens when, for some reason, a heat doubles with its final, but NOT vice versa :(
    31/7/3 RegattaDraw Full Wizard user interface implemented. (see comment 23/7/3).
    31/7/3 BRCHelper Confirmation form is shown centre screen on first use; thereafter its position is user defined.
    30/7/3 HelpSystem This Help file should provide a system overview only, with the full table of contents. All application specific help should be placed in separate help files. Such files have now been created for Entries, Control, Start, Finish, RegattaDraw and OptionEditor.
    30/7/3 OptionEditor The Editor class can now be headless - ie it can function without the form being activated. This behaviour is essential for the Mailing Database.
    30/7/3 Mailing Mailing database now uses the latest classes. It only needs to reference the OptionEditor.

    Note: you MUST NOT save a module with the same name as a reference! If you do, you will cause Access to crash, leaving an orphan module which cannot be found. This has been resolved by removing the reference, replacing the module, deleting it and then adding the reference again. Long winded, but effective!

    30/7/3 MPIClients Server name is now held separate from the Profiles, as it is static.

    Private Const DEF_KEY_MESSAGING As String =  DEF_KEY_ROOT "\Messaging"
    30/7/3 MPIServer Major tidying up has now been done. We still need to fully comment all of the interface implementations, though for the moment its more important just to get the system up and running again!

    DEF_NAME_START and the other definitions in General.bas are redundant - module removed.

    30/7/3 BRCHelper Compatibility broken yet again.

    clsGlobals removed. The problem with the new object model (25/7/3) was that Global data was stored in three separate classes in three DLLs. This is crazy, since only two are actually required. This also lets us remove all of the code from clsServerGlobals which has now been moved into clsOptionEditor. This is very important, since it guarantees that only one class is accessing the Registry - we are far less likely to have cut and paste errors.

    27/7/3 Setup Multipart setup program created. For this to be fully successful, we also need a set of blank databases for installation - when we create a new profile, we can copy these to the target folder.
    25/7/3 Mailing The Mailing database now has to reference MPIServer instead of BRC Helper. This is on the understanding that the database will always be executed on the Server: if it is to be used on a Client machine, then we should reference MPIClients instead, and ensure that the RaceManager is running on the Server (guess why...)
    25/7/3 ASP pagesetup.asp was ever so slightly buggy, which was confirmed by the wrong stylesheet being used. The problem lay in the Select Case statement for choosing the stylesheet - it used m_iRaceIndex, whereas the GetSessionVariables function was writing to Session("RaceIndex"). The variable has now been removed, and everything works as intended :)
    25/7/3 RaceManager This would now need to reference MPIClients as well as MPIServer. To get around this, it is better for clsServer to expose its Globals...
    25/7/3 MPIServer Configuration is used throughout MPIServer - the variable must therefore be declared at Module, NOT Class, level...
    25/7/3 BRCHelper IMPIHelper is now PublicNotCreatable, as every interface should be!
    25/7/3 BRCHelper Compatibility broken.

    This allows the MPI based options, as described above, to be implemented. The only properties which clsGlobals retains are the Server name, ConnectionString and SQL provider - everything else is now held in MPIServer.

    All Enumerations have been moved to clsGlobals for simplicity.

    23/7/3 OptionEditor The aim is for each client to connect via MPI to the OptionEditor, which will then provide it with the settings held in the registry on the server. No more need for multiple registries, each of which may be very different! The MPIClients will therefore need a global class (clsOptionsFromServer). This will be responsible for maintaining its own data, caching what comes in from the server. This class should connect immediately on creation. The only information that cannot be centrally held is the server name, which obviously needs to be set up before MPI can work!
    23/7/3 RegattaDraw TODO - this could really do with a Wizard style interface as well, as there is a logical sequence to what you have to do
    23/7/3 OptionEditor I have now removed the old functionality from BRCHelper, though in order not to break compatibility, have not removed the methods - they now do nothing. The Option Editor now does everything that BRCHelper used to do - the only exception is that, in order to avoid a circular reference between DLLs, Globals.LoadSettings MUST be called as soon as the OptionEditor closes. This will ensure that all of the relevant properties are updated.
    23/7/3 OptionEditor This is now undergoing a major change. Since most of it is a linear operation, I am now using a Wizard style user interface, complete with the original Context Sensitive help, and full help on each page of the wizard. This is done via a separate CHM file.

    NB: for remote CHM linking to work, filenames must NOT have spaces in them.

    18/7/3 RegattaDraw RegattaDraw needed a minor fix: where we have status changes in the draw that are not taken up, their opponent might get an unfair advantage, racing 2 races fewer in total than some other crews at that status. Status Changes are always therefore be inserted at the lowest level to provide fairness to other crews in the event of the status change scratching.
    18/7/3 OptionEditor We can now set the number of stations, view (TODO - modify) their names, and set the chevron pattern to be used for a multilane draw (NB: only the A chevron has been implemented to date).
    18/7/3 Entries Entry fees can now be modified within the Entry Manager. I believe this to be the last major feature to be added.
    17/7/3 Entries TODO - use a separate folder for the database backups
    17/7/3 Entries Major changes have been made to the Sponsors form. It now supports multiple sponsors (TODO - Groups). The format of the page has been changed significantly: we now list the sponsors' names in the right hand pane, instead of just a rather meaningless number, and is sorted by Results Sequence, instead of the order in which the sponsorship was added.
    17/7/3 Entries If we are recording a Refund, it will always be entered as a negative number.
    17/7/3 Entries Payment bug fixed - no matter what type of payment was chosen, it was entered in the Database as a cheque...
    17/7/3 ASP & RegattaDraw Two sponsors can now be allocated to each Status. In addition, there is full support for Groups - each Group can have its own individual sponsor, plus an extra sponsor for the Grand final, if present.
    17/7/3 ASP Spiders.asp now has a SHOW parameter, which replaces both EXPAND & BRIEF. Its options are: ALL / SHORT / [NONE]. I'm still unconvinced as to which of these options to use for Race Day.

    The PLAIN parameter turns off highlighting of those crews still in the event.

    16/7/3 OptionEditor It appears that we can create linked tables under Access 2000 (or more specifically, under Jet 4.0). This is a very useful addition to the Option Editor, and ensures that the end user never needs to delve into the databases themselves! Note: in order for this function to work correctly, the StaticData database MUST have "StaticData" in its filename so that the source of the links can be automatically differentiated.
    16/7/3 Admin [List - Clubs affected by Plate] has been moved into the Regatta database. There are actually still quite a lot of queries in admin that really should be moved to either the Head or Regatta systems.
    16/7/3 Entries TODO - If a contact withdraws or scratches all entries, we need to ensure that all Day Tickets are also cancelled.
    16/7/3 Admin [Payment - Refunds] query added
    16/7/3 Entries It appears that the payments are bugged - no matter what you select, it goes into the database as a cheque (fixed 17/7/3)
    16/7/3 Mailing Update sheets are double spaced - we've therefore got enough room to show the full name of the crew in a multiline textbox where it exceeds the normal width (this is generally doubles & pairs, but to a lesser extent single sculls as well). To do this, the height of all elements in the Detail is increased to 0.9cm - its only a very slight rise, but gives the required effect.
    16/7/3 Mailing Reports now use the Station names as provided by BRCHelper (ie defined in the registry). However, we still have a problem, in that the registries of the client machines may be wrong - Commentary could very well have different station names to the Server. TODO - look into some way of synchronising the registries.
    16/7/3 Mailing Update sheets have a flag to denote finals, and the boundary lines all match up correctly.
    16/7/3 Mailing Winners list for ARA modified extensively. It used to show J15 and below as qualifying, which is wrong, and was completely baffled by Groups! That is now fixed, and it also shows the number of starters in each event, exactly as the ARA wants. I now need to update the website code (regattacompleted.asp) to give the same functionality. TODO
    15/7/3 MPIClients Correction of duplicated races is now possible
    15/7/3 Database Regatta.SelectRace includes Verdict. This allows us to do more robust checking when a race finishes and its found already to have a winner. If the verdict is ROW OVER, we're OK, since the scratching routine automatically fills in this field. Otherwise, we need to flag an error.
    14/7/3 Database Regatta.SelectCrew includes StatusDescription
    14/7/3 Start If you try to start a race that does not exist, the error will be reported locally instead of on the Server.
    14/7/3 Commentary The syntax of the Start message now matches that of the vastly improved Finish. It reads much better :)
    14/7/3 BRCHelper Station names are now held in the registry. This removes the last Bedford specific functionality!
    14/7/3 RaceManager If we try to send a message to Commentary after that machine has crashed, an event will be raised instead of the error. This methodology should be used throughout to clean up cleanly after RTE 462.
    14/7/3 RaceManager As each terminal starts up, it now informs the RaceManager of what machine it is running on.
    14/7/3 BRCHelper I never knew that the numeric keypad produced different ASCII codes to the normal keyboard numbers! ValueBoxEx now works with the numeric keypad (bug reported by several people on 13/7/3).
    14/7/3 BRCHelper InputboxEx now uses a multiline textbox, so long announcements for Commentary wrap and can therefore be seen properly (bug reported by GTD 13/7/3).
    14/7/3 Commentary The announcement for the finish now reads much better eg:

    The result of Race 228, the Final of Men's Novice Sculls, was that Robb of Bedford Rowing Club beat Woods of Star Club by 1 length in a time of 2 minutes and 12 seconds.

    14/7/3 Finish Not Rowed Out shortcut added (n)
    13/7/3 TODO
    • RaceManager: if a system cannot be contacted (ie a machine has crashed on us), then we should not display the error - we might though amend the list to show that comms have failed.
    • It would be VERY useful to be able to print the Update Sheets directly from the RaceManager without having to go into the mailing database itself.
    • Small Boats Race First: this option has not quite had the intended effect, since the schemas currently show the full level of a race. This can be solved using the schemas only, though may take me some time :)
    • NB: all of these ideas are cosmetic, since the software currently works extremely well.
    13/7/3 ASP RegattaDraw page modified so that the hyperlinks for Winner Of Race 123 will actually go to that race - you can therefore see easily who the crew might be :)
    13/7/3 ASP Crew highlighting improved to eliminate the possibility of a type mismatch causing strange effects.
    13/7/3 MPIServer If in the second round one of the crews had no time taken for his first round, the LASTWIN function threw an error due to a NULL field in the regatta table. This has been fixed.
    11/7/3 ASP Crews that are still in are highlighted in bold. As soon as they lose a race, they revert to normal. This looks really neat :)
    11/7/3 ASP When displaying full spiders, the Race number is replaced by the verdict and the winning time once the race has taken place. This allows the punters to easily compare times.
    10/7/3 Entries Layout of the new entry form changed so more crew details can be seen. It still looks clumsy, but is better. In addition, the Club and Contact combos now use a much bigger font.
    10/7/3 Entries Bug fix: on creating a new contact from the new entry form, any payment added would be credited to the contact shown on the main form. This is now fixed.
    10/7/3 StaticData TODO - allow multiple sponsors for an event, plus individual sponsors for grouped races.
    10/7/3 MPIServer Commentary now receives details of every race's sponsor.
    10/7/3 Finish Assorted improvements made to the order in which the dialogs appear.
    10/7/3 Start Start now maintains a list of the races on the course. This is going to be useful if we need to record a false start, and also ensures that the operator can see what he last started (in case he confirmed the start accidentally).
    8/7/3 RegattaDraw GenerateSpiders button disabled during its operation.
    8/7/3 Entries Payment form now centre screen
    8/7/3 Entries Payment and DT buttons added to the new Entry form
    8/7/3 RegattaDraw Spider for 7 entries has been fixed - it contained multiple instances of Crew1 and Crew 2 only!
    7/7/3 BRCHelper ValueBoxEx fixed so that it can cope with Backspace and delete keystrokes. It will also now accept the number 9!
    7/7/3 RegattaDraw If a spider cannot be generated, you are now warned.
    7/7/3 Mailing Mailing - Notification of Entries had a bug for Day Tickets - if a contact was entering on behalf of a club AND a composite, the day tickets would be listed as being required for both :(
    16/6/3 Commentary Commentary now gives the names of scullers and pairs correctly - ie won by Smith and Jones of Xyz Rowing Club.
    16/6/3 BRCHelper vbDefaultButton styles now work with the ConfirmAction dialog box.
    10/6/3 Mailing List - Sponsors Races query added to the mailing database - previously it was in Regatta Front End, which I am steadily trying to slim down...
    10/6/3 Database Main database given an icon - hopefully this will make it easier to differentiate the various databases open during a big debugging session! Unfortunately, this is linked rather than embedded, so the icons will need to be kept in a permanent folder :(
    10/6/3 Database TimeOfEntry field moved out of EntryInfo and inserted into the Entries table. This guarantees that it is always set to the current date
    10/6/3 ASP PageSetup.asp modified to use the new RegattaID field, which has replaced RaceIndex.
    10/6/3 Control Ability to take up a status change now added. This effectively copies all details of the crew to the Status change placeholder entry, then scratches the original. In this way, payment details are preserved.
    10/6/3 Start Start code also standardised
    9/6/3 RegattaDraw Multilane Racing needs (TODO)
    • Ability to coalesce races
    • The ability to redraw on the day, preserving the crews in each races, but changing the lane info.
    9/6/3 Finish Finish code has been tidied up to use the InputBoxEx function. This should make everything look a bit more standardised.

    I've also removed all of the are you sure messages, replacing them with a confirmation right at the end. This is a significant improvement, and will placate certain people :)

    4/6/3 RegattaDraw Major bug fix implemented - the old functions GetPrevious & GetNext allowed the system to move a race so that it came AFTER its next race! I did have error trapping code in GenerateSpiders that would catch this one, flag an error and abort (see comment for 28/5/3). I've now amalgamated the functions, which makes sense anyway, and explicitly check each node to make sure that it is not the next race. If it is, the function returns Nothing, and the race is not moved.

    There is also code in there to check if we are running a multilane regatta - if we are, then all three possible outcomes are checked.

    This code slows the Draw down, but is well worth it...

    2/6/3 RegattaDraw Have now got most of the schemas written and tested for MultiLane racing (A format, 4 crews)
    30/5/3 BRCHelper LimitTextBoxToNumeric function written. This uses variations on the WM_UNDO message for its functionality. Note that it does not support decimal numbers.
    30/5/3 Progress Monitor Front end written and tested. Dynamic naming of the station is now possible.
    29/5/3 Database All fields within the tables are now properly commented.

    Size of text fields has been reduced where appropriate.

    HeadStartTimes & HeadFinishTimes tables have been deleted, as they are now obsolete

    Bit of pruning done to remove obsolete/duplicate contacts, and to pare down the mailing list

    29/5/3 BRCHelper InputBoxEx now handles focus correctly.
    29/5/3 Entries All connections now default to May2003 & May2003Admin to avoid startup errors that are untrappable.
    28/5/3 ASP Database Query for listing by Club now returns NULL for 1000+ crew numbers, instead of vbnullstring. This ensures that common functions view the same data.
    28/5/3 ASP Various formatting changes have been applied, plus the inclusion of a LATE tag. Since there are so many variations on a crew name, I have moved the functionality into a separate ASP page, to be included by all three main ASP pages.
    28/5/3 ASP What calls RegattaDrawByStatus? Nothing within the website itself, just Control. Unfortunately, we can't get rid of it, since its also used for static, published results.
    28/5/3 RegattaDraw Schema definitions have been converted to dictionary objects to make porting them to ASP easier. We also get the benefit of an EXISTS property.
    28/5/3 RegattaDraw I should really have noticed this before - there's no way of ensuring that the heats within a status are ordered correctly if there is a lot of doubling - ie the winner of one heat could go forward to the next round, which happened an hour ago!

    Its fairly easy to get around - simply check for the problem in NumberRaces, and if found, prompt that a redraw will have to be done. TODO - must fix this properly at some stage (see 3/6/2003)

    22/5/3 ASP Spiders have been totally rewritten to cope with the changes in RegattaDraw.

    At the time of the Draw, we have to create spideroptions.asp, which holds the settings for grand finals and ignored plate events. I don't want to read the registry from ASP! TODO - plate entry size must also go in this...

    21/5/3 RegattaDraw Spiders have been written for all Plate events - Max Heat = 46!
    20/5/3 RegattaDraw There are keys in the registry to specify which statuses should NOT have a Plate Event. There is currently no way of modifying this info, though this is very low priority, as I can't really see when we'd use it in anger :)

    Since this is potentially very confusing, Spider info has been moved into the profiles, but is not in clsGlobals, so will not be copied over when creating a new profile.

    20/5/3 RegattaDraw Plate event created for 17 entries. If no grand final, we must create a null race to ensure that the code is interpreted correctly. Plate Schemas for 18-32 entries will be a real pain to create, and so will probably be done only when absolutely necessary!
    20/5/3 RegattaDraw Plate events created for 8-11 entries. TODO - have lists of those events eligible for a plate, and be able to specify yes/no.
    20/5/3 Mailing Runners & Riders report fixed to show withdrawn crews
    19/5/3 Help System Background colour now works in compiled file
    19/5/3 Mailing ARA Regatta Winners report created.
    16/5/3 RegattaDraw Spiders for 17-32 entries created - TODO - Plate events
    16/5/3 RegattaDraw Layout for Spiders 9 & 10 fixed
    16/5/3 RegattaDraw Spider for 3 entries fixed.
    15/5/3 BRCHelper InputBoxEx - a sizeable and repositionable InputBox.
    15/5/3 BRCHelper MsgBoxEx is now resizable
    15/5/3 Commentary Winners names displayed at the finish
    15/5/3 Commentary Rowovers are announced as such when they start, but there is no commentary on the finish, which would otherwise state "a win for..."
    2/5/3 Entry Manager Can now modify a contact's details from the entry form - we needed to call UpdateControls of frmEntries.rstEntries after the modification.
    2/5/3 Entry Manager MatchDoubles no longer can let a crew double with itself.
    2/5/3 Entry Manager MatchDoubles now creates any missing EntryInfo before it starts. TODO - there should be a cleaner way of doing this...
    2/5/3 BRCHelper Resource file missing, so MsgboxEx caused a crash
    2/5/3 RegattaDraw May2003Regatta.List - Statuses in Draw was missing the CountOfEntryID field. This crashed the spider generation.
    1/5/3 Entry Manager UpdateContactDetails now working, and has been added to the Tools menu
    1/5/3 RegattaDraw Abort flag now reset in NumberRaces, and an abort now causes exit from the entire routine, not just the first loop.
    3/2/2003 Ancient History
    • At the moment, I've written it for Regattas. The programs for Start & Finish will gain a second tab for Heads - one tab will always be disabled, depending upon the current configuration. Control will need very minor tweaking (i.e. change race time instead of change division), while Commentary will simply not be used, and the Query terminal can remain the same, regardless of the configuration.
    • Timestamp information is now sent to the Start and Finish clients in order to synchronise their clocks with the server. This does not, however, appear to work over the network. To test this, set a second Win2000 machine up as the server, and run MPI & Start in debug mode to try to locate the problem.
    • No database access is being done yet - the DLL is sprinkled with TODO comments, indicating that certain stuff needs to be added in. The most complex of these database accesses will be for Commentary, which will need to determine who is in a race, and their times/opponents in the previous round (if any). Fortunately, we can have everything running on the server, which means that we will not need to use clumsy workarounds, such as working from a commonly named (T) network drive, as was needed in Oct2002 (just think for a moment about all those unnecessary network accesses). However, now that we have proven that it works, we should abandon development of Commentary for the time being, and concentrate instead on getting the Head Race specific stuff working properly.
    • Start should receive a message at the beginning of each division, informing it that the Division is about to begin. It should then receive a list of runners and riders in the anticipated order. From this, we should be able to predict the next crew number. If we override the prediction, then we should use this as the base for the next prediction. A collection will be best - delete the ones that have definitely gone, and ignore any ones that have been passed over by adding them to a second collection. If a passed over number is subsequently entered, move down the first collection until the next normal one is found (i.e. where the key does not exist in both), removing from collection 2.
    • This algorithm has now been coded, and seems to work as intended.
    • It seems to take an appreciable time for the database to be updated fully; however, Start remains fully responsive at all times
    • Finish should receive a message once the division is complete, informing it that times checking (over the radio) is about to begin. It should receive a sort of Runners and Riders list, which will contain all of the crews that were started in this division. Am not sure where to do error checking, though it would make sense to do it here. This error checking is very complex, but the matching algorithm has already been written, and should be relatively straightforward to port.
    • Query terminal can be used for either Heads or Regattas, with absolutely no modification. I'm rather pleased with this, especially as it acts as a background service - only Task Manager is able to close the application. I'd like to experiment with getting multiple query terminals running, though don't know how to do this at the moment, given the current WithEvents framework… Note: this was fixed on February 3 2003 - WithEvents is not a problem ?
    • I've given Control a WebBrowser interface, as suggested by Gavin Dods. This has the added benefit of allowing me to reuse the same queries and ASP code as is used for the Query Terminal. Much better than having to reinvent the wheel... Sorting is no longer possible, though quite honestly, this was too confusing for the user (LMS included), and I'm not sure that it was ever used in anger. Filtering is of course possible, as all of the ASP pages support filters.
    • Note: when using parametric queries, it is VITAL to put the parameters in the right order: this is why the old code was unable to change a crew's division without some VERY ugly SQL…
    • RequestCrewInfo sends a synchronous message to the server, and hopefully returns a new message back, containing details of the requested crew. This can be used for some pretty advanced data validation
    • Commentary seems to have a slight bug, in that the windows don't always cancel in the right order when running over a network. More work probably needs to be done to resolve this. It might be best to maintain a collection of a UDT, and delete items when OK is hit. We will therefore only ever have one window open. Note - this is now implemented, and seems to work reasonably well.
      The UDT method works well, though we needed to break compatibility in order to test it out. On pressing OK, it will display the oldest message available. If a high priority message has been sent, then this will be displayed before any normal priority messages.
    • The Server program doesn't need to look as polished as the rest, since it is there merely to drive the others. I really can't be bothered to make it look better, and might reduce it to just a single tab to make it somewhat easier to use...
    • Error handlers have been added to all routines, which will make debugging significantly easier. Ideally, there should not be any errors, though inevitably I'll forget something. Without the handlers, the programs would crash, and leave MPI in an unusable state until the next log in.