Flying Spaghetti Monster – Wikipedia, the free encyclopedia

Flying Spaghetti Monster – Wikipedia, the free encyclopedia

You should also check out http://www.venganza.org/ for the letter.

We’re now having to put up with people pressing for the teaching of religion in the Science classroom in .au as well.

Honestly – religion in a religion class and science class. Is it that hard for people to get that into their heads?

Although the 15 Answers to Creationist Nonsense should probably be examined by students.

If people don’t come out of school having learnt how to think then there really was no point to them going there in the first place. We will not progress as a species without understanding and thought.

(this isn’t to say that many core ideals of at least several religions are not a good thing. The idea of being nice to each other for a change is an old one that’s preached by many a religion. I just wish people followed it instead of pretending to.)

Election results page performance

Did the switch of the election-results page from postgresql to mysql today. It’s about twice as fast (crappy statistics there, but it’s an approximation).

This is using InnoDB tables.

With prepared statements we should be able to increase performance even further. I enabled the query log for a load of the page – we’re doing about 3,500 queries. Hrrm…. not so good. But using prepared statements should give us maybe another decent boost (a fair bit IIRC the parser overhead)

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.

Comments Are Evil

When a comment above a function says “returns -1 on error” and the code does the exact oposite (returns -1 anyway except if there was out of memory error, which may be #defined to -1 anyway) it’s a bit annoying when you first look at it.

Remember kids, comments in code are evil. They are wrong – or misleading at best. They only ever say what one person at some point in the past thought they beleived the code did. The definitive record is the code itself.

(there are possible exceptions to this rule… maybe… internals can be good to document – but arguably it should be *away* from the code so that you don’t start thinking the documentation is accurate and up to date – because it’s not).

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?

ndb_mgmd restart

One of the things I’m working on is adding the ability to use ndb_mgm to issue a restart command to ndb_mgmd (i.e. from a management client, get management servers to restart). At the moment, you have to go and shut it down then start it yourself.

So why would you ever want to restart a management server? Well, bugs aren’t really a reason – I’ve never heard of anyone having to restart the management server “just to get something to work again”.

The reason is online configuration upgrades.

There are a bunch of parameters you can change without having to restart your cluster. We call it a “rolling upgrade” as it’s the same procedure as upgrading one compatible version to another.

The whole procedure would be really easy if we only ever had one management server (which is what a lot of people have anyway – you only ever need a mgm server to have a node join the cluster).

It’s also tricky because you don’t want management servers up and serving different configurations. This would tend to be bad and never lead to hugs and puppies.

For supporting more dramatic configuration changes (e.g. add/drop node) we’ll be needing configuration locks and enforcing that everyone agrees on the config they’re serving out.

There exists some code from a previous effort a few years ago. So I’m having a look through it and trying to work out the state of everything. There seems to be a bit of bitrot and I’m trying to work ouf if anything is worth using.

The approach that I’ve come up with is to have a “single user mode” for the mgm server – i.e. nobody but one connection can do anything. This is where we’d do updates and changes before unlocking.

I wasn’t really caring about notifying ndbd about changes as the way you do things atm is to restart each ndbd and they then pick up the changes.

Otherwise, we really want a “this parameter changed” rather than “there’s a new configuration”.

So, the ‘mgm restart’ thing is really going to be implemented as “config reload” – getting the mgmds to stop and restart in the right order and so there is never more than one version of the configuration is being served at a time.

hrrm… back to the code to figure out what’s going on with this older stuff.

Fancy shortcuts to MySQL Bugs

So Elliot Murphy is talking about QuickSearch shortcut for bugs.mysql.com which is quite useful if you use Firefox.

However, I’m using Epiphany (which is based on the same rendering engine, but is a bit more GNOMEy – and besides, i’ve been using it for a while, i have all my bookmarks and saved passwords etc there).

So, a quick PHP script later, and I have a nice little command line version of the same script.


#!/usr/bin/php
< ?php system('sensible-browser ' .'http://bugs.mysql.com/search.php?' .'cmd=display\&limit=10\&' .'status=All\&search_for=' .urlencode(implode(' ',array_slice($argv,1)))); ?>

Useful! Usage is like:


$ mybug 10950
$ mybug ndb

hope it helps.

maybe i’ll switch to firefox one day… when it’s faster.

Linux® in Australia

Jon talks about recent happennings with securing the Linux® trademark in Australia.

In what we laughingly call the past, we discovered that Linux was not a registered trademark in Australia and such our legal options in the case of someone abusing it.

So, we set out on the road of securing the trademark. It’s a long process (we’ve also put in some applications for some of the names LA uses) and our legal dude (I think they call them lawyers now, but ‘legal dude’ sounds cool) Jeremy Malcolm has been great in sorting out the stuff you need to sort out.

So, the way the Linux® trademark works is that Linus owns it, but since he has little interest in having to do the legal footwork (something about prefering to hack and spend time with family – you know, things he’s good at) there’s an organisation called the Linux Mark Institute (LMI) to administer it.

So, we’re (LA) being the good guys and making sure we’ve got good legal ground to stand on in Australia – and we’ve gotten Jeremy to do what’s needed to secure the trademark – which is (basically) prove that the right person is going to own it and it’s a good thing to have.

Getting people to say that they respect and support the trademark (by having an appropriate license from LMI) puts us in a better legal position.

Of course, letters from lawyers can scare people – but don’t be scared, this is just warm and fuzzy things for the good of us all.

(Small, cute, furry creatures not included)

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.

MySQL 5.0.10 released!

The next beta of 5.0 is out – 5.0.10. So go ahead and download it. You’re not cool unless you download it (you can find it here http://dev.mysql.com/downloads/mysql/5.0.html)

File swap it, torrent it, burn it to cds and give it to friends. Don’t you just love free software!

This release fixes a bunch of bugs that were holding back MemberDB from being usable on MySQL. This was bugs in new features, and the main one had already been reported.

There’s also been a few fixes for cluster which is always a good thing. Nothing show stopping though. We must be good :)

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….