

31 Jul 2006 (Monday)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Serendipity. Power cut. Barbeque. Dream. |
I've got this odd urge to watch Serendipity. Only I'm not sure if I have a copy or, if I do, where it is. Bother.
Dad told me there was a Miami Vice film yesterday. It surprised me a little. And I've just discovered that there's a Poseidon Adventure remake. I may be out of touch but I don't expect either to be particularly wonderful.
I wish my mind didn't run away with lots of fun things that Could Be.
I'm sitting here in the dark now (1:20am). The power got kicked out a couple of minutes ago so there's no lights in here or anything. Just me, a candle, and the server which is quite happy to sit there on the UPS. The UPS, on the other hand, is getting increasingly distressed and beeping away every 15 seconds or so to tell me that it's not got any power. The Looking out of the window it looks like everyone's been hit. It stopped raining about half an hour ago and there was no thunder at all so all I can assume is that there was a strike somewhere else - probably over Brandon way. Oh, and there's the moths which like the laptop's screen.
I got myself all panicy earlier today, but after a bit I calmed down and
life returned to normal. I think it's really a matter of what's normal,
though
.
If I were clever I could shut down the server. One of the odd things about the UPS is that I don't have the ethernet switch on it, so when the network goes down I can't actually see or do anything to the server anyhow. I just have to trust that when it reaches that 2 minutes of battery life left it will indeed shut itself down. Which it always has, so I can't complain.
My little candle looks very small. Sam and I can watch it. It looks pretty.
The UPS beeping is quite frustrating really. I guess I could dig out a cross over cable, plug in to the back of the server, and shut it down with that. Or move the serial lead... oh, no I can't because the serial port is connected to the infra-red receiver.
I think I'm hungry, but I don't fancy going downstairs for something to eat. It's 1:40 now and, if I remember correctly, the UPS claimed to have 5 minutes of life in it. So that's 5 minutes in very slow time land. Either that or the fact that the RiscPC isn't on probably helps.
Let's see what else has happened recently, as I've got a little bit of time to waste and there's really not all that much to say otherwise. Mum had a barbeque on Sunday, as a 'leaving work' thing. Lots of people around, some of whom I knew and many I didn't. A couple seemed bothered by the fact that I tend to walk around with the foam bat. Maybe I'm just completely accustomed to it. It's not like it's for hitting things; it's mostly for twirling, only I can't get my fingers right yet. I'm getting there though.
I feel asleep on my glasses last night, I think. I woke up and there they were, folded up, under my side. They seemed ok though - they're not bent fortunately. I remember taking them off but not putting them away, so I must have been tired, I guess.
I've just remembered what I was dreaming last night. I was dreaming that I was Jewish and I was living with a load of other Jews being collected together to be taken to ghettos. That was a whole bundle of fun. Given my general lack of Jewishness and not-so-much knowledge of specifics of the period, it was a strange and disturbing dream. It's not like I've watched anything related recently. Maybe its my minds way of saying that I should. Or... I don't know.
Return to top | Comment on the diary
|
SongMeanings. |
I decided to add the 'Song Meanings' look up to Opera as a hotkey lookup,
'cos I do it so often. The address to use in the lookup, in case anyone
needs it (or I forget) for song names is
http://www.songmeanings.net/query.php?action=title&query=%s,
or, if you want to look up based on artist
http://www.songmeanings.net/query.php?action=artists&query=%s.
Dead easy.
Return to top | Comment on the diary
|
Lights. |
Listened to Archive's 'Lights' tonight. I wasn't so impressed. Then the track 'Lights' came on and... well, I lit up. That's more like the Archive I like. And 'I will fade' has some of the feel from 'Take My Head', whilst being new. 'Headlights' is a track for a hot dark night, I think. Like now, or maybe that's just 'cos it feels right.
Of the earlier tracks, 'Veins' immediately sounded familiar. To me it has sound that could place it on '(What's The Story) Morning Glory ?'. 'Programmed' sounds just like its title; I'm not sure what to think of it. It's a bit... dull... 'Black' is ok, but nothing special...
Otherwise today I've not made a phone call which I must do either tomorrow or Monday, or I'll look like an idiot. More like an idiot. And I've been doing some very simple maths that seems to have taken a long time because I can't remember my algebra that well. It's just simple equation of a line and simultaneous equations, but it seemed hard. Probably made more so by having to do it all in integers and avoiding overflow. Joyful - not hard, but just frustrating because I used to be quite good at it.
Return to top | Comment on the diary
|
Modularity. SlimServer. |
I like modularity a lot. It might seem obvious, but being able to restart (or kill) components of the system without any significant system problems seems to be a vital part of developing a robust system. It used to be a 'fun waste of time' in the past (well, quite distant past now) to lobotomise the system in fun ways to see how far the system could be pushed before it collapses. A sort of computer Jenga. I think someone else suggested that a few months back.
Anyhow, it has a practical use - if the system can cope with components missing then it can be described as robust in the face of system limitations. Obviously you don't want your system to fail just because you're replacing a part of it. There are always examples where this sort of behaviour is insane. Replacing certain components - particularly where they are hard-linked - will cause considerable problems.
Internet is the example that I always cite for this, because it is dead easy to replace the module on the fly. Not that it's necessary to except under certain odd circumstances, but as a quick "Oh, my program's broken and I've used up all my sockets" solution, reinitialising the Internet module is pretty reliable. And of course the system is usable on the network after a few seconds - usually less time than it takes to enter the next command.
But, much as I love this system, it pains me to think that it goes completely unnoticed most of the time. As with many things that I've done, it's not really noticeable. In which case, is it worth the effort ? Whilst I think it might not be appreciated, I don't think that really matters. If the goal is stability then at any point increasing the robustness of the system is important. Although the actual robustness for replacement on the fly is rarely used, the testing involved invariably highlights problems which have gone unnoticed for years. That side effect in itself makes much of the work worthwhile.
Deciding to try out SlimServer from the bleeding edge today, I checked out the trunk of the subversion repository. With a couple of hiccups - which I fixed, reported and were fixed in the repository (they're good!) - it was reasonably painless to get running. I'm quite impressed really. I'm not sure that the searching is much better with the MySQL database over SQLite, but I've not really used it enough to know. I'll need to bring forward my 'sort albums by years' code - I don't know how well it'll work.
In order to ensure that the images in the album gallery appear sensibly,
I've updated my 'image size' script to resize the
'CoverFront.jpg' files to 100x100 and call them
'CoverThumb.jpg'. Seems to work and looks very pretty.
Return to top | Comment on the diary
|
Touchscreen coolness. |
Ian pointed me at a very cool touchscreen experiment video. It's pretty damned impressive really. The photos section is very similar to sections of Minority Report, if I've remembered rightly. Oh, the video is Quicktime. According to the text, the accuracy of the touch screen components is < 0.1". Which means, given the size of the table, that they have a total resoluction of around 360x270. Which doesn't actually sound all that great - I guess you don't need much more than that.
Unsurprisingly I'm quite tired today. I've managed to write some pretty funky demo code to test out some new things, though. And I've done a lot of 'fix bug-send to tester' iterations as well.
Return to top | Comment on the diary
|
An alarm is important ? |
Let's recap on what I've done this evening, because it's actually Important. With a capital I and an emphasis. Really. Either that or I'm just tired and I shouldn't be making decisions or doing anything that matters. So let's wind back...
It's about 1:30am and I'm fed up with doing work so I decide to go and watch the pilot of 'Eureka', which turns out to be quite good. It's late and I'm tired and my right eye is watering and I really want to go to bed, but I've decided to watch it and anyhow, my room's going to be too hot for another hour or so anyhow. I've got my pyjamas on because I am actually tired. Episode ends and I'm tired and want to go to bed. Only I can hear something. I don't know what it is. It's a very faint alarm of some sort - sort of like you can hear if you've left the phone off the hook for a long time, and just as hard to locate. It's about 2:50.
It's annoying me so I decide to find it. From the bathroom it's definately coming from outside, so I grab my dressing gown - because obviously it would be silly to go outside in just your pyjamas (hang on, this is sounding like dream-logic... but that's what I thought at the time, and still do), and with my slippers on, off I toddle. At the end of the drive I trip over something and looking back it's a little balled up hedgehog. Aww. Sorry hedgehog. He didn't move. Greebo took a sniff at him and then wandered away.
It's coming from my left, down the road so off I head. Maybe there's been a break-in somewhere, or someone's car alarm's gone off, or something. But it's annoying me, and I want to know what it is now that I'm here. I head off down the street and it's still not nearby. At the end of the road it's definately coming from straight ahead and a little right, so I go straight across the road and down the next one. A little way down it occurs to me that maybe I should have put some clothes on and, glancing back I notice that someone else is walking up the road. I ignore them and keep going until a mewing cat stops me. It's Greebo and he's followed me, but I think I'm going a bit far for him. So I walk back a little way and call to him. He comes running up and I pick him up to quiet him down. He's quite happy. So I keep walking, and I get to the end of the road. And there's nothing more there. Only the sound is still there - off to the right, not so much straight ahead. So it's more in the direction of the school.
That would make more sense; the school alarm would be loud enough to carry to here, I'd have thought, and there's probably stuff worth stealing there. Or maybe the shop; that's in the same general direction. But Greebo's struggling now. Maybe he's well out of where he knows, or he just doesn't like being carried. So I go back home. It's still annoying me, both because it's there and because I've gone this far, I really want to know what it is. So I put on some shorts and t-shirt, grab a torch and my MP3 player (for after I've found out what it is and am on my way back) and my phone. Only my phone's dead. So I grab Dad's and hope that he doesn't mind. So much for my "I always have a charge on my phone".
And off we go. Back to the end of the road and instead of going across, we go toward the shop. I say 'we'. I mean 'I' because I'm not taking Greebo. At the shop there alarm clearly isn't from there, so I keep on going toward the school which is more in the right direction. A few minutes later I'm standing at the school but there alarm's coming from beyond it. So I keep walking. I'm beginning to wonder if it's the Brandon station barriers. Barriers tend to have a little alarm when they're going down, so maybe it's become stuck on. Or there's been an accident there.
I get to the bit corner in the road with the flashing 30 sign and I'm wondering to myself what exactly I'd do if I find out that there is a break-in. What if they're still there ? What if the owners think that I'm the one doing the breaking in ? What if ... and so on... but I give up on those thoughts because I've got no answers and I don't know what the alarm is even for. Maybe, I'm thinking, it's for the farm house on the left as you go up towards Brandon. It's in that sort of place.
I get there and it's not really coming from the house. It's sort of diagonally - towards Brandon itself. Maybe a shop ? If it was, surely someone would have killed the alarm by now ? I keep going and I'm asking myself why I'm doing this ? It's not like it is important. It doesn't matter to me. Apart from not knowing what the alarm is, I wouldn't care. So why do I choose to go out at such a silly hour for a walk to find out what one little alarm means ? When there's so many things that I do care about, but don't do anything about because... well, because of things I can't even put in to words because I can't even find rational sentences. It's a long road. It always makes me think. Which is why I usually have the MP3 player - except I can't have that on and hear the alarm.
I get to the crossing and I'm thinking I'm definately closer now. Over the crossing and toward the pub I notice a difference. I backtrack to the middle of the railway lines. Normally I wouldn't stand in the middle of railway lines, but I'm feeling pretty confident that there's nothing going to be coming. It's 3-something AM. It's coming from my left, somewhere towards the houses, outside of Brandon. So I head a little way back the way I've come and down the first right hand turn. No. It's further along. Back and down the next turn - that's the station carpark turning, so I wander into the middle of the carpark facing away from the road and it's now ahead and left. There's some works yards over there. I don't know what they are, so I wander further down the road to see if I can find a company name. If nothing else that'll give me something I can say where it is.
It's about 3:40am and I get to one of the gates. The alarm seems to be coming from in there. So I ring the polince and tell them this and explain where it is. The woman on the end of the line asks if there's anyone around or any cars. There's nothing. Just me. Who's walked from the next village. And is waving a torch around to see whether there's any one around. She suggestes that the alarm may have gone off in the storms (well we've not had any storms around here since about 9pm) but she'll try to send a car around if they've one available. Fair enough; nothing more I can do. So now I've got to walk home.
But I've got this thought in my head about why this is important. Why is an alarm in the next village so important that I must do something about it ? Why should I act on that, and not on other things ? It has no bearing on me, so does it matter ? Of course it does in some way - and if I hadn't gone then I believe that things would have been a lot better for the couple of snails that I couldn't see with my torch (and I feel so awful for... I'm so sorry). And if it's not more important than other things, then why should I act on it ? If there's things that I want to do but don't because I can't find a rational reason for other than 'I feel that I want to do this', then how different is that from this situation ? I mean, there's really no rational reason for wandering off to try and find an alarm that's going off ?
Finally I get home and it's about 4:30. Along the way I've managed to convince myself that I don't need to have any rational reason for some things. Sometimes to just want to do something is all that you need. And, at the end of the day, what's the worst that can happen ? I can be yelled at and die. I can be embarassed and I can die. Nothing at all, and I can die. I can be hit by a toilet seat from the space station, and die ? Um... No, that's Dead Like Me... What's the best that can happen ? Well, all of the above, but without the dying. But I can say to myself that I made some decision - late, pointless, stupid, and probably other bad things too - but a decision that I made because I wanted to and not because of any at all rational logical reason. Having made that decision and done something about it, I'm beginning to vaguely regret the fact that I don't drink. There's always Apple Juice, though.
And, it now being around 5:20am, I'm very much aware that decisions made at night are, more often than not, incredibly poor and regretted in the morning. However, the lights had a huge halo around them before I went out, and I'm having to take three shots at spelling some words, there's a distinct possibility that I won't have any recollection of this tomorrow. Hopefully this diary entry will remind me.
I don't expect anything.
What have we learnt by tonight's escapades, though ? That sounds can really travel a long way at night. That long roads are very bad for thinking (in the sense that they give you an opportunity to). And, most importantly of all, the realisation that if something trivial can be done for no rational reason at all, then something important can also be done for no rational reason.
And my spinny head is telling me I am so going to regret this in
a few hours. But that's just another regret to the pile so... who cares
.
Oh, and when I got home I could still hear the alarm going off.
Return to top | Comment on the diary
|
Well that's naff. |
I thought "I've not done a Windows update in a little bit; let's see what there is". There's this little program called 'Network diagnostic tool' which is meant to diagnose network problems for you. So I tell it to go off and do its bit. It does a little animation and then tells me that "Windows cannot connect to the Internet using HTTP, HTTPS or FTP. This is probably caused by firewall settings on this computer."
I don't have a firewall on my Windows machine. That's done by my linux server. So I decide to log what it's doing on the linux server - the Windows machine can't get to the outside world without going through it, so that'll catch everything it does. What do I see ? Well, it connected to 'search.encarta.com' (aka ftp.microsoft.com) for FTP, logged in anonymously and transferred a directory listing using a PASV connection. Twice. It didn't even try HTTP or HTTPS. So not only did it lie about being unable to connect to the Internet, it didn't bother doing 2/3 of the tests it claimed to have done.
Or another way of looking at it is that it didn't actually do what it said it would do, and the results it presented were not based on the things that it did do. As a diagnostic tool it's quite utterly useless. Quite astoundingly useless infact. And, of course, misleading.
It's late and I've lost the track of what I was going to write this evening about 'important' things, but it'll wait until tomorrow, providing I remind myself. And I remember what it was that I wanted to say.
Oh, that was one thing I was going to write. Julian rang to ask me about a
particular problem he was having with his CD drive running slowly. He said
it was set to use PIO and refused to use DMA. I didn't really know what to
suggest after talking him through a few ideas. So he went away. And found
the solution himself. Which is great, but it didn't make me feel all that
wonderful. And then later Simon rang with a problem with his MP3 player.
Which I couldn't suggest anything on either. So that wasn't all that good.
As 'knowing stuff' goes, I'm not doing so well
.
Return to top | Comment on the diary
|
Feels just wrong. Robert Guillaume. |
It feels just very wrong to *RMReInit the video driver within a
TaskWindow and know that everything'll be fine. I know it's not completely
fine, but it doesn't have any lasting side effects - safer to do at the CLI,
but still, it feels wrong. Not in a way that means that it is, just that it
isn't something you would expect to work but it does and should.
I finished playing Half Life 2: Episode 1 again, this time on a harder difficulty level, and noticed a name in the credits I recognised. "Robert Guillaume" plays the voice of Dr Eli Vance - better known (to me) as Benson in Soap and Isaac Jaffe in Sports Night. The other voices, which I wasn't really thinking of as being anything other than who they are are, and who I know, are...
Michelle Forbes (who plays Judith Mossman in HL2) who is better known to me as Ensign Ro in Star Trek: TNG. Louis Gossett Jr (who plays the voice of the Vortigaunts) is Gerak in Stargate SG-1 (series 9, the crazy Jafar leader). Merle Dandrige (who plays the voice of Alyx) has a small part in the Home episode of Angel (I can't remember the episode).
Just quite surprising!
Return to top | Comment on the diary
|
Years go by. |
It's easy to forget in the general 'stuff' that goes on that what's Important isn't any of that 'stuff'. At least, it's easy to forget until you stop. Even on the sunniest days, when you're meant to be concentrating on other things, it can be there and remind you that... what ? that you're an idiot, I suppose.
A couple of days ago, I wondered what it was that made me think that saying stuff was important. I never go any answer. I don't think there is one.
When it comes to computery things - or at least the small subset
that I'm just about adequate at - I can know what to do and how to do
things. Outside of that there's this kind of blur, where I can't seem to
decide what to do.
There was some dream last night. There was a table of some sort. Wood. Brown. Big windows, like in a factory. Some people. I don't remember much else. Obviously she was there.
I was outside earlier today and the thought struck me that Caroline just is the girl of my dreams, and it's something I can say with some authority, and without any fear of looking silly. Well I might look silly, but for something that's blatantly true. It's odd to say, mainly because it is expected to have a meaning other than the literal.
In lighter news, the BBC website had an article about the "oh my god, it's hot" weather we've had today...
At zoos, keepers tried to make life more comfortable for the animals, handing out fruit or blood-flavoured ice lollies.[ Blood-flavoured lollies; BBC news ] |
... now, fruit flavoured lollies I can understand. But 'blood flavoured' ? I'd love to have been in the conference room when Wall's marketing department pitched that one. "Yeah, it'll be great for budding vampires." "All the taste of the abattoir."
Return to top | Comment on the diary
|
Really good day. |
I've had a really quite good day today. Despite being destracted by mum and generally being far too hot, I think I've had a really good day over all. Bet that won't last in to tomorrow.
I was just getting in to bed when I remembered the dream I had last night. It was somewhat strange. I went out driving somewhere and I got lost and couldn't find my way back. It was getting dark and I didn't know how to get back, so I rang dad to come and get me (as you do!). I didn't have my phone or any money or anything useful with me any how, so I had to use a pay phone. The pay phone was at the edge of a small estate which seemed very nice. I knew it was where Caroline was living so I decided to wander through and have a see where she was. The people seemed nice, but before I got to the corner to turn toward her house I turned around and went back.
There's no real interpretation needed on my dreams is there ?
Return to top | Comment on the diary
|
Errors alive! |
I got a nice comment on the diary from Matt Godbolt today, about my little errors discussion yesterday. Apparently the library that they use at ProFactor is pretty much what I described. Only, of course, they've actually done it and used it in something real. It's highly exciting because it's a validation that I'm not mad for thinking this, and clearly it must be beneficial to them. At some point I really need to try it for myself. Maybe it's not as hard as I imagine. Maybe such a thing can even be shoe-horned into existing code. Ha! Ok, maybe not, but it's nice to hope.
It's now midnight 45, so I'm going to play a game for 15 minutes. Really, just 15 minutes. And then go to bed. And try to sleep in this heat. Hmm. Just thought "I've not heard anything from Julian or Simon in a while". Wonder what's happening with them.
Well, I was going to, only the local server died and I've had to restart it and check what was going on. Some DMA failure which killed the machine completely that time. It's come back up, but... maybe it's the heat. Like me he's not so keen.
Return to top | Comment on the diary
|
Passing By. Meaning In Words. Errors. |
[ |
There's sometimes no real meaning in the lyrics of the things that I listen to. Whilst I don't really have an amazing fondness for lyrics that have a banal content, or haven't been thought about enough, there's sometimes tracks where the sound is far more important than the words. I'd probably cite foreign tracks like that - the Italian Lacuna Coil tracks would do nicely. Say 'Senzafine' which is a wonderful track, and not just because it leads in wonderfully from 'Trance Awake'. Lyrically I can't follow it, 'cos it's so hard to keep up with things in a foreign language for me - I think it's just because I'm not used to those sounds together, but it does sound great.
Which wasn't a prelude to much, but kind of distracted me because I was looking at the lyrics to 'What Else Is There ?' and trying to see if there was truely any real meaning behind them beyond the 'sounding good where they are'. Maybe there is in general terms, and I know there is to me because I can overlay my own thoughts over it and it has a particular meaning to me. Um. I mean that I can relate to what I think I want it to mean. No idea if that's what they meant but anyhow. It's hardly a nonsense track, and I think there's a lot of thought in it, but it's not a deep thing. Anyhow, that's saying not much about the fact that I read something into a track.
I generally found that Jadis was very much a 'fit the sounds to the tracks' and treated them as such. It was a little surprising that the words are pretty decent. No offence to them! A lot of listening to music is it filling a nice rhythm for me anyhow.
To return, though, to Zero 7, they seem to have some sort of running theme through their spoken tracks. I'm not sure I can get a grasp on what it is. It's not like it's a major focus. Like, if I were to say "what's Archive's focus" the answer would be "Bitterness", 'cos they're pretty focused (albums 3 and 4, rather than 1 and 2). But there's some sort of 'awkward uncertainty about things ' feel to Zero 7.
It's after 1am now and I think I should migrate towards bed. There was some long important things I wanted to write. Not the important things, but just something that I wanted to write...
Ok here's the thing, and it might not be very well phrased but I'm going to give this a whirl anyhow. Obviously there's probably whole bodies of knowledge out there on this problem but I'm working from experience and my own thoughts rather than any academic standpoint.
Errors are the thing I'm bothered by. Chris and I have often discussed the problems of error hiding and the issues it causes. There's two forces at work here. The first is that the user should never see any error that cannot be recovered from. That's obvious - you don't want your user to get a segmentation fault which will mean nothing to them. The other is that you don't want to hide problems from the user or the developer. Simplest example is a failure to allocate memory should be returned as such, but you also need to know where the failure is occuring.
Let's say that you've got an allocation failure in your image decoder whilst trying to extract a PNG. You don't have enough room. You need to return this information back to the caller, which was part of the layout engine for your renderer because it needed to know the size of the image. Now should the error be 'couldn't get size of image', or 'memory allocation failed', or 'bad image' ? The layout engine is inside your document viewer and the error is passed back up to it. Because the size of the region is now indeterminate does it pass up an error saying 'bad layout', or replace the layout component with a 'broken' placeholder so that we know there's something there but that it was broken. If you've replaced the layout component and rolled on with the 'broken' place holder does this mean that the layout is now successful ? Surely not, because part of the layout failed. Is the 'broken' place holder wrong because it's not the document that's broken, but the system which is (currently) unable to complete the task ? How can the brokenness be corrected ? Will it just fix itself as memory becomes free ? Or will the user have to go through the 'try it again, it might work' process which seems to be increasingly common.
And this is why it becomes common. Error hiding like this means that the user doesn't know what went wrong. They just know that something was wrong, and sometimes you can just retry and it will fix itself, either because of memory (or other resources) becoming available, or because someone forgot to initialise something and the second time around the values are more advantageous. This is a terrible thing to happen. It's not as bad as the 'segmentation fault' type of error, but user confusion or the feeling that the software doesn't work reliably is completely unacceptable in a product.
For the developer, though, this sort of problem is both desired (we've gracefully recovered from a memory shortage) and frustrating (we don't know which component has failed or why). Graceful recovery is wonderful, but it (generally) involves error hiding. Maybe we can think of errors as being expected and unexpected. In RISC OS terms, expected errors are those that you would usually get through the SWI interface (say), V-flag set plus an error pointer is expected. Unexpected is an abort of some kind, or a generated error (which is actually far more serious because invariably you cannot recover from it - aborts are somewhat more flexible). Within those 'expected' errors there's some that are more expected than others. From a call to the filing system, a 'file not found' error is usually expected, whereas a 'Buffer overflow' isn't as likely.
Because each error has a number associated with it, handling the errors on a per-case basis is possible. Other systems use a similar method for tracking their errors. The C library has a number (3, IIRC) of standard error numbers which it can use. Posix extends this to something like 80 (I think it's Posix, or maybe it's BSD, or unix in general, but I'm not going to look it up because the source isn't important here), many of which are parameter or filing system specific. In neither case do you have any other context. RISC OS error blocks are number plus message, although the message is intended for human consumption and not machine parseable.
But checking against an error number table is still error hiding, and are the errors really suitable to be ignored ? Consider, say, the 'Buffer overflow' error; in RISC OS this is generally coupled with a register which indicates the additional space required. When writing libraries it is usual to think in terms of functions in a literal sense, which return a single value. In many places this has been tackled for the specific functions by returning -ve sizes for error cases and positive for size requirements, or similar. In any case, what of the error being passed up. If there's a buffer overflow because of memory allocation failure in dealing with an image file within a document, what gets returned back to keep track ? It's all about where the error goes.
If the error is returned wrongly as (say) 'cannot read file' when it meant 'not enough memory to expand image' because the error has been obscured at each level then you're left with a confused user, because the file is quite clearly readable and (they think) quite correct. And even if the file could not be read, which file is it ? Is it the file they specified, or something that the file depends on ? Is it some central resource that the application needs to load that file (a palette table, let's say) ? The filename might be returned as part of the message but does that really help ? What if the message is replaced by something else ? I know of a system where all the messages which were not 'expected' by the top level were replaced with the simple text 'Unexpected error occurred' (or similar - I don't remember exactly and I'm not saying what it was in). This made a whole lot of sense in keeping the user confusion down - no point in telling them that there was a failure in component bingle because it won't mean anything to them, so you might as well reduce the message to what they do understand, even if that means saying something as bland as 'unexpected error'. Does raise the question of what is expected, though.
I think of the ways of error handling and ponder whether exceptions are a a solution to this. They're not, in my opinion. Exceptions provide a separate exit method for routines outside the 'expected' course of action. I've seen libraries that use exceptions as their normal action and I'm not at all convinced that that's sensible. Usually exception reports are singular; they deal with a single failing at a time.
To me, as a developer, a single error isn't helpful. You need to know the path that reached that point. Hiding the errors doesn't help to finding the circumstances for the error occurring. To me, getting out a backtrace because the application blew up badly is actually more useful. Not for any more reason other than that it gives you a good indication of the location where the failure occurred and the processing which was happening at that time. Obviously this is worse than a breakpointing, or tracing debugger, but I've become used to not having a decent tool for that sort of thing - so much so that I'm not actually sure what I would want of such a debugging environment. But that's another issue... The backtrace tells you where and what happened in a useful way. I presume, of course, that you can read the backtrace. Once you're used to backtraces in one form or other you can generally read others anyhow.
If the code had checked its pointers (let's say), or ensured that the file was open before operating on it (as another example - I know they're rudimentary, but they're easy to understand) then the backtrace might not occur and the fact that it was allocating the wrong amount of space or that the file wasn't actually there might have been missed.
So what am I working up to ? Well, I had an idea about the error handling. It's been there a long time - since before I went to Picsel I'm sure (around 2000?) - but it's that errors should be cumulative. If you return an error back to your caller, you also return whatever error you were given which caused that error. The problem, though, is what you do with this information. Going back to one of our earlier examples we might have a chain of errors such as 'cannot open file', 'cannot layout image', 'cannot read size from image', 'cannot read image file', 'cannot allocate memory for file', 'cannot allocate memory'.
It follows from this example that each instance needs to have some component of context information. Particularly if the errors are number-based then knowing what they refer to is a huge help. So you would have the document name associated with the first error, probably nothing, or maybe the frame name for the second, the image identifier for third, the image filename for the fourth and fifth, and finally the size of memory requested with the last. Of course these need to be associated in a useful way that they might be interpreted. How this happens is unclear.
Also there may be multiple arguments to the error cases, for example an XML parse failure might return (for example) the document name, line and column of the error and possibly the XPath description of the element which failed - if it was a validation failure then maybe the expected content could be returned. This is mostly presentation content, though, not much of it is parseable. If you know there there's a file name error, then it's possible to offer the user the opportunity to change the error, but that doesn't help if the filename was embedded in a remote document - the filename might be replaced as soon as the document was refetched.
Does this help the user, though ? It depends on how this information was presented. The top level error would be the usual one you see. In this case the error is 'Cannot render document', and that's ok because if they saw that they'd know something was wrong. If the user could click on an option to say 'explain why' and get the list of faults then maybe they'd be wiser - they'd finally see the 'cannot get enough memory' error and know how to fix it. Here's the big question though... Does this prevent the user being confused and feeling out of control ? I think so. To put it in a slightly more commercial sense, does it reduce the support requirements ? 'possibly'. The advantage is that some users will be able to address the issue themselves. The disadvantage is that given the greater amount of information, some will just give up in the face of the jargon. Can this be reduced by hiding the 'middle' errors, as (in the case cited) the important failure is the 'out of memory' ? From my own experience I'd say not because it's possible that the error at the end is nothing to do with the cause. If the 'out of memory' is because the document is malformed and had an invalid size specifier then you might miss the true cause which would be in the middle probably with something like 'cannot create element bingle'. Additional checks might catch that sort of thing, but each additional check introduces more complexity and might make things more difficult to see.
How many layers will our errors have ? Probably too many. In all but the simplest of applications there are so many layers that may be active that it may be difficult to pinpoint the root cause - having all the information available may just be adding more noise to the pile. And then there's the issue of the memory failure. If we are out of memory then how can we accumulate these errors which are of an indeterminate number as we step back up to the callers ? We could allocate a few 'handy' error details but each of those arguments we need to associate with the errors might be large so how many and how big is 'enough' ? Is it acceptable to just kill the system under those circumstances ? I'm pretty sure it's not, but it's not all that different to a stack overflow which is generally unrecoverable because we have no stack to recover with.
There is also the issue of object availability as you're returning the error. Although strings can be copied easily, if the error that is being returned refers to an object (structured entity in memory) can that be returned as one of the arguments to the error ? What if, depending on how far up the application we go, the object is destroyed ? In this case, a garbage collected language helps because the object shouldn't be destroyed because we're still holding on to it (presuming, of course that this prevents the garbage collection). It also may prevent the error from being recovered from - if the object in question was the root object in a structure then the error's reference to it would prevent any free of the memory taking place and thus recovery from a memory shortage would be far more unlikely.
Every time I've thought about this, I've considered how exactly to do a decent implementation, but the problem is that you need to start the system that uses this sort of error handling from the ground up. From an application's standpoint that means that all your libraries have to use it or any of the interfaces you use might be hiding the error and you have effectively a 'black box' which you can get no more information from. 'Black boxes' are great when they do what you want but the problem of lack of extensibility always hits you if you want to move outside their set purpose.
The issue of complexity for the error reporting system becomes a limiting factor - the harder it is to include the error reporting, the less likely it is to be used. That's one reason why (another being a lack of any concensus over the 'best way) that no complex error reporting system seems to ever be used. I've never come across a system which uses an accumulating error report - unless you count a backtrace from system failure, but I pretty much discount that as that falls into the 'unexpected error' case.
It may be that the goal that I'm trying to satisfy - that of being clear to the user and developer - is not one which can be met usefully.
Quite a few years ago (about mid-2000, I think), I tried an experiment in writing an application using only pass-by-value and return by value for all function calls. I wanted to confirm to myself the general belief that I had at that time and my expectation that this would be slower and harder to write usefully. It wasn't any harder to write, in fact many things became far easier. It was slower than I had anticipated, though, and I was far more wary about doing anything similar in the future. It was a very useful exercise, though, in showing up both how well and badly suited it was to the task. I've only played with prototypes that use accumulating error reports. I need to actually spend the time trying it out to see whether there is some great gain in it. My gut feeling is that it cannot be worse than the single error report, but that the additional work involved in writing code like that may make it unrealistic.
Anyhow, those are some thoughts on 'Errors'
. It's not Important,
but it matters a little that I write something down, even if I don't have
the One True Answer.
Return to top | Comment on the diary
|
Don't think about it. Little things. |
Don't think about it. Again.
Lots of little things today, all being frustrating for a variety of
non-amusing reasons. It seems that the more things you write the more
likelihood there is that the bugs you find will be your own. Obviously
that's statistically likely, but still it's a little... well, annoying
really. What've I fixed today ? One race condition that I should have
foreseen in memory allocation. Three or four little places where code can
shortcut certain operations if the operation will be ineffectual (things
like 0 byte transfers, wait for 0 ticks, etc). Improved the memory handling
on a couple of things so that they don't fragment as much. Got very
frustrated whilst debugging one thing because some of the debug code which
used 'if (err);' had a completely invisible semicolon, despite
being looked at many times over the course of an hour. And finally I've
identified that I'm very unhappy with the behaviour of two components -
they're far more noisy than they should be for the system. One of them's
mine, and I've known it was poor for a long time. The other one is generally
ok, but has some very poor parts - but isn't mine. I'm not sure I can
completely improve it, but it's likely that I can ditch some of the
particularly bad bits in it.
That lot, and trying not to distract myself by thinking about other things which seems to have been harder today than usually. Oh well.
Return to top | Comment on the diary
|
Ready ? Jessica and William. |
Ready for Operation Depth Charge ? Don't touch that dial...[ Ready ?; Last.fm holding page ] |
Last.fm is being upgraded today, apparently.
We went to Liz and Johns today, and most of the family were there, so I got
to see Jessica and William. They're both really gorgeous
.
Oh and someone left a nice comment about my helping them find the track used on 'Dead Like Me' (Boom Boom Ba, by Metisse). As Sky are currently re-showing the first season (I think), this may be why.
Return to top | Comment on the diary
|
What do we do now ? Dreams of banks. |
I dreamt this morning that I'd someone at a bank had caught me leaving some back door into their computer system, only I had no idea how I had ever done it, even though it had all the markings of something I had done and (eventually) I remembered my password to disable it. I felt very lucky that I'd been let off so easily, having just removed my hack. Someone was with me and made themselves scarce when I was taken to one side by the manager. I don't know who she was. The woman that was with me, not the manager.
Agent Bacon: What do we do now ?[ What now?; Two agents; Chitty Chitty Bang Bang ] |
Ok, I don't know what the agents' real names are.
[ |
Having had a whole evening of bouncey music, I decided to put something a little sadder on, so I decided on Tracy Chapman's 'Fast Car'.
Bruce Forsyth is in 'Bedknobs and Broomsticks'. Strange.
Return to top | Comment on the diary
|
Don't think. Chitty Chitty Bang Bang. Pyjama Fetish. |
Don't think about it. Don't think about it. Don't think about it.
Eek, I didn't realise that Chitty Chitty Bang Bang was by Ian Fleming. Nor that the screenplay was by Roald Dahl. Clearly I'm just dim for not knowing these things..
Scarily, in google searches for 'Pyjama fetish', I'm on the first page. I blame Julia Sawalha. And Stephen Moffat.
[ |
Return to top | Comment on the diary
|
Monitors. Feeling urgh. |
I've now got more monitors than I can cope with. Well, that's strictly not true, 'cos I can cope with a maybe another two before my head explodes. Simon's returned his RPC and A5000 to me 'cos he's not got any room. And with them, an old Acorn monitor. So I'm currently using it for the main Windows PC (actually playing Half Life 2 DM on it). And there's still the VM Pro for my main RPC (BNC for the ViewFinder and D-Sub for VIDC) and the 15" monitor for the build machine, and the laptop itself. The server doesn't have a monitor usually, 'cos... well, it's a server.
I woke up this morning feeling pretty naff. And things didn't get all that much better through the day. Oh well. On the plus side, I talked Simon through fitting the new HD and I think he's quite happy with that now.
Return to top | Comment on the diary
|
Saying the wrong thing. Bland. Burnt arm. |
I think it's reasonable to say that I've become so concerned about saying
the wrong thing that I no longer want to say anything at all.
Sometimes things seem to be just varying shades of bland.
I burnt my arm a few days ago. It hurts still. I'm not sure exactly how I burnt my left arm because I was reaching why my right, but it is sore and burnt to prove it.
Return to top | Comment on the diary
|
Pirates 2. Tiny mouse. |
[ |
Pirates Of The Caribbean 2's out now at the cinemas. I'm going to have to go
to see it at some point soon. Only I always feel odd going on my own. I
don't suppose there's anyone in Norfolk who'd want to pop to the cinema with
me ?
Golly, two direct requests of my readers in as many weeks. Must
stop this. I've been trying to avoid reading too much around as to what it's
about other than that it exists, 'cos... well, I want to be surprised. I'm
not sure it'll be a huge surprise because at least I know what it's about.
Greebo brought in the tiniest of mice earlier. Poor little thing was terrified. I took him outside and put him on the other side of the road and he ran off towards one of the houses. Greebo's shut in the house so I'll have given the little mouse a good start.
Return to top | Comment on the diary
|
The Cube. In Theory. |
I watched 'The Cube' today. Very, very strange. Not sure if it's stranger than 'Cube', but it's certainly odd. As the thing that started the film off, it certainly is interesting.
To quote Alyx "Well, that was random"... ok, so that's using a quote from
2006 about a 1969 film, but hey, what the hell
.
It's too hot to sleep just yet, so I thought I'd go downstairs and watch something. There's a DVD in because I was watching TNG 'The Nth Degree' last night, so I pick a random episode - 'In Theory'. This seems to be about Data having a romantic relationship with some woman. Mildly amusing but too cringeworthy to actually watch, so after 20 minutes I turn it and the telly off. As I get up, I knocked the remote and the telly came back on again on Sky One, which was showing... 'In Theory'... Now that, I would say, it one hell of a coincidence.
[ |
Matthew Godbolt seems to have got his little WeeBox up and running now. Funky.
Important things (unlike the dull, unimportant things which I usually talk about) related mostly to Chocolate Oranges...
Chocolate Orange should never have had the tag line 'tap and unwrap'; clearly the person who came up with that never had to actually get one apart, or they'd have used the words 'smack', 'smack', 'thump' or maybe 'whack'.
Chocolate Orange doesn't taste as nice when fridge cold.
Chocolate Orange doesn't feel as nice when summer room hot.
Chocolate Orange from the fridge followed by lump of Wensleydale Cheese tastes surprisingly nice.
Well that's all I can remember right now.
Return to top | Comment on the diary
|
Get the message. Burn. |
I was thinking this morning, in a sort of general way, about how to get a message to someone without worrying so much about being overheard. Let's say you're a subversive organisation. Let's say that you don't really trust your email communications, or general message boards for one reason or another. Let's assume that you want a way of leaving a message, rather than a direct communication channel (such as IRC, or even one of the more proprietary network systems). Why not leave your message in completely plain sight where it's archived away for you so that even if it's removed you can get it back? Sounds like a publicly available Google Mail account ? Maybe, but my thought was for making things intentionally public - use wikipedia!
Pick a random wikipedia article. Preferably one that nobody actually cares about. Replace the entire text with your message. Use simple obsfuscated language if you like, because obviously you don't want to say "We've scheduled the attack on the station for 12:30, not 11:30, 'cos Jacques has a dentist appointment..." But just stick it in plain view for everyone. The Wiki police will no doubt come along and erase it at some point, but who cares because Wikipedia keeps a log of everything. You can always go back and find the messages as they were posted. And you can repeatedly change the message, so to reply, you just change the same article again and again. Include code words or special language if you want to ensure it's from the right person.
The advantage of this is that any snooping body ('The government' or whatever) would have to monitor changes within the whole of wikipedia to find these sorts of things. Having a simple system for changing the article used could give you a lovely way to hide your messages. It's hardly complex, and obviously Wikipedia records an IP address, but then email did that anyhow, so you're not losing all that much there.
Just random wonderings anyhow.
I've got a burn on my arm. I'm not quite sure how it got there, but it's
been itching like mad all day
.
Return to top | Comment on the diary
|
Radio headphones back! |
My brother's given me back my radio headphones, as he's not using them. So now I can play at being a cyberman by myself. Bit grainy; the camera doesn't like the indoor light.
Simon did his 10K run today and got a medal.
It's just been so hot today that I can't sleep now. I thought I'd write something in the diary, but I can't find any words to write - hence this ramble.
Return to top | Comment on the diary
|
Fed up today. Took apart 5mx. Put 5mx back together. |
For some reason I'm feeling quite utterly fed up today. And I'm sure it's all because of me. The only thing is that when I'm feeling bad I tend to do stupid things, either intentionally or not. So I have to watch myself very carefully. That said, I usually miss the blatantly stupid in thinking 'oh that's a good idea'.
A while back I found my Psion 5mx that had been hidden away in a cupboard for a few years. It's broken - it only displays horizontal lines. Which means the ribbon cable that feeds the display is either loose or cracked. So I thought I'd take it apart and see if giving the cable a bit of a prod would help. Since I've not really missed it in the last few years, I think it's probably reasonable to try - hardware and I don't get on, so it seems quite likely that I'll have a load of unuseful bits afterwrd.
So, I took it apart, having finally found a screwdriver that could remove the screws. There's a handy little guide that someone made to make this easier. It's even got pictures for thickies like me. Getting the back battery compartment section off was somewhat of a challenge, but once I worked out that the cover was catching on the spring it was easy to remove.
Once apart, it's pretty easy to see why the cable might break - it's being continually flexed as the lid is opened and closed. I gave it as good a prod as I could back into the slot and began reassembling the machine. There's no explicit instructions for this and getting the base back on again required a little bit of force. But once together again I stuck the batteries back in and lo and behold... it's just as broken as before.
Which is great! It's a piece of hardware that I've taken apart, put back together and it kept working. Or at least, wasn't any less broken than when I started. Yay me. Now the likelihood of fixing a 5mx is pretty low, so I guess it's unlikely anything will happen with it now. Which is a pity, 'cos it's quite neat.
Hmm. It looks like PsionFlexi do a repair service for this problem.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||