06 Jan 2009

Search better

Something I have always thought of as a secret weapon in my skills is that search the Google has generally yielded good results or I find I am alone in my problem. I have found that others do not do this as well, often times they search - get nothing, come to me for help, I search and get what they need. Regardless there is a interesting game from MS research which shows you a page and you search for it (backwards to the norm) and score points for how high it appeared in the rank and if you didn’t use common phrases.

My gripe with it is that it has a timer (how many can you do in set time) and since it needs to load the pages, us poor South Africans with no bandwidth it makes the game go slower. I figure I could get 4 or 5 more pages in with decent bandwidth. Oh well, check out PageHunt

Thanks to Alfred for the heads up.

09 Dec 2008

Scott Hanselman - Last night at Microsoft

Being on the southern tip of the world and add the slowest bandwidth anywhere (confirmed by Scott himself) we seldom get the greats like Scott Hanselman out to talk to us, let alone for free, and when he is on holiday… but that is what the S.A. Developer community got last night and what a night it was. He spoke last night on MVC and I made some notes I thought I would share.

The first concept is that

  • ASP.NET > Web Forms

It’s an interesting way of thinking that ASP.NET is not Web Forms, since it is normally that we use those two interchangeable. ASP.NET is a framework for building web applications, if we use web forms on that framework is a choice not a requirement. Web forms in itself is a lie, it tries to make us believe that the web is stateful… so that we get the RAD/VB6 experience for development. The problem is that like the Matrix, the lie constrains us. MVC is the anti-RAD in a way, it opens up a lot more to the developer than Web Forms traditionally does. Knowing there is a lie, and knowing the truth can hurt you (the same way Neo knew there was no gravity, yet fell) and so MVC can hurt you. MVC is NOT a replacement for Web Forms, it is another way to solve a set of problems and some problems are better solved in web forms, and others in MVC (or ASP.NET Dynamic Data).

MVC is made up of models, viewers and controls and all of these are changeable. So the viewers uses web forms to render the HTML, but there are other options. One of those is NHaml which is a very different way to create HTML (can read about it here) and I thought that looked very interesting. Viewers should contain no logic, they should focus on rendering HTML only. What is very nice is that for the rendering side JQuery is bundled directly into MVC! It is also important to note that ascx files (ASP.NET controls) are not a

Separate from the viewers is the controls which uses the ASP.NET Routing feature of 3.5 SP 1 heavily. It is very elegant in it’s implementation and shows a forward thinking of convention over configuration. In other words it if you type in a URL like http://test/account/view, it will first check in the viewers\account folder for a view.aspx or ascx file and then in the viewers\shared folder for a view.aspx or ascx file. No config to say that this URL maps to this file. Controllers should contain the bulk of the logic but should not have any web concepts (i.e. don’t use the Request object). Obviously you could, but this breaks the important separation in the MVC design. What is nice, is that because the design of MVC is to help enforce separation, unit testing is amazingly simple and if you have the full versions of Visual Studio then it even builds unit tests for you! So while it may be very easy to put some code in a controller to check if a user is authenticated, you need to decide what level of tolerance for code smell you can handle.

Separate still from both of those is the models. Which is your data model for example LINQ to SQL. The purest form of MVC is you have your data model and then a model to talk to controllers so there is a separation in the models and everything is clean. How much benefit that has in real world is unfortunately not that much and because you have the power (you took the red pill) you can share the model from the models to the controllers.

After that Scott showed his latest project, called NerdDinner. Which is based on MVC and will be an open source solution through CodePlex one day. He showed a lot of the code and highlighted the good bits and the bad bits. This really highlighted what he was talking about and some of the problems you need to solve when working with MVC. After that was Q&A with Pizza.

Defiantly one of the best talks I have attended in a long time. He is on his way to Cape Town (taking a day out of his holiday to fly specially to CT) so if you are in CT, you must go and see him! Details can be found on S.A. Developer!

06 Nov 2008

Windows Azure

Reading Paul Thurrott’s review on Windows Azure he mentioned that it is part of the Azure Services Platform or ASP! ASP is already used (twice) in the Microsoft domain for ASP (classic) and ASP.NET, which the non developer community do not understand are different, but it is also a TLA (three letter acronym) for application service provider… which is what Azure aims to be, and if someone at Microsoft actually thought the latter combination th

11 Sep 2008


Earlier this year I attended a great event called Dev4Devs which is run by Microsoft on a Saturday morning at their offices and invites any developer to get up and present for 20mins! This is a great introduction into a lot of things as well as a great place to start if you want to become a presenter. Well it’s happening again in October! I will definitely be there so head over to Eben’s blog for more details.

26 Aug 2008

Silverlight: Lessons Learnt

Tech-Ed was a lot fun and the feedback for the session I did was more positive than negative. Being a speaker doesn't get you into too many special things (there is a speakers lounge) but one of the fun things it did get me this year was the chance to do a video session with my good friend Simon from BlackLight, who was also my co-speaker for my WPF talk. The video is about 15min long and I play the role of interviewer (Larry King watch out!) and I interview Simon on what he does everyday Silverlight and the lessons he has learnt in the last year and a bit.
To check the video go to http://technet.microsoft.com/en-us/events/teched/cc561184.aspx
04 Dec 2007

Visual Studio 2008 Install

So I had Visual Studio 2008 beta 2 installed and got my copy of the RTM media from Ryan today, so obviously I had to do the upgrade today. However I did have Ryan warning me of his experience with it (what made it worse was he didn't even have the beta installed). So I uninstalled the beta. Popped the disk in and it told me to uninstall the beta .Net 3.5 framework. Did that, ran the setup again and it worked, perfectly.

Dunno what else to say really. Normally these things are ammo for the annoyance tag but not today! However if you are unlucky like Ryan, read his post as he is getting some lovely info from MS on the comments.

19 Nov 2007

Windows Vista Power Button

In Vista there is the shiny new start menu with the shiny new turn off options, and until recently I have been using the fly out menu on lock to hit sleep or hibernate or shutdown etc... Thankfully I have gotten over that through two dumb luck experiences.

Firstly my home box I have been hitting the power button since it is quick to resume and I don't really worry about things. I always just thought it was putting it into sleep, well this weekend I stumbled across a new feature in Vista (well new to me) called help. It's amazing, it's like Google for windows off line Laughing

Seriously, in the help feature I found an article on what the power button does. Basically if you have an old machine the power button puts it into sleep. However if you have a more modern it puts it into hybrid sleep. This new mode, works like both hibernate and sleep in shutdown (i.e. it does both). Then when it needs to start up again it checks to see if the memory still contains the information (i.e. sleep mode) and if it does restores damn fast from that. If it doesn't contain (say due to power loss) then it restores from the hibernate information.

The power button is the ONLY way in the Vista interface to do this!

To check if you can use this or to turn it on/off go to power options (either off the battery icon in the task try or in the control panel), click Change Plan Settings on your selected power plan, next click Change Advanced Power Settings and under sleep you will see the options (see the attachment of this post for a screen shot).

Image icon hybridsleep.png41.01 KB
02 Nov 2007

SQL Server Express with Advanced Services

This really is the worlds most needed, most hidden and most marketing bs item ever. For those who don't know SQL Server Express is the light version of SQL Server, basically runs a database server but nothing else, not even a management tool. However it is free to redist with apps and it ships with Visual Studio etc... so it's out there a lot.
But you can just feel there are things needed to get it from almost useless to void filling tool (management tools being number 1). Anyway someone at MS realized this at some point in the last year and decided to bring out the Advanced Services edition (how is that for marketing spin, it should be the complete edition but no we need it to be advance, even though it install stripped down features of everything still).
Anyway above the standard express you get:
  1. Stripped down management tool
  2. Reporting services server (the /ReportServer, you don't get /Reports)
  3. and full text search.
These features are so advanced it's insane, oh wait they are all in the standard SQL server from day one.
Anyway if you need this you can get the 250 odd MB download, which you can just run on your vanilla SQL express to upgrade it, from
More details on this is available at