New House

Time to write some blog posts on the new house. Here are some “before” shots. I’ll do a few posts on the various things we did soon.

Living roomfrontkitchen

No Comments

int overflow

I haven’t posted anything for a while as the result of a bad case of integer overflow.

Many months ago, I thought I’d dust of the old photo gallery and upload some more photos. After numerous failures I realized PHP has a POST limit of only 4 MB and I was trying to upload 5MB+ photos. This took me quite a while to work out, as it failed without an error. I thought a good solution was to up the limit to something big. 2GB should be more than enough for anyone!

When that still didn’t work I just gave up and posted the photos somewhere else.

Little did I know that I’d just broken almost everything php on that server. It took a couple of months before I finally realized that the max size of an int on this platform is about 2 billion… and  post_max_size = 2048M in php.ini actually wraps to -2048MB or so. duh.

So back to it!

No Comments

Themingly great

I finally spent a bit of time browsing the Wordpress themes. How does this one look?

There’s also put a link to my album in the photo gallery which used to be hosted at this address. Not too sure about the random image block in the sidebar yet though. I can’t figure out how to restrict it to random images from my album only, so you randomly see everyones photos.

Now, to update the photo gallery! I’ve decided to host my photos here, rather than giving away all rights to facebook.

, , ,

4 Comments

Programming for dummies

I just stumbled across Scratch.

Ok, it’s meant to be for kids, but I like the idea. It’s basically a visual programming environment for creating animation and music.

I found this via a post on the Google research blog about “Android app inventor“. They’re planning to make a similar graphical block-based programming environment for writing android apps.

I like the idea of visual programming. The traditional code-compile-run-test-stop-change-compile-run sequence is a little boring and time consuming. I want to change something “on the fly” and see what it does.

This programming style often seems to be associated with education. Greenfoot and Alice are two examples. If I was a real engineer, I may find myself playing with LabVIEW for programming microcontrollers and whatever else real engineers do.

But anyway. A couple of years ago I started working on a visual programming environment for creating video/audio/frame based processing applications - FraMMWorks. The idea is that you have a collection of building blocks (video sources, face detection, edge detection, etc) which you join together to generate an overall video processing “chain”. You can then save the resulting code as an executable and run it anywhere.

If there’s any interest I might just spend some more time on it.

, , , ,

No Comments

Google Real-estate

Browsing through this morning’s articles I came across a blog post for the new Google Maps Real Estate layer.

It’s a really nice visulisation of what is currently for sale/rent. And the best part – it works for Perth!

Here’s an example for some typical “first-home-buyers” in the Perth area. It’s interesting to see clusters north, south and east and some areas with no houses at all.

, ,

No Comments

Energy efficiency Microsoft style.

Microsoft’s latest technology –  Hohm – is ready to save the world from global warming.

It sounds, ugh, confusing.

The general concept behind it is good. In fact, it seems similar to Google’s offering - PowerMeter – which borrows the catchline:

If you cannot measure it, you cannot improve it. — Lord Kelvin

I can’t see how these “applications” will work yet though. It all seams a bit abstract and idealistic. The main issue is that someone needs to make a buck. Who wants to pay? The energy providers? Unlikely – they’ll loose money through reduced energy usage anyway. End users, well yea, but why would I want to pay for something I already know?

I suppose in essence it’s really about re-educating people. Which means it’s not going to make anyone any money. If companies such as Microsoft and Google have a spare few mil to throw at this – good on ‘em. But it seems a little fishy to me.

And for something amusing:
“Later on, Microsoft intends for the service to grab data from programmable thermostats and so-called “smart plugs” to provide better real-time information. It all sounds well and good until the day we’re inevitably forced to call Microsoft’s activation center after adding a deck to the house”
http://www.theregister.co.uk/2009/06/24/microsoft_launches_hohm/

, , ,

2 Comments

Backup using rdiff-backup

I’ve been using rdiff-backup to automate my linux backups for a while now. I just recently made some improvements to my cronjob which performs a nightly backup and thought I’d share it here.

Rdiff-backup is a great application which wraps around rdiff to backup entire directories from one place to another. It’s very efficient too. Rdiff only transfers the changes to files, which means it’s great for performing offsite backups.

Only problem is that it’s still not easy enough to use – so I wrote a script to *really* automate things.

Here’s how to get it working:

  1. Install rdiff-backup on local and remote computers (apt-get install rdiff-backup for debian/ubuntu, build for windows, build for osx or build from source for anything else).
  2. Copy this script to /etc/cron.d/backup (you’ll probably have to rename that downloaded file)
  3. Create configuration directories /etc/backup/ and /etc/backup/hosts/
  4. Create the main configuration file /etc/backup/backup.conf with your settings using this template
    # This is the config for a script which uses rdiff-backup to perform a nightly
    # backup of various
    # servers to this computer. It should be called via cron and should be
    # configured to send stderr to a sysadmin.
    #
    
    #==============================Config section==================================
    
    # local directory to store backups
    BACKUP_DIR=/usr/data/backups
    
    # location of remote host specific back up details
    HOST_CONFIGS_DIR=/etc/backup/hosts
    
    # Number of days to keep backups for. If unset backups will be kept forever
    KEEP_BACKUP_DAYS=62
    
    # parameters to pass to rdiff-backup
    RDIFF_BACKUP_PARAMETERS="--force"
    
    # set to 0 for debugging information to be suppressed
    DEBUG=1
    
    #================================End Config Section============================
    
  5. Create a configuration file for each host you want to backup. This must be in the format of “backup.hostname” – i.e. backup.hammer.cs.curtin.edu.au or backup beans.ath.cx. You can refer to the localhost through its name too (i.e. backup.mycomp). These must be placed in /etc/backup/hosts/
    # Config options for backing up remote computers
    # filename must be in the format of
    #   backup.hostname.domain
    
    # The directory to start the backup at.
    START_DIR="/"
    
    # Directories to backup. use a space to seperate.
    # INCLUDE_DIRS will have preference.
    # ie. if we include /usr/data/wilson but exclude /usr/data everything under
    # /usr/data/wilson will be backed up, but /usr/data/tim won't be.
    INCLUDE_DIRS="/usr/data/wilson/data"
    
    EXCLUDE_DIRS="/usr/data /proc /cdrom /tmp /mnt /sys /home/squid /home/www/gallery2"
    
  6. Create an SSH key with no passphrase which will allow you to logon to the remote computer without typing a password (we will be automating this with cron remember). This link gives some details.
  7. Create a cronjob to run the script.
    30 4 * * *     root    /etc/cron.d/backups

Your remote computers should now be automatically backed up every night!

I haven’t actually tried this with windows or Mac OSX computers, but I believe it can be made to work.

, , , ,

2 Comments

Making use of University Research

While not the best news article I’ve ever seen The Australian IT have a story about Innovation funding in the next budget.

An interview with the Minister for Innovation, Industry, Science and Research:

The lack of collaboration between business and industry — on which new jobs and economic opportunities depended — was “one of the great weaknesses” of the innovation system, he told a higher education conference in Sydney.

Australia ranked 16th out of 28 OECD countries for research collaboration between industry and universities in 1997, he said.

“By 2004 we had fallen 10 places to be last out of 26 countries,” he said.

I’ve essentially been working somewhere in the void between University and Industry for the last 4 years. On one side of the void there is the Universities. I’ve seen many potential projects from IMPCA which simply end with a research article. And I dare say this is exactly how Universities should operate. They should research concepts on the “cutting edge” of science and make the results publicly available (very public. i.e. give away this knowledge — don’t scrooge the ideas with patents).

Then there’s the other side of the void – Industry. It seems to me that companies are only interested in university research if it is “ready for market”. They simply want to make money instantly out of the idea without wasting time and money “getting it ready”

So, how do you fill this “void” between Universities and Industry? I’m really not too sure! :)
I don’t think simply pumping money into some form of “commercial ready” grant works, because you have to fund the right projects which will make money for industry. I suppose the only way to work out which are the right projects is more collaboration between industry and universities.

But how do you force more collaboration between industry and universities without just offering grants?

, , , ,

No Comments

Cane Toads Invade Western Australia

It would appear the inevitable has happened.

Quarantine officers found a male cane toad at the checkpoint between the Northern Territory and Western Australia border on Friday night.

The officers reported hearing the calling of the toads at the border late last week and say there is evidence to suggest the pest has established a breeding ground in the East Kimberley at Lake Argyle.

ABC news

Why is this a problem? It’s a problem because cane toads kill anything which eats it. Eggs and tadpoles kill the little things (i.e. frogs and geckos), toadlets kill the medium sized things (i.e. lizards) and adults kill big things (i.e. crocodiles). So they wipe out the native entire carnivorous population. And we don’t want a country full of herbivores!

What is being done to prevent this? I think the general attitude is best summed up by the term “meh”.

There are a few community based toad squashing groups (who catch and kill individual toads). I suppose they have the required enthusiasm (hell, they’re living in it, while I’m sitting in front of a desk in Perth), but I don’t think they will affect the situation at all. Official government responses to these groups seems to be a gentle pat-on-the-head.

Ok, How do we stop them? Look at the past. Introduced rabbits were a massive problem for Australia in the early 20th century. Hunting individual rabbits is almost laughable. The big ass fence cost a lot of money but didn’t work. Biological methods appear to have cut rabbit numbers dramatically since mid 20th century. Research and introduction of Myxomatosis and Calicivirus dropped numbers from 600 million to 100 million.

But that was after Rabbits did a lot of damage and money wasted on failed methods.

Why isn’t this proven path being taken to slow the toads? Well, this is where the “meh” factor comes into it. The West Australian government has provided a token $500k grant to begin research as well as funding a report into the “effectiveness of current strategies”. Federally, CSIRO have been researching solutions since 1991, but don’t seem to be getting anywhere in a hurry.

So, for now the only solution seems to be either raise cane toad research to a much higher level of importance (i.e. more money), or just give up an let them take over everything.

, ,

3 Comments

Adding drives to a Dell MD1000 storage array

We recently bought a Dell MD1000 storage array (to go with our Dell PowerEdge 2900) with 5TB of space. We’re running Ubuntu (I prefer plain old Debian…. but oh well…).

They say these things are expandable up to 45TB (all on a single virtual disk)… I wanted to make sure it’s really possible! Here’s how I did it:

I ended up using the Dell Open Manage command line interface as I couldn’t get the OpenManage web interface working with Ubuntu. I presume there’s something similar with the Windows install of OpenManager.

See this post to install Dell OSMA and open the manual for the omreport and omconfig commands.

  1. display the current controllers:

    omreport storage controller
  2. display the current physical disk status:

    omreport storage pdisk controller=1
  3. display the current virtual disk status:

    omreport storage vdisk
  4. insert the new drive (and take note of the bay number)
  5. reconfigure the virtual disk with the new drive

    omconfig storage vdisk action=reconfigure controller=1 vdisk=0 raid=r5 adisk=0:0:9,0:0:10,0:0:11,0:0:12,0:0:13,0:0:14

    where 0:0:9 was the new drive and 0:0:10,0:0:11,0:0:12,0:0:13,0:0:14 were the existing ones.
  6. check if it’s finished reconstructing with

    omreport storage vdisk
  7. wait….. wait….. go home…. come back….
  8. resize the partition and file system in your operating system.For me, this involved using LVM tools to resize the partition, then resize2fs to resize the ext3 filesystem

, , , ,

1 Comment