Tuesday, March 15, 2011

Bike mechanic win!

In previous posts I talked about trying to find a good bike mechanic. I tried both Kennedys and Cecil Walkers with no success but I've finally found a quality shop.

Abbotsford Cycles is under Richmond station on Swan Street. They don't sell bikes, only repair them which is unusual, but you know they're going to focus on doing good repairs. When I took it in I had a chat to Leon, one of the mechanics and he amazed me with his knowledge and experience. He predicted a number of issues (like delamination of the crank bearing cups) that turned out to be true and he picked up a bunch of problems that all other bike shops hadn't even noticed.

Throughout the process he kept me informed with what he was doing and gave me lots of choices in the repairs. He offered three different choices for crank bearings and the shop has a brilliant stock of spare parts. It ended up costing less than I expected considering how much time and effort they spent on the bike.

I picked up my bike and it is running beautifully. I am so incredibly happy with the service. Big thumbs up Abbotsford cycles!

A strongly typed implementation of INotifyPropertyChanged

INotifyPropertyChanged is an interface used to notify clients that a property has changed. It's used heavily in Silverlight and WPF in combination with databinding and when used it makes updating the ui and then retrieving data from the ui very simple.

I have a major gripe with the way it's generally done though. There are usually two places where the parameter name is specified as text. In the xaml code:
<TextBlock Text="{Binding Name}" />

and in the viewmodel
public class Person : INotifyPropertyChanged
  public string Name
    get { return _name; }
    set { _name = value; NotifyPropertyChanged("Name"); }

The main problem here is that if you refactor or rename a property you might miss these two locations and will not be alerted. Your app will not work and unless you're testing all your ui field databindings you'll never notice.

Unfortunately we can't fix this problem in the xaml, but in the viewmodel here is a neat typesafe implmentation of NotifyPropertyChanged.

protected void NotifyPropertyChanged<T>(Expression<Func<T>> expression)
   if (PropertyChanged != null)
     PropertyChanged(this, new PropertyChangedEventArgs(expression.MemberName()));

public event PropertyChangedEventHandler PropertyChanged;

public class Person : INotifyPropertyChanged
  public string Name
      get { return _name; }
      set { _name = value; NotifyPropertyChanged(() => Name); }

Friday, March 11, 2011

Cecil Walker

In the previous installment I talked about the drama I had getting my Kennedy custom bike maintained well. I tried Kennedy's themselves and they were crap. I tried my local bike shop but they weren't even slightly interested. So I gave Cecil Walker's a call.

They were very proud to announce that they were the only accredited Campagnolo servicers in the CBD. I thought that sounds awesome and I should give them a try. So I took my bike in and asked them to give it a general service and also check my top 2 issues: a) The way downshifting on the front chainrings left the chain lost in limbo between the two chainrings and b) the horrible grinding/clanking noise coming from the bottom bracket.

I even pointed out that it was a Shimano chain on a Campag gearset and that I was worried about compatibility issues. Remember this for later.

So at the end of the day I went to pick up my bike with high hopes. They talked about everything they'd done and I asked about whether the chain or the bottom bracket were a trouble and they said it was all good and charged me $70. So I rode home and my bike was as noisy as ever and the shifting was just as bad as ever. Let me say right now that this was very disappointing.

So I took it back the following week and asked them to have another look at it. I picked it up at the end of the day and was told that they'd checked it out and it turns out that the bottom bracket has never been opened in the 3 years I'd had it. So.... the previous week when I asked them to check it out... they... didn't? They'd just made liars out of themselves!!! Too flabergasted, I took off home and within 30 meters my chain got caught between the chainrings! I turned around and went straight back to the shop.

At the shop someone who I assume was a manager or senior staffer came along and had a look and announced that Shimano chains don't work on Campag gear. That was why I was getting so many issues with the front chainring.

So now they've admitted that they:
  • Didn't check the bottom bracket even though I specifically asked them to and;
  • Didn't identify that a shimano chain doesn't work on Campag gear even though they claim to be a Campag accredited workshop!!
So in summary, I can't recommend Cecil Walkers. My hunt for an even slightly decent bike maintenance store continues...


A couple of years ago I got sick of my shoulders and arms aching every time I rode more than about an hour. So I decided to get a bike fitting. I'd heard that Kennedy's was good so I went to see them.

I was impressed. He diagnosed all the issues that were causing my discomfort on my existing bike and recommended a few options to fix it. Clearly the best option was a custom made bike.

I took the plunge... gulp... it was hideously expensive but I figured that over the course of the next 10-15 years it would be worth it. And it was! I'd never known such comfort riding a bike! The next round the bay was such a pleasure. Plus the gear on the bike is terrific. I can't recommend Campagnolo gear enough. The Khamsin wheels are bombproof and the Veloce gearset is wonderful.

I also figured that I wasn't just buying a bike, I was buying a lifetime of expert servicing and follow up with Kennedy's.

Unfortunately the reality was a little different. Ever since I got the bike I've had nothing but trouble from Kennedy's. They have been surly and unhelpful and pretty much useless. From servicing to finding better/replacement parts they have been so unhelpful.

The final straw
After a service by Kennedy's my bike started missing gear changes. When I shifted down on the front chainring it started getting stuck between the chainrings. So the pedals would spin and I'd have to stop to sort it out. At first this only happened occasionally but as time went on I got paranoid about shifting gear because I knew it would eventually fail.

I took my bike in to Kennedy's for a service and asked them to pay special attention to the noises coming from the bottom bracket and to the issues with gear shifting. I picked up the bike after they were done and all they had done was change the chain. To their credit that's all they charged me for, but it certainly wasn't addressing what I'd asked for. I realised they weren't even slightly interested in looking after their customers in the long run.

The aftermath
In subsequent attempts to get the issues with the bike sorted I discovered that the problem with shifting gears was that Kennedy's had fitted a shimano chain which wasn't compatible with my Campag gearset. So the only thing they actually did when I asked them to try to sort out my issues was to charge me for another chain that only exacerbated the issues I was having. More on how I discovered this in subsequent posts....

So if you're looking for a custom bike... look elsewhere. I've heard good things about Baum's but have no first hand advice.

Friday, May 07, 2010

Omnia align screen success

Oh no!
I, along with so many others recently experienced the dreaded Omnia align screen bug. When Windows Mobile starts up, it forces you to align your screen. However, if the screen won't align, which is incredibly common with the Samsung Omnia, you can't get past this screen and your phone is completely unusable. Personally, I'm staggered that such a big company will ignore such a fundamental issue.

Since my phone is out of warranty, I decided to take matters into my own hands and replace the screen. So I went to ebay and found a new digitiser for $12.98. I bought mine from this seller (search for Omnia Digitizer) and was very happy with the service. The digitizer came with a selection of tools that were sufficient to do the entire job.

The digitizer is a clear panel that sits on top of the lcd screen. It's what is responsible for letting the device know when the screen is tapped.

Fitting the digitizer
Once the digitizer arrived I found these instructions and followed them. Although since I was only replacing the digitizer I didn't need to remove the camera or the keypad membrane.

I then reassembled the phone and crossed my fingers. It powered up then presented the dreaded "align screen" screen. I tapped each of the alignment markers once and.... it worked!

Since then the phone has been so much easier to use! The accuracy of the screen is so much better than it ever has been. It's still nowhere near as good as an iPhone or a HTC HD2 or a HTC Desire... but what can you expect from Windows Mobile 6.1?

From a brick to a fully functional phone for only $12.98. Bargain of the year!

After a few days of living with the digitizer I have found that it's incredibly prone to scratching. I've been careful to keep it clean but still have 3 significant gouges out of the screen. So I'd definitely recommend a screen protector goes on straight away.

Wednesday, April 07, 2010

Windows Phone 7 Series

I've been experimenting and researching development on Windows Phone 7 Series. I've installed the CTP and written my first program! If you want to get started, look at this free book by Charles Petzold.

Here are some of my observations.

Dev Framework
You can only write apps using silverlight or XNA (Xbox development framework). This has some pretty big implications, such as the fact that all applications written for previous versions of windows mobile will not run on Phone 7.

All of them. Throw them away. All of those organisations who have built product and ip based on Windows Mobile will not be coming to the Phone 7 party with any advantage. In fact, most of the current applications will not even have a parallel in Phone 7.

It will be nice for people who are already familiar with Silverlight. So there might be some nice apps written targetting Silverlight. The downsides is that it will require a connection and the performance will be related to the speed of your network connection.

XNA might also bring some XBox devs across. But there's a fairly steep learning curve and isn't that accessable for noobs.

One really big advantage is that MS has taken a much stronger grip on the hardware. Their specs are much more stringent. For example there will only be two screen sizes allowed. Large and small. No more having to cater for 15 different screen sizes!

There is no database on the phone. Silverlight apps can access a sandbox storage location. The word I've seen on various forums is that you're supposed to use cloud for data storage and you can store simple data as xml in Isolated Storage. However, this guy (http://sviluppomobile.blogspot.com/2010/03/sqlite-for-wp-7-series-proof-of-concept.html) has a POC with SQLLite running on Phone 7.

Target audience
The phone seems to be squarely targetted at the consumer. Most of the enterprise apps will mostly likely stay at version 6.5 and earlier. In a lot of ways, it looks like they've copied the iPhone but with bigger icons on the home screen.

Does the world need an iPhone clone with no applications currently written? Who knows.


I've been working with ASP.NET MVC for a while now. I really enjoy working with the framework and had a very successful project delivered using it. Some of my highlights are listed below.

Separation of concern
The framework is a wonderfully elegant implementation of the MVC pattern. Once you get your head around the responsibilities of the controller, model and view you can very rapidly produce robust, testable code.

There are huge productivity gains available when using ASP.NET MVC. It takes so much complexity away from ASP.NET devlopment, without reducing flexibility and power. When doing ASP.NET development, you need to be aware of the page lifecycle at all times and trying to work out which actions should be performed at which step of the page lifecycle can be extremely complex.

The framework really lends itself to testability. You have to be a little careful to keep it clean, but if you do, the whole system is very testable. The key point to ensure testability is to only pass ViewModels into your controller actions. I cannot stress how important this is. As soon as you try to access the Request.Form in your controller method it becomes incredibly hard to test. You have to mock out the HttpContext and it just gets messy. Even with some very complex forms, I always found a way to represent it all using ViewModels. If you get stuck, use a custom model binder.

This is the area that surprised me the most. We had a very low rate of regression errors. I attribute this to two factors:
1. Separation of responsibility - Each controller method operates quite independently, so changing code should not affect other functionality
2. Testability - Having a good suite of unit tests helps to catch any errors that might creep into the code.

I put together a presentation explaining some of these points in more detail. It's available here.

A strongly typed RadioButtonList for ASP.NET MVC

There are many strongly typed controls in ASP.NET MVC. For example TextBoxFor. I really like using the strongly typed HTML helpers because you get much better information at compile time. Especially if you've turned on compile time view checking.

The one control that was missing, however is RadioButtonList. There is no "RadioButtonListFor" to be found. So I wrote my own.

This is what the code looks like in the aspx
<%= Html.RadioButtonListFor(m => m.GenderRadioButtonList)%>

Here's the code in the controller to check what the user has selected

public ActionResult Submit(HomePageViewModel viewModel)
  if (viewModel.GenderRadioButtonList.SelectedValue == HomePageViewModel.GenderType.Female)
    // Do something
  return View("Index", viewModel);
The code, plus a sample website using it, is in this zip file.

Additionally, at the risk of creating an infinite loop, here's a StackOverflow question that this post is an answer to. It's got some useful comments and more code.

Monday, January 15, 2007

Earth-Destruction Status

I think we can all agree there are many issues with life on earth. A solution that may not have occurred to many of us is total destruction of the earth.

This is not a guide for wusses whose aim is merely to wipe out humanity. If total human genocide is your ultimate goal, you are reading the wrong document. There are far more efficient ways of doing this, many which are available and feasible RIGHT NOW. Nor is this a guide for those wanting to annihilate everything from single-celled life upwards, render Earth uninhabitable or simply conquer it. These are trivial goals in comparison.

Current Earth-Destruction Status

Thursday, May 04, 2006

The home straight

I'm in the home straight now. Just today at work and then I'm on a plane and home.

I woke up early this morning. I realised that I'm now not going to sleep again for about 46 hours! Pretty freaky.

Monday, May 01, 2006


I had a pretty quiet weekend. I went to the movies and spent a bunch of time in Borders reading books and drinking coffee (a couple of my favorite activities). It's been cold and rainy this weekend. Maximums around 12-13 degrees and very wet. I guess there's a reason everything's so green around here and I must have been very lucky to get such great weather the first week I was here.

Just three more days to go. I can't wait to get home.

Saturday, April 29, 2006

You know what I miss?

I miss milk in my coffee. What is with 'creamer'? Here in the office, they basically have powdered milk that you add to your coffee. I've even had a few black coffees because I just can't deal with the yuck powdered milk!

Mind you, that's certainly not the biggest thing I miss :)

Tuesday, April 25, 2006


Many thanks to everyone for their birthday wishes. I got a hilarious phone message from the Hartwichs and had some nice chats. It was very good timing, I was feeling a bit lonely and really appreciated the contact from home.


I had a fairly busy weekend somehow. When I tell you what I did, you'll be amazed that it filled out a whole weekend, but if you include all the times I got lost while trying to find various shops and then when I couldn't find the car in the carpark it all adds up.

On Saturday morning I visited "Pike Place Market" which is a fairly well-known landmark in Seattle (I hadn't heard of it either!). It started as a fish market and has an amazingly eclectic collection of shops. Then on Saturday and Sunday I visited various shopping malls and did some shopping. Dave wanted to buy some pressies for his family and he was only over last weekend, so I've got all my shopping out of the way early. I bought some books (a birthday present from Mum and Dad - thanks!), some jeans and some presents for my girls.

By the way, here's a photo from the airport when the girls were seeing me off :)


One of the guys here at work has loaned me his car for the time I'm here. He's obviously a very generous guy and it's made a huge difference in terms of what I am able to do (public transport being almost non-existent). It's been very handy. I've been driving it around and haven't yet forgotten to drive on the wrong side of the road! Although I always have to double-check which side of the car to get into and I keep hitting the door reaching for the gearstick!

While I'm talking about cars, you should see the size of the cars over here. I'd say 20% of all vehicles are massively oversized compared to cars in Australia. Here's a great example of the kind of thing you see scattered through supermarket carparks. It's absolutely massive!

Monday, April 24, 2006


Click here for a larger image
I went to a baseball game on Friday night. It was quite interesting, because I'd never been to a game before. I've watched it a bit on TV and thought I had a fair handle on the rules. However, there are a lot of little rules that I was not aware of! It's quite a slow moving game. If anybody acutally got onto a base there was a huge cheer. This probably only happened about 6 times. The end score was the Detroit Tigers beat the Seattle Mariners 1-0. That's a soccer scoreline!

It was freezing. Only 3 degrees! I was wearing a t-shirt, a long sleeved shirt, a fleecy top, a jacket, hat and gloves and I was still really cold. You really get the sense that a Seattle winter would take a lot of preparation!

Click on the pictures for a larger (albeit still blurry) image.

Friday, April 21, 2006

The food

The food here is very rich. I mean very rich. I am really craving some plain food that isn't covered in dressing, cheese, sugar or all of the former! Every coffee shop has tons of donuts and pastrys and everything is sugar coated. I seriously don't understand how anybody here can be slim.

A couple of unrelated food incidents:

I went to the supermarket to buy some breakfast supplies. Wandering among the aisles of unfamiliar food I saw Special K! I was stoked to see something that I knew I would like. To my surprise, this was not Special K as I know it. It was frosted with sugar and was incredibly sweet.

Yesterday for lunch I went to a Thai restaurant with some of my colleagues. I had Massaman Beef curry and it was delicious. I only managed to eat about 1/4 of it and was very full.

Today I felt like something light. I went to a Deli and saw they had Chicken salad sandwich. Fantastic. What I got was a sandwich with chicken (good so far), lettuce, pickles (not what I was expecting for salad!) and a huge amount of mayonnaise.

I'm finding it hard to predict what I'm going to get when I order/buy food. It's kind of weird.


My plans for the weekend are starting to come together. I'm going to the baseball on Friday night, of which I have almost no expectations or knowledge! Should be a fun experience. My manager who's over from Toronto is going, as is Dave.

For the rest of the weekend Dave's got some shopping he wants to do (clothes are very cheap over here) so I'll go along and spend some money too. Any requests from back home?

No other big plans. I'll probably hang out with Dave a bit since he's heading back home on Monday.

Wednesday, April 19, 2006

Life is full of oddness

It's amazing how in my normal routine I take so much for granted. For example if I'm going to leave a room I can tell if the lights are off by just glancing at the light switches and noting their position. I don't consciously examine whether they're up or down, I just subconsciously must know that the image looks right for me to leave the house. However here in the states lots of things are just slightly different and force my conscious mind to kick in and do some work.

For example:
- Lights are off when the switch is down, not up. So I notice that the light is on, glance at the switch and get all confused!
- With mixer taps, the hot and cold directions are reversed. So that while I'm waiting for the hot water to arrive I'm not constantly checking that I'm pushing the tap in the right direction.
- Cars drive on the other side of the road. So every time I approach a road on foot, I glance in the wrong direction first!

Tuesday, April 18, 2006


I've arrived in my hotel in Seattle. It looks quite reasonable, although I haven't really done anything except drop my bags yet!

If you want to see where I am on a map, click here. The hotel is that white, bent building right in the middle. You can use the + and - signs on the left to zoom out or in and see where it is in context of Seattle.


I'm going to take a brief diversion from my usual ramblings for some... um... unusual ramblings. I've just arrived in the States for a 3 week work trip. I hope I'll be able to fit in some non-work activities too, so I'll be using this blog to keep family and friends updated with what I've been up to.

I'm currently sitting in LAX waiting for my flight to Seattle. It's 9:15am here and it's lovely and sunny. Pity I'm dressed for 10 degree Seattle weather :) According to my body clock it's 2:15am so I'm feeling a bit weary. Looking forward to this leg being over and arriving at my hotel so I can have a shower and relax.

I think I've handed out about 4 different, incorrect, methods of converting Melbourne to Seattle time... sorry about that! To set the record straight... As you may have deduced from my figures above, add 7 hours and take off a day and you'll be set.

Hope everyone in Aussieland is well... bye for now.

Tuesday, February 21, 2006

The future of Mobile Development?

There are a number of companies out there that create products that synchronise data between a server and mobile devices. The type of synchronisation I want to talk about today is over GPRS.

Basically (very basically), a program is installed on the server back at the office. It monitors a database and if any changes are made, it sends the data out to the device over GPRS. Then a program on the device updates the local database.

One of the reasons for this approach is that GPRS is still too slow to have data requested from the server in real time. The local database is effectively a cache.

I forsee the day that WiFi coverage will be so extensive that we're not even going to need a GSM network. Hence products like this WiFi mobile phone.

Now I'm going to digress with a little trip down memory lane. Back in the early days of my programming career, we couldn't assume that the executing PC had a fast network connection. So we had to build complex data synchronisation products to get around this network limitation.

But as networks (both LAN and broadband internet connections) became faster and more prevalent, it became simpler to have a single data source and remote applications accessing the data in real time. Thus the spread of web based applications to the point that I haven't worked on a Windows Forms application for a very long time.

I hope you can see where I'm headed here. I'm not convinced that there is a future in data synchronisation across GPRS. I expect that once WiFi/3G connections are reliable and fast enough mobile applications will be replaced by web based applications. Especially as the newer generation of mobile web browsers get more sophisticated in their display options.

Thursday, February 16, 2006

Top 10 Science movies that were never made

Another amusing rant by David Wong from Pointless Waste of Time.

I've read/seen most of the books/movies he covers and I agree with almost all of his points. In particular, I was hugely disappointed with the Hitchhikers Guide to the Galaxy movie and I'd love to see a Neal Stephenson book made into a film.

Find it here.

Wednesday, January 04, 2006

Gravity and Weightlessness

The International Space Station is in low earth orbit, approximately 360km above the surface of the Earth. They experience microgravity. I always assumed this is because they are far enough from the earth that the Earth's gravity no longer had a significant impact at this altitude.

It turns out I'm wrong. Gravity only reduces by about 3% for each 100km altitude. So they're still experiencing 91% of the gravity that we

What we experience as weight is known as "Apparent Weight". It is perceived because of force gradients across our body, where each horizontal cross-section of our body is supporting the weight of the parts of our body above the cross section.

When we're standing on the ground, we experience weight due to the reaction force of the ground. When in an aircraft, gravity acts on all mass within the aircraft (including our bodies), but the lift is generated by the aircraft shell, which also causes a reaction force that triggers apparent weight. The fact that gravity acts on all objects in the aircraft, but lift is only generated by the aircraft shell creates this force differential. If you were in a box that was in free-fall (ignoring friction for the moment), you would experience weightlessness because there is no reaction force provided by the box.

So back to the astronauts... They still experience gravity, but it is balanced by the centripedal force created by their orbit around earth. They experience weightlessness because the space station is moving at the same rate and with no friction does not provide a reaction force.

This has got to be my most confusing post yet! As always, for more information, see this Wikipedia article

Tuesday, December 20, 2005


From the "I-wish-batteries-were-smaller" department. I've previously blogged about tritrium as an energy source.

Here's another alternative: Antimatter. This article on HowStuffWorks discusses the use of antimatter drives for space exploration.

A quote from the article:
"The amount of antimatter needed to supply the engine for a one-year trip to Mars could be as little as a millionth of a gram"

Now that's energy density!

Wednesday, November 09, 2005

Wind Turbines

I've always liked the idea of wind power generation. One day I'd like to have a turbine on the roof of my house contributing to my household energy requirements.

There are a couple of major issues with current, propeller type wind turbines. Most turbines put the blades in front (upwind) of the support pole. This requires that the blades are very stiff, so they don't flex and hit the pole. This adds to weight and therefore cost, while also reducing efficiency as there is more mass for the wind to move.

Well, why not put the blades behind (downwind from) the pole, you ask? Seems obvious, because you can have lighter and more flexible blades. Unfortunately there are issues due to the turbulence created by the pole. There is a kind of "dead spot" behind the pole which causes the blades to lose pressure and flex towards the pole. This can set up a rhythmic flexing and can destroy the blades depending on wind speed/strength and rotation frequency.

Here is an alternate design that uses a vertical axis and doesn't have any of these issues. I'm not sure how feasible it is, but hopefully it can result in more efficient wind power generation.

As always, more information is available from Wikipedia here.

Tuesday, November 08, 2005

Shrink wrapped software and Feature Prioritisation

Just read an interesting article written by Joel Spolsky. You can read it here.

It covers two important concepts in Software Development.

1. Developing shrink-wrapped sofware vs customised software. I've developed both kinds of software at various times.

I find that writing customised software really isn't a good business model. The process tends to go like this:
- Sales guy talks to the client
- Asks for a quote with some very vague, hand-wavy "requirements"
- BA/Architect comes up with an estimate based on gut feel
- Estimate is turned into a dollar figure, discounts are applied to ensure the deal is won
- Contract is signed

Later on, down the track, the consulting company decides what functionality can be crammed into the budget, negotiates with the customer and they come to some agreement.

The end result is that the customer doesn't really get what they want and the consulting company make a very small profit (or sometimes, large losses!) and that's it. No more chance to benefit from that work at all.

At least if you develop some software that can be resold (even with customisation) you've got an opportunity to leverage that work into future earnings.

2. Priorities
The other interesting concept discussed is prioritisation. I think this is so important, but lots of people just don't get it. If you set priorities and then develop components based on their importance, everybody wins!

Friday, October 28, 2005

Sleep Study

I had a sleep study last night. I slept at a hospital attached to various sensors to help diagnose why I'm not getting much value from my sleep.

The sensors attached to me included:
- 3 ECG sensors to monitor heart activity
- 4 EEG sensors to monitor brain activity. Maybe these weren't connected properly, because they said they weren't getting a signal. What? Did you think I was going to let this cheap shot get through to the comments??
- 2 sensors to monitor leg movement and check for Restless Leg Syndrome
- 3 sensors to monitor breathing. A plug for each nostril and a little plate that hangs over my mouth
- 2 straps around my chest and stomach to measure expansion/contraction
- 1 position sensoron my chest to measure whether I'm lying on my side, back or stomach
- 1 Blood O2 level monitor on my finger
- 3 Sensors on my forehead to measure eye movement (I guess to detect REM sleep)
- 1 Microphone strapped to my neck
- 1 Sensor on my chin that I suspect was monitoring teeth grinding??

For a grand total of 21 sensors and wires hanging off me.

So as you can imagine it wasn't easy to sleep with all this paraphernalia on digging into my head and body. Trying to roll over was a major engineering exercise to avoid tangling or detaching any wires. The only ones that were really uncomfortable were the finger one which caused my finger to throb after a while, and the tubes from the nose/mouth sensors that went behind my ears. When I tried to lie on my side they made my ears ache.

So anyway I've come out unscathed, if a little tired. I get the results in about 4 weeks so hopefully they've got some good information to work with. Kudos go to the nursing staff who have to stay there and actually be awake all night. I couldn't do that job.

Thursday, October 27, 2005

Modern Programming Languages/Systems

I just read an interesting and thought provoking article by Charles Petzold. Read it here.

While I don't claim to have the experience that Petzold has, I started my programming experience back on Windows 3.1, writing C++. I feel a similar disquiet towards .NET programming that he describes.

Back in the day, when I wrote a program, I wrote every line of code. I controlled everything about the program. When a window resized, the controls moved because I put in code that told it how to move. I had complete power over the behaviour of the program. The downside of having that power is that it takes a long time to write all that code.

Nowdays I can get a program up and running a lot faster. However the cost of this improved productivity is that a lot of code is hidden away from me and that makes me feel vaguely nervous. When I write a foreach loop to iterate an arraylist these days I have no idea what's actually happening under the covers. So I just have to shrug and hope it performs okay. Because the alternative is too onerous and most of the time it's just not necessary.

The biggest extreme in this direction I have experienced is working with Borland Builder. It took me a week to get two windows to communicate with each other because it was a 'non-standard' communication and builder hid so much of the implementation from me that I had to work around it in incredibly complicated ways.

Could I go back? It'd be very hard to have to worry about ensuring that I deallocate all my pointers again. But at the same time I really miss the mental stimulation and discipline that that imposes. I feel 'careless' as a programmer now. At the same time I'm sure I'm romanticising C++ programming. I haven't mentioned the endless frustration of spending 3 days tracking down that annoying memory allocation bug. But then I also haven't mentioned the incredible surge you get when you find it and fix it!

So for 90% of programs, the extra productivity that modern programming languages provide are well and truly worth it. But I'll always look back and miss the real challenges and satisfaction that C++ programming provided.

Wednesday, October 05, 2005

John Dies at the End

I've been debating whether to post this or not. I (obviously) decided I would, but not without reservation.

Here's a link to an online novel called "John Dies at the End" (or JDatE) that has been published in installments over the last number of years.

It's quite an odd story and has some quite disturbing/scary bits in it. I was almost having nightmares around the middle bit there. But at the same time, the storytelling style and plot twists are simply fantastic and this guy's got an amazing imagination.

For example, here's a quote:
I was wondering if I should warn the girl about John's coffee, which tasted like a cup of battery acid someone had pissed in and then cursed at for several hours.

Now that's just weird. But at the same time, I love the writing style. Maybe I'm weird. I mean, how can coffee taste worse just by having someone yell at it?

So, if you've got nothing better to do, go check it out. But don't come and complain to me that it's really weird.

Thursday, September 22, 2005

Space Elevator

Here's a (kind of) follow up to my earlier entry about Space Fountains.

Here's an article that contains a proposal to build a space elevator. It goes into quite a bit of depth about the construction of the cable and the elevator cars and even addresses failure scenarios. A great read.

Tuesday, September 20, 2005

Become a pastafarian

There's an amusing parody site here in response to the decision by the Kansas school board to teach Intelligent Design alongside evolution in schools.

I particularly like the graph of Pirates vs Global temperature :)

Tuesday, September 06, 2005

Stirling Engines

Stirling Engines are a wonderful technology to convert any heat (including waste heat from other processes) to power. They are completely sealed so there is no harmful exhaust and they're very efficient.

They've hit the press a bit lately and the latest news is that the world's largest solar array will use them to convert the gathered heat to power.

If you want to know more, click here for instructions on how to build your own.

Friday, September 02, 2005

Genetic Modification

I've often heard the theory that my generation is that last generation that will die. I've always thought that was a bit optimistic, but an article I read on The Australian yesterday has made me revise that opinion.

I've also long thought that my generation has missed the Genetic Modification (GM) boat because our genes are already set. Sure, future generations will be modified before they develop much, but I'm pretty much stuck with the genes I've got.

The Article talks about some scientists who have modified a mouse so that it can regenerate damaged legs, tails and even heart tissue. It can't regenerate the brain yet.

But the real kicker is that if they take liver cells from these GM mice and inject them into regular mice, the regular mice gain these regenerative abilities too.

Maybe there's hope for me yet...

Monday, August 29, 2005


All cars are an exercise in compromise. A major limitation of the internal combustion engine is that it has a fairly narrow rev range where it is efficient in terms of power output for fuel used. Anything outside that band and you start to lose efficiency. This is why electric cars, electric trains and boats are efficient transport. The engine spins at close to it's ideal rev range almost all of the time because they have flexibility built into the drivetrain.

Cars on the other hand, have to vary their speed significantly and often and have a rigid connection between the engine and the tyres on the road. So gears were added. These allow cars to keep their rev range somewhere around their most efficient level but still be able to vary their speed. This applies to both manual and automatic transmissions.

A new kind of transmission has been developed. CVTs (Continuously Variable Transmission) have a theoretically infinite number of gear ratios, allowing the engine to stay in it's most efficient rev range regardless of the road speed. It's a great technology.

You know how lots of automatics now have that 'semi-automatic' mode that allows you to change the gear up or down by moving the transmission selector to the side and moving it forwards or backwards? This always seemed odd to me, because why not get a manual and enjoy the improved efficiency.

So here's the funny part. Yet another example of marketers taking a great engineering idea and weirding it. Nissan has released a car with CVT and they've put in this 'manual' mode. They've taken a masterpiece of engineering that allows an infinite number of transmission ratios and they've deliberately hobbled it by forcing the transmission to stick at certain pre-defined ratios! It's like developing a new, propellent-free rocket, but NASA deciding that the big flames coming out of the space shuttle were more 'dramatic' and putting a rocket engine on the back to produce the flames.

Friday, August 12, 2005

A glimpse into the future

The guys at Pointless waste of time have done it again. There's a hilarious and well written prediction piece about how virtual reality will become the preferred place to live. Click here to read.

He raises some interesting questions. I don't know the answers, but I enjoyed pondering as I read.

Thursday, August 11, 2005


Check out the gyro car and the gyro train.

They are two wheeled vehicles like motorbikes that use gyroscopes and precession to stay upright, even when they're stationary. They work by having a reasonably sized gyroscope mounted in the vehicle. Tilt sensors detect the vehicle starting to tip over and apply a force to the spin axis of the gyroscope. Precession causes this force to be translated by 90 degrees, righting the vehicle.

More (and probably better) information is provided by HowStuffWorks.

Extra Value Pack!

I went shopping at coles today. I went to grab my normal-sized container of stuff when I noticed a larger "Extra Value Pack". I figured, cool, it has to be cheaper because it's "Extra Value".

But then I decided to check. Of course, the larger pack wasn't any logical multiple larger than the small one (that would have made it easy), so I had to use a calculator.

It turned out that the "Extra Value" pack actually cost more per gram than the regular size! Damn marketing lies!

"Extra Value" my ass.

Friday, July 15, 2005

The best a man can get?

I've got a pretty tough beard and find shaving uncomfortable. However, I just got a new razor, a Gillette M3 Power.

It's got a battery and vibrates as you shave. It's great! It's made shaving a breeze. I can't recommend it highly enough.

Friday, July 01, 2005

Headspins after drinking

You know how the room spins after you've been drinking? Well, have you ever noticed that after a while it stops spinning, then starts spinning the other way?? Ever wondered why?

Balance is handled by a small blob of jelly called the cupola. It is in a small chamber and is attached to the chamber walls by lots of tiny hairs. When you move your head, the ball of jelly moves a bit slower than the chamber which bends the tiny hairs and indicates to the brain that you've moved.

When you drink alcohol, because it's such a terrific solvent, it gets just about everywhere, including in the cupola. The shape of the cupola is distorted by the alcohol, bending the hairs. Your brain interprets this as a rotational force (ie: you're spinning around).

In time the alcohol diffuses out of the cupola. However, by then your brain has gotten used to the the fact that your head is spinning and adjusted it's interpretation of the signals coming from the cupola. So it interprets your normal signals as seeming to spin in the opposite direction!

Quasiturbine engine

We've all driven piston internal combustion engines, right?

I've driven a Mazda RX-4 with a less common engine type, a wankel rotary engine.

One of the things that prevents a standard piston engine from revving harder is that the pistons have to accelerate and decelerate with every stroke. The momentum of the pistons is a major limiting factor. A rotary engine removes this limit by having all moving parts spinning, no acceleration and deceleration required. I can tell you, those engines rev like mad! The main downside of a rotary is that it doesn't completely burn the fuel, so it's not as clean.

Also, each piston only produces a power stroke once for every 2 revolutions of the driveshaft.

Welcome to the next step in this evolution, the Quasiturbine engine. It is far more efficient (it produces 4 power strokes for every revolution of the driveshaft! 8 times more than piston combustion engines) and burns the fuel more completely.

Can't wait until this is in a car... it will be fun to drive.

Thursday, June 30, 2005

RSS Feed

For those of you who are using the feedburner RSS feed that I was initially recommending, I've changed my recommendation :)

I was looking through the blogspot options and one of them was an RSS feed! Already built in.

So I've updated the link on the right. The feed to use is:

The other one will probably continue to work, but I'm not going to be checking that it's still alive.

O2 Xda II Mini Part III

My Xda died today. Well, to be more precise, I killed it!

I was trying to free up memory on the internal storage by moving files to the storage card. One of the files I wanted to move was an application that's run as a Today screen plug in. It was in use, so I removed it from the today screen then copied it across to the storage card.

Then I had a brain fart and re-added it to the today screen. Dumb, dumb, dumb. The device crashed, then rebooted. But as it came up, it tried to draw the today screen which caused it to crash and reboot! Shampoo, rinse, repeat.

So I had to hard-reboot it, which is like a re-install the OS in desktop land. End up with a totally blank device. Now to re-install and re-configure all my apps :(

Tuesday, June 21, 2005

Windows Mobile 5.0

Yesterday I attended a Microsoft Developer conference about Windows Mobile 5.0. It was basically presenting what we'll be able to do when (if?) Windows Mobile 5.0, Visual Studio 2005 and .NET Compact Framework v2 are released.

The features are great. I've been developing on my Xda and it's really hard to do some things that seem so obvious. For example, it's impossible to tell if the backlight is on! WM5.0 provides lots of really useful APIs and events to detect things like this. It'll allow for much better applications for mobile devices.

The biggest feature they've missed is that you can't write managed Today screen plug ins. When you go to Pocket PC software sites, the majority of applications are... you guessed it... Today screen plug ins, so it seems amazing that they've not included this.

So if anyone's looking to get a PDA or smart phone soon, try to hang off until you can get one with Windows Mobile 5.0.

Friday, June 10, 2005

The end of folders?

Slashdot has an article today about the death of folders.

The idea is that rather than placing a file in a folder, you add metadata about the file, describing it's characteristics. The advantage of this is that you can have multiple characteristics, so you can say that a file is related to "Family", "Photos" and "Funny" all at once. Then when you browse the disk, it shows these categories as virtual folders.

Gmail does this and I've heard lots of positive feedback. I think it sounds very promising.

Monday, June 06, 2005

Space fountain

A space fountain is a type of active structure. This means that it requires power to retain structural integrity (ie: Not fall down!)

It basically works by having a hollow core through which pellets are shot upwards. A device at the top of the building (most likely a magnetic diverter) will reverse the pellet's direction. Doing this will impart some of the kinetic energy in the pellet to the structure, providing lift.

Therefore some of the weight of the structure is supported by the pellet stream rather than the building, allowing for less bulky building techniques.

Space fountains can be used as a launch pad for spacecraft by reducing the amount of fuel needed to be carried.

A related technique is the space elevator.

Thursday, June 02, 2005

O2 Xda II Mini Part II

Last time I talked about my O2 XdaII Mini.

I'm pretty comfortable with my use of it. The 'Today' screen shows my upcoming appointments, any messages and my tasks. To display the tasks, I've installed a Today plugin called Task Plus. It shows tasks with more information than the standard task view. It also shows battery status.

I've also written some applications. One is a 'game' manager. I use it for playing Magic: The Gathering. It keeps track of the amount of damage I and my opponent has taken. It's a great app because I'm likely to have my phone with my and it saves having to write on paper or use beads.

The other is a budget. It keeps track of how much money I'm spending, which I find useful. It actually stores the data in a SQL database on the device!

The best app I've seen is one my friend Dave wrote. It's a scorecard for frisbee golf. Again, it saves having to carry a pen and paper around.


Everyone hates batteries, right? They're heavy and bulky and they keep going flat at the most inopportune times. Mobile phones these days seem to be not much more than a case around a battery!

Enter Tritium, a radioactive isotope of hydrogen. When Tritium decays, it emits an electron. Sounds pretty darn good for a battery, right? Right? There are plans to make batteries that might last 10-12 years without recharging. See this Wikipedia article for a little more info.

There's an article with a lot of discussion about this on slashdot.

A summary of the posts in favor of these batteries seems to be:
  • Tritium batteries are already used in pacemakers

  • They are very easy to shield and give off almost no harmful radiation at all

  • Even if they're punctured, the results are less harmful than the contents of most chemical batteries

  • A summary of the posts against seem to be:
  • Ooohhhh... nukular... bad. Bad nukular!

  • And a word from the cynics:
  • Battery makers won't invest in this because they like making us buy lots and lots of disposable, short lived batteries

  • I say bring it on!


    Found this great article about gaming.

    It's great. It explains very clearly (not to mention verbosely!) my opinions about games in lots of areas.

    My favorite part? I hate wandering around lost in FPS's:
    Did you remember when you were a kid and you got bored on weekends, how you would go to a large building, a hotel or a hospital, then wander around for several hours looking for a certain room? While zombies attacked you? Neither do we. That's because, much to the surprise of FPS game makers everywhere, wandering around lost in hallways isn't fun.

    Other highlights? Creating 'difficulty' by giving you only 4 bullets in a clip, or making you talk to 10 different NPCs in the right order to be able to accomplish a task.

    Wednesday, May 25, 2005

    The Singularity

    Slashdot had an article yesterday about downloading your brain.

    It reminded me of an essay called Staring into the Singularity.

    The essay talks about what happens when we develop an AI that is capable of improving itself, by designing and implementing it's own software and hardware. Once this happens, thanks to ever-increasing hardware speed the work that the AI is capable of doing in a given timeframe rises asymptotically to infinity in a short period of time.

    At this point the essay proposes that one by one the neurons in your brain can be replaced by a wireless device that performs the actual processing. The physical neuron will not be shut down until the inputs and outputs are modelled exactly by the computer. This way, your conscious is shifted into a computer seamlessly, and there is never two copies of you running at any point (which is one of the major issues raised in the Slashdot article).

    It's a thought-provoking read.

    Tuesday, May 24, 2005

    Macro to attach to asp.net process

    You know how much of a pain it is to debug web apps in Visual Studio .Net? You either run the website (which takes forever) or have to attach to the aspnet_wp.exe by clicking [Alt]dp[Enter][Enter][Enter].

    Finally! A macro to attach to the process automatically! Thanks to Dan.

    Sub AttachToAspDotNet()
      Dim attached As Boolean = False
      Dim proc As EnvDTE.Process
      For Each proc In DTE.Debugger.LocalProcesses
        If (Right(proc.Name, 13) = "aspnet_wp.exe") Then
          attached = True
          Exit For
        End If

      If attached = False Then
        MsgBox("aspnet_wp.exe is not running")
      End If
    End Sub

    Monday, May 23, 2005

    Plane reverse thrusters Part II

    I flew to Sydney on the weekend. On the way back, I was sitting just in front of the wing. As we were landing, I checked out the engine on the Boeing 737 and lo and behold, the back part of the engine slid back just as the loud windy noise started. It looked just like this (about half way down the page, under the heading "b) Reverse Thrust Configuration".

    So, this just goes to show, not all of the information on the internet is bullshit. Unless this post is also bullshit... hmmmm.

    Friday, May 20, 2005

    Plane reverse thrusters

    I just read about reverse thrusters for jet airplanes. You know when you touch down and then you hear a really loud sound from the engines and the plane slows down quite rapidly?

    I always assumed they somehow ran the engine in reverse or something. I knew that didn't make much sense, but I didn't really know how it would work.

    Well, it turns out they deploy these big diverters behind the engine that just redirects the jet exhaust!

    See this Wikipedia article for more info.

    O2 Xda II Mini

    I recently purchased an O2 XDA II mini. It's manufactured by HTC. It's also badged and sold as an iMate JAM.

    I love it. I'm all for convergence. Where I used to carry around:
    - A mobile phone (Nokia 6610)
    - A 256MB USB flash memory stick
    - A Palm Vx, which despite being old was still very capable.
    - A paper based diary
    - A flash based MP3 player

    I now have just one device. It covers all these functions, plus it provides:
    - A camera/video, albeit a really crap one
    - Voice recording
    - Masses of applications
    - Wikipedia on the device if I'm ever curious about just about anything.

    I also don't have to worry about synchronising people's contact details across my phone, palm and PCs. The Xda synchronises automatically with Outlook on my work and home computers.

    - Small form factor an ideal compromise between mobile phone and organiser with a useful screen
    - I can write my own programs for it! This is one of the most important points for me.

    - If I ever want to just carry a mobile, it's a bit bulkier than my old mobile.
    - Only 128MB RAM. I bought a 1GB expansion card, so that's okay :) I can't wait until they've got a multiGB hard disk built in.

    Next time I'll talk about how I tend to use it and the applications I've written for it.

    Wednesday, May 18, 2005

    Movie Physics

    Dammit! I just saw a trailer for the Fantastic Four movie. I was really looking forward to this one. The FF, Victor von Doom, what's not to love?

    Then I saw a scene where a truck is coming towards The Thing (the strong, orange, rocky one) and someone else who was lying on the ground. So The Thing jumps in front of the person, braces himself and hip and shoulders the truck.

    The truck crumples around him and stops dead (cool CGI, by the way, he's almost enclosed by the truck due to the crumpling).

    But get this... the truck stops. Excuse me for having a brain, but exactly how is he anchored to the road?? Fair enough he's not hurt. I guess he weighs a fair bit too, but not as much as a truck, I'd wager. What should have happened is that he puts a big dent in the truck and gets carried along. It's the whole conservation of momentum thing I'm talking about.

    This kind of thing just ruins the illusion for me. It rubs into my face that what I'm watching is not real. It sucks. And it's becoming rampant.

    Remember in The Hulk when he's standing on the roof of a building and jumps a few kilometers away? Well, if he applied that much force to the roof of a building, the only thing that would happen is that he blasts the roof out from under his feet and he falls down.

    At least let's get some semblance of an excuse for something vaguely resembling realism. Please?

    VB.NET vs C#.NET

    There's an interesting discussion happening at work at the moment about VB vs C# code. My thoughts:

    VB as a language was designed to abstract a lot of complex functionality so that the programmer didn't have to "bother" with it. This is great for small and simple applications. It provided a great platform for developing small applications quickly and efficiently.

    C++ however doesn't try to hide detail (although later libraries such as the STL started to edge in this direction). So you have more power and control, but also an increased level of complexity. So it took longer to produce a simple application but is more capable for a complex application.

    So from my point of view, the comparison is between ignoring complexity and knowing, at a deeper level, what was actually happening when you call a function with a reference parameter. Knowing how memory is managed and how pointers work. Coz this stuff is still important, no matter how much .NET tries to hide from you.

    I don't think there is any difference in VB or C# code. The only differences nowdays (.NET) is the syntax.

    However, there is a big difference in code written by someone how 'gets' how the low level operations work and someone who doesn't. This is, to me, the essence of the (unfair IMO) categorisation of VB programmers and C++/# programmers. The categorisation is based on where you came from. If you started working with C++ you probably understand this stuff, or you wouldn't have cut it as a C++ developer. If you started working with VB, you didn't have to do that. Mind you, that doesn't necessarily mean that you don't get it... there's no reason that a programmer starting with VB is any less capable of understanding what's going on under the hood.

    Joel on Software has an interesting article about Leaky Abstractions that also illustrates this issue. It's pretty long, but it's almost certainly written better than this (admittedly long-winded) post :)


    I was amazed to read that the QE2 was originally built with a steam turbine! It's maiden voyage was in 1969. I didn't realise that steam turbines were still in use at this late date. She was refitted with diesel engines in 1986.

    And thus it begins...

    Okay, so I got me one of these newfangled blog thingies. I expect that the world will now be a better place, with no more hunger, poverty or war. That's the way these things work, isn't it??