Pete Wright's Radio Weblog
Musings on anything and everything, but mainly code!

 

 

13 July 2004
 

Rory Blythe does a great spot on .Net Rocks each week called Google Weirdoes. Basically he goes through the referrer log of his blog and mentions the strange and obscure Google searches that people do that eventually land them on his blog. Some of the people out there are pretty ingenious and actually use Google searches to hit Rory's blog and shout out to their friends and stuff. Neat.

Anyways, looking through my referrer logs after I uploaded the last post just now I came across a really really weird one. Someone hit my blog as a result of an MSN search for, get this, "SEX ACTIONMAN AND GIRLS". How the hell did that get me? In the UK ActionMan is the equivalent of G.I. Joe. I never once mentioned G.I. Joe or Actionman having sex with girls. Strange indeed.

Damn, now I have I suspect I'm going to get all the raincoaters in here.

 


12:31:38 AM    comment []

I've spent quite a lot of time today in Visual C# Express, the new entry level C# IDE in the Whidbey .NET family (2.0). It's awesome. The user interface is just so wonderfully streamlined everywhere that it should be (options) and borrows all the great UI features of Whidbey that make the next version of Visual Studio so cool.

The thing I love most is the small things, the things that don't jump out at you in the feature list. For example, control tabbing among pages in the IDE. Historically this always worked like Alt Tab, but within the IDE. You'd hold down CTRL and then keep hitting TAB to move through the currently open documents list one doc at a time. In Express though you get this neat pop up appearing

It doesn't look like a big deal, but it really is. From a useability perspective you instantly get to see a list of all the open documents and panes in the IDE which you can navigate either by hitting Tab repeatedly, or by clicking an item with the mouse (while still holding down CTRL), or even use the cursor keys (again, while still holding down CTRL). That's awesome. It makes choosing an individual document from a huge list really easy.

C# Express users also get the much vaunted Refactoring support. See www.refactoring.com if you really have no idea what refactoring is. In Express, as in Whidey, the refactoring functionality is completely brainless to use. Just select the code that you want to refactor, and then either choose the appropriate refactoring from the main menu in the IDE, or right click and choose a refactoring from the context sensitive menu that appears.

Cool as it is, I do have two gripes. The first one is quite minor. When I'm knocking out code for my own use I try hard to follow eXtreme Programming principles. I'd love to do this at work too, but the realities of working with paying customers make it impossible. Anyways, a huge tenet of XP is "do the simplest thing that could possibly work". So, for one part of my app's functionality I need to grab a webpage and return it as a string. I figured the simplest thing would be to write a nice static method in a Retriever.cs class that did the dirty work. No problems so far. I then refactored the code to keep the methods nice and cohesive, ending up with GetPage as a public static, then DownloadPage() and ReadWebPageAsString() as two supporting private statics. Great stuff. Refactoring worked a treat there. BUT, at some point it's not going to make sense to have these methods static anymore and I'll need to remove the static modifier. Wouldn't it be great if there were refactorings to promote a top level public method to a class method, and vice versa to demote a class method to an instance one. I know there's a lot of risk there in that you'd need to also move the child methods and find a way to cope with other code that may be referring to them, so it's probably unrealistic to ask for an expect such a thing. Would be nice though.

The other gripe on the other hand is far more realistic and serious. Refactoring is a great and powerful tool, when used in conjunction with tests. The last thing you want developers, regardless of their experience, doing is going through code refactoring the heck out of it without some form of test scaffold to prove that the code still works after all the tweaking. So, why on earth did Microsoft choose not to put unit testing into Express? Without it you're realling giving a newbie programmers a lot of rope to hang themselves. Come on MS - at least put some massively simplified unit testing system into Express. Please?


12:21:21 AM    comment []


Click here to visit the Radio UserLand website. © Copyright 2004 Pete Wright.
Last update: 27/11/2004; 12:29:03.
This theme is based on the SoundWaves (blue) Manila theme.
July 2004
Sun Mon Tue Wed Thu Fri Sat
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Jun   Aug