Tuesday, February 24, 2015

My thoughts on Swift, as articulated by someone else

Martin, pretty much sums up how I think about Swift, so I'll just link rather than rehash what he has said:

Tuesday, February 17, 2015

How to talk to kids about tech

Wonderful video, featuring The Tech Guy, Leo Laporte talking to a 9yo kid who wants to buy a machine.

This is how you talk to kids about tech, don't talk down to them, treat them as equals.

Nice one Leo.

Friday, February 13, 2015

Always have to search Stackoverflow for these git tips, so thought I would bang them into one place.

How to merge either all local or all remote changes

Single File

git checkout --ours filename.c
git checkout --theirs filename.c
git add filename.c
git commit -m "using theirs"

Or for all files

git checkout --ours .
git checkout --theirs .
git add .
git commit -m "using theirs"


How to delete a remote branch

git push --delete origin branch


How to create a branch off a branch

git checkout -b featureBranch existingBranch


You may remember me from...

Hey anyone still reading this from 2007!

It's been a while between drinks.

I've gone from living in the UK, to being a architect for an online bank (briefly), to running my own company and having relative success selling iOS apps, to selling those apps and working for the company who bought them, to being back doing not much again! (Phew).

Oh yeah, I also wrote a book (not my best work sorry) and had a monthly column in PC World!

In between I've met some really awesome people, and picked up a lot more experience, mostly in the mobile world, and even won an Emmy for some work on the America's Cup app. Obviously, I was only part of a team, but still felt great to hear that we'd won!

Anyway, will endeavour to post more here, and try and get my page views up to somewhere, near where they were 8 (gulp) years ago!

Tuesday, May 21, 2013

I'm baaaaaaaack

Been a while! Don't have a gig at PC World any more, so might start posting on here a again. Stay tuned. Rants to continue after the break

Friday, February 12, 2010

Woah. Is that the time?

Haven't posted on here for almost a year.

There are a few major reasons for this. They are in no particular order:

-- I'm no longer doing .net only coding, I went fulltime iPhone coding in June 2009. It's been going really well. Thanks for asking!
-- Twitter: I loveTwitter. I like the immediate feedback and the conversation style. I also don't have a lot of time because of above, so bigger formal posts are not as appealing. ( @kiwibastard )
-- PC World: I now write a monthly programming column in NZ PC World, so that takes away a lot of my creative juices, as it were. I love doing the magazine stuff.

So, I hope to come back here more often, but don't be surprised if I don't

Monday, January 12, 2009

This one got through QA:

Hate to be a grammer Nazi, but check out this dialog:

Monday, January 05, 2009

Hundred Pushups iPhone App

The Hundred Pushups iPhone app has been released to the App Store.

Link here

Use the app to gain strength, lose weight and above all reach the goal of 100 push ups in 6 weeks. I can personally vouch for the program as I have done it myself and the iPhone app is the perfect companion.

Sunday, January 04, 2009

Macworld Expo Keynote Predictions

Prediction one: This will be the last time I predict what will be announced at Macworld Expo by Apple!

I've been pretty busy with other things, including publishing an app for the iPhone. (Note to self: change the urls for that...) and with the impending arrival of child number two, I haven't been keeping up with the rumours. So this year all of my predictions will be completely off the cuff. So here goes (in no particular order):

1) Update to iLife and iWork - it's been almost a year and a half for iWork and at least a year for iLife so they are due
2) Mac Mini / AppleTV refresh. Both are due for either a cut or a revamp. I can't see too much happening with the ATV as it's pretty much a hobby sideline for Apple. It would be nice to see a Mini upgrade with more ram and CPU bump. It would be great to see a mini with some kind of ATV integration, although again can't see it
3) Refresh to iMac line up. This could just be a CPU and Video bump, but maybe a refinement of the design. Although, IMHO they are spot on as it is. I can guarantee this one because I bought a new iMac about 3 months ago!

I think the above will happen in some shape or form. The next list is things that could happen, but probably won't, or ones I want to happen...

1) iTablet. This would be computing nirvana for me if this happened. I can't see Apple announcing this outside of an Apple run event. The current financial climate might not be the place for this kind of device either
2) Mac App Store: Like the iPhone app store but for Mac Apps. I want this as a (sometimes) indie developer rather than an end user, but it would be awesome for all concerned. The only issue would be the bottom dweller price trend could continue for Mac apps - apps selling for less than they should because some developers put their apps at too low a price
3) Apple to announce an across the board dropping of prices by 20% due to current economic climate.

Well that's it. Will report back with my hit and miss rate.

Tuesday, December 30, 2008

The Commuting Year in Review

I was listening to the TWIT year in review on the way into work this morning. I listened to every episode this year while commuting. If totaled in miles it would be a long way.

I started off the year traveling to Northampton by train from Rugby:
View Larger Map

I did that until February. I was working for a marketing company making enhancements to a legacy Delphi based system. It was without a doubt the worst job ever. The people who worked there were idiots, the work environment sucked and it was the most miserable 3 months I have ever spent. Not a great way to start the year.

From there I worked in Hammersmith in London and was taking the train from Rugby to London Euston:

View Larger Map

and then the underground from Euston to Hammersmith:

View Larger Map

I worked there for a local authority creating a portal site for customers. It was done using ASP.NET and C#, with a Biztalk layer connecting the different systems. I was pretty much responsible for the front end which was great. It was a hell commute, but the job was interesting and the people I worked with were great. It was a great step up from the previous job.

Commuting by train and tube was always interesting, sometimes frustrating, but glad I did it. It was a great "life" experience and took me way out of my comfort zone. Having to deal with 4 million other commuters was interesting for a boy from Temuka! I do feel sorry for the people that have to do it everyday for the rest of their working lives. We don't know how lucky we are here in New Zealand when it comes down to it.

From there I worked in Corby which was about an hours drive from Rugby up the A14. The A14 is the road trucks use to get to the M1 and the M6. It was jammed with trucks and the Cathorpe junction where the M6 and M1 merge was always fun! Again it was a great experience and gave me plenty of time to listen to Twit...

View Larger Map

I was the lead architect for a freight management system written in C#, with a Sql Server backend. I also did some training - upskilling some AS400 developers to .NET - which I enjoyed. Again the people were great, but needed a better processes in place, which they were aware of so good luck to them for the future.

I finished there in late August and we flew back to New Zealand and moved into our house in Timaru. (Sorry google doesn't do directions from Heathrow to NZ!)

I now do a daily commute from Timaru to Ashburton which is about an hour.

View Larger Map

I work for a Bank doing the teller systems (MFC/C++) and the Internet Banking Site (.NET). It is all interesting work and I look forward to being involved with the migration from MFC to C# which will be started sometime in 2009.

So all in all I did a lot of commuting this year and will have more next.

Wednesday, December 17, 2008

Remote desktop connection cannot verify the identity of the computer

If you get the following error: "Remote desktop connection cannot verify the identity of the computer that
you want to connect to. try reconnecting to the windows-based computer or
contatct your administrator."

when trying to connect OS X to a Windows Machine via RDP then do the following:

1) Delete all files in /user/{username}/Documents/RDC Connections
2) Don't fill in the domain text box

for some reason when using the Mac client if the domain text box is filled then the Windows machine at the other end can't authenticate the connection. Seems to be worse with Vista, but I have read of this happening with 2003 also.

Wednesday, October 29, 2008

Linking iPhone/iPod Touch with Xcode

I just spent the last hour or so trying to get my iPod touch working with Xcode so I could debug on the device

If you are having trouble after you have followed the instructions on Apples developer site, here's what to do:

In Xcode, right click the info.plist file and select open as text file. This will open the bundle as a plain text Xml file.

Find the Key:
and below it will be a string element. Change the text between the element to your AppId minus the 10 digit number and the dot.

So for example if your appId is 1234567890.com.mycompany.myApp then change it to com.mycompany.myApp

Easy thing to do, but hard thing to solve.

Hope that saves someone the hours of frustration I had.

Tuesday, October 28, 2008

20 Second SQL tip

If you restore from a backup with NORECOVERY from the GUI it sometimes doesn't bring the database back online, even if the restore succeeds.

So if you are stuck with a database that no matter how long you give it, the status is restoring, or loading the following command should work:


Thursday, October 23, 2008

StackOverflow: the good, the bad, the ugly

The eternal dilemma for developers is finding the answer to their specific question. There are a number of sites on the web that try to help, some free, some not.

Stackoverflow is the latest attempt to create an ultimate resource for answers to programmers questions. It is the brain child of notable (or notorious depending on your view) doyens of the development community, Jeff Atwood and Joel Spolsky (who has Kiwi heritage).

The actual site is a work of genius. It is clean, clear and crisp and is, without a shadow of doubt, the best website engine of it's kind. Period.

I have been a member since the very early beta days. (User Tag is KiwiBastard BTW) In the early days there was a limited number of people on the site, but even so, questions where answered in quick time, and a question would stay on the front page a good amount of time, so that people had a chance to offer a reasoned answer.

Since then the private beta has gone public, the noise to signal ratio has increased. Post are only on the front page for a limited time. The questions are generally still answered but because there is more traffic, people rush an answer. It also appears that people won't bother answering a question once it has had a few answers. The reason for this is both the pro and the con of the site. The site is driven by a points and badge system.

Basically, you get points in a number of ways:

- Getting your answer upvoted
- Getting your question upvoted
- Getting your answer accepted

There are other subtle ways to get points, but it becomes addictive and like a game. So you find people don't bother answering a question that has been answered, because the chance of getting points is lower than answering a question that has no or few answers. While this is good because it means new questions get answered, it also means sometimes a question never gets a CORRECT answer. This is of course a problem.

The argument is, with more people, then there should be more eyeballs on each question so the net is the same as when it was a smaller audience. This argument seems to work in theory, I am finding in implementation it doesn't. The turnover of question is such that, a question just doesn't stay on the front page very long.

The other issue I am finding, is the tolerance for newbies is very low. People seem to get down voted if they ask a seemingly stupid question. Seemingly stupid to experienced developers, but we were all noobs once. I try to show tolerance to these people and answer their question the best I can, and maybe point them in the right direction. It's the fair thing to do, and I'm sure that Atwood and Spolsky would prefer this approach to down voting and alienating new developers.

Aside from the minor gripes, it is a great site. It will become the go to site for developers. Of that there is no doubt. I just hope that over time, newbies become better accepted, and people get use their upvoting ability a little more.

Tuesday, October 21, 2008

Nice Gmail Tip: plus-addressing

I was digging around the Gmail docs just to see what new stuff they've been throwing in there and came across something useful that I hadn't come across before.

A lot of people I know have multiple mail accounts some of which they use when signing up for stuff just in case for whatever reason that address gets "accidentally" sold to an organisation that will spam you silly. What Gmail does is provide a feature called "plus-addressing", which allows you to insert useful but ignored stuff into your Gmail address.

As an example:

If your mail address was myname@gmail.com (Apologies to Myna Me if you have an account) and you were signing up for something at "dodgysite.com" then you could supply the mail address in the subscription form as:


The mails will still be routed to your account but if you start to get spammed and that address is being used then you have an idea of where they got your address from.

It's quite a nice feature and when used with filters can also be used to manage mail too so you could possibly give plus-addressed addresses to everyone and include some identifiable word in the address.

One thing to be aware of is that at some point if people start using this a lot then the spammers will start to circumvent it by striping out the +x part, but that doesn't seem to be the case at the moment.

EDIT: Nic points out quite rightly that this isn't strictly a Gmail feature but is part of the mail specs such as RFC5233 and yes, it is dependent on the site you're supplying the address to actually accepting a "+" (the latest version of Fring on iPhone doesn't even allow "."!!!!)

Wednesday, October 08, 2008

Useful Vista Tip: Open Command Window

Windows 2000 and XP had a bunch of power tools that had great, but little enhancements to Windows that made doing geeky things just a little easier. Unfortunately, there are no power tools for Vista. The most useful power toy I found was the ability to open a shell command window from an explorer window, by right clicking in the window and selecting the "Open Cmd Window" option.

Well, it turns out this feature is baked into Vista, but hidden away behind the scenes. To get it to work you simply hold down SHIFT, while right clicking in the Explorer Window.

Friday, September 12, 2008

iPhone 2.1 - Pointless!

I had really high expectations for the 2.1 update. Sadly it was always going to be a disappointment. Again I have been with a friend who owns a different phone on O2 and while his phone is showing 3 or 4 bars mine is showing No Service. Damn! Equally annoying is the fact that the phone apologists seem to fall back on the "number of bars does not mean the same thing across different phones" argument, but No Service is No fucking Service on any phone.

Anyway, another thing (other than Genius, aka please buy music you don't want) the only real difference I've noticed is a new little circle icon at the top where the connection type is shown, as you can see in the following pic. I have no idea what it represents and have not seen it before.

What it isn't is:

  • 3G
  • Edge
  • GPRS (I don't think, that's a square with hollow circle)
  • Wireless
Be interested if anyone has any idea what it might be.


Looks like this post is as useless as the update. It appears that all of the icons for the various data modes have been changed. 3G is now just white text rather than black on a white square so I'm assuming that the circle above is the GPRS equivalent to that. Surely the change isn't intended to save some battery power by lighting up 5 fewer pixels!!!!

Since 24 hours now I've been running 2.1 and none of my original gripes are fixed.

Thursday, September 11, 2008

Exclude CSS from Authentication in ASP.NET

This little thing has bugged me for a while. The CSS for authenticated sites where only showing once the user had logged in. This means that the Log On and Log Off pages are unstyled - although usually for me anyway, on my dev machine - seems to be ok live.

Well, if this is the case, you need to exclude the CSS folder (or files) from Authentication. This is achieved by added the following code to the web.config file somewhere in the configuration section

<location path="css">
<allow users="*"></allow>

Thursday, August 28, 2008

Do the hundred?

Can you do 100 press-ups? If not then follow this program one hundred push ups and you will be able to after 6 weeks.

I start tomorrow and managed a feeble 17 on my initial test...

Is there a more diverse field than software development?

I've been on the Stack Overflow for a couple of weeks. If you've been under a rock and don't know, Stack Overflow is a Q+A website for programmers, developed as a joint venture between industry luminaries Jeff Atwood and Joel Spolsky.

From the questions that fellow developers have asked, it highlights that a lot of people are doing a lot of vastly different things. Everything from tracing the inner exception of a soap message in ASP.NET through to rendering a tree structure in Django through to wondering the performance implications of case insensitivity in Regular Expressions.

This is why I love software development. There are so many fields to get into, and so many languages to learn and so many ways to do the same thing. If you get stale, you can just learn a new language or technology in your current language.

So my question is - is there any other industry that is as diverse?