|
|
|
|
|
|
The what festival? Rather to my own surprise and several other people's, I went to the beer festival last night. This was the first one I'd been to since 2004, and not surprisingly since coeliac disease renders me permanently incapable of drinking (normal) beer, so one would naturally expect that beer festivals were things to which it was pointless for me to turn up. I was persuaded to come along anyway by a variety of lovely people, and I spent the evening drinking cider, which wasn't bad. I've often said that the thing which annoys me most about cider is that very tart dry cider seems to be in the overwhelming majority, whereas my taste runs more to sweet cider. (And, to be honest, sweet alcohol in general; for example I'll always pick sweet sherry over dry even if the former is cooking-grade and the latter really poncy, and I'm a great fan of mead.) This was illustrated particularly graphically at the cider bar last night, where they had about thirty different ciders available of which about five were sweet – and yet, when I went back to the bar for my second pint, all the sweet ones had sold out first and I had to make do with medium-sweet. What's with that? Everyone appears to want to drink sweet cider, but nobody seems interested in making it. Aren't market forces supposed to sort this kind of thing out? Two people went out of their way to tell me that before I arrived the Tannoy had announced the availability of a gluten-free beer. So naturally I went in search of that at one point. I couldn't find it, and eventually resorted to asking a staff member – who turned out to have just spent an hour searching for it on behalf of another drinker, without success. So I didn't get to try that, which was a shame. My usual irritations with the beer festival as a drinking venue were somewhat mitigated by the fact that for a change it didn't rain. In fact I think this might have been the only time I've ever been to a beer festival and not had it rain us all into the inadequately sized tent. The bar was still a mad scrambling crowd and I still wished I'd brought a chair of some sort, but it could have been worse. And I got to see lots of lovely people and even meet a new face or three, so for socialising sorts of purposes I was definitely glad I'd gone. As usual with beer festivals, I felt hung over this morning in astonishing disproportion to the number of units of actual alcohol I had. Never quite sure what that's about. |
| | |
|
|
|
|
Unexpectedly useful Unix utility ( why programs that do nothing can come in handy ) So nullfilter, despite my having originally assumed it would be a completely useless program for actually using, has proved its worth repeatedly in the last month and in fact might well end up being the one of my filter programs from which I get the most ongoing use! I almost feel there ought to be a moral here. Perhaps it should be a comment I recall once seeing posted on a newsgroup by (I think) pm215: ‘never neglect the trivial case’. |
| | |
|
|
|
|
Abstract things that annoy me, #3 in a series People conflating practical fixability with blame. Suppose something bad happens, and the person who is morally speaking most blameworthy is someone who it is practically speaking impossible to induce to modify their behaviour, stop doing it, fix the problem, whatever. In that situation you might regretfully have to approach somebody else involved in the problem, whose fault it either isn't at all or is significantly less, explain why the problem can't be solved in the ideal way, and ask them nicely to modify their behaviour instead. What you do not do is to go to that person and rant and rave at them self-righteously as if all the moral fault from the original situation is theirs! |
| | |
|
|
|
|
Microsoft 1-0 GNU I've just discovered that if you write the following code: if (condition); { statement; }
then gcc will accept it without question, whereas Visual C++ will give a warning pointing out that the semicolon after the closing parenthesis was probably not what you actually wanted to do. One point to Visual C++; none to gcc. Unusual, since gcc normally seems better at this kind of ‘probably not what you meant’ warning. (I wouldn't have made the error at all if it hadn't been for this wretched code I'm maintaining which was written by someone who didn't think there was anything wrong with five-mile-long individual source lines. I can't reliably check there isn't rubbish at the ends of the lines if I can't reliably see the ends of the lines!) |
| | |
|
|
|
|
Technical comments on the Chumby For any interested geeks in the audience, here's some more technical detail on the Chumby and my use of it as a high-tech alarm clock. ( geeky geek geek ) |
| | |
|
|
|
|
Alarming technology So, about a month ago, I complained in here about my alarm clock having particularly poor behaviour with respect to DST changes. A few days later I was ranting to some friends about this, and tangentially about how alarm clocks always irritate me anyway because their user interfaces never quite do what I want, and for decades what I've really wanted in this area has been an alarm clock for which I can write the software myself. My main annoyance has always been how you turn the alarm on and off. On traditional analogue alarm clocks, you manually enable the alarm when you go to bed each evening, and turn it completely off in the morning as a means of shutting it up. This has the obvious failure mode that if you aren't paying attention when you go to bed, you won't get up on time. The standard digital alternative is that you turn the alarm on and then it beeps at the same time every morning until you turn it off again; that has the slightly less obvious failure mode that if you're unexpectedly elsewhere it goes off anyway and irritates anyone nearby, and also that if you wake up early and decide to get out of bed, you still have to come back and stop the alarm beeping, or alternatively shut it off completely and (again) have to remember to switch it on again that night. So my solution involves an alarm clock with three basic states: alarm on, alarm off, and ‘you haven't told me yet’. In the last state, there's a big visible indication of some sort on the display which you'd have to be extremely absent-minded (or drunk) to miss. So essentially this is the analogue model – you have to manually enable the alarm every evening that you want it to go off the following morning – but with a big reminder making it nearly impossible to forget to do so. This seems to me to manage the best of both worlds. (In addition to that, if I was writing the software myself anyway, I wanted a number of other minor tweaks; for example, the ability to set a one-off different alarm time and have it automatically reset to the standard one the next day. Or the ability to use the snooze function as a countdown timer at any time of day instead of only being able to activate it when the alarm is actually in mid-beep. But the tri-state thing was by far the most important point.) So I ranted this at post-pizza a few weeks ago; this turned out to set in motion a chain of events which involved me and Ian getting about half way through designing an alarm-clock-shaped custom computer peripheral before someone pointed out that a Chumby might be just what I wanted: http://www.chumby.com/. Essentially, it's a small computer with a touchscreen, in an alarm-clock-sized package, able to synchronise to the correct time over a network, and (relatively) conveniently programmable by the end user. The Chumby Store won't ship outside the USA, but with a little help from my friends I was able to arrange for one to be posted to me anyway. It arrived two days ago, and since I'd been able to write most of the software in advance, it is now sitting on my bedside table acting as a nearly ideal alarm clock, and successfully woke me up this morning. Hooray! (I say ‘nearly’ ideal because there are still a couple of annoyances, most notably that the sound output is glitching in a really annoying way and I haven't yet worked out why. I'm sure it's in my software, because everyone else's Chumby applications sound fine. But as ewx pointed out yesterday, having your alarm clock make a really annoying noise is not necessarily a bad thing!) |
| | |
|
|
|
|
Omens Yesterday I changed my work password. Today I got in to work, sat down at my computer, and didn't absentmindedly type the old password. A good omen for the day, I felt. Two minutes later I was forcibly rebooting said computer in the hope that when it came back up it would talk to the network file servers more usefully. So much for good omens. |
| | |
|
|
|
|
Heard in the office just now My colleague Peter just produced this excellent bon mot: C++ shares with Lisp the property that you shouldn't be allowed to use it until you've used it for two years.
(He says he can't remember having seen it elsewhere, although of course people do occasionally forget that sort of thing. Whoever said it first, though, it's very good :-) |
| | |
|
|
|
|
The Infinity Machine Probably most of my friends have heard me waffling on about the Infinity Machine at one time or another. If anyone reading this has managed to miss it so far, you can find my article introducing the concept at http://www.chiark.greenend.org.uk/~sgtatham/infinity.html. Today I have a question about it to ask geek-inclined readers. The Infinity Machine has been a fun thought experiment for most of my life, but in one respect it's slightly frustrating. Its ability to search a (countably) infinite space in finite time would enable it to solve quite a few problems that are famously unsolved in the real world; but quite a few of those problems would simultaneously be rendered pointless to solve anyway by the presence of Infinity Machines in the world. For example, you could use the Infinity Machine to search all possible computer programs to find the one which was fastest at factorising large integers – but you wouldn't want to, because if we had Infinity Machines then a perfectly naïve factorisation algorithm would be just as efficient in practice and far easier to get working correctly. It occurred to me this week that there is a scenario in which that slight frustration might be resolved. Suppose you were suddenly taken away from your normal life and sat down in front of an Infinity Machine for a few days, or a week, or a month. Suppose you were free to write programs and run them on it, and free to write finite quantities of the output to real-world storage media to take back with you, but when your time expired the Infinity Machine would vanish and nobody would ever get their hands on one again. In this situation, asking the Machine for efficient finite algorithms would be entirely sensible, in principle. What would you get it to compute, in this situation? (Ground rules: to help you write your programs you can have access to a large library, and perhaps archives of reference websites such as Wikipedia if you want them. But you don't get unfettered Internet access while you're using the Infinity Machine: I don't want you doing things like factorising every key on the PGP keyservers, or all the root CA keys, because that's against the spirit of what I'm interested in asking.) Some thoughts on my own answer: ( you might want to think of your answer first, though I don't insist on it ) So, what do other people think? Perhaps I should ask some subquestions as well: - What could you do that would have the biggest effect on improving the world?
- What would you do in order to make yourself the biggest profit?
- What would you be most curious to know the answers to, even if nobody would ever believe you?
- And which of those would you prioritise most highly: what would be the thing you'd actually do if given the chance?
|
| | |
|
|
|
Misunderstanding what the difficult part of a job is. Specifically, the misapprehension that the hard part of a given job is thinking of a starting point or basic approach to the problem at all, when in fact the hard part is getting all the implementation details to work right given such an approach. People under this misapprehension will cheerfully suggest a variety of starting points, some of which might even be the right one but certainly none will be a good one you hadn't already thought of; they will then be puzzled when you look more rather than less irritated, and mysteriously don't thank them profusely for their vital contribution and spring immediately into action. In extreme cases of this, the person will provide several basic approaches and (implicitly or explicitly) suggest that you ‘simply’ try all of them and see which one works best, apparently blissfully unaware that they've just attempted to multiply your workload by three or four (or perhaps even succeeded in doing so, if they're your manager). |
| | |
|
|
|
|
Another confusing midnight curry-related wrong number call Long-time readers of this diary may recall that back in 2004 – around the same time of year, in fact – I had a rather silly phone call after midnight one night, in which a caller had tried for a curry house, got the wrong number, and when I told him I wasn't a curry house he persisted in trying to order a curry from me anyway. Last night, well past midnight, I had a wrong-number phone call from a curry house, informing me that a meal I hadn't ordered was ready for delivery. When I said they'd got the wrong number, they insisted that it was definitely the right number because it was on their computer as the number the orderer had called from. I said I hadn't ordered anything, and they said that in that case they were going to have to charge me £20 for a prank phone call. I said I hadn't made a phone call, and they insisted that yes I had. I tried to get them to tell me what address the delivery was meant for, in the expectation that it would turn out not to be my address, but the guy on the phone said he didn't have access to that information as he was ‘only a call operator’. (Seemed odd; a curry house wouldn't have struck me as the kind of organisation which obviously required a separate department for phone calls with limited access to databases.) Meanwhile, some other guy was clearly audible in the background and sounding quite panicked, saying ‘But I've got this curry! The curry's ready! What do I do with this curry?’ I eventually hung up on them, after getting bored with the endless repetition of ‘we're going to charge you £20’, ‘but I didn't make a call’, ‘yes you did, your number is in our computer’. I told them to send the bill for their £20 to the address the delivery was meant for, and put the phone down. I presume that it really was a wrong number, and that nobody had actually managed to make a prank call which caller-IDed as me. (Not least because if you'd gone to the effort of being able to do that sort of thing, prank calls to curry houses would be low on your list of applications for it!) So I presume that whatever address they had was not mine; certainly there was no subsequent ring on the doorbell with an unwanted curry (although I did dream a ring of the doorbell at 5am, and actually did go down to check it really was a dream and not a confusing curry-related caller). I imagine no bill will turn up in the next few days either, but if one does then I suppose I'll have to tell them to take me to court and prove I phoned them. But their persistence amuses me, or at least it amuses me now after it finished irritating me. My last confusing curry-related caller persisted in trying to order a curry from me even after finding out I was a private individual and not a restaurant; this one persisted in trying to tell me about my curry delivery even after I told them I didn't order one. Perhaps the proximity of curry is deleterious to people's ability to comprehend that they've got the wrong number :-) |
| | |
|
|
|
|
Thoughts on thoughts (IV) Gosh; it's been a couple of years since I last made a post in this irregular series, which makes it quite irregular indeed. I had coffee with feanelwa a couple of weeks ago, and we had a conversation in which it occurred to me that some kinds of programming, perhaps particularly at the level where you're only just getting the hang of it, are a fundamentally introspective process. If you want to program a computer to be able to do some task your own mind already knows how to do, one way to start working out how is to do it or imagine yourself doing it; then you watch your mind's process of thinking about it, closely enough to break it down into smaller steps. Then you write each of those steps in your program, perhaps by applying the same technique again. In other words, you're reverse-engineering algorithms and procedures out of your own subconscious: converting procedural knowledge into declarative. It had never occurred to me to think of it in those terms before, but I'm glad I did, because I've been strongly introspective from a pretty early age and now I feel as if I have a better explanation for why it comes naturally to me. ( now I attempt to apply this procedure to general sentience, with verbose results ) |
| | |
|
|
|
|
False positives These days, whenever I see (or worse still, find myself using) a noun phrase consisting of an acronym followed by a word beginning with the acronym's last letter, part of my brain twitches uncomfortably in a ‘PIN number’ sort of way – even if the last word represented by the acronym isn't the same as the following word. I'm also beginning to feel a reflexive flash of irritation on seeing the word ‘it's’, even in many circumstances where it's being used correctly. Subconsciouses are irritating things. |
| | |
|
|
|
|
Taxing paperwork I received a tax return in the post today; this will be the first time I've ever had to do one. Well, in fact I received part of a tax return; apparently the policy is for HMRC to send you the pages they think you're most likely to actually need – the exact phrase they use is ‘a Tax Return that we think matches your personal circumstances’ – and if you need any of the other pages, you can phone up and ask to be sent them, or download them and print them out. The reason I received a tax return in the first place is because I wrote a letter to HMRC last year notifying them that I'd made a small capital gain from some company share options. I therefore invite my readers to take their best guess at whether the Capital Gains Summary page is one of the pages included in the pack I was sent. *sigh* |
| | |
|
|
|
|
Irritation of the day Sprinting to catch a bus, successfully, but then realising when you get on the bus that you haven't enough cash on you for a ticket and have to walk after all. For added points, do this when the air is cold enough to make running particularly unpleasant. Still, I got there in the end, and a cup of hot coffee and one of Caffe Nero's extremely gooey and delicious gluten-free chocolate brownies made an excellent restorative. |
| | |
|
|
|
|
Errata Oh, rats. I am in fact wrong. In my previous entry, I was mistaken in the precise form of the node annotations required. ( correction ) |
| | |
|
|
|
|
Efficient deadline management with annotated B-trees At post-pizza last night Ian set me an algorithms problem, because he thought it would be right up my street. The solution I came up with turned out to be overkill for his actual needs, but it was a rather cute use of annotated trees which I hadn't thought about before, so I want to write it down somewhere. ( algorithms geekery ) |
| | |
|
|
|
|
Addendum (Of course, on this particular occasion it doesn't actually matter if my alarm clock is still wrong tomorrow, since I'm off work for two weeks and won't have to get up anyway :-) |
| | |
|
|
|
|
Collective time travel Last night was the first change of the clocks since I got my latest radio-synchronised alarm clock. This clock, unlike its predecessor, is unable to walk and think at the same time. Or rather, it's unable to both display the time and synchronise itself with radio signals; so once every 24 hours it shuts its time display down while it listens carefully to the radio for up to 15 minutes before being satisfied it's got it right. And it has to do this only once a day, because shutting the time down is annoying and has to be minimised. It turns out, in a staggering display of careful, attentive-to-detail design, that the time of day at which it chooses to do that is just before the radio signal adjusts when the clocks go forward or back. So my alarm clock is still wrong today, though it will presumably be right tomorrow. Or at least it had better be. Good grief, who can have thought that up? It's not even as if you need to fully comprehend the MSF signal to know the clocks have changed: there's a one-bit DST flag broadcast every minute. While I'm ranting, I'm also not fond of the way the clock change is officially mandated to happen. Instead of having certain times of day sometimes happen twice or not at all, it'd have been much better if they'd arranged that the hour between (say) 1am and 2am either went at double speed or at half speed, but remained monotonic. The only possible excuse is that the people who devised the current scheme had never heard of cron(1). |
| | |
|
|
|
|
Scattered showers A few weeks ago my shower developed an annoying leak. Every time I got out of the shower, I'd see a big puddle of water on the bathroom floor in spite of the shower curtain supposedly being in the way. This is the first serious homeowning problem which I've been able to solve without calling in a professional. However, none of the process was fun, not even the end of it. The stages I went through were as follows: ( long but hopefully faintly amusing account of DIY incompetence ) Bah. |
| | |
| |