Monday, March 23, 2009

Working without root access

For so many years I've worked with unix machines where I've had root access. To be honest I've got a bit slack, it's so easy to install software, libraries and python modules as root and I'd forgotten that you can live without root access and have the environment you want.

Naturally there is a security benefit to installing everything possible with just user rights.

My own bin path

Create a bin directory in your home directory.

Add this to ~/.bash_profile:

export PATH=~/bin:$PATH

So my local binary is favoured over the system ones.

When building with configure, use this option to build and install in your own $HOME.

./configure --prefix=$HOME

When you do make install, everything goes in ~/bin and ~/lib

Personal python modules

When installing a python module use this:

python install --home $HOME

Watch where it installs the files and in ~/.bash_profile add a line like this:

export PYTHONPATH=$PYTHONPATH:~/lib/python

rsync to a machine with my own rsync binary

When deploying software I like to use efficient rsync to copy over what's changed. If the remote machine doesn't have rsync installed, you can install your own copy in your own ~/bin directory and use rsync over ssh while telling it where your binary is at the other end. Here's the trick:

rsync -avz --rsync-path=/home/$USER/bin/rsync $SOURCE_PATH $USER@$DEST_HOST:$DESTPATH

So the --rsync-path is set to the path to an rsync binary at the other end.

Any other handy tips?

Friday, March 20, 2009

Django is Awesome

Unlike the computer systems at this airport in Malaysia, Django is Awesome.


I've been using the neat trick of simultaneously gathering requirements and turning them into Django "Models" (which are object wrappers for database tables). This allows me to immediately show a lovely Admin user interface and try entering data.

Entering data into a new schema is an excellent way of finding out what you've forgotten and where the foreign keys should be.

For the first time, I'm using Django's Model Inheritance which makes it much easier to model the real world.

The only danger is that the customer sometimes thinks the software is virtually complete.

Three weeks working in Singapore and Malaysia is coming to an end tomorrow. Some things I saw:

  • Food is cheap, I've been having a hearty lunch for about AU$3

  • One low cost airline charges you AU$40 if you have any luggage at all

  • One of my workmates was robbed of his cellphone and laptop as he slept in his car near a toll plaza with a window down a bit

  • While the economy may be down, the building of hi-rise apartments seems to be booming

  • Most of the internet connections here, even in businesses, have high packet loss

  • Traceroutes from Malaysia to Australia sometimes go via Japan. IP geocodeing sometimes puts me in the middle of Paris

  • There is massive over air conditioning here. Often you go from steamy outside to freezing taxis to steam to freezing offices. I went out and bought a coat. I wonder what the electricity consumption per head is?

  • All good fun, looking forward to getting home.

Tuesday, March 17, 2009

If the Internet is oxygen, I'm suffering anoxia

I'm currently working in Malaysia, home of the Internet Super Corridor.

When I moved into an apartment with broadband supplied via an ethernet socket in the wall. It didn't take long to realise that the service was bad.

Picture 1.png

It's not just at the apartment, at a local cafe I tried to sign up for a Wifi service AIRZED. After messing about for around two hours I gave up and emailed them from elsewhere:

"I could not log in to your service after registering and paying.

Please cancel my account and refund the payment."

They wrote back:

"Please accept our apology.
It was due to some techical errors on the billing system which did not capture the payment made.
I have manually updated your payment into the system. Could you please try whether it is working now.

Ivy Chan
Accounts Dept
Airzed Broadband Sdn Bhd"

Can you read Ivy?

Apparently not. My money's gone and I'm not at that particular cafe any more.

The PJ Hilton's room internet was pretty bad (but not as bad as at this apartment).

Oddly, the best internet service I've experienced was wireless when I tried a Wimax modem.

I complain about the Internet in Australia but after spending time in marvellous Malaysia, maybe things aren't so bad.

It is time for quality of service guarantees for internet connections.

Thursday, March 12, 2009

8Mhz IF notes from VK3EPW

Regular readers will have seen that I've been publishing construction notes from Peter, VK3EPW for his multi-band transceiver.

He's just sent me detailed notes on the 8Mhz IF section which I've incorporated into the original posting here.

Aside from the electronics theory, Peter's construction is simply wonderful with circuit boards laid out manually with Dalo pen and shielding compliments of Milo tins.


Thanks Pete.

My Tracks - nice Android App

The Google integration really is useful. Grabbed a little App from the Market called My Tracks that records your travel and then allows you to send direct to Google My Maps.

View Larger Map

That's the taxi ride from where I'm working to where I'm staying. Wish I'd collected more of them, you get some interesting deviations catching taxis here.

Liking the G1 but it doesn't take much data and GPS use to run the thing flat within a day. This tends to happen when I'm in a taxi and we're both lost on the way home.

Monday, March 09, 2009

Getting through registration on an unlocked G1

Purchased an unlocked T-Mobile Google Android HTC G1 phone over the counter in Singapore. It worked when I put my roaming Telstra SIM into it, great.

But, silly me, I did a factory reset on it to start fresh - it was cluttered with all sorts of junk from whoever unlocked it.

After a factory reset it reverted to just knowing about T-Mobile APNs and demanding that I authenticate with a Google account. Wifi is off and inaccessible, and of course it can't get to the network using T-Mobile APNs.

So I was stuck.

After much research (mostly incorrectly searching for how to bypass registration), here's the trick that worked for me.

  • Turn off the phone (hold the hangup button)

  • Hold down, and keep holding the Menu button while powering on

  • After the Android splash screen, you can let go of Menu when you see you're in SAFE MODE

  • Press Menu and you'll see an APN button, press that

  • When the list of T-Mobile APNs shows up, press Menu again and you'll get the option to add your carrier's APN

  • Make sure you get the MCC and MNC numbers right, that's how it decides which APN to use. Mine came up automatically but I've seen another phone that had the wrong ones.

  • Turn off the phone. Turn on the phone as normal (no Menu hold down).

  • Go through the intro and register a Google account, or make one if need be.

After all that I'm happily doing 3G data on a Maxis SIM in Malaysia. I notice that automatic setting of the time didn't work but that is no drama. Great toy.

A big walk around Singapore and a G1

weather.jpgTook the opportunity of a Saturday off to take a big walk around Singapore. In the end I walked for about four and a half hours.

Oh, looks like it's going to be a bit hotter on Sunday, better dress for that!

Starting where I stayed near the Tanjong Pagar MRT station, along South Bridge road, left at Cross street, along Havelock, over the river on Kim Seng Road, right up to famous Orchard Road in the North.

Walked the length of Orchard Road turning right at Rochor Canal Road to arrive at my destination, the shopping centre of technology Sim Ling Square.

I got to Sim Ling at 9:45 and it was mostly shut. There was a street market near by so I hung out there until things opened up. Most of the shops didn't open until about 11am.

Picked up a little box that plays video, such as DivX encodings into your TV. It has a USB host connector and an SD card reader. It does a pretty good job but I feel it is under powered and perhaps skips every other frame but it will do the trick.

Back down to Victoria Street, South Bridge Road and home. Maybe just a lazy 10Km walk but it passed easily with all the entertainment of looking around a strange, for me, city.

shooting.jpgSingapore certainly is tidy and organised. The toll card system is impressively widespread. Like many asian cities with English signs, there's a war on the plural. You see "beware of pedestrian" as just one example.

Later we visited Lucky Plaza where TMobile G1 Android phones are on display and sell for SG$800 (7% of which is refundable GST at the airport).

If I hadn't used an iPhone, this phone would have been a revelation but up against a very polished competitor it's clear that there is still some work to do.

Screen and touch screen is very nice and responsive. We all struggled to guess where certain settings might be in the menus. The little keyboard is handy but I'm not sure that the extra depth of the device makes it worth it. It's narrower and thicker than an iPhone and doesn't sit in the pocket as well.


When the screen is swivel/slid up to expose the keyboard it won't lie flat on a surface while you type so I guess you are meant to hold it in one hand and peck with a finger.

I have a couple of Google accounts, I set up for one and then wanted to change but couldn't see how. In the end I did a factory reset.

Google's phone platform is a welcome addition to the marker, HTC makes some fine hardware under a couple of brands but the iPhone is still the benchmark in my book. Funny how the absence of multitouch, scroll physics and an accelerometer make quite a difference.

Update: it looks like it has an accelerometer but just doesn't use it for obvious things like screen rotation.

Thursday, March 05, 2009

On the road in Singapore and Malaysia

Not much time for blogging at the moment. I'm working in Singapore and Malaysia. It's great to be back, in particular Malaysia is an old favourite.


Normally I go into the ABC's Ultimo studio to talk with Fran Kelly on Radio National breakfast but rather than either missing a spot or doing it over the phone I conspired with Roi Huberman to do the item over the phone while I recorded my audio locally and sent him the file.

Roi then skilfully glued the two tracks together.

Aside from some mic popping at my end I think it worked out rather well. Sounds like I'm there.

The amazing bit is that I'm using a Verbatim brand headset mic that cost just $12. They seem to have a particularly good microphone but do fall apart pretty quickly.

Back in Singapore, I'm running a workshop on the Google Maps API and staying in an apartment on the 44th floor, pretty spectacular when there's interesting weather.


At night the sound of bad karaoke singing can be heard through the walls. Last night it was "I will survive" for hours.

All going well as long as I don't explode from all the food.


My news addiction is being satisfied by tuning in to the BBC world service on 9.740MHz. Seems strange hearing a super strong station on short wave. Presumably there's a local transmitter.

The boss picked up a couple of HTC Google Android phones today, they do look very nice but the keyboard keys are rather small. I'll have a better play and report back soon.