Tuesday, December 15, 2009

DIY Null Modem

I know serial ports are heading  towards obsolescence but I still need to use them occasionally. One piece of hardware often required for serial connections is a null modem. The following describes how I made a DB9 null modem.

I started off by purchasing two cheap plastic DB9 shells, a DB9 plug and a DB9 socket. DSC_0177
Next I screwed the shells together and hacksawed through the cable side of the screw holes on one shell and the plug side of the screw holes on the other shell. DSC_0178
After gluing the two cut down shells together I had a shell with a space for installing a DB9 connector in both ends.


From here it was a simple soldering job following the null modem pinouts from nullmodem.com and I had a compact DB9 null modem to put in my toolkit!




Transfer Drivers When Rebuilding a PC

A colleague of mine was recently rebuilding a pc for a remote site with no internet access. He had installed pretty much all the required software he could think of in the office before taking the new pc to site and we were talking through the job when he realised he would need a driver for an obscure serial PCI card.

Without any precise details of the card he was unable to find a driver to download before heading to site. And with no internet access on site he couldn’t rely on windows to find a driver online.

The card in question was still installed in the existing pc which could be run for 15 minutes or so without blue screening so I suggested that it may be possible to extract the driver for the card from the existing pc and transfer it to the new one. A quick Google showed up a couple of excellent driver backup utilities that will find all installed drivers on a pc and back them up to a folder.

I tested a few of these applications. My favourite is Driver Backup which is a tiny c# application that doesn’t require an install. Just beware that because this is a c# application the .net framework needs to be installed on the pc you are grabbing drivers from

Wednesday, November 25, 2009

Technorati Claim

I’m claiming this blog for my Technorati profile, using token QV9BTY3WFXZU

Wednesday, November 18, 2009

Recording a Webcast

I often register for webcasts with the best intentions of attending, but they often end up running at times that conflict with other work of a higher priority.

Today I decided to record a webcast so I can watch it at my leisure. I did this using a very nice screen recording utility called CamStudio which costs absolutely nothing!

CamStudio captures the graphics and audio currently occurring on your PC and records them to an avi file. So I was able to simply join my webcast, start CamStudio then run off to a meeting. When I came back from the meeting I stopped the recording and used Windows Movie Maker to trim the excess from the end, add a title and export as a .wmv that I can watch and pass around to my colleagues.

One thing I had to work out before I could start recording with CamStudio was how to get sound to record. A few things have to be done here:

  1. In CamStudio select Options–>Record audio from speakers
  2. In Control Panel–>Hardware and Sound–>Sound select the Recording tab. Right click on Stereo Mix and Enable the right click on Microphone and Disable (on Windows 7)

Now the sound recording will be from whatever is sent to your PC speakers rather than your microphone.

Technorati Tags: ,,,

Sunday, November 15, 2009

Steve Irwin in Fremantle

The Steve Irwin

The Sea Shepherd vessel Steve Irwin is currently docked at C shed in Fremantle making preparations to head off on Operation Waltzing Matilda in early December to disrupt the Japanese whaling fleet.

We took a family trip down to Freo yesterday and went on a fantastic guided tour of this imposing black ship. Our tour guide was a Sea Shepherd volunteer who will be heading south on the Steve Irwin in December.

One thing our guide made clear was that the Sea Shepherd crews are not engaging in anything illegal. It is international law that the hunting of endangered species is illegal. The problem is that no country is prepared to enforce those laws in international waters. So it is up to an independent organisation to enforce this law.

The Steve Irwin Helicopter Sea Shepherd relies completely on donations to continue its operations, and the donation must be generous with the Steve Irwin costing in excess of one million dollars a year to run. The majority of the running costs are for the fuel required to intercept and harass the Japanese whaling fleet in the southern ocean.

Hollywood is heavily involved with Sea Shepherd. Anthony Kiedis of Red Hot Chili Peppers donated a large amount of money to fund the initial purchase of the Steve Irwin while Darryl Hannah and Pierce Brosnan are among those who have made a voyage to the southern ocean.

Tours run Friday to Sunday 9:30-5:30 PM and I recommend taking a look while the Steve Irwin is in town.

Thursday, November 12, 2009

Tether Your Phone Without Rooting it

Good news Android users, you no longer have to “root your phone” to tether it to a laptop!

android160A tidy little application called PdaNet makes this  possible. From what I understand PdaNet is actually a two part installation. The first part is a small application that you install on your PC. The second part happens automatically when you plug your android phone in via USB. The PdaNet application actually installs a small android app on your phone which is used to access its data (3G etc) connection.

I’ve tried PdaNet on a windows 7 laptop and it works beautifully. Now I need to investigate whether I can set my laptop to prevent such things as windows updates happening when I’m connected to my phone and using up the measly 500MB of my phone plan.

Tuesday, October 27, 2009

Back Seat Programming

Having an audience watch over my shoulder while I bang the keyboard looking for a solution to a tricky problem can be an unpleasant feeling. The unpleasantness ranges from a niggling feeling of self doubt after I make a silly typo to a hot itchy feeling when it becomes apparent that the peanut gallery knows a more elegant command prompt shortcut than the one I just used.

But back seat programming is so effective that is something I think we just have to learn to deal with. The reason it is effective, I believe, has something to do with our minds inability to operate on more than one scale at a time.

Stay with me here… the poor monkey at the keyboard is working on a fine grained scale, that is concentrating on syntax, pointers and file paths. While he is handling these details his audience is free to ponder in a more coarse grained manner on such things as system architecture. Combine the two scales and you have direction and implementation happening in real time.

I suspect that anyone who has worked solo on a project with an undercooked specification will know all too well how the code can spiral into unnecessary complexity. I believe this is a result of only working on the fine grained scale, and could be prevented with a regular back seat programmer.

I should qualify all of this by saying that it is imperative to have the right sort of back seat programmer. It needs to be someone whose technical ability you respect, someone who gives you a moment to see your own syntax errors before saying something and someone who keeps their damned fingers off the screen!

Monday, October 26, 2009

Take Your Time and Get More Done

I’ve been trying to adopt something of a life philosophy lately where I avoid multitasking in favour of solid concentration on a single task for a prolonged period. Whenever I find I’m starting to hurry I try to catch myself and slow back down. I seem to get much more done this way and what I produce is of a higher quality with the added benefit of experiencing far less stress.

The hardest part of implementing this life philosophy is protecting my concentration from interruptions. So far I am doing this by designating times of the day that I make myself slightly inaccessible. I do my best work before lunch, so I start each day by choosing  a single large, important or difficult task to work on solidly all morning while ignoring email and requests from colleagues as much as possible. My afternoon is then devoted to the backlog of small tasks that has formed during the morning that would have become distractions from my core task if I had attended to them at the time.

Losing Your Life in Half Hour Blocks

When I got home from work this afternoon I didn’t turn the television on for my daily blast of high intensity advertising. Instead I’ve just spent half an hour eating dinner with my wife before she went out for the evening, then an hour in the hammock with my laptop reading my favourite blogs, then half an hour doing some soldering on one of my projects.

I perceived time as moving quite quickly during my evening and felt that it must be getting late, but when I checked the time it was only 7:30. If I’d sat down to watch TV my evening would have gone in a flash and I’d still be feeling not quite relaxed with work on my mind.

A regular TV free evening might be a really good thing…

Technorati Tags: ,

Tuesday, October 20, 2009

Save the Planet, Take the Bus

I was catching up on my reading tonight and read an interesting article in the September issue of Engineers Australia on energy efficiency of different modes of transport.

Energy Efficiency of Australian Passenger Transport Modes in 2004-05The report showed a graph of passenger vehicle fuel efficiency from 2004-05 which I was unable to find online. I did however find the same graph (show here) from 2005-06 in an Australian Government publication Energy in Australia 2009 under the Transport and Infrastructure section. This graph highlights some surprising comparisons of efficiencies.

For example motorcycles and international aviation are nearly on par for efficiency in terms of passenger km/GJ. This is a measure of how much energy it takes to move one person for a kilometre.

And while the carbon footprint of travelling by plane was a hot topic recently, it is actually on par with light rail for efficiency. The Engineers Australia report notes that the surprisingly low efficiency of light rail is due to its dependence on electricity which is generated relatively inefficiently from brown coal. A reasonable conclusion from this is that electric cars are possibly not the environmental saviour that many claim them to be.

So if you were looking for a way to reduce the carbon footprint of your daily commute don’t bother buying a motorcycle. You may as well catch the train or even the plane. As can be clearly seen in the graph above, the best option by far is to jump on the the bus!

Tuesday, October 13, 2009

iTunes Movie Rentals – Fix the iFreeze

I’ve had some long waits for the more popular movies in my Quickflix queue lately. When I heard that iTunes downloads are quota free for iinet customers I decided to give the iTunes movie rental service a try.

My first thought when I started browsing the movies in the iTunes store was that they are a little more expensive to rent than Quickflix at $6.99 each compared $15 a month for four movies. The instant (well less than 3 hours anyway) gratification of downloading almost makes up for this though.

So I found Seven Pounds and started downloading. Three hours later when I started trying to play my movie I hit a major showstopper. Playback lasted about two seconds then iTunes froze so badly I had to kill it with task manager. A quick search on the forums provided an easy fix though. I just had to change the preferences in iTunes to play movies in a new window and everything worked perfectly.

An added bonus was that iTunes just works with my MCE remote! The basic play, pause and volume functions work right out of the box. After running MythTV on my mediacentre PC for a couple of years I am terribly impressed when anything just works!

Sunday, October 11, 2009

Brand New Second Hand

After nearly a year of saving $10 here and $20 there, I broke open my piggy bank this weekend and bought a brand new second hand waveboard from Windsurfing Perth.

2007 JP Real World Wave 69LI’ve been riding a 96 litre Fanatic Freewave for the last four years and love it, especially when I’m first to plane in marginal conditions. But at 72 kilograms I’m a lightweight and just can’t hold the rails down when the wind blows above 25 knots. So for when it blows I decided to go small, really small and got a 2007 model 69 litre JP Real World Wave (shown here).

I picked up two G10 Real World Wave fins with it, a 23” and a 20” to match my 5.8 and 4.7 sails respectively. The 5.8 may be pushing the big side for this board but with the right tuning I think I can make it work for me.

Now I just have to wait for a decent blow to try it out. The temptation to take it out in marginal conditions just so we can get to know each other is there. But I know if the wind drops the paltry 69 litres won’t even float me so it will be a long swim back to the beach.

Tuesday, October 6, 2009

Inspiring Reading

I’ve recently given up treating my Google Reader account like an inbox.  Every lunch time I would log in for a quick read and be stressed out when I saw that I had over 400 new posts to read! Now I just treat it more like a magazine rack in the waiting room and flick through an almost limitless number of awesome articles hand picked to suit my interests.

A couple of feeds that I am finding particularly inspiring at the moment:

  • Make Magazine features the work of a wide variety of eccentric inventors. I find an infectious joy present in these articles on making for the sheer creative joy of it
  • Boing Boing is an online magazine of technology, culture and fantastic quirkiness
  • Adafruit has regular articles on open source electronic projects and kits. A great source of inspiration for projects and diversions around the home

Now that I have stopped trying to apply a zero inbox philosophy to reader I can feel free to add more great feeds like the above so I always have something interesting to suit my varying moods.

Thursday, September 3, 2009

Androblogger Test

Just a quick post from my phone to try out the Androblogger app for android. So far it has validated my account fine and the editor is simple and does what it needs too. One small improvement would be auto caps for the start of sentences, I know it's possible as I've done it in my own apps.

Well done to the develops for a much needed app.

Friday, August 28, 2009

Tweet Hate

So often when I mention that I am a twitter user I come across haters. The most common reason for the hate is that “twitter is pointless” and “tweets are boring”. Aside from the fact that these opinions are usually second hand (the worst kind of opinions) they are also misguided.

The reason these opinions are misguided is that they blame twitter for the banality of some of its users. Twitter is simply a new medium for communication much like the mobile phone was not so long ago, and is thus entirely incapable of being banal or interesting.

If you have to listen to a boring friend on the phone do you tell everyone that phones suck and phone users are boring? Of course you don’t, you just screen their calls and find someone more interesting to talk to. You might also consider the fact that it is possible that you are boring to listen to yourself, and you need to work on being a more interesting human being.

So my message to the haters - twitter is not boring, just you and your friends are.

Sunday, August 23, 2009

Google Latitude vs Tweetmondo

I've just been trying out Google Latitude this week on my Android phone. I have also been using the Tweetmondo layer on Layar (see Augmented Reality Phone Tweeting), so I thought I'd do a quick comparison for anyone thinking of adding location services to their social media suite.

LocationDefault is "suburb" accuracy, I'm not too bothered if strangers can see what suburb I am in, and it only updates when the Tweetmondo layer is open. Locations are show on a map or augmented reality viewLocation is scarily accurate, but only available to friends I have invited to view it. Once again this only updates while the Google maps application is running. Location is only shown over google maps (no AR)
UpdatesDone in twitter after updating location on Tweetmondo layer in Layar, so have to use two separate appsDone from within latitude as "shout outs", all integrated and easy to use
Following/PrivacyJust like twitter, you are visible to anyone who's looking!Invite only, so more privacy but this makes it harder to find new friends

After creating this table I'm starting to think that the title of this post is perhaps a little innacurate. Latitude and Tweetmondo compete in slightly different niches of the social media space so this is not really a "vs" situation. I see myself using both applications. I will still use Tweetmondo to interact with people I don't know (trust?) in my immediate vicinity, but those people I get to know and trust will eventually be promoted from a tweep to a latitude friend.

Feel free to leave a comment and let me know which of these apps you use, and how much you trust your tweeps and friends.

Thursday, August 20, 2009

Augmented Reality Phone Tweeting

The augmented reality app Layar has just been released (17th August) on the global Android market. If you have an Android phone and you tweet then you will love the Tweetmondo layer. This layer takes the image from your phone and overlays an impression of recent tweets that happened close to where you are standing. For a youtube video of the app in action check out the Layar Blog, it works for me just like it shows here.

This app is great for an early release, but it can be a little confusing to get started and I couldn't find any instructions. Here is what you can do to get started.
  1. Install the Layar app on your phone
  2. Start up Layar, go to the Featured tab and hit Tweetmondo
  3. The Filter Settings dialog opens, you can probably just hit Apply
  4. Your gps icon will show in the notifications bar and you should see the output from your phone camera with a grid overlay and hopefully some bird icons representing tweeters
  5. Tap one of the tweeter bird icons then tap again on the info bar that appears at the bottom of the screen
  6. Select Privacy then you will be redirected to register your phone with Tweetmondo. Enter your Twitter credentials
  7. Now whenever the Tweetmondo layer is open on your phone your location is updated with Tweetmondo servers. By default this is not too fine-grained, for example my location shows up as something like Scarborough, Perth
  8. Now you can use your regular everyday Twitter app (I use Twidroid) to tweet and it will show up on Layar at your location.
One showstopper with the above instructions is that if you are in an area with no other Tweetmondo users you can't set up your phone to update your location through the Tweetmondo layer. When this happens you will just have to wait until you are somewhere busier and try again.

I think this is really cool for the extra level of engagement it offers to tweeters, but I'm sure just like Twitter itself this will not be everyone's cup of tea.

Friday, August 14, 2009

How to Open Gmail Attachments with Android Apps

I've just added a new feature to my Android cook book application Bites! You can now send and receive recipes as xml files attached to emails.

From the users point of view the feature works like this:
  1. The sender simply long clicks on a recipe and selects send via email in the context menu. The gmail application opens up with the recipe attached to an email, all that is left to do is enter a contact name in the to field and hit send.
  2. The receiver simply opens their gmail inbox and hits the preview button next to the recipe file attachment, then Bites opens with a dialog box asking if they want to import the recipe. That's it, couldn't be easier!

Now the technical details for those of your that are looking to include the ability to open a gmail file attachment in your own Android applications.

First up you'll need an intent filter to handle the attachment file type you are interested in opening with your activity, so to open xml files your activity needs the following in the manifest (leading underscores to allow display in blogger).

<_action name="android.intent.action.VIEW">
<_category name="android.intent.category.DEFAULT">
<_data mimetype="text/xml">

Then in your activity you'll need to handle the gmail attachment intent uri which has a content:// scheme. This intent contains a uri to a gmail content provider that points to the file attachment on google servers. To read a file attachment you have to open an input stream from the content provider using the uri in the intent created by the gmail application like this:

if (getIntent().getScheme().equals("content")) {
InputStream attachment = getContentResolver().openInputStream(getIntent().getData());

In my application this input stream is an xml file, which I can then create a document object from and parse using the following:

DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
Document doc = builder.parse(attachment);
Element recipe = doc.getDocumentElement();
String strRecipe = recipe.getAttribute("name");

To see the full code in context take a look at the Bites source code (available under GPLv3).

If you would like to install Bites just scan the QR code below with your Android phone (you'll need to use the barcode scanner app).

Saturday, August 8, 2009

Foam Dust

After a bingle on the water the other weekend with an old guy in a floppy hat my long board was looking a tad sad. What looked like a minor crack in the gloss at first inspection turned out to be a pretty decent crunch with the foam crumbled and soft behind it for several inches.

So after cursing old guys floppy hats and crowded beaches for a few minutes I checked out the board lady's site for some sage advice, then took a trip to Bunnings and bought a new 5" rotary sander.

After grinding out all the damaged material with great enthusiasm I was left with a pretty scary looking hole. Following the board lady's advice I then filled this up with even scarier looking blocks of foam (divinycell), which I first heated in the oven so I could shape them to the hole. The chemical aroma that emanated from my oven would indicate that it would not be a good idea to cook a pie at the same time as heating up divinycell.

After applying resin, glass cloth and masking tape to hold the whole mess together I left it to dry and was left with the lumping looking result in the picture above. I then sanded this back down to the rather pleasing result show here.
After filling in a couple of little holes with some glass fibre dust mixed with resin I'm putting my feet up for the next drying phase. Look for my next post on painting this and glassing over it, hopefully to restore my longboard to like new condition.

Friday, August 7, 2009

No Gmail in Android SDK

I've been frustrated in recent days by the Android SDK not including the gmail app. The email app included with the SDK works differently to the gmail app which is what all the users will be using.

I'm trying to include a new feature in Bites where users can share recipes via email attachments. The sending part is working. The receiving part is not, and finding out why is not so easy as the gmail application is not available to debug with on the emulator.

The only option available to me so far is debugging on a physical device, which reduces me to old school debugging using the Log.d function and logcat in DDMS. This is quite tedious when compared to the step through debugging possible when using the emulator.

Google, if you are listening can we please have gmail in the SDK. I'm not bothered if it is a closed source binary, I just want to test with it.

Stay tuned for my post on how to open gmail attachments with your app (as soon as I work out how to do it).

Thursday, August 6, 2009

QR Codes for Android Market Apps

I'm really excited about QR codes at the moment! Data entry and searching are great on new smartphones but still a little slow and tedious compared to the instant gratification we are used to on a pc. So the ability to just aim my phone camera at a code and receive information or navigate to a url is very cool.
When I was checking out my application listing on AndroLib I realised that these guys are using QR codes to create Android Intents. There are just so many possibilities with this.

The QR code listed for my app Bites on AndroLib looks like this:

When I decoded this with the online zxing decoder I found it contained the string market://search?q=pname:caldwell.ben.bites which when scanned with my phone opens the market with a search result for Bites. What an easy way to get data and intents between a pc and a phone!
There are just so many creative and subversive ways to use QR codes, they have even found their way into street art.

Well done to the ZXing guys too, I use their barcode scanner app from the Android market for barcode scanning and I have to say they have done a fantastic job!

Tuesday, August 4, 2009

Testing Android Apps Without Jailbreaking Your Phone

I've been hard at work developing the next update of Bites, my cookbook app for Android phones and now I want to start testing on a physical device not just the sdk emulator.

I don't like the idea of jailbreaking my phone, it is still my main source of communication and I don't want to risk paying out the rest of a 24 month contract while having a useless bricked phone. So last night I found that I can test an app update without releasing to market. Here is what I did:
  1. Export the signed .apk as per a market release
  2. Post the .apk on my code hosting site as a testing release
  3. Navigate to the .apk using my phone browser and click to install
  4. The phone tells me it cannot install apps from outside the market then allows me to go to a settings page on which I can tick a box allowing apps from outside the market
  5. Try again and the app installs

I'm assuming this will only work with apps that have already been released to market. I tested this with an unsigned .apk and my phone would not install it, so it looks this is a neat little backdoor for honest developers.

There is a potential for security problems but only if a developer turns bad or an app signing key is liberated.

Monday, August 3, 2009

Carving & Code

Bam! My first blog post. Carving Code is going to be my online record of how I did what I did after I did it and found that it worked. The focus will be on my main passions: surfing, windsurfing and open source software, but I'm quite sure I will diverge into other topics as the mood takes me.

Currently I'm fixing a rail ding on my 9'1" longboard and updating my recipe book application for Android phones so expect a post on one of these sometime soon.