Archive for August, 2007

Why we play the lottery

Thursday, August 30th, 2007

The chances of winning Lotto (New Zealand Lottery)
3,838,380 to 1

The chances of being killed by an asteroid
3,500,000 to 1

The chances of drowning in your bath
685,000 to 1

We play the lottery against extremely poor odds because our brains are hard-wired to look for positive reinforcement. If we win $10 on the lottery we’ll feel like winners even if we spent $30 to do so. We hear about a friend of an auntie’s neighbour who won the ‘big one’ and it stands out in our mind. We don’t place the same importance on all the millions of misses that no one talks about.

The same thing is true of horoscopes. We pick out a sentence or just a couple of words and because they might just apply to us (usually because they’re fairly generic) we recognise it as a hit.

I admit that there is a certain rush that comes with gambling which can be given a monetary value but I would say that most people, deep down, are expecting a big win one day and almost all of them will give a lot more than they get. This is fine for those with extra income but many gamblers are on benefits or are at the poorer end of the scale and should be spending their money more wisely.

In the last financial year, New Zealanders spent a total of $1,977,000,000 on gambling and I would bet (hyuk hyuk) that just about every dollar spent expected a return of some kind. Perhaps critical thinking should be a subject taught at school?

Bah humbug.

9 Months of Ubuntu

Monday, August 27th, 2007

Nine months ago I downloaded the Live CD of Ubuntu 6.06 (aka Dapper Drake), burnt it to a CD, popped it into my CD drive, rebooted my PC and had my first experience with Linux.

My background is in graphic design. Originally in print but in the last seven years it’s been mostly new media and in the last two years I’ve moved almost exclusively to web development. I’d spent a little over a year working heavily in Visual Studio developing web applications and used Macromedia (now Adobe) Studio 8 Suite (especially Fireworks, Dreamweaver and Flash) for all things graphical.

I’ve always preferred Fireworks over Photoshop for web graphics. I like the ability to work with vectors and the amount of control you get for rendering them as images. I know plenty of other designers who love to use Photoshop for web graphics though and they seem to get on just fine with it.

For the times that I’d occasionally take on a bit of print work I’d use either Freehand or CorelDraw. Yes, yes, I realise that Corel doesn’t hold much esteem in the print design community but in my opinion it’s the best all-rounder for the PC. In my Mac days I used Quark and then later InDesign with Illustrator and Photoshop and while they’re a brilliant groups of products they’re not all they’re cracked up to be.

I became a registered Microsoft Partner a couple of years ago and benefited from the plethora of CDs with just about every Microsoft application. I used Project, Office, Visio, InfoPath, OneNote and Visual Studio on both XP and Vista. I also ran Virtual PC with various configurations of Windows Server 2003 and SQL Server.

I think what initially annoyed me about Microsoft was that I began to get into developing standards-based websites (X/HTML + CSS) and grew increasingly frustrated with Internet Explorer’s (and Visual Studio’s) blatant disregard for standards. If you’ve ever developed a website using standards-based CSS you’ll know exactly what I mean. This frustration pushed me towards the concepts of open source and before I knew it I had gone from being a strong Microsoft advocate to a rabid hater. And that was even before I discovered Slashdot!

So, back to Ubuntu.

After trying the Live CD (which I contend has got to be one of the greatest selling points – it embodies the open source ethic perfectly, you can give it a go and it won’t go messing up your entire system) I decided to install it onto a spare drive I had lying around. It was a rather steep learning curve and I came close to throwing the towel in on a number of occasions. I’ve worked with dual screens for years and there was no way I was going to even consider doing any productive work without them. I’ve got an ATI dual head card and had to quickly learn my way around gedit and vim with the xorg.conf file whilst looking for technical support on the web via my intact laptop.

On a positive note, I loved the way you could quickly download free software via the simple Add/Remove button on the menu and felt quite special when I learned to use the terminal and sudo apt-get install. I was generally impressed with the quality of much of the free software available but many of them weren’t quite as good as the applications I’d been using in Windows.

I trialled – and subsequentially purchased – VMware Workstation which I then built a nice, clean install of XP (is that an oxymoron?) plus all my favourite applications on. At least this felt safe. I could go back to the ‘old familiars’ any time I wanted and do away with my anti virus applications at the same time (that’s the beauty of snapshots!).

At first I tried to use gedit for hand-coding all my ASP.NET applications and continued to run and test them on an instance of Windows Server but after the unadulterated beauty that is Visual Studio’s Intellisense (I’m not kidding) this seemed a huge step backwards. I had had a little experience with Python and so tried a couple of frameworks like TurboGears, Django and Pylons using the excellent Wingware IDE but couldn’t find a reliable hosting company and lacked the knowledge to set up my own Python+Apache-based server. I then tried PHP and found that it was far better supported by the hosting companies. It’s an ugly, ugly language but it’s widely used and there are a ton of PHP-based apps out there. My first website in PHP was pretty horrid but it’s been reworked a couple of times now and I’m using Smarty templates and a nice MySQL class along with URL rewriting (which is a pain to get working in .NET if you’ve ever tried). Recently I’ve started using Eclipse rather than gedit for my PHP website too. Oh, and I’ve also used Texy for the family forum.

So, where am I at with Ubuntu these days? I’ve rebuilt my PC once and upgraded twice. I’ve overwritten my old XP hard drive and am using it as my work drive along with a separate partition for my home directory. I’m now only occasionally starting up my VMware instance of XP to use Macromedia Flash or Firework and I have an instance with all the versions of browsers for testing my websites. I’m occasionally using the Gimp in lieu of Photoshop but it’s still got a long way to go. I recently discovered Inkscape and used it to design a logo for a fairly substantial customer – it’s a very nice application and I look forward to the day it’s able to handle print-quality tasks and perhaps even the vector-to-bitmap tasks that I love so much in Fireworks.

I’m happy with Linux. I may try a different distribution when I’m a little more confident as well. My experience has been much better than I was anticipating but there are still a lot of areas that need improvement before I recommend it to anyone else who isn’t willing or able to edit configuration files.

One thing that I’ve noticed is that the Linux community is over-represented by bad logos and stupid application names (having a K on the front of every KDE app is lame and recursive acronyms will never, ever be cool). I guess that’s the price of freedom. There’s not the same pressure from the market to enforce the survival of the fittest in the open source community.

Long live open source and all the splendid mutations it spawns!

Spam Filtering in Evolution

Sunday, August 26th, 2007

This is regarding the email application for Linux called Evolution, not some ethereal take on natural selection.

After hours of searching the web I found how to get spam filtering working properly in Evolution. First, make sure that the Spamassassin plugin is unchecked and that the Bogofilter plugin is checked. Now make sure you have bogofilter installed – go to the terminal and type sudo apt-get install bogofilter. You may have to restart Evolution for the new settings to take effect.

Now here’s the trick: Bogofilter needs to know what you define as spam and what you define as ham (not spam). I suggest you make a new folder and fill it with both real messages and spam messages. Mark all the genuine emails as important. Now select the all and hit Ctrl-J or mark them as junk. It’ll move them all to the junk folder and will remember that this is what you think spam is. Now you need to go to your junk folder and select all the ones you’ve marked as important (the ham emails) and hit Ctrl-Shift-J or mark them as not junk. It’ll now move all the good ones back.

I realise it’s really counter-intuitive but it’s the only way I’ve found to get it working. I’m not sure whether it’s OK to turn the Spamassassin plugin back on. If anyone has anything to add please let me know.

RIP Perry DeAngelis

Thursday, August 23rd, 2007

“The amount of years that she will live longer than us because of her [vegetarian] diet is directly proportional to the horror of that diet.”
- Perry DeAngelis 22.08.63 – 19.08.07 (a sceptic of ‘some note’).

So long big fella and thank you.

‘Bomb Scares’ and NZ Journalism

Sunday, August 19th, 2007

I’m annoyed at the state of New Zealand journalism. It’s embarrassing. Some kids let off some bottle-bombs (probably the kind you see all over You Tube [the dry ice or mentos-in-coke kinds]) and the New Zealand media leaps on it like the attention-deprived inbreeds they are.

This is sensationalist reporting at its worst. Is it any wonder Muslims with issues resort to this kind of thing when you see the reaction they are guaranteed to receive courtesy of a media system that has no sense of balance, ethics or humour?

I can almost imagine them sitting there, failed traffic wardens that they are, just waiting for the opportunity to be just as important as all those savvy foreign journalists who get to wade around in blood and bring the big-hitting items to our TV screens.

When they were reporting the incident did we hear them address the issue that these were remarkably underwhelming ‘bombs’ and that they were really nothing but noise? Did we hear that they might, just possibly, be pranks but that the police had to make the fuss they did as a matter of routine?

If we ever have a real bombing in New Zealand I think we can thank not the idiots who made these bottle-bombs or our involvement in western politics for drawing the attention of undereducated, over enthusiastic fundamentalists. We should look to the organisations that, literally, ‘promote’ violence.

The Water Bear

Monday, August 13th, 2007

This little critter (a Tardigrade) is less than a millimeter in size, lives in water, can survive temperatures from -200°C to 150°C, radiation, dehydration and extreme pressures. What’s more; they look totally cute and you’ve almost definitely eaten a lot of them in your lifetime.

I really must buy a microscope.

2001 Mars Odyssey Launch Video

Friday, August 10th, 2007

Last week the Phoenix Mars Mission was launched and it’s out there somewhere right now travelling at 16,000 miles per hour and will reach Mars on May 25, 2008 where it will rummage around on the northern icy plains. This video is from the previous Odyssey launch in 2001.

An army in the making

Wednesday, August 8th, 2007

According to China’s demographics they’re going to have about 30,000,000 extremely edgy young males hanging around looking for something to do in the next ten years or so. What happens to young human males when they are unable to find a partner to mate with? There is a huge increase in aggression. What happens when you take 30,000,000 aggressive young males who, as part of their culture, don’t question authority and combine that with suggestions that the USA can’t afford to pay the debt they owe to China due to a generation of baby-boomers who are now going into retirement? I don’t know – it’s not really my area but it might be worth thinking about.

Memorising cards

Saturday, August 4th, 2007

A couple of weeks ago I saw a Robert Winston documentary on the human mind. In it he talked about how we form memories by strengthening neural pathways. He mentioned that having multiple pathways will create more enduring memories i.e. if you meet a person who’s name is John you’ll have a better chance of remembering his name if you associate it to a person you already know well who’s called John.

I’d always been impressed by people who could memorise things and so I decided to give it a go and set myself the goal of being able to memorise a shuffled deck of 52 cards. It took me eight days but I can now have someone shuffle a deck of cards, spend five minutes or so looking at them and be able to recite them in order (forwards or backwards) and also be able to say what card is at a specific position in the pack (i.e. card # 34) .

I’ve since learnt that there are different ways to do this and that mine might not be the best way but here’s how I did it:

  1. Separate a pack of cards into suits and gradually associate each card with an object. Preferably an object that makes you feel something (like a puppy or vomit or a mousetrap).
  2. Once you have strong object/card associations for the whole pack try mixing them up and make sure you’ve still got those associations.
  3. Starting from somewhere in your house (I chose my bed) go on a linear mental journey through each room and outside to the letterbox. Break this up into 52 memorable places (cupboards, sinks, tables, etc) and try to flag the locations at 10, 20, 30, 40 and 50 as important (i.e. I have 10, 20 and 30 as sinks).
  4. Once you have a strong picture of these locations try taking, say, 10 random cards and put the objects associated with them into the first 10 locations. Try to feel something for the object/card/location association – for example, if you have a puppy in the hallway you could feel nervous that it’s going to pee on the carpet.
  5. Repeat until you are able to fill up all 52 locations with object/card associations.
  6. Now you should be able to recite a shuffled deck of cards backward and forwards and be able to easily say what card is at a given location (i.e. at position 23 for me would be three locations on from the laundry sink).

The science behind this is fairly simple: most of our evolutionary ancestors have benefited in some way by being good at remembering objects and locations. We’ve inherited their genes. Only (relatively) recently has there been abstract things like numbers and we’re not really all that good at it because it’s never really been a survival issue. If you forge a relationship between abstract numbers and recognisable objects and imagine them in familiar locations it makes it easier to remember them.

Derren Brown and dowsing

Thursday, August 2nd, 2007

And here is what I like about Derren Brown – he takes the paranormal, makes it his bitch and leaves us broken and slightly violated but a little wiser for it.

It’s got to make you wonder what else you may have swallowed from less honest conjurers.