tomboy

Since I’ve just upgraded to Ubuntu Breezy (the next release of Ubuntu, currently a preview release) I’ve installed tomboy. It’s like a Wiki for your desktop. Awesome. Seems to be pretty useful. Even more useful than the stickynotes applet. In fact, i think I’ll remove sticky notes.

The storage format for tomboy is a lot more resiliant as well. A file-per-note instead of one large XML file.

One day I’ll go through a bunch of GNOME apps and fix their file system code so that it becomes near impossible to loose data with unexpected reboots.

MySQL Melbourne Meetup

When:
Tuesday September 13th 7:00pm

Where:
Miro International Pty Ltd
Level 18, 31 Queen Street
Melbourne 3000, Australia

Thanks to Miro for offering their offices for the meeting.

What’s happening?
Stewart Smith will talk about:
– What’s new in MySQL land
– Introduction to MySQL AB the company
– what it does
– what it offers
– Graphical tools for MySQL
– MySQL Administrator
– MySQL Query Browser

RSVP
Please RSVP via our meetup.com site:
http://mysql.meetup.com/93/

After
We can head to a pub or out for curry.

Why “returns -1 on error” is bad

(a general note on what’s good practice)

In C, 0 is false and !0 is true.

In the dim past there was an elsewhere where 0 was true and !0 was false. Why? Because there can be more than one error state and this is usually more interesting than how many ways success could have been acheived.

Well, that sucks too – there’s information on success that could be useful (e.g. we succeeded, but only n bytes worth instead of the m you asked for).

So, the way of <0 on failure and else success came about for packing the maximum amount of information into the int that we commonly return from functions (and usually fits nicely in a register and it all leads to hugs, puppies and a warm feeling inside).

So what do most people do on error? Return -1.

Hrrmm… this casually (if not totally) defeats the point. In any function that does any real work, there’s going to be more than one place where failure could occur (even if it’s an error path that should never really happen… it will, but never to you… always to a guy somewhere in a country that you didn’t know existed and knows less $native_language than you have digits).

So if you get a bug report in with a log message (because you do print log messages when errors occur! – especially non-totally-fatal ones!) about a failure, and you go to look at that function and go “aha! this function must have returned -1!” Well, it just so happens that there are five places that could return -1. Where did your program fail? Without a core dump or something, you will never know.

So, what if these five places returned different error codes (which, of course, you wrote to the log)? Then you’d be able to narrow down the search for buggy code!

It doesn’t have to be a unique number, or even user understandable (especially when these are places that shouldn’t fail – or so you think) but it makes your job a hell of a lot easier if you can quickly jump to the bit of code you should look at.

In cluster, we have this great system where when really bad stuff happens, we get these nice trace logs of what signals have been cruising around the cluster recently. This greatly helps with debugging. It sort of makes you go “wow” when you first see a crash reported, trace file follows, and then a patch a few hrs later that fixes the problem. This is because it’s an aid in tracking down exactly where to look for the problem.

“It crashed” is never a useful bug report. But only having the facilities in your software for only being able to say “it crashed” unless you’re a developer guru dude isn’t very useful either.

The various backtrace reporting tools do a bit to help. As always, the more information the better. This is certainly the case when you look at the backtrace and go “how on earth did we ever get there?” or the stack is just completely hosed and you have no hope of finding your arse from your elbow (although these days valgrind will help you here).

Here endith the lesson.

missing macos functionality

way back when even the first touchpads were hammered into powerbooks (500 series, back probably close to 10 years ago now – if not a bit more) you could tap one corner, then another (quickly) and the cursor would jump from one side of the screen to the other (diagonally!).

I miss that. It’s useful.

Anyone know how to get X to do that?

Full iPod’s Lament

Well, it’s happenned – my ipod is full. Not so much full, as overflowing. There’s now a bunch of music that just doesn’t fit.

The good news is the 60GB ones are less than $600 – which is about what i payed for this when I bought it (wow, was it 18months ago… maybe).

The added battery life would be welcome too – esp when travelling.

noise cancelling headphones a no-no

Well, this review over at ZDnet seems to say that the Bose Quiet Comfort 2 Acoustic Noice Cancelling headphones have leather. The suck. Well, that strikes them off my list.

In case you didn’t know, I don’t do the leather thing.

There’s also a disturbing review over at Amazon from a guy who seems to know what he’s talking about (Grado make great ‘phones – mine are supurb).

So, the sound quality may not be all that great (although people rave about the noise reduction – and that’s worth something, but maybe for $299USD I’d expect something that at least matches my $150AUD Grado ‘phones).

So, anyone got ideas for something decent for travelling with (planes) that doesn’t involve a dead cow?

Maybe in-ear earphones is what i’m looking for….

faster IMAP

wow, courier-imap in sarge is so much faster than in woody. I see noticable speed improvements now. I also don’t see weird stuff happenning with offlineimap (terminating due to unexpected EOF). Much happier with mail.

Also, on another note, I’ve started using Evolution’s vfolders again. Talk about cool. Also, I still have memory free (which is a big improvement over times gone by).

A warmer place to work…

So, aparrently our 7 year heater is really old and we shouldn’t expect much from it.

No, really.

A switch had broken. Again. The same one that was replaced less than two years ago.

So, I ask our Northern European friends – what’s a good brand and model for a natural gas central heater that’s not going to require fixing every year?

Heater woes….

Aparrently they’re only meant to last 10 years.

Pity ours is only seven.

You’re also meant to have a service every two years.

We, of course, being responsible people, have had someone out every year – when it’s busted.

Oh, and the company that made it isn’t actually the company that made it, they bought it out and have nothing to do with this stuff.

Great.

So I sit with a small electric heater dreading going outside the office in fear of freezing.

It’s such fun going out in the car – it warms up quickly. I think I feel like going for a drive tonight. Anywhere really, as long as I can use my car heating.

Amazing amount of Cruft

Went through part of the package list on the box I use for mail. Wow, a lot of cruft accumulated over the years.

I guess it has been used for a number of things, and this Debian thing is so easy to just upgrade instead of re-install, so I’ve done just that.

Why I need X and GNOME and esound on a headless box that doesn’t make noise is quite beyond me. Oh well, I guess at one stage I did have a screen hooked up and the KDE desktop backgrounds was really important.