Entries for October 2004
October 6, 2004 at 10:15PM Listening for file updates on Windows
I’d really like to know if there’s a way to set up a callback of some kind or variety that would allow a program to be informed of when a certain file is updated. Not just any file, but a particular file.
I’ve taken a look through MSDN, disorganised heap that it is, without the slightest bit of luck. If anybody out there knows how, I’d love if somebody’d contact me and tell me. I don’t want to have to run a thread that would cycle through a list of files, checking to see if their datestamps have changed, which is the alternative.
I know the is possible on Linux and a few other nixen, but I need this in Windows.
I’m going to hack my comments system back into working tonight, along with a few other changes to the system, and I hope to have it back running tomorrow morning (UTC).
Update: I’m after finding this article and this one that mention fileio/base/findfirstchangenotification.asp FindFirstChangeNotification. Now there’s an system call that could do with a more obvous name, maybe CreateFileChangeNotificationEvent or something.
October 7, 2004 at 1:21PM Texts at 4am
I’m not the best of sleepers, and I find it difficult at best to drop off, but there’s one thing that doesn’t help and that’s getting texts in the middle of the wee hours.
Not that I don’t appreciate the texts, it’s just the timing is unfortunate. Let’s give a common scenario:
I typically go to bed at around 12am or 1am. My alarm clock died on me a while back, so I’ve been using my mobile phone’s alarm at full volume instead.
My mobile phone, when it’s like this, can be quite loud. This is a good thing when I’m using it as an alarm, but quite another matter otherwise. I turn it back down every morning after the alarm goes off.
During one my so so nights, where I’m just a little restless, I might be dropping off to sleep at around 4am. This is typical. But if this is interrupted, I’ll be wide awake and won’t be able to go to sleep at all. This is no exaggeration. I’m currently suffering from it today.
So imagine me, tossing and turning in bed, trying to get rid of some of that nervous energy that’s keeping me up. I’m just dropping off, when I hear: BEEPBEEPBEEP! BEEEP! BEEEP! BEEPBEEPBEEP! BEEPBEEPBEEP! BEEEP! BEEEP! BEEPBEEPBEEP! And I’m back to where I was four hours ago.
So please, unless it’s an emergency, don’t text me between 1am and 8am, unless you know that I’m not asleep or trying to get to sleep.
Cheers.
October 7, 2004 at 7:55PM Comments enabled!
I did a bit of tweaking with the comments, and they’re now working with the database!
It turned out to be a little more work than I’d expected because I’d changed the way I handled views and actions since I first wrote the comments code. It’s all back in synch now though.
The styles on the comments are rather basic right now. They’re more there to help them stand out than to look good. As soon as I’ve an idea for a nice layout, I’ll go in.
Those thinking they can now spam my blog should check the meta tags: following of links is explicitly turned off or any search engine spiders on any page with them, so don’t even try.
October 8, 2004 at 4:33PM Bayesian comment moderation.
An idea’s been bouncing around in my head for a while now. Right now, I don’t have any comment moderation, and I wouldn’t like to have to build a moderation system, primarily not because of the difficulty--it’s not hard--but because I don’t like the idea of moderation from an ethical point of view.
Seeing as I’ve set up my site so that any pages with comments don’t allow spiders to follow links off them, link spam in comments shouldn’t be a problem. But there’s the possibility of spammers posting up crap anyway, and there’s also trolls to worry about.
I don’t want moderation, but if I was to build it, here’s how I’d do it: Bayesian moderation. After all, if it works for mail, why can’t it work for comments?
Like with email, when you post a comment it’ll run it against a filter. If it returns a negative, it’s posted up, otherwise it’s posted on a moderation queue for me to check. I’d be informed by email of the addition.
There’d also be moderation buttons on each comment where people could mark comments for moderation, be it as spam or trolls.
Ideally, the system would be able to do most moderation by itself, quietly disposing of spam and troll posts without me having to worry about doing it. If there’s any doubt about the spamminess or trollishness of a comment, then and only then would it be dumped on the queue for me to moderate.
It’d be nice to have two filter databases rather than the one, one for spam and the other for trolls. That way trollish comments wouldn’t dilute the spam database.
October 11, 2004 at 4:28PM On Starting a New Project
I was talking to Peter last night about Laszlo. There are these times you need confirmation of why you have difficulty going off and either learning or writing something. I’ve a few projects like this, and something he said, quite off the cuff mind you, was a trigger.
He said, though I paraphrase, that to learn something you need some reason to learn in, and in the case of programming, that means a project that’s well suited to what you’re trying to learn. If you don’t have that right kind of project, you won’t learn the language or the technique.
Quite apart from Laszlo, I’ve been looking for some excuse to build something useful in ML, be it SML or O’Caml. But nothing’s came up. I’ve had a similar problem with Python: none of the projects I’m developing right now seem well-suited to it, and those that might be I’m doing in other languages because they offer some end user invisibility. That’s why I want to use Lua for Expresso (what I intend on calling MochaServ from now on), and for my eventual rewrite of Mocha (I’m installing Visual C++ and wxWidgets this weekend). Anyway, it’s a shame to waste such an nice icon. ![]()
Ah, but what to write in ML. O’Caml’s compiler generates code as good as, if not better than most C++ compilers with optimisations all on. But there’s no way to tie the likes of Python or Lua into it, nor are there any wrapper libraries for the likes of wxWidgets. So dispite it being a better language than C++, and one I really want to build something useful in, I can’t, or at least not without even greater difficulty than if I was lazy and wrote the core in C++. And there’s no sense in knowing a language in the abstract, theoretical sense, if you can’t build something in it that’s practical and useful.
And then there’s Python. I know Python, and know it well, but it’s about a year since I’ve written anything more than a quick hack in it. I don’t feel I write enough in the language. Maybe I should dig around for an SDL wrapper and write a game in it, maybe convert my old RISC OS game, Reaxion, to it. But do I’ve the time, or will I just start putting it off like I tend to do?
BTW, I’ve a project that could benefit from being written with Laszlo, both in terms of implementation and learning opportunities. I’m just wondering if its dependancy on Flash might be a disadvantage to its saleability...
October 11, 2004 at 4:29PM This Entry Has Been Deleted
The post that had been here unintentionally hurt a friend of mine. Its intention was misunderstood by the commenters who came later.
The point had been self-depricating mockery. I was laughing at myself. I’d left people’s names out in the hope that people would get the point of the post. But that didn’t happen, despite my protests. Maybe it’s that I didn’t make myself clear when I wrote, or something else, but regardless, the effect was not the one I intended.
I got a text a few minutes ago asking to have this taken down, and that’s what I’m doing, along with the attached comments. It might not fix what inadvertant damage has been done, but it’s something at least. It’s my way of saying sorry.
I would prefer if people would not leave comments connected to the original post.
Update: My comments code allows me to verify to some extent the identities of those posting. There was a seemingly innocuous, but false comment (dated October 16, 2004 at 11:29AM) posted here that I will be deleting in the next few days proporting to be from the person in question. I will block the IPs of anybody caught doing this: I don’t appreciate people lying on my site.
October 13, 2004 at 4:03PM Found a Copy of Opus III’s Mind Fruit! Yay!
I’ve been looking for a copy of Opus III’s first album, Mind Fruit--a most utterly excellent example of early house/trance--for ages now, at least eight years or so. It’s deleted, and impossible to find in the shops. But wandering about the Intarweb and stumbled across a copy for sale on eBay.
I asked Cormac to put in a bid for me--I’ve no credit card--and there’s only ten hours left till it’s all mine! And, at $3, so cheap too!
W00t!
October 14, 2004 at 3:24PM Digital Crew is Five!
Yay!
Most companies fail within their first four or five years in business, but Digital Crew is still going strong.
We’re heading for a celebratory dinner in Scoozi’s later at 6.30.
October 19, 2004 at 12:17AM The Difference between Europeans and Americans

With kudos to Rogi.
October 20, 2004 at 10:34PM Useful downloads for those doing the Hacker’s Diet
A while back I did up some nice clear PDFs of the Fitness Ladder (28kB) and the Daily Weight and Exercise Log (19kB), and I’ve put them online in case anybody wants nice versions of them fit for printing off. The layouts are nice and simple, and look better than those in the book, IMNSHO. ![]()
October 27, 2004 at 5:59PM Cork city centre is flooded!

Sweet mother!
I had to head off to CIT to pick up some tickets for the graduation ball. When I got back to the offices, things were fine, but Dan’s after looking outside the window, and the city’s completely flooded! It took just 40mins for a one-foot deep river to appear in the street!
Cormac took some photos:
- Right outside, looking at the GPO
- Poor bastards in the Vodafone shop!
- Looking down Pembroke St. towards South Mall
- Island in front of the GPO disappears
Update: It’s 7:15, and Dan, Peter and I tried to wade out to the Web Work House with plastic bags around our legs. Dan got as far as O’Brien’s before it got too deep for him, and he’s not a small bloke! Peter and I got as far as the top of the street before the bags started to leak. Our left legs are sopping wet. I’ve a feeling I’ll be walking into work tomorrow with my slippers on! It’s currently at eighteen inches.
Update (8:00pm): Now there’s people kayaking about the place! No change.
October 28, 2004 at 12:25AM My laptop’s keyboard has died.
It started with the left control key, then delete, now it’s minus. Feck this: I’m going moving everything onto my computer here at work.
And feck this company laptop: I’m saving up and buying my own nifty high-powered one.