Main

2008 Jan 22

Bugs Bat has related to me so far…

provided as an aide me memoir to me (I’ve already looked them up 3 times), not an implication that these need to be fixed very quickly.

*deleting (hiding) an entire Barony every time you change a branch’s details (I think it’s specifically when you change the type of the branch (using the History section? I think - memory is vague).

*If you edit someone’s awards, click save. Otherwise, if you edit other details as well, it may forget the edits to the awards.

2008 Jan 22

New Administrative Section

To make it easier to get the updates out to Canon and her prospective minions, I’ve created an administrative section at sca.org.au/canon/admin. This is password protected, and will eventually contain the latest version of all files needed to run what I call CLAMPAGE: Canon Lore, Apache, MySQL, PHP And Gratian Etc. I mainly did it to save the hassle of sneaking attachments past Canon’s GMail account, but it’s a good extra backup too. I’ll throw a few other files there, like the installation instructions and the source code for Gratian, so that if the cat eats my laptop we’ll still have something to work with.

2008 Jan 21

Now this one I call a bug

Bug 1

And it’s reproducible and troublesome….

Create a New person. Try to give them an award.

Error message upon entering details - “giving a null award”.

I’m not sure it does it for every new person, but it does for a lot, and it continues to give this error on a new person created in a previous session. (eg Athol Williams, Tamaly, Zyl)

This is also exhibiting with Royal & Queen’s Ciphers. (eg Vandell Lychea, Fineamhain an Einigh ui Concobhair). It may happen when records are merged together too (I think Vandell was merged, but don’t remember merging Fineamhain). In fact it’s now happening with other awards eg Fineamhain’s pelican (1/9/07). In fact I think it might be doing this to everyone now.  Maybe it was only in version 7 that i remember sucessfully adding awards.

Bug 2:

Pressing “guess” or “fix” on an individual’s record when there is nothing apparently wrong with the record gives an access violation error message. Not that I need those buttons.

2008 Jan 21

gratian wishlist

I should preface this with a disclaimer:
“I analyse, I can’t help analysing how things could be better, no matter how good they are already. That doesn’t mean I don’t appreciate how good things are already. In fact, it tends to mean I think the product is good enough that it is worth tweaking, whereas a lesser product I won’t waste the time on suggesting improvements to because I don’t trust the authours to be able to implement them. So, these aren’t bugs, and these aren’t things I need, they are just the things that I notice I could use or think would be nice in a perfect world where I had an infinite number or bored programmers at my fingertips”.

so my wishlist (so far):
*a tiny unobtrusive indicator of the number of search results (maybe on the serach icon? or in the bottom bar)
*search by event date
*ability to merge events
*(automatically?) render names (and branch names too) with special characters in them into the closest standard character, and enter that version as an alternate name, or in some invisible field. This is so that people can be easily searched for (search will need to check alternate names too), especially when electronic communications or pegasus listings may have been rendered in plain text. The website may need this too - I haven’t checked it. In the meantime, I will be manually entering such names in this way.
*Something that makes it clearer that a branch is closed or in permanent abeyance (colleges). The “became” is not very clear. Perhaps a field for branch closed, which shows up on the website as something like “branch closed May 2006, became part of Stormhold”. The date field could not be a simple date field of dd/mm/yyyy, but would have to have some flexibility for answers such as “before 2004″, “may 2006″, etc.
*the ability to denote that only one sovereign attended an event
*not sure if I want this one or not (can see arguments against it): a name registered date field, and ditto for armoury (and an armory field)
*very low priority - jump from branch to it’s members in gratian
*notes fields - for editors viewing only. In a perfect worlds there would be no need for this, but sometimes there is. To stop the next user (or myself on a tired day) from fixing an error that isn’t really an error. (eg a person has really got 5 copies of that award), or for stopping new mistakes (eg there are 2 people with that name - check which one it is). Also the easiest place to write about awards given back, or deaths, and details like that that are useful to know. Or to mark a suspicious record for later fixing. This would never appear on the website.

and for the website:
*a previous reign, next reign link on each reign of lochac
*reverse the order of reigns of Lochac so most recent appears at the top
*overhaul news, faq, homepage and other bits of random text, and make them easy for any canon herald of dubious computer skills to edit.

2008 Jan 20

introducing myself

Well really this post is just an excuse to test this blog.

But I’m Tiffany, known in the SCA as Teffania de Tuckerton, and I’m the new obsessive-whose-life is-being-taken-over-by-the-lochac-OP also known as canon herald.

And now I’ll return to that pile of fix me’s that is teetering on the electronic desk, threatenign to fall over. But before I do, I don’t think people realise how snazzy and user orientated gratian is, when they haven’t used it - trust me people - it’s very friendly.

2008 Jan 11

Muddling Along

The new Canon Herald steps up as Queen of Lochac tomorrow afternoon, so she’s found a stand-in for while she’s away. Meanwhile, I’ve been rebuilding my primary work computer (and incidentally breeding), so things have been up in the air for a while. But last night, after much wrangling and fiddling with settings and configuration files, I sent the Acting Canon a ZIP file containing everything she needs. Once she’s worked her way through my verbose and possibly incomprehensible instructions, she’ll have a working copy of the Canon Lore site and the Gratian editing software on her computer. Changes I made to Gratian have made it at least vaguely possible to do site updates, so she’ll be able to maintain the online awards database in more-or-less real time. This is a Good Thing.

There’s a way to go yet before I can call the thing finished, but this is a good next step. I just wish there was a competent PHP and Delphi programmer out there who wanted to take over so I can get back to changing nappies…

2007 Oct 16

Cloned Lore

One of the things that stops me trying out all sorts of new features and fixes in Gratian is the fact that it updates the Canon Lore site directly.  Obviously, if I’ve done something wrong, this could cause the site to die in various dull or spectacular ways.  So to make it easier to test things without breaking the real site, I’ve finally gotten around to setting up a dummy version.  If you check out batpup.com/canon, you’ll see what looks like the Canon Lore site, with a slightly out-of-date database.  As I make fixes to Gratian (usually on the bus to and from work) I’ll set it to update there instead of the main site.  Gods willing, this will mean I’ll have a working version of Gratian ready for Canon Herald, before too much longer.

2007 Oct 6

Sorted!

If you’re reading this, you already know that Canon Lore is the website of the Canon Herald of the kingdom of Lochac, and holds all knowledge of the awards received by the kingdom’s citizens or given by the kingdom’s royalty. You also know that Gratian is the windows-based software used by Canon to update the site.

This blog is maintained by Mortar Herald, Baron Karl Faustus von Aachen, who also maintains the software behind Canon Lore and Gratian. Canon Herald, Mistress Bethan of Brockwood, will be given the keys to this particular kingdom as well, although it’s entirely up to her whether she chooses to use it. If she had free time on her hands, they never would have made her a Pelican.

The other thing you’ll know is that Gratian isn’t fully functional yet. It’s mostly feature-complete, but some of the features are so bug-ridden that they’ve been disabled to prevent possible death and mutilation of its users. Similarly, the Canon Lore site has some flakey moments, although it’s a lot better than Gratian, having been developed a lot longer ago. The rule of thumb is this: if something isn’t working, it’s because Mortar stuffed up; if something is working, it’s because Canon fixed it. This is close enough to the truth that you can rely on it.

Now, an anecdote. One of the things Gratian does is organise the Order of Precedence, the list of all award recipients in order of rank: Dukes first, then Counts, then other peers, and so on down to the lowest of the low, the people who have no armigerous awards at all. When my (Karl’s) predecessor as Canon Herald produced the rather primitive WebCanon, which Canon Lore inherits nothing at all from, she chose an order like this:

  1. The person with the highest-ranking award comes first.
  2. Where two people have the same rank, the person who received the award first comes first.
  3. Where two people received their highest-ranking award on the same day, toss a coin.

I felt that this algorithm lacked intellectual rigour, so I changed it thus:

  1. The person with the highest-ranking award comes first.
  2. Where two people have the same rank, the person who received the award first comes first.
  3. Where two people received their highest-ranking award on the same day, start from step #1 with their second-highest award, and so on down their respective lists.
  4. Where one person runs out of awards first in this comparison process, the other person (the one with more awards) comes first.
  5. Where two people have identically-ranked awards given on the same days, compare their SCA names; the one closest to the front of the alphabet comes first.

This system has the advantage that it is at least predictable.

However… I was having trouble with the OP calculator function. It appeared that the QuickSort function built into my programming language was in error! Given a list of valid people, it would apparently insert a null person into the list, somewhere near Ulric Johannson for some reason. I examined the code in detail, but it seemed fully functional. And, to make matters worse, the problem appeared only when I was running in debug mode, and disappeared in production mode. This is referred to as a Heisenbug, and is a royal pain in the arse.

This morning I finally tracked it down. Have a look at this bit of code and see if you can see the problem:

1. if Person1 = Person2 then:
    Result := 0
    exit function

2. if Person1.AwardsReceived is 0 and Person2.AwardsReceived is not 0 then:
    Result := +1
    exit function

3. if Person1.AwardsReceived is not 0 and Person2.AwardsReceived is 0 then:
    Result := -1
    exit function

4. for each award up to the smaller of Person1.AwardsReceived and Person2.AwardsReceived:
    Result := the award rank comparison for that pair of awards
    if Result is not 0 then:
        break out of loop

5. if Result is still 0 then
    Result := comparison of the number of awards each person has

6. if Result is still 0 then
    Result := comparison of the alphabetical order of each person's name

See the bug? Don’t worry, I didn’t for a stupidly long time. It’s this: after step 3, I don’t set a default value for Result. If there are no awards in a person’s file, step 4 won’t set Result either, because the loop never gets used. Then, steps 5 and 6, which assume Result is already set to zero if nothing else, will behave more or less randomly, according to whatever random bits happened to be stored in memory before the function was called. As a result, the QuickSort function becomes unstable, and All Bets Are Off.

So it’s fixed now. One less hurdle on the long run to completion.

Fun, eh?