Monday, December 24, 2007

Happy Xmas

Happy Xmas to all, and those who don't do Xmas then best wishes.

This is our first (and probably last) Winter Xmas and unfortunately it looks like it won't be a White one. It will be bloody cold though, can count on that.

Anyway, to my friends in the North - enjoy your Turkey and Brussel Sprouts (yuk). To my friends in the South - enjoy your BBQ's and salads!

Saturday, December 22, 2007

Windows Vista Service Pack 1 RC1

Although an Apple fan boy, I still have a Window Laptop for doing .NET dev work on. The machine is new and came with Vista pre-installed. I have MSDN and considered re-installing XP, but thought I would give Vista a chance seeing as I paid for it!

Initial experience was ok, but I felt the internet was a little slow. This was bourne out by testing - my Macbook Pro, and XP via boot camp was around 7000kb/s down, Vista came in at around 4800kb/s. All on the same internet connection. I did a little research and discovered other people were having issues too. I tried all the resolutions to no avail.

I was about to give up on Vista, when I noticed RC1 of SP1 (say that 10 times fast) was available to download. So I did - nothing to lose.

Installation was fairly painless, it comes in via Windows Update. The whole process took about 25-40 mins, rebooted a few times and fairly painless.

The whole OS feels snappier, and I rebenched the internet connection and it was up to 8000kb/s. Ok hardly scientific but the results speak for themselves.

Hopefully, SP1 for Vista has ironed out the many issues that people were having. It seems to have for me so far.

Friday, December 21, 2007

"Blogger arriving on .NET Platform 3.5 is..."

A blog, particularly one which has had a fair amount of work put in over a period of time, can be a precious and special thing, and to be invited to contribute to this one by James is comparable to inviting someone to live in your home, or drive your car. It is an honour that I intend to repay by hopefully making posts that not only maintain the standard that has been set so far, but also by bringing my own perspective of all the new stuff that's going on in the business we call software development. I have to say that James has certainly set the bar pretty high with his post announcing that I had been invited to start contributing to his blog, and I certainly intend to live up to the billing.

So Hi! I'm Shaun, as James has already said I'm a Brit currently based in Cheltenham, UK and have been a software developer for as long as I can remember (even back to childhood.) As a contractor I've worked in many diverse industries from media to government via pharma and banking etc and have tended to focus on the ever morphing set of MS technologies.

So what can you expect from me? Well, my current interest is in the latest greatest bits and pieces that have come along with the new .NET framework releases. Like James I'm quite enthused about the possibilities created by some of these new technologies such as LINQ and hope to be able to shine an "in the real world" spotlight on them. Some of the topics that I'm most excited about and straining at the leash to blog about are:
  • LINQ (to SQL, to Entities, to XML all of em)
  • Continuous Integration
  • Test Driven Development
  • The rise of AOP in .NET development (using PostSharp)
  • WCF (son of remoting, grandson of DCOM)
One of the current pieces of research I'm playing with at the moment is how we can combine LINQ (to SQL) with a WCF service to provide data to a simple client (WPF) thereby moving closer to a real world implementation of an n-teir LINQ app. So keep your eyes peeled for a post on that some time soon.

Wednesday, December 19, 2007

New poster

I am happy and honored to introduce a new poster to the blog. Shaun Austin, a dyed in the wool Pom, and all round good bastard. You can trust me when I say he knows his stuff. In-fact I can honestly say I've only met one other person who comes close to his knowledge and ability.

Shaun's C.V is pretty impressive. He has been contracting for the last 10 years or so and has genuine real world experience. The only issue is he is a northerner and slightly Xenophobic in the Flight of the conchords sense of the word. (bit of an in joke I'm afraid). Also, we are (hopefully) co-authoring on a .Net related book. All will be revealed in the fullness of time.

Anyway, I hope you enjoy his posts - I'm sure you will.

Tuesday, December 18, 2007

Linq to SQL : where are the n-Tier examples?

Further to my last post regarding Linq to SQL. I have been searching the net, looking for examples of how one might use Linq in an n-Tier world.

Short answer is there isn't really any. The vast majority of examples you will find are for a 2-tier model, where the DataContext is alive across the call, and the Entities will always be attached to the DataContext. Unless you are developing utilities, or you code will always be executed in the same box as the database, then this isn't really real world examples.

With a bit of digging, I have found a series of articles on the MSDN site here with the most useful being this one.

The readers digest version for those of you who are too lazy to read the articles, is that you need to serialize your Entities and then use the Attach API to "reattach" them to a DataContext.

There are some gotcha's, most important of all being you may have to handle concurrency issues yourself.

I intend on posting some code once I have digested the articles and found time to do some playing, but I would suggest you do some digging of your own, and those articles would be a good place to start.

Wednesday, December 12, 2007


I have been playing with Linq (Linq to Sql) for a couple of weeks, when I get a chance. I do like Linq. The most powerful (and obvious) feature is automating the plumbing of creating a data-access layer. Design the database, drop the tables with links on the designer and bam, you're done.

While this is a really good thing, I think there are two potential issues:

1) Linq can promote tighter coupling of UI to DataLayer (DataContext in this case)
Maybe this isn't as big an issue as it used to be in the bad old days, but I can see lazy coders talking directly to the dataContext/Layer from the UI. For example

myDataGrid.DataSource = MyDataContext.Customers;

it probably isn't a sin but it's a small step from there to embedding business logic in the UI layer because it is so easy to do something like

string id = txtId.Text;
var cust = from customer in MyDataContext.Customers
      where == id
      select customer;

someControl.DataSource = cust;

in a search button on click event. This sort of thing was/is common in Delphi. Delphi has a concept of a Datamodule, which isn't a million miles away from a DataContext. Well I guess it is, but for arguments sake, if you think of a DataContext as a central data repository then a Delphi data module is getting closer. It makes ugly, hard to maintain code. So please don't ever do this. Use Linq to Sql by all means, but there is no reason not to still have a business layer in between.

2) Linq to Sql will generally create a 1:1 mapping of data objects to business objects
A lot of people don't care about this, but business objects shouldn't necessarily be a 1-1 mapping of your tables. Take an order for example, it will contain data from a number of different tables, customer, order master, order detail, product, possibly tax. Anyway you get my point. From a business object point of view, this is one object.

Without discipline, good design, and buy in, linq makes it very easy to cobble bits of data together to do what you need quickly and easily, in the short term, but can cause a mountain of headaches in the maintenance phase. I have seen it all to often in Delphi code.

I guess in a nutshell, the point of this post boils down to this statement:

Linq offers great power, but with great power comes great responsibility. Please, please, please remember this when you are dipping your toes into the Linq pool for the first time.


A couple of people have complained in the comments about the last skin causing vision bluring after a while. I have therefore changed skin. It's just a standard template supplied by BlogSpot. I really should create my own, but only so many hours in a day...

Monday, December 03, 2007

The old 80 / 20 rule

Jeff Atwood suggests there are two types of developer. Basically it comes down to 80% of developers are what I would call plodders. They get on with the job, but aren't particularly brilliant or interested in coding as a craft.
The other 20% have a passion for developing and are not only good, but are always trying to be better.

Being a contractor, I have worked in a lot of different industries, and more importantly with a lot of different people. My observations of different types of developer are below.

Type A: Plodders

Plodders get their name because they tend to plod away day after day, producing code. The code they produce might not be the most elegant solution but it works and that's all they care about. These types never really better themselves too much, because programming is something they do to pay the bills and they don't really love it.
Every project needs plodders - tell them what to do and then let them go.

Type B: Coders

Coders are definitely in the 20% mark. They are very good developers, with the ability to look outside the confines of what they are doing and see the bigger picture. They would be keen to better themselves by reading blogs and books and keeping up to date with latest technologies. Coders usually need to be kept interested in, or believe in what they are doing, and can revert to plodding if they aren't. Coders would rather prototype something to see if it will work, rather than methodically work out what would be needed and document every part of the system before coding.

Type C: Careful Coders

A careful coder is basically a coder with a more meticulous personality. These types prefer to have a full understanding, and a fully documented specification before turning on the IDE.

Type D: Guru

These are very rare types, maybe 5% of all developers. They fully understand the languages and technologies they use, and know things inside out and can wring the last CPU cycle out of their code. A true guru isn't self titled. It's up to other developers to give them that name. I've worked with maybe 2 or 3 in my entire career.

Obviously the above list is entirely subjective and only coming from my experience but I think most people would agree that the guys around them would fall into one of those categories above.

For the record, I consider myself to be a coder, but always seeking to be better and improve so one day I might come close to being a Guru...

Tuesday, November 06, 2007

VB Must die

I'm sure there are some excellent VB programmers around it's just that I've never met any. Judging by the quality of the VB code I've been looking at recently, none worked at the place that wrote that code.

There is something about VB that seems to invite cowboys and morons to it. Guys that were flummoxed by C/C++ or Delphi, but still wanted to get on the IT Gravy train. I guess it's easy to get something up and running, and without a lot of forethought or future thinking. Just put all our business rules on the click event of this button, no one will ever need to change the code, or the UI.

The language itself encourages laziness.

On Error Resume Next


Sure the program has just come back from catastrophic error, but I'll still try and plug on anyway. What's the worst that could happen?

variables don't need to be defined before using

VB guys counter this by saying, "Always use Option Explicit". Well if you should always use it, why isn't it turned on by default? Or better still why give the choice?! Sugrue rule number 1 states that if you allow a programmer to be lazy, they will be.

The single worst thing about VB to me though is the use of braces when calling a method with parameters. Or not.

myMethod parmeter1, parameter2

is valid, infact that's how you do it. However if you are assigning the return of a method to a variable, put the brackets in:

myVar = myMethod(parameter1, parameter2)

why? What sane person thought of this? WTF is the point. Either use it or don't.

Which brings me to VB.NET. Obviously it is real OO and utilises the .NET framework so is built on the foundation of brilliance, but what is the point? If it's to allow VB coders an easier starting point to .NET, then they are kidding themselves.

Microsoft should doing everyone a favour and send VB for a long walk off a short pier. Either learn C# or flip burgers instead.

Sometimes you have to be cruel to be kind.

When is String.IsNullOrEmpty doesn't work

If you read my previous post you'd know I was involved in some C#->VB COM developing. Well actually VB->C# to be 100% correct.

Anyhoo, in VB you can define a string with a length eg

Dim suckyVBString as String * 9

which defines a string of max length 9 characters. When this string is part of a user defined VB type (or "class") then when the type/class is newed then suckyVBString will be "         " rather than "".

So a little unexpectantly doing a String.IsNullOrEmpty(suckyVBStringFromCOM) returns false

a little browse of the IL shows that IsNullOrEmpty contains this code (not exact code I am blogging on my mac but you get the point):

public bool IsNullOrEmpty(string s)
   if (s != null && s.Length > 0)
      return false;
      return true;
so while the Marshaled VB string is full of 9 nulls (char /0), it is neither null or empty according to the code.

A quick visit to String.Trim() sorts all this out, but it's a trap for young players if you're not careful.

C#->VB6->C# Sucks

The current project I am working on is erm, interesting. The scope of the project is to replace VB business logic, with C# and SQL Server. The major caveat is that the VB front end MUST stay intact. Not only intact but untouched.

Fun fun.

Most things just work out of the box. Obviously all classes must be exposed with [ComVisible(true)] attributes and given a GUID. Even though Microsoft states that you shouldn't =, we also had to use the AutoDual visibility attribute to get VB to see the public methods.

The VB code we have to interface to uses classes with property method indexers. These are probably called something else in VB, But I call it this. These look something like this (going OTOH so might get syntax wrong)

Public Property Let Reminder(index as Integer) as String
Public Property Set Reminder(index as Integer) as String

instead of being marshaled as

public string[] Reminder

as you might think, this gets Marshaled as

public string get_Reminder(short __p1);
public void set_Reminder(short __p1, string __p2);

which is of course correct. This is not a major, but the VB code does need changing. Also if the underlying VB array that the properties refer to are not zero based then the C# code then has to take this into consideration when dealing with the index.

oh and any normal VB property that is assigned with ByRef or more to the point, with ByVal not added then the properties get marshaled as above.

Like I said fun fun.

Heres the "killer feature" though. If you are doing Unit testing in C# of the VB Business logic that includes your C# that includes VB arrays that are marked by ref, well it won't work. It falls down in the re-marshaling back into C#. (Don't ask).

But with a bit of reflection foo it is possible.

First you have to get the type using

Type t = Type.GetTypeByProgID("mydll.dll");
object objectInstance = Activator.CreateInstance(t);

then we just simply go InvokeMethod with the Class Name, Method Name and any method arguments in an object array.

I'll post the code - don't have it on hand at the moment.

Anyway, if you can avoid COM and .NET do so. Well VB frontend to C# code anyway...

Thursday, September 27, 2007


Been a bit slack lately. Haven't posted for ages.

I have a few ideas, but finding the time to do them is an issue. I bought an Xbox 360 a couple of weeks ago, and between that, learning Objective-C on the Mac, the Rugby World cup, and usual work/family/sleep patterns I just haven't had time to sit down and put pen to paper, so to speak.

However once I get Halo 3 and BioShock out of my system I plan to up the frequency on here.

Forthcoming topics will include:

Agile / XP
Nunit and Test driven development
Continuos Integration
Why VB sucks
C# 3.0 salty goodness.

BTW if you have an XBox 360, get Halo 3 and get Bioshock if you haven't already. Both are awesome. Oh and Forza 2 aint bad either.

Thursday, August 09, 2007

C# 3.0 - Extension Methods

Think of extension methods as normal static utility methods you can add to any object.

Extension Methods can be defined in any class. There are only two things you need to do to define an EM. First the method must be public static in a static class, and you must add this to any parameters.

public static class MyExtensions
   public static string AddNewLine( this string s )
      return s += "\r\n";


string s = "This is my Test";
Console.Write("I'm now on a new line");

This is a fairly trivial example, but I'm sure you are starting to see the power of extension methods.

In C# 2.0 days the above would be:

string s = "This is my Test";
Console.Write("I'm now on a new line");

To my mind, the above is not as readible, but also you have to remember which utility class you put AddNewLine in, or more importantly another coder has to know which class you put the method in.

Microsoft suggest you should use your own Extension Methods sparingly and warns not to extend existing types that you don't control. This is because changes in the existing type could break your code.

I guess this is all logical stuff. I think that most people will use Extension Methods for adding utility functions to standard types, for example the one I can think of, off the top of my head would be something like ToInt() to convert a string to an Int.

Great Post

Here is a great post explaining the intangible benefits of Mac use. Gets especially insightful around page five ;-)

Wednesday, August 08, 2007

What do you want in a computer?

If you hate Macs, then don't bother reading on.

Anyone who reads this blog will know that I am a developer for a living, what's more I develop on Windows using Microsoft tools. Without a shadow of a doubt Visual Studio and in particular C# are the best tools for getting the job done. Period. Windows, well not so much.

When I get home, I just want my computer to work. I want to catch up on email, read and write blog posts, surf the net, watch video, listen to music and import, edit and view of Digital photos. I would estimate that 80% of computer users would have the same requirements.

I don't want to have to piss around making sure my Virus, Malware and Spyware apps are up to date and my computer is clean. I can't be arsed with my machine crashing when I'm half way through something. In other words I use a Mac. Now, I can respect people thinking they are saving money by buying a budget Dell or equivalent. I'm sure they are fine and do the job 90% of the time. More power to them. For the rest of us, I really and honestly don't understand why so many people persevere with Windows.

I think other than the fact that OSX just works without fuss and is virtually Virus and Spyware free, the biggest pro for getting a Mac is the bundled software. iPhoto, iDVD, iMovie, iTunes, GarageBand, iMail and iCal are brilliant. There are apps on Windows that do the same thing for free, but none of them are included with the operating system, or work as seamlessly.

There is a new version of the so called iLife apps out. Link here. Having seen what is on offer, I think that the new iPhoto could be the killer app to make Windows users switch. It automatically imports photos from your Camera and breaks them into Events, making it easier to view your photos. This with iPhoto's already impressive ease of use, speedy search and "it just works" factor will make viewing your photo library painless.

I know this sounds like an ad for Apple, but it's more wanting to let everybody know how much simpler life with a computer can be. If you've ever used an iPod then used any other MP3 player you will understand what I mean.

The future is Linq and Linq to SQL

I have been playing with VS 2008 Beta 2 all morning. Where to being. I will post some more specifics later but Linq - wow.

I have read some propeller heads not liking Linq to SQL, because it isn't a true ORM, whatever that means. Me, I like it. It gives enough abstraction to handle the meanial tasks, but gives me enough flexibility to let me do what I want, and not have to buggar around with config files.

Get used to seeing code like this:

var totalInvoiceValue = db.Invoices.Where( cust => cust.City == "London" ).Sum( cust => cust.ExtendedPrice );

In a nut shell, that is all you would have to do (once the mappings are setup and thats Visual) to get all the sum of all invoices for London. No more query strings. Very nice.

It is my intention to door some more posts around Linq as I get more into it, mostly so I can write down my thoughts as I find having to explain something in words help me get a better grasp of it too, and if it is useful to others along the way then all the better.

But until then, do yourself a favour and download the beta and start playing.

Tuesday, August 07, 2007

New iMacs Released

New iMacs here

Even though I am an unabashed Apple fan boy, I have to admit I was surprised at how cool the new iMacs are. Might even have to get one I think.

Not sure about the new keyboard, but I like the USB port at either end.

I would wait until Leopard comes out in the next month or two before getting one though. Oh and they'll run Windows just fine, trust me. I have just installed Visual Studio 2008 Beta 2 on mine and it runs great.

Thursday, July 26, 2007

Tour de Farce

I have been into cycling since about 1995. I caught my first Tour on the T.V. around that time. I was captivated, awesome scenery coupled with the drama of the tour made for awesome T.V. I guess I was a little naive and really didn't know the dark under current that was perversive in the sport.

I watched year after year from then on. I loved Jan Ulrich's tour win taking the title of his team leader Barne Riis who was the defending champion. Richard Virenque winning 5 or 6 King of the Mountains in a row. Little Marco Pantani defying the odds with his awesome come back victory. Unfortunately, they were all caught cheating (well Ullrich "retired" before he could be found guilty but was implicated in a drug ring) the very sport they were supposed to love.

Then came Lance Armstrong and all was good with the world again. Even he, the most tested athlete in history, was tainted by the drugs. I firmly believe he was clean, but I'm an optimist. I want to believe.

After the on going fiasco with last years tour, it had to be squeaky clean this year. In every sense of the word. It was looking good. We had the drama of Vinokorov falling and then his heroic time trail victory and stage victory in the Pyrenees. Last year was almost forgotten. And then the bombshell. Vino and his team were thrown off the tour and he was found guilty of blood doping. Then today Rasmussen who was leading, was thrown off the tour for irregularities in off season dope testing. These two incidents are another slap in the face, in a long line of slaps in the face.

It's not the other riders, or the sponsors, or even the organizers of the tour that are hurt most. It's you and me, the cycling fan. The guys who will never make a bean from cycling, but race and train in the rain and the wind and the incessant attacks from Magpies in the Spring. All for the love of the sport. The drug cheats are killing it for everyone and have to be stopped.

What can we do?

We can hit the cheats were it hurts. In the pocket. We're the guys who buy the bikes and the wheels and the group sets and the team shirts, and show up to watch the pro's. There would be no pro cycling without us. So lets all make a stand. Let us agree, as cycling fans, to boycott the sponsors and teams of drug cheats. Lets not fuel the vicious circle any longer. We owe it to ourselves...

Sunday, July 22, 2007

Old Code

As I have posted previously, I am modifying some old Delphi code I maintain. It is usually a yearly thing. The client has some requests I procrastinate and do it at the 11th hour. I am not a procrastinator as a rule, but going back to Delphi from C# is very very painful, and something I don't like doing.

Looking through my old code is painful too. Most of the stuff I did between 5 and 7 years ago. I thought I was good in those days, but well I wasn't as good as I thought that is for sure. It seems looking back, that I didn't fully grasp OO. Also I seem to put code in utility type files - just source code files with procedures and functions that don't tie in together. I see now that most of the code should have been wrapped up in classes but for some reason I didn't.

Would have made my life a lot easier now that is for sure.

It's a worthwhile and humbling experience to go through some old code. It makes you realise that there is always room for improvement and learning. I bet in 5 years the code you did yesterday that you thought was awesome will look just as bad 5 year old code does today.

A little reminder that taking a step back from your code and thinking about what you are doing is always a good thing...

ModelMaker Explorer

Recently, I have been coding in Delphi again. I have to take some code (mine) and refactor. In standard Delphi it's not a pleasure. I am using D7 which is getting a little old now, but I prefer it over 2006 which I also own.

I purchased ModelMaker Explorer to help out. It comes highly recommended. I bought it for refactoring features, but it has a ton of other useful features too, such as live metrics. I haven't checked out all the features yet, but at 95Euro it is a bargain. I wish I had bought it years ago.

Wednesday, July 04, 2007

If apple designed everything

Link Here

It appears to be in Italian, but you get the idea.

Thursday, June 21, 2007


Hey Windows freaks. Beat this.

In all seriousness if someone did code this for Windows it would rock.

Would have to be in WPF to match the "cool" factor of OSX transitions and visual/animation effects, but it could be done.

Until then you can either be jealous or buy a Mac. Do the latter you won't regret it. Trust Me.

Monday, June 18, 2007

Sometimes normalising data is a pain

We've all been there. Inherting some piece of crap Access app that was designed by someone who did a 5 minute polytech class. All the data is stored in one table or replicated in several tables. Above all else it's a nightmare to code against.

Of course databases like this could do with some normalisation. But sometimes, we can go a little too far. I am currently involved with a project to track data through a system and display eta's and other information on several display monitors around the physical location, to give workers a better idea of current state of play, allowing them to make better judgement calls. (can't go into specifics here).

At several locations along the route, there data is retrieved using some equipment. Each piece of equipment has a unique 6 character Id and posts information in real time to my app using tcp/ip sockets, with the 6 digit Id as the reference.

A process then filters this raw data and stores it in the database, with the primary key being the 6 digit char. Ok so far. At several points along the route decisions are made and data is manipulated and stored in another table for use by the seperate display process.

Against this spec, I start coding the system. I am lead developer on this system, but the overall lead (wrote the spec) is also designing the database. At some point he decided to normalise the data a little and move the 6 digit Id into a table of its own with an integer primary key.

This is fine, from a database point of view. It might be possible in the future that the Id field changes (6 digit char one) but not very likely. About as likely as Steve Jobs owning a Zune, likely.

So by normalising the data, my job as a developer has increased. A lot. First of all, my classes need to be rewritten to incorporate a int id field. ( I do this by hand - shoot me ), then my code needs to be rewritten to include joins to this new table . A simple change on the database creates a lot more work.

Some people at this point may argue that the design is at fault, or you shouldn't code against an incomplete db schema. This may be true. However in this system the int id field is meaningless, so I have to access two tables everytime, instead of just checking against the raw data. Ok, we may save a miniscule amount of space on the database server, but really, is it worth the extra effort, especially considering how cheap cycles and space are these days?

Normalisation, is good. But before you do it to the nth degree, it needs to weighed up against the system as a whole. Just because a DBA prefers fully normalised data, doesn't mean it should be done.

Tuesday, June 12, 2007

Safari Buzz (and fud)

There has been a lot reported about Safari 3.0 (beta) being available for Windows today. I have been running it all morning with few issues. However, if you're a Windows head, it seems to be the thing to do to bash Safari.

I think a lot of these people should remember ITS A FRICKEN BETA.

Also, if these people hate Apple so much, why are they so interested in this? I think thoust doth protest too much.

Monday, June 11, 2007

And now with Windows flavour

Just finished catching up with the WWDC Keynote address by Steve Jobs. Nothing earth shattering announced unfortunately. Leopard, OS X 10.5 looks very nice though. Makes Vista look a little tried. All features etc can be seen Here

The one interesting thing announced was that Apple have release a new version of Safari, that is also Windows compatible. According to (Apple) benchmarks it is the fastest browser available today. Download it here. If nothing else it makes it easier to test Websites on Windows. Until now the only way to test on all browsers was to have a mac and install Parallels or Boot Camp.

I guess it's a double edged sword. On one hand it makes it easier to make websites Safari compatible for Windows developers. On the other hand it takes away one excuse Windows developers can use for justifying a mac purchase. Not that one is needed, but Windows users are a little slow, lets face it....

Parallels for Mac 3.0 Review

I upgraded my version of Parallels to version 3 as soon it was released on Friday. The major draw card for me was 3D graphics support. I like to play the odd Windows game from time to time, so this is a major(ish) feature.

There are a slew of new features, including the ability to boot a Boot Camp partition within Parallels.

Install was fairly painless. I have a XP parallels image and a Vista boot camp drive. I tried both. I didn't notice any real world difference in my existing XP image to be honest. My Vista boot camp image loaded nicely within Parallels. It has to load some drivers to the OS first and requires a couple of reboots first, but it up and running within 10-15 minutes.

The Vista image running under Parallels had Aero turned off, and I couldn't get it running even with Direct3D support turned on. It run pretty sluggishly too. Quite a bit slower than native boot camp. This is understandable I guess but a little disappointing. I think it is down to memory issues with Vista (my version is Premium or Ultimate or wtf it's called) as much as anything else. My machine is a Macbook Pro @ 2.16Ghz and 2Gb Ram. The image had 1.5Gb ram allocated to it.

My advice would be unless you absolutely need it don't run Vista in Parallels.

XP runs as fast as native under Parallels, in fact, running in full screen it would be impossible to tell it wasn't running native, using real world / seat of pants benchmarking.

3D Gaming
The marketing blurb on the website says, "New! 3D Graphics lets you run today’s most popular PC games on a Mac". This is a little misleading.

I downloaded a demo of Star Wars Lego II and it crashed on the menu screen. There is a list of games on the website, one of which is Quake 4. I downloaded the demo - I also downloaded the native Mac version, but haven't benchmarked yet.

Quake worked fine, but in game fps was hovering around 14-18 on average. I had medium detail turned on, with shadows but no AA, running @ 1082 x 768.

I will benchmark against native Mac version be commenting. I would have thought however that 14-18fps would be quite low however.

Overall, Parallels is great and I recommend it to anyone. Word on the street suggests that something similar may be built into Leopard. Time will tell on that front.

I would hold off on buying or upgrading, until after the WWDC which starts today (11/06/2007) as this info will become more clear then. Also, if you are looking to run the latest PC games, I still think dual booting with Boot Camp is the best way forward.

Thursday, May 24, 2007

Life changing gadgets

On the back of Nics blog post about a Scott Hanselman blog post I thought I'd add my 2c, sorry 2p worth.

In no particular order:

  • Macbook Pro

  • I'm a born again Apple addict (as I keep telling anyone who will listen). I was getting thoroughly sick of wasting my time rebuilding Windows PC's after 6 months because of slow down, and generally getting sick of Windows. After 3 months with a Mac, my passion and excitment for computers is back. Every geek should have at least one Mac.

  • Sky+

  • Ok it's hardly bleeding edge and I should get around to getting a "proper" DVR, but being able to record two Sky channels at once, live record, and season link is brilliant.

  • iPod Video

  • Watching webcasts and listening to podcasts while commuting to work is a god send here in Britain. I didn't really understand how great these things were until I got here. I do think people use them to hide behind, so they don't have to talk to strangers on public transport but I guess that's a good thing for those people. They say copying is the greatest form of flatery, then take a look at most other MP3 players and Apple should feel very very flattered indeed.

  • Wireless Internet

  • Not really a gadget but hey it's my list. Life before Wireless broadband sucked. Surfing in a dark, dingy, cold computer room. Now I can surf infront of the box and talk to the missus! Actually the Internet in general is IMHO the single greatest invention in the history of the world. Don't agree? Ok think about your life now. Now take the internet away. Sucks doesn't it. Communication, Information and Entertainment has been changed forever because of the Internet. I was a programmer before the Internet, but can't remember too much about those days. Man it must have been hard getting information. These days a quick Google finds the solution to most issues. Huge productivity gains there I think!

  • Amstrad CPC 464

  • This little machine started it all for me. I got an interest in computers and programming because of that little 8 bit machine. Who knows what I would have been if I hadn't met the Amstrad, but I can genuinely say that my life would be completely different. So the Amstrad must rate as number 1 on my list of life changing gadgets.

Wednesday, May 23, 2007

AC Milan 2 - Liverpool 1


Notice to Microsoft - Stop. Stop now.

Silverlight, Linq, Astoria, even .NET 3.0 are all either out or on the horizon.

I want to learn all of them, but with the need to: work, commute, eat, sleep and spend time with the family - there just isn't enough time in the day. So I say to Microsoft, stop now. Let me catch up ;-)

As a born again Mac fan boy I am pretty buzzed about Silverlight 1.1 and all it entails. Hopefully it will give all those devs out there that are bi curious (Mac and PC) an excuse to buy a Mac - testing silverlight apps on Mac!

Technologies like Silverlight and to a lesser extent WPF are creating a paradigm shift in the world of software development. It won't be long before you need a designer and/or user experience person on your team. Hopefully it will mean a richer experience for the user and nicer web sites and apps to use.

And it will allow developers to get back to what they are good at - developing. To often websites are either designed by developers or developed by designers. The end result can be disastrous. I mean you wouldn't get your dentist to remove your appendix?!

Tuesday, May 22, 2007

New Zealands greatest export

The pilot episode from the FOTC new US TV show is up. Funny.

not sure how it will go down in the States with the dry humour but hope it goes really well.

Tuesday, May 08, 2007

My first play with Oracle

On the current project I am working on, I have been introduced to Oracle. I have never come across it before - usually use SQL Server in various guises.

The installation process was a little harder than SQL Server, as the server we had been supplied had Java locked down on it. Basically the installer wouldn't run as it's a Java app. A boffin managed to find a work around and got it installed.

I guess being multi platform is a good thing - but to me the Java interface looks dated and is a lot slower than a native Windows app. The actual interface itself is a little clunky also. I don't believe it's as intuitive as SQL Server 2005 for example, although I am a lot more familiar with SQL Server.

Once you get up and running though, it's not too dissimilar than SQL Server. I did read an article talking about update-read locking and how Oracle allows users to read data on pending updates. I guess the thought process is that the update may never happen so why lock a process from reading. I guess it's a good feature to have that option. SQL Server just locks the read in that scenario.

From a front-end point of view the two are the same - I use the new .NET 2.0 data factory pattern (System.Data.Common) when connecting to databases anyway, so from that point of view nothing in my code is different for use with Oracle or SQL Server (or mySQL or any other db for that matter).

Anyway, so far no real issues with Oracle. I much prefer SQL Server, but I guess that is more to do with familiarity than any negative aspects of Oracle.

Thursday, April 12, 2007

I.T. Interviews

As some of you may know we packed up and left NZ and moved to England about a month ago. I decided to go contracting as it allows greater freedom and more money! There are downsides too of course (discussed on my other Other Blog

Anyway, as such I have been to a few (3) interviews and 2 phone interviews over the last few weeks and thought I would post my views.

The Process
Interviews suck, lets face it, but some suck more than others. It is common these days to vete applicants with an initial phone interview first. This to me is fine and makes sense. I have no problem with phone interviews.

Then it seems it is becoming more and more popular to do an online "skills" test. I think these are a complete waste of time. I (and others) consider myself to be an above average developers, and I have over 10 years experience, in several languages, platforms and more importantly, business areas.

Quite frankly the stupid online tests can hope to test me on my experience. The ones I have done are a multi choice question and answer type thing. All this tests in my opinion is how well you remember semantics outside the IDE. I have pretty much been developing since Intellisense, and have (I admit) become lazy. It doesn't mean I am a bad developer, in fact in my opinon the opposite. I let the tools do the donkey work, while I am concentrating a creating a solution.

I once interviewed for a job at HP. They had the best test I have ever seen. It was a real world scenario to finish an application. It gave the testee the opportunity to really show what they were capable of, and let the testers see some code and see how the person thinks. (I didn't get the job, but was the only person to ever finish the test. Didn't get the job for other reasons than soft dev ability BTW)

I think the HP style test is the only way to go. Test people by all means, but don't make them do stupid little multi choice Q+A tests. They really are wasting everybodys time.

If you make it to the face to face interview, make sure you have are prepared. Do some research on the internet about the company, and have some questions in your mind to ask them.

I find if you ask questions along the way, it makes you :
a) seem more intested in the company
b) look intuitive and knowledgable
c) seem well prepared

Also, run through in your head some questions they may ask you, and have some answers sorted out. It helps relieve the tension.

Don't put anything on your C.V. you can defend/explain in an Interview. You may have played with Javascript before but don't make it look like yuo are an expert. It will come back to haunt you as most interviewers will ask questions based on you C.V.

Above all enjoy it.


I've been a bit busy of late - move to the UK and was looking for work so haven't been inspired to blog about software development.

I have been busy on my other blog - it includes tips on those looking to move to the UK.

Link Here

Anyway, I will post soon about my thoughts on the interview process...

Tuesday, February 27, 2007

Sometimes technology is fantastic

I am writing this on my new Macbook Pro, using an HTC Apache EVDO phone connected via Bluetooth as the internet connection.

The Apache is a great data device / PDA - not so good as a phone - bit big. The fact you can use it as a modem is good. The fact that you can use it via Bluetooth as a modem is great. The fact that it all works with the Mac is fricken brilliant. I was a bit worried about switching to OSX that things like this wouldn't work (I have been tainted by bad experiences with Linux) but so far so good. OSX has just about every app I use on Windows or an equivalent.

It's a little mind boggling really if you think about how far the technology sector has evolved. The computer industry has been really only around since the mid/late 70's. How many other industries have moved so far in so little time. If the automotive industry for example moved at the same pace, just imagine what sort of vehicles we would have today - certainly wouldn't be tied to fossill fuels for one.

Anyway for today anyway, mark one up for technology actually working and being useful!

Thursday, February 22, 2007

New tools from CodeGear

Codegear the new name for the development arm of Borland have announced a couple of new tools:

Delphi 2007
Delphi for PHP

The D2007 release is, from what I can tell, a release of Delphi to that includes Vista support and some refactoring of the Database connection components. I don't do much Delphi anymore, so not terribly interested, but will check it out.

The other one, Delphi for PHP, is a little more interesting to me. I don't currently do PHP - I do ASP.NET, but am always keen to see how other technologies work.

All in all, I think a positive couple of announcements from CodeGear. It seems to me they are concentrating on areas they can actually compete. Their Java toolset has been moved over to Eclipse which is a good thing, and they appear to be concentrating on Win32 for Delphi.

I think this is a good move. In all reality they can't hope to compete with Microsoft when it comes to .NET. They are just too far behind the 8 ball, always a release behind. For example the latest Borland Development Studio 2006 uses .NET 1.1. Concentrating on Win32 which a lot of people are still keen to develop for, and looking at new areas - Delphi for PHP, I think they just might be able to create a good niche for themselves.

Tuesday, February 13, 2007

Design Patterns in C#. Part 1 Singleton Pattern

Design Patterns are a useful part of software development reuse. Design Patterns introduce a common problem and common solution to said problem. DP's are usually broken into 3 categories:

Creation Patterns:
As the name suggests, deals with the Creation of Objects
Structural Patterns:
Ease design by identifying a simple way to realize relationships between entities
Behavioral Patterns:
Identify common communication patterns between objects

Design Patterns are bigger in the Java world than they are in the .NET world. It's only in the last couple of years that I come across design patterns and their usefulness.

The most common design pattern, and the easiest to understand is the Singleton Pattern.

The definition of the Singleton Pattern is, "Ensure a class has only one instance and provide a global point of access to it."

Which means that the class will only allow one instance of itself to exist. We do this by hiding the constructor of the object and publishing a public method to instantiate the object.


namespace Singleton
  class Program
    static void Main(string[] args)
      ClassicSingleton s1 = ClassicSingleton.CreateInstance();
      ClassicSingleton s2 = ClassicSingleton.CreateInstance();
      //if new classes were being created, values should both be 1
      //if singleton works then should output 2



  public class ClassicSingleton
    private ClassicSingleton(){}

    private static ClassicSingleton instance;
    public static ClassicSingleton CreateInstance()
      //if instance doesn't exist create new instance
      if (instance == null)
        instance = new ClassicSingleton();
      return instance;

    //small method to prove only one instance gets initiated
    private int counter = 0;

    public string CountValue()
      return (counter += 1).ToString();

The above example is using the classic singleton approach. As you can see it is fairly straight forward and easy to understand.

This example is fine in a single threaded case, but in a multi-threaded application it is possible for an instance to exist on separate threads. To eliminate this issue we change the CreateInstance method to include a lock and another check:

public static ClassicSingleton CreateInstance()
  //if instance doesn't exist create new instance
  if (instance == null)
    lock (typeof(ClassicSingleton)) ;
    if (instance == null)
      instance = new ClassicSingleton();
  return instance;

These two above examples are using fairly standard approaches to creating a Singleton Pattern and is how you would probably expect to see things in the Java world. C# creators (and VB.NET too) new about Design Patterns when they were creating the language, and added a few nice features that makes it easier to do things such as this. The below is a Singleton Pattern creation the .NET way:

sealed class DotNetSingleton
  private DotNetSingleton() { }

  public static readonly DotNetSingleton CreateInstance = new DotNetSingleton();

  //small method to prove only one instance gets initiated
  private int counter = 0;

  public string CountValue()
    return (counter += 1).ToString();

As you can see from above the .NET version is much simpler. We create a static readonly property of type DotNetSingleton. Because it is marked static readonly it can only ever have one instance of DotNetSingleton. Note the class is now a sealed class, meaning it can't be inherited.

I am hoping to introduce several Design Patterns in the next few posts, but there are also several great resources on the net.

Do Factory is probably a good place to start, but as usual Google is your friend!

Next time, the Factory Pattern.

Wednesday, February 07, 2007

Macbook Pro First Impressions

Well, it finally arrived. Was it worth the wait. F**K YES!

I have owned PC's in various guises since my first 386SX-20Mhz in 1991. Since then I have owned and used literally hundreds of PC's. I got my first laptop in 1999, it was an IBM Thinkpad and I thought it was Christmas. I have used every version of Windows since 3.0, and Dos 3.3 before that. I am a professional programmer who makes a living off using Microsoft products, and developing for Microsoft OS's.

So in summation, I am not some blatant Apple fan boy. I know the ins and outs of PC's better than most. The reason I am relaying this information is because I think from here on in, this post could get a little Pro Mac.

First Impressions:

The packaging is first class. Every little thing is thought of. The styrafoam packaging is classy, and laid out well. There is nothing in the box that doesn't need to be there. The power cables and adapter are a nice designer white. All in all the packaging is brilliant.

You turn the laptop on, and OSX comes up straight away. That is nice. Usually with a PC laptop, there is still some final installation that is required. Once the obligatory sign on stuff is dealt to, you are away.

Nice touches

It's the little things that make the difference. The power connector is magnetic so it doesn't rip the side of the laptop off, if someone trips over it. It also has a little LED on it that is red when charging and green when finished.
The Apple logo on the back glows, as does the keyboard when it gets dark. This is so you can use it in the dark and still see the keys.

Oh and the other cool feature I noticed right away - you push the off switch and it realises you want to shut down and brings up the shutdown/restart menu. Nice.

The touchpad understands gestures too. For example you can push down with one finger and scroll up and down with another, and it acts like a scroll wheel. Again just a little thing but nice feature non the less.

I haven't played enough yet to give a full appraisal, but so far I like it. Again it's the little things I like. The fact you don't need to click "OK/Cancel/Apply" when you change something in the System Panel. It realises that if you changed it, you meant it and you don't want to be bothered again.

The integration between OSX and things like iTunes and PDF documents is much better than Windows. I guess this shouldn't be a shock. The great thing about the MBP, is that it comes with a remote, that you can use when using iTunes, or playing a DVD, or showing a photo slide show. It swaps seemlessly between the fullscreen applet and normal OSX. It is instantaneous. I have seen a few other PC makers try this. My work Dell for example has a Media Centre, but it is slow and switching between Media Centre and Windows takes several seconds.

The single mouse button is taking a little to get used to, as is the command key. Also the touch pad seems to freeze when switching applications from time to time.

That's it so far!

It just works. That is the overwhelming feeling I am getting so far. It just works.

Tuesday, February 06, 2007

Black Craps end of tour report card

I just heard Fleming from the press conference from the dismal effort last night against the poms. He said something along the lines of, "We are on track. We feel comfortable where we are, and we are happy in the knowledge we ran Australia close with room for improvement".

Sorry. Happy getting close to Australia? Of course you have room for improvement, you lost every game. I can't understand this mentality. To me the tour was a failure. They failed to make the final, failed to beat Australia, and failed to stand up when it counted against England.

They've had "room for improvement" for the last 5 years. A sign of a good team is playing to your full potential every game. Not looking good getting to 20 odd and then getting yourself out, or dropping easy catches. If catches win matches, then we had no chance of winning. It was the worst display of field I have seen from the current team. The pride themselves on their fielding. The must have dented pride after this tour.

Anyway, here is my end of tour report card in batting order.

Stephen Fleming 2/10
Looked terrible with the bat, scored a hundred in the last game but that was too slow and cost us the game. Let things happen in the field too much.
Nathan Astle 2/10
Saw the writing on the wall and retired. His time had come.
Lou Vincent 7/10
Had the spark we need at the top of the order. Always competes, some other players could have his attitude. Live wire in the field.
Peter Fulton 3/10
Got a start in every game but didn't go on. Needs to sell his wicket a little dearer. Made some awful gaffs in the field too.
Ross Taylor 5/10
Has the makings of a genuine world class player, but needs to get a little more out of himself.
Hamish Marshall 1/10
If cricket ever bought in the pinch runner or fielder law, like baseball he would play every game, but otherwise is not an International player.
Craig McMillian 2/10
Did his usual by playing one good knock on tour. He should take advice from Nathan Astle
Scott Styris 5/10
Came in too late in the tour to be effective but is a crucial part of the team
Jacob Oram 8/10
Shining light of the tour with the bat, which has reached a new level this tour. Bowling needs work, but will come. Brilliant gully fielder.
Brendon McCullum 5/10
Glove work was pass mark, dropped a couple of catches. Not suited to the swinging ball at the top of the order, but can be a devastating finisher.
Daniel Vettori 7/10
Continually gets more out of himself than his ability would indicate. The rest of the team should look to emulate his attitude and aptitude. Would make a good captain.
James Franklin 4/10
Lusty blows with the bat, shouldn't disguise his bowling is up and down at the moment. Dropped several chances in the field.
Shane Bond (100%) 6/10
This is the Shane Bond that actually hits the pitch. Looked good when he did
Shane Bond (50%) 1/10
Looked very ordinary when not at full clip. Bowled a hit-able pace and length.
Mark Gillespie 6/10
Was the find of the tour. Needs more consistency going forward, but looks the goods - particularly at the death.
Jetan Patel 6/10
Made the most of his chances in the limited games he played.

So the average mark was 4 which is a fair result of the tour in my opinion.

Sunday, February 04, 2007

Apple Update 3

So, my Mac Book Pro didn't arrive overnight. Didn't think it would. It however didn't arrive this morning and courier run is usually around 10. Starting to get suspicious. Inquires have found out the the courier company has lost the thing. OMFG.

Man this thing better be good, with all the stress and agrivation it has caused. Someone out there just doesn't want me to have a Mac.

It really shouldn't be this hard.

Friday, February 02, 2007

Apple Update, erm, update

HN rang back, said there were non glossy screened one's in the warehouse in Auckland. I suggested they get one on a courier overnight.

So good work in the end. I finally found someone who was willing to get of their arse and help out, and go some way towards restoring my faith in shop assistants!

More to follow I'm sure when it arrives. Genuinely excited about it arriving, which I guess why I was so frustrated at the delays.

Apple Update

Ok so 3 weeks have passed and no Mac Book Pro. Harvey Norman just rang and said it is going to be another 3 weeks. That's it. I've had enough.

Dell may be unstylish and bland, but at least they can deliver in under 6 weeks.

Ratshit Customer Service

I have been stewing over this for a while. I just seem to keep running into really bad customer service.

It started at Harvey Norman a couple of weeks before Christmas. I went in to buy an iPod for my wife. I knew what I wanted, had the money and just needed someone to get one for me. I stood at the counter for 10 minutes, while the one person on duty at the counter talked to a guy who clearly wasn't going to buy anything. I got sick of that and went over to a bunch of employees who were standing around talking.

"Not our area", was the reply. So I left and bought one from Dick Smith.

I (foolishly) went back to Harvey Norman to purchase a laptop. To call the guy I talked to incompetent was a slight on people who are actually incompetent. This guy if he works at it, could aspire to be called incompetent. Anyway, I ordered the laptop (Macbook Pro) which was over $4000 worth of kit. 3 weeks have passed and I am still waiting. "I don't know when it will arrive", is the response I get whenever I try and find out about shipment date.

No one ever tries to call the Apple supplier (Renaissance I believe) and find out when it was shipped or an expected arrival date. They have my money now, I am of no use to them obviously. I mean how long would it take to at least look like you're doing something? The 5 minutes it would take to find out is obviously eating into their staring at the wall time, or more likely scratching their arse time.

That's ok. It will arrive eventually. Will I spend another cent in Harvey Norman? Not on your life. Even if the same item is more expensive somewhere else, I will never buy another item from Harvey Norman. Ever. People ask me all the time, "Where is a good place to buy X?". I can guarantee I won't be recommending Harvey fecking Norman to anyone. So five minutes making a phone call has potentially cost them a lot of money.

I was out of town this week sorting out a few loose ends for a client. I was walking to their office and went past a Starbucks. Thought I would try them out. It was about 7:30am and there were two staff, and one guy at the counter who was obviously a friend of the serving girl. I stood in line while they talked for about 5 minutes, said excuse me a couple of times, stomped my feet and walked out. So stuff you Starbucks, I am never going to step foot in your establishments ever again either.

It doesn't take much to offer good customer service. It doesn't cost much either. The cost of not giving good customer service can never be quantified of course, but I would imagine that one bad staff member could be costing a lot more than the minimum wage the employers are paying....

Thursday, January 25, 2007

Damn missed again

Forned top 25 "Web Celebs"

A bit questionable this one. As with any list I guess. Again as usual with these sorts of things, it is very US centric. Don't ya just love those lists of "Best 100 Sportspeople in the world", that are all yanks, and include fatties from the NFL.

Anyway, I haven't heard of half of these people, which to me is a barometer that it is pretty crap. As the "WebCelebrities " are most likely bloggers from what I can tell, and still most blogs are read by geeks, rather than the mainstream, there are a few glaring omissions:

Joel, from Joel on Software
Drew from Fark
Kevin from Digg

Oh I seem to have been left of too.

Wednesday, January 17, 2007

Recursively Copying files in C#

In a project I am working on (an IIS admin interface for Boss) I need to copy all files from a Source Directory to a Destination Directory, but have the option to skip the copy if the file already exists.

I instantly thought of the SHFileOperation Shell32 Api call, and went as far as wrapping that in C#. That works fine, but either overwrites existing by default, or throws up a GUI interface asking the user if they want to overwrite. This is a web app so this wasn't an option.

I decide to roll my own, and discovered that it wasn't that hard. Worst part was recursing the directories, but I dusted off some old "C Programming 201" memories and got that sorted.

Anyway here is the code:

using System;
using System.Data;
using System.Configuration;
using System.Collections.Generic;
using System.IO;

/// Class that recursively copies all files in source dir to dest dir
/// Can overwrite existing or not.

public class DirectoryCopy

 private List _dirList;
 private bool _overwriteMode = false;

 public DirectoryCopy()

 /// Copy the Boss Files from install dir to website

 /// Path to Copy From
 /// Path to Copy To
 /// Base Path to truncate from destination path
 public void Execute(string pathFrom, string pathTo)
  _dirList = new List();
  foreach (string file in _dirList)
    string destFile = file.Replace(pathFrom, pathTo);
    System.IO.File.Copy(file, destFile, _overwriteMode);
   catch (IOException) // if files exists then that cool just keep going
/// Recursively copy files given a Source and Destination Directory.
/// Option to overwrite existing

/// Source Directory
/// Destination Directory
/// Overwrite if file existsts?
 public void Execute(string pathFrom, string pathTo, bool overWrite)
  _overwriteMode = overWrite;
  this.Execute(pathFrom, pathTo);

 private void CreateDirIfNotExist(string path)
  if (!System.IO.Directory.Exists(path))

/// Get Sub Dirs and Files of a root directory

 private void BuildFileListWithFiles(string rootDir)
  // Iterate through all directories
  string[] subdirectoryEntries = Directory.GetDirectories(rootDir);
  foreach (string subdirectory in subdirectoryEntries)
   string[] files = Directory.GetFiles(subdirectory);

Apologies if the formating gets screwed.

Refactoring suggestions welcomed and encouraged.

Tuesday, January 16, 2007

Crap Bats Disaster

Ok, we almost pulled that one out of the fire. Brilliant fielding as usual and Patel was great - he bowled very well and caused a run out in the field.

However, this should detract from our woeful batting. In fact it should highlight the fact that if we had got a few more runs then we would have won. It is clear to me, that our fielding unit is as good as any team in world cricket. We are a balanced attack, and when Bond fires we can scare any team. The fact he hasn't really fired yet is highlighting how well the rest of the unit is going. Jimmy Franklin is probably the weak link, but he will make way for Oram or Styris or both.

If I was "The Ferocious Mr Fixit" here's how I would put it:

The Problem:
Our batting has the ability, but the line up is wrong.

The suspects:
McCullum is a fine finisher. He just looks ordinary against the new ball. He has all the shots in the book, but some players just can't handle the swinging ball. It also looks like he is trying too hard.

Fleming is badly out of touch. Astle is hit and miss but should stay. Taylor is class, but is running the risk of having his flair coached out of him as seems to happen to all young New Zealand players.

McMillan is a stop gap measure at best. Fulton looks ok, but needs to stop getting out in the 20's - application and concentration. Vettori is class, but again needs to get more out of himself, and the tail without McCullum to boost them looks very long.

The Fix:

Astle and Fleming to open. Astle told to play his game, and Fleming applies himself as the glue that holds the innings together.

Taylor at 3 and again just told to play his game, but prize his wicket and remember that he can't play the big shots from ball one.

Fulton Ok at four, but would be pushed down when Styris back.

Macca finally put down, and replaced by Fulton when Styris back, or a Marshall until then. A Marshall only needs 20 odd cos it saves 20 in the field.

McCullum at 6 or Oram when he fit. Vettori at 7 (or 8 when he Oram fit) and the rest of the tail. I would leave the bowlers as is, but replace Franklin with Oram when fit and rotate Mills, Patel and Gillespie depending on conditions.

The biggest change I would make, would be to not worry about scoring 100 in the first 15. I would tell the top order to nudge it around, and only look to hit the bad ball for 4. Goal would be 2 or 3 down for 100-120 at the 30 over mark. Let the middle/lower order get the bulk of the runs, as that is where our riches are. Taylor, Fulton, Oram, McCullum and Vettori are all potential match winners and the top order with runs on the board can score readily later on.

Sport is about playing to your strengths. Our strength is our middle/lower order. Just because other teams look to get off to a flyer doesn't mean we need to. Play safe, sensibly and leave the hitting to the guys who can.

From time to time it wont work. That is obvious, but the current system hasn't worked for a long time. New Zealand and Fleming in particular used to be the innovators in the One Day game. We had to, to overcome our limitations. I think it's time to innovate again. For the sake of all New Zealand sporting fans.

Crap Bats do it again

What a tremendous cricket team we have. Rolled for 205 against what could laughably described as England's attack. I'm sure the Bangers would have made more than 205 against Anderson, Collingwood etc.

It is the lunch break as I write this, comforted by the knowledge that this is England, and we are in with a punchers chance against them. If Bondy could get a couple early and Lucas and Patel bowl well England could do their usual Hari Kari. I can't see it to be honest, they have looked the better team for this half of the match anyway.

I'll post a follow up when (if) we lose and make some suggestions as how to fix this disaster we call a batting line up.

Monday, January 15, 2007

Gave in to temptation

After drooling over them for a while, I have finally ordered a MacBook Pro. Just got the base 15 Inch Core Duo 2 2.13, but it should rock. I upgraded to 2gb of ram as I intend to use Parallels and the word on the street suggests 2gb is the sweet spot.

Ordered it from Harvey Norman and because it isn't standard (also ordered the glossy screen) it has to come from Oz and should take 3-4 weeks. I could walk to Oz and back in 3-4 weeks, hopefully that time frame is worst case scenario, but nothing would surprise me from Harvey Norman.

I intend on doing .NET dev work in Parallels, from the reading I have been doing, it should be fine. If not I can use Bootcamp and duel boot, but that is a last resort.

Anyway, more to follow when it arrives...

Wednesday, January 10, 2007

I've hit the century, My 100th Post - it's a theory about a sea change in the computer industry

Ok. I've had time to think since the unveiling of the iPhone. In my opinion, the iPhone will be to the cell phone what the iPod was to the mp3 player. These things are gunna sell like chocolate bars at a fat camp. It doesn't take a genius to work that out.

What will Apple do on the back of this? They own the portable music industry. The will own the portable phone industry. The one place they still don't own is the Personal Computer industry. They did once. The Apple II was the computer industry. The original Mac popularised the GUI interface. And then a usurper called Microsoft came and took it all away (along with IBM I guess).

Can Apple turn this around? I think on the back of the iPhone and iPod popularity, people will look at Mac's as a viable alternative to Windows, especially now that you can run Windows apps natively on OSX.

The one thing holding them back is the price of the hardware. Sure cool has a price, but not that much. If Apple allowed OSX run on generic X86 hardware. Well that would just rock. I really and honestly think if they did that they could make huge inroads into the MS monopoly. The question is: Do they want to?

I guess they think of themselves as a hardware company rather than a software company. Their history is creating computer hardware and software, and it would be hard for them to let go, but please Steve, do it. You could once and for all get one back on your old nemesis.

Tuesday, January 09, 2007

Could this be the ultimate device

Phone, iPod, WiFi internet device, video player, PDA the new Apple iPhone appears to do it all.

I have an HTC Apache which probably does all this too, but is ugly and way to like a PDA to be useful as a phone. The iPhone is under 2 cm thick! If it lives up to expectation this could be the ultimate device.

Not sure when it will be available, but the queue starts here!

I tried, I really did

Linux. Gone. Buggar.

I had to revert back to Windows on my dev pc. I just couldn't get the Ipw3945 wireless drivers to work. I tried everything, and read everything - including the 25 odd page forum topic in Gentoo forums.

So back to Windows it is. Luckily I am now doing dev in VMWare so it was easy as pie to get running again.

Notes from the experience:

- Check you hardware against Linux before you install, although if I had it still would have said the Intel Wireless should work
- Virtual Machines rock. If you aren't developing in VM's then you should. My guest OS is only Windows 2000 which means don't need that much memory on the guest to make it run well. I have 2gb on my dev pc which I think about right.
- Without scientific quantifiable data to back me up, Linux is much faster at surfing the net than Windows. I don't know if this has anything to do with the TCP/IP stack on Windows or what, but pages load so much quicker in Linux. Under Win the page seems to sit there for a second before doing anything whereas in Linux it is pretty much instantaneous.

I guess for all it's issues, Windows has made the Computing experience very easy. Biggy ups to MS for that at least.

Thursday, January 04, 2007

Linux (again)

I had reason to reinstall my laptop the other day. I had been running Vista but didn't want to activate it, so was going to reinstall XP.

I decided to do all my dev etc in a Virtual Machine, because I tend to rebuild my dev machines alot. I figured if all the dev stuff was inside a VM, it would be easier to reinstall etc.

Anyway, so I figured if I was doing that, why not run Linux as the Host OS. I like Linux, it just feels better than XP and even Vista. The security is great and works as it should and IE malware etc is just not a concern. There is one glaringly obvious problem with Linux.

Drivers, Drivers, Drivers!

Windows installs in about 30 minutes, either installs the correct drivers out of the box, or just simply install from the CD and hey presto, you're away. Linux, well that's another story.

Sometimes you are lucky and can find a driver and it installs easy. Most of the time it doesn't. Take for example the Intel Wireless Driver in my Dell laptop. To get that to work, you need to compile a new kernel. Come on people. As long as the average user needs to compile the freaking kernel to get something going, Linux ain't going to be mainstream. Period.

Yes, I understand the awesome power of doing this, but I have been trying to get my laptop going for over a day now, and the upside by far outweighs the downside.

Anyway, the kernel compile has finished so I must reboot and try again....