Skip to main content

T-34 days and counting...

image001This morning I got up for a quick cycle and as I road up the last big hill before I got home the sun really started to beat down on me and the swet changed from cooling moist to dripping. This is all at 6am, which is normal for a South African summer day, in fact our winters, in Johannesburg, aren’t too bad too. It normally is around single digits in winter at night and the days go up to 14 or so degrees. I guess that is why Willy-Peter decided to send me this picture – it’s a warning that better go shopping for a jacket or nine.

T-40 days and counting...

In 40 days I will be starting a very exciting adventure, that being flying to Canada and America for 3 weeks of what is being referred to as the Rangers Sabbatical. The what? you may be asking yourself, I have posted previously on my Microsoft VSTS Rangers project involvement. Well in January I will be heading to hang out with with Willy-Peter Schaub at the MCDC (Microsoft Canada Development Centre) in Vancouver Canada and then Chuck Sterling at Microsoft Corp HQ in Redmond, USA.

I am hoping to be able to blog a lot about this trip, although I doubt that I will be allowed to share photo’s of that central server that Microsoft runs that all traffic on the internet run though which is built on Linux (that is a joke for those with humour issues), since this will be the first time I will be going to north America and so this is really going to be an exciting adventure.

Google Maps City More Info

I was answering a question on World Cup 2010 Dizcus and found an amazing feature on Google Maps. I was looking for maps of cities in SA, and I stumbled across this cool more info link.

image

More info takes you to a portal for the city with information on the time & timezone, a high view map of the area, photos and videos of the town, popular places and related maps. This is a great resource when you are looking for information on a city that you have never been too! Below is a screen shot from my home town of Johannesburg.

image

Dev4Devs - 28 November 2009

Well today is the day! Dev4Dev’s is happening at Microsoft this morning and I will be speaking on 10 12 new features in the Visual Studio 2010 IDE. For anyone wanting the slide deck and demo application I used you can grab them below.

The slide deck is more than the 6 visible slides, there is in fact 19 slides which cover the various demos and have more information on them so you too can present this to family and friends :)

Has Nokia stopped piracy?

Nokia5800 The Nokia 5800 I have runs on the Symbian S60 5th Edition operating system and it seems to be a decent OS, but built into it is the most interesting anti-piracy system I have seen. So how does it work? Note: I am not an expert in this, this is my view after a few weeks looking into it, so I may be wrong.

First every application needs to specify what features it uses and based on that it can either be flagged into one of three categories:

  • Unprotected
  • Protected
  • Testing

Testing has no security, and is just good for testing. However for the other two, they must be signed with a SSL certificate. For unprotected applications you can self sign, in other words using the certificate on the phone to sign the application. For protected you’ll need a certificate from a certificate signing website - which there are just a few of and these sites also require you to signup as a publisher which costs $200. So once you pay $200 and you go through the process you can sign an application however it is locked to the IMEI of the phone. This means that the application can only ever be run on a specific phone.

Now the security model falls over, if you go out and get the publisher details since you could take other peoples applications and strip out the existing certificate and sign it with your own, but that costs $200 (and you are logging with a central company what software you are signing, so that they may be able to track it). Why I think this works is because almost every single application out there is much cheaper than $200. In fact for $200 you can get so many apps legally that I question who would pay $200 if they were not a legitimate publisher.

I think this process is much better than the iPhone’s app store - since you do not need to get a companies permission to sell the software. You can build it, host it anywhere and viola it is available.

A similar process is available in Windows Vista+ x64 for drivers, which must be also signed in a similar process. I am wondering if this should not occur for all applications in Windows as well - however there are a lot of changes that would need to be implemented.

I won a Soccer World Cup 2010 Jersey!

1d655f1858f373918f32febe13d70a56 If you do not live in South Africa, you cannot imagine the excitement what next years soccer world cup is generating. In my view it will be one of the top defining moments for South Africa, up there with the ‘94 elections and '’95 Rugby World Cup. To that end I have been doing my little bit as a local to help out people with sharing knowledge on all things world cup at the Dizcus World Cup website.

If you know StackOverflow/ServerFault/SuperUser then this site follows the same design as them except focused on a non-computer topic. For the rest of you readers, it is just an easy to use website where people post questions and others answer. If you successfully answer a question or answer a question very well you get points.

So Mathew, the site owner, put up a challenge about a month ago where he said the top 5 people, based on points, would get a South African Soccer Jersey! Well I was in the top 5 (I think number 2) and so I got the email today saying I had won a jersey! Thanks Mathew for the jersey and the great website!

Paying Nokia for convenience

Nokia5800 In the last few weeks I got a Nokia 5800 XpressMusic phone which has been brilliant, and as the geek I am I have been playing around and trying out many of the functions on it. One area which has been an absolute fail, has been the GPS software: Nokia Maps. The phone comes with a  6 month license to get directions or have the phone speak to you as you drive, but at the end of the 6 months you need to pay for these premium services :(

I have no problem paying for it, but the costing model is retarded. This is the pricing when you select it from within the phone:

  • 1 day costs R19.99
  • 30 days costs R20.00
  • 30 days with automatic renewal costs R66
  • 1 year costs R512.99

Now I cannot imagine what person would choose 1 day, when 30 days is 1c more expensive, however the part that confuses me is that it is over three times more expensive for the same 30 days with the exception that you are telling Nokia you want to keep up to date with it. The year part is also odd, since if you purchase each month separately it is R240 which is less than half of the year subscription!

CLIPART_OF_10875_SM All of this screams that Nokia South Africa has ZERO clue about what they are doing to promote people to

  • Buy in bulk or put another way: Pay more
  • Setup a “contract” which will cause people to pay more

In fact it seems they, Nokia South Africa don’t want the business - because you can also purchase this using your browser online from Nokia Europe, which is a little more work than on your phone, but their pricing makes sense (see how it makes sense to buy the bigger packages or renewal options):

  • 1 day costs €1,59 (in rands that is roughly R17.90 or 10% cheaper)
  • 30 days costs €5,99 (in rands that is roughly R67.45 or 237% more expensive)
  • 30 days with automatic renewal costs €5,19 (in rands that is roughly R58.44 or 11% cheaper)
  • 1 year costs €39,99 (in rands that is roughly R450.33 or 12% cheaper)

When my subscription ends I will be sending money out of the country and helping Europe make their sales targets which just feels wrong :(

Note worthy

I have been very focused during the day on a project and my evenings have been taken up a lot with VSTS Rangers work so the blog has lagged a bit so here are some things you should be aware of (if you follow me on Twitter, then you probably have heard these in 140 characters or less):

I was awarded the title of VSTS Rangers Champion - this is a great honour since it is a peer vote from VSTS External Rangers (no Microsoft Staff) and MVP’s for involvement in the VSTS Rangers projects.

The VSTS Rangers shipped the alpha of the integration platform for TFS 2010 - this is important for me because it means some of the bits I have worked on are now public and I am expecting some feedback to get them better for beta and release next year. It is also important since my big contribution to the integration platform, which is an adapter I will cover in future blog posts, has a fairly stable base.

Dev4Dev’s in coming up in just over a week. This is one of my favourite events because it really is event for passionate developers since they have to give up a Saturday morning for it (no using an event to sneak off work). I will be presenting on Visual Studio 2010! Which should be great, based on my first dry run to an internal audience at BB&D last week. Two more of my BB&D team mates will be presenting Zayd Kara on TFS Basic and (if memory serves me) Rudi Grobler on Sketchflow!

The Information Worker user group is really blowing my mind with it’s growth, on Tuesday we had 74 people attend our meeting. For a community that only had a 100 or so people signed up on the website at the beginning of the year that is brilliant. Thanks must go to my fellow leads: Veronique, Michael, Marc, Zlatan, Hilton and Daniel. We will be having a final Jo’burg event for the year on the 2nd and it will be a fun ask the experts session.

NDepend - The field report

I received a free copy of NDepend a few months back, which was timed almost perfectly to the start of a project I was going on to. However before I get to that, what is NDepend?

NDepend is a static analysis tool, in other words it looks at your compiled .NET code and runs analysis on it. If you know the Visual Studio code analysis or FxCop then you are thinking of the right thing - except this is not design or security rules but more focused at the architecture of the code.

Right back to the field, the new project has gone through a few phases:

  • Fire fighting - There were immediate burning issues that needed to be resolved.
  • Analysis - Now that the fires are out, what caused them and how do we prevent it going forward.
  • Hand over - Getting the team who will live with the project up to speed.

Right, so how did NDepend help me? Well let’s look at each phase since it has helped differently in each phase.

Note: The screen shots here are not from the project, since that is NDA - these are from the application I am using in my upcoming Dev4Dev’s talk.

Fire Fighting

The code base has over 30000 lines of code and the key bugs were very subtle and almost impossible to duplicate. How am I supposed to understand it quick enough? Well first I ran the entire solution and I start looking at it in the Visual Explorer:

image

The first thing that it helps is dependency graph in the middle which visually shows me what depends on what, not just one level but multiple levels and so on a large project it could look like:

ComponentDependenciesDiagram

Now that may be scary to see, but you can interact with it and zoom, click and manipulate it to find out what is going on.

image

For fighting code I could sit with the customer people, and easily see where the possible impact could be coming from. So that gets it down to libraries, but what about getting it down further? Well I can use the metrics view (those black squares at the top of the image above) which I change what they mean - so maybe the bigger the square the bigger the method, class, library etc… so using the logic that at some magical point (about 200 lines - according to Code Complete by Steve McConnell), the bigger the method the more likely that there is bugs in it. I could use that to find out where to spend time looking for the problems first, which meant that the problems were found quicker and resolved.

Analysis

Right now that the fires were over moved on to analysis to make sure that it never happened again - well when a project is analysed by NDepend it produces an HTML report with the information above but also a lot of other information like this cool chart which shows how much your assemblies are used (horizontal axis) vs. how a change may effect other parts of the code (vertical axis):

AbstractnessVSInstability

And that is great to see what you should focus on in refactoring (or maybe what to avoid), but there is another part which is more powerful and that is the CQL language which is like SQL but for code so you can have queries like show me the top 10 methods which have more than 200 lines of code:

WARN IF Count > 0 IN SELECT TOP 10 METHODS WHERE NbLinesOfCode > 200 ORDER BY NbLinesOfCode DESC

Some of these are in the report, but there is loads more in the visual tool and you can even write your own. I found that I ended up writing a few to understand where some deep inheritance was getting used when it came to exception handling specifically. In the visual tool this is all interactive too, so when you run that query it lights up the dependency tree and the black squares so you can easily see what is the problem spots and identify hot spots in the code.

Hand Over

Moving the final stages, I have to get the long term guys up to speed - how do I do that in a way they can understand without going through the code line by line? Easy, just pop this on a projector and use it as your presentation tool, with a custom set of CQL’s as slides or key points to show. What makes this shine is that it is live and interactive so when taking questions or doing a discussion you can easily move to other parts and highlight those.

All Perfect Then?

No, there are some minor UI issues that are more annoyance than anything else (labels not showing correctly in the ribbon mode or the fact that you must specify a project extension), but those are easily overlooked. The big problem is that this is not something you can pick up and run with - in fact I had tried NDepend a few years back and decided it wasn’t for me very quickly. If it wasn’t for a lot more experience and having an immediate need which forced me over that steep initial learning curve then I would never have gotten how powerful it is. That also brings up another point, the curve is steep - and if you aren’t used to metrics and thinking on an architectural level then this tool will really cause your head to melt and so this is not a tool for every team member, it is a tool for the architects and senior devs in your team to use.

Using Outlook 2010 with Google Calendar

Update 1 October 2010: If you want FULL sync, then Google has updated there sync tool to support Outlook 2010 - please go to the Gmail blog for more info. Comments to this post will also be disabled as there is nothing left to say.

If you are using Google Calendar and want to use it with Outlook 2010, you will find that the Google Calendar Sync tool no longer works smile_sad_48

So what can you do? Well Outlook 2010 supports the iCal format and so does Google Calendar - so you can use that to get a basic sync between the two.

To set this up go to your calendar details page in Google Calendar (Settings link at the top of the window then Calendars and finally click on the calendar name), and at the very bottom of the is two sets of icons one public & one private. Right click the iCal icon from the private and select copy URL.

image

Now in Outlook, go to your calendar and click the Open Calendar button and select From Internet, now paste the URL in the text box and click OK.

image

There you go, your Google Calendar is now in Outlook 2010.

Downside to this is you now have two calendars in Outlook to work with, but if you click that little arrow next to the calendar name image you can have them display as one and you can easy copy/paste between them.

image