I stop to prioritise.
I'm scheduled to spend Monday evening at one of Perth's Zone sites, where I will test the latest version of my tournament software. The Australian national tournament is in just a few weeks, and I'm in the process of adding the extra features that Nationals will need. I'm also playing in their league. Most of the day Tuesday I'm at another site, doing tech work on their gear and playing in their league. And sometime before Wednesday evening, I have to do some shopping for the Perth's third Zone site -- I'm buying them some UV tubes and some parts to build a passive VGA splitter; and, of course, I'm playing in their league.
There's a state open fencing tournament next weekend. Everybody who's anybody will be there, and it'd be a great opportunity to show off our fencing clock-and-score box. I assign getting the box working as top priority.
Mike, a programmer at the Herbarium whom I collaborate with, has been out on holiday for two weeks, and before that he was sick, and before that I was too busy to meet with him. So it's been a month since we've met. I assign him top priority.
Thursday I'm going to see the Final Fantasy movie. It's not like I have time or anything, but several of my friends are going, and have commanded me to attend.
Friday there's a meeting of WASFF, the Western Australian Science Fiction Foundation, and they'll need every warm body they can get just to reach quorum.
On Monday, my chip finally comes in at Rad Spares. I ordered it last Monday, and they usually get stuff in overnight. But when I dropped by to pick it up, they said there'd been a strike at their courier service -- they'd picked the part I needed at Sydney and put it in the courier system for delivery to the trade counter at Perth, where I was scheduled to pick it up, but the strike had jammed everything up, and my chip was stuck in transit. I need it for the clock box. The chip in question is a 4094, and it's part of the interface between the keypad and the clock box. And without a keypad, there's no means of input to the box, so it just kind of sits there dumbly.
The 4094 I've got in there at the moment should, I think, work; and I don't know why it doesn't. The usual remedy for this is to look the chip up on the Web, but this one is a specific flavour of 4094 called a BU4094, and no-one's heard of it. 1.3 billion web pages about everything from chickens on springs to sparkler bombs, and no-one, anywhere, has heard of a BU4094.
Plenty of people have heard of a 74HC4094 though, and so I've downloaded a datasheet for that instead, and that's the flavour that I've ordered through Rad Spares. I called on Friday, to ask if the strike was over yet, and they said, "Um." Apparently the strike was long over, but they'd somehow managed to lose my order. They can't find it anywhere, so they pick a fresh chip for me, and tell me I'll have it on Monday.
Monday comes, I pick up the chip, and drop it into the clock-and- score box. It doesn't fix my problem.
That's really annoying. I've just spent a week waiting for this part to see if it would fix my problem, and it didn't.
I do some extensive messing around, and eventually discover that one of the data sheets for one of the other chips is wrong. This other chip, the demux, has outputs in the order 02134567, but the data sheet shows them as 01234567. So when I've been telling this demux chip to point to what I thought was the 4094, it was in fact pointing off to some random spot in hyperspace. I download several other versions of the datasheet from other manufacturers just to be sure, and they all agree. It's the work of a moment to change the software to point to the actual correct address for the 4094.
Now all I have to do is get the keypad to actually read its keys.
Monday night at the Zone, and my software performs reasonably well. I note down about five minor points that need fixing or enhancing. Tuesday at the Zone goes well, too; although it had all looked a bit grey a day or two before. The building three doors down had caught fire on the Sunday morning, and was gutted. The building two doors down was destroyed too, but a narrow alley protected the Zone and its immediate neighbour. The Zone was closed for the Sunday due to the thick black toxic smoke that was pouring out of the burning buildings, but as of Monday they were fine again.
On Wednesday I go in to see Mike. He is developing an app for the Herbarium to do heavy-duty manipulation of plant-sample data. They have hundreds of thousands of records about the individual plant specimens stored in their library, and Mike's tool allows users to go in and do powerful and useful things to the data. Well, it allows Mike to go in and do powerful and useful things. Mike is rather weak on user interface design -- the very concept of interface design is alien to him. He tends to grab a graphical control at random and slap it on a form. Some of his forms have well over 500 controls, and there are about 50 forms in the application. It's my job to attempt to straighten out this tangle into something that ordinary mortals can use. This is pretty much impossible -- I'll be happy if I can get it to something that ordinary super-geniuses can use. The app crawls out to fill your whole screen (God knows what happens if you are using multiple monitors), and has thousands of lines of code devoted to resizing of fonts.
And it's got right-clicks everywhere. Right-clicks are evil, because if you know that you can right-click on something and have a menu pop up, you're fine, but you have no way of knowing this. So the functionality buried in these right-clicks is invisible to you, and therefore may as well not be there. It's a real two-steps-forward-three-steps-back kind of a process: since Mike has sole control of the code, the rate at which I can straighten out old SNAFUs is less than the rate at which Mike can add new ones.
Wednesday arvo I was going to work on the keypad, but I discover that I've unwisely left my laptop power supply at the Herbarium. I go back and pick it up.
Thursday I do get to work on the keypad. The keypad's microcontroller is communicating back to the main box just fine; but I haven't yet gotten it to read its own keys. This is partly a soldering issue: I'm hand-building the board as I go; there are 19 keys; and each key requires about three wires, each custom cut and shaped to fit exactly on the board. I grind away at it, and then in the evening go to see Final Fantasy.
I'm going to see it with Swancon, the local annual science fiction convention. They are selling tickets once a month to opening nights of SF movies. Last month I went and saw Tomb Raider, which was a complete dog. (The "making of" puff-piece on TV was funny as hell though -- it's full of all these actors and so forth praising the movie and director for being so visionary and ground-breaking. And the narrator seemed to think that the central character's name was "Laura Croft".) So I had vowed to read reviews before buying a ticket to this one. The reviews said pretty much what I expected: visually stunning, otherwise crap. But I went and saw it anyway, and actually, I quite liked it. OK, so it got a bit ridiculously cosmic at the end, with the blue CGI fighting the red CGI, and the main characters building daisy chains of themselves, but that aside the plot was quite reasonable. The CGI people were almost but not quite convincing -- they moved slightly wrong, their lip-synch was a little weird, the hair- do's of all but one character were made of concrete, and they couldn't cry. But the day when all big-budget movies are shot entirely in a virtual world is drawing closer.
Friday it's more keypad work. About noon, I get the breakthrough -- I can read keys with some semblance of reliability. I add in routines to respond to keypresses, to increment scores, add penalty lights, add minutes and seconds to the clock, start and stop the clock, and so on. Then it's off to WASFF's special general meeting.
Several bugs had been discovered in WASFF's constitution, and a series of proposed fixes had been put forward at the business meeting at this year's convention. But the constitution is deliberately made difficult to change, and you have to propose the changes at one meeting and accept them at another. Thus, this special general meeting. Now, it's easy to get quorum (15 people) at the convention: there's hundreds of fans around, and enough of them are sufficiently interested to stop in and spend a couple of hours debating points of order. But a special general meeting is harder: people have to actually go out of their way.
When I rock up, at the appointed time, there are two people already there. It takes nearly two hours, some phone calls, and two people buying memberships so that they can be counted before we actually reach quorum. Passing the changes is trivial by comparison. I don't get any work done while I'm waiting, as my work would involve dragging around keypad plus clock-and-score box plus soldering gear, but I do take along my laptop, just so I won't feel left out. There are about four other laptops in use at the meeting.
I do get to spend time thinking about my next move, which involves dropping a routine into the clock-and-score micro to validate input it gets from the keypad micro, and dropping a routine into the keypad micro to validate the input it gets from the actual keys. The following morning, I write the first of these routines and get it working. I cut'n'paste this routine into the keypad micro's code, and then take a look at it to see what changes I need to make to it. After all, it's getting a completely different kind of input from a completely different source, which has to be validated for different reasons.
Oddly, I need to make no changes whatsoever. Even the comments are correct and need no change. This is sort of equivalent to grabbing a random part from a car, slapping it into a motorbike, and having it fit perfectly and work first time. Very strange.
The tournament starts at 1pm, and at about noon I go over to my sister's place to use her drill to drill out the holes in the front face of the keypad box. I have to drill a hole for each key, and of course the holes have to be perfectly lined up. Since the face is opaque, the only way to get this done is by dead reckoning: measure the key positions on the circuit board, measure out those same positions on the case, and drill. It works almost perfectly; I have to do a small amount of shaving with my pocket knife to get the alignment right on about three of the holes.
I get to demo the current state of the box to the key people at fencing, and I even use it to score while I am presiding a bout.
Now all I have to do is reverse-engineer all the club's four different brands of control boxes so that we can interface to them, finish out my laser game tournament software and distribute it to all competing sites well ahead of the national tournament, do my tax return and fill out my census form, and I'll be all set.