Monthly Archives: April 2004

Interesting Franchise Name

Anyone noticed these little signs popping up all over the place? Presumably they belong to some trendy fashion outlet which sells clothes that wouldn’t fit my big toe.

I wonder if the person who came up with this franchise name subscribes to the theory presented in this urban legend.

Advertisements

Could I fly a DASH-8 when I go to the US?

I planning on making a trip to the US later this year for a technical gathering in Redmond. Because I live in Canberra this usually means that it is atleast a three leg trip, and I think I prefer the one hour Canberra to Sydney (and vice-versa) flight the most.

The reason hasn’t anything to do with the duration of the flight, in fact if anything it could be a little bit longer. It has everything to do with the possibility of flying on a DASH-8.

Asside from the fact there is something a little Indiana Jones-y about flying in a twin prop – the seats are just so much more comfortable. On the Qantas DASH-8 configuration I have about an inch and a half air gap between my knees and the seat in front of me. Compare this with the the painful experience of flying on a larger jet where my knees start out pushing into the back of the person in front of me.

You’d think that’d be a hint to them that its probably not a good idea to put seat back – apparently not. I love the blurb just after take off when the lass comes on over the radio and tells us that we can now get out of our seat and walk around the cabin – umm, how?

I’m really looking forward to heading back home today, I flew up on a DASH-8, but on the trip back I’m in a jet. I wonder if they would just let me hold on to the wing. I wonder if I can get a series of DASH-8’s to the US.

We found our digital camera . . .

About a month ago we lost track of our digital camera, we wondered whether someone had come along and taken it out of the bottom of Bella’s pram while we were out (we usually take it with us just in case). Anyway, Nicola was cleaning out the car today and found it under the seat.

Naturally – I knew it was there – I was just testing her. Anyway, in celebration of the event, Bella got her picture taken.

Design-Time Type Resolution

Have you ever wondered how the DataSet component on the ToolBox in VS.NET discovers the strongly-typed data-set instances which are part of your project or its direct references? Not only was I curious, but I also needed that functionality on a designer code that I was writing. Here is what I found.

In the case of the DataSet component, it actually uses a custom ToolboxItem class to allow you to change what type of data-set actually ends up on the design surface. When it pops the dialog it looks at the code in the current project using an underlying feature of the VS.NET system called the CodeModel. It walks the code model looking for the various strongly-typed data-sets and presents them as options for the developer to select.

The ITypeResolutionService service is then used to get a Type instance back from the fully qualified name of the type determined by walking the CodeModel. If it returns null then it generally means it hasn’t been compiled. Referenced assemblies are a little bit different – the path names to the assembly files can be got at using DTE but you can’t just load the assemblies up and suck out the types to inspect them. That would result in the assemblies being loaded into the DefaultDomain setup by VS.NET and the assemblies would be locked until you shutdown the IDE. When getting referenced assembly type information you need to start up a seperate app domain for a short period of time and load all the assemblies into it. You can then get the type information out and unload the domain when done.

All in all it was an interesting tour through some of the VS.NET plumbing. Unfortunately many of the pieces of the puzzle are marked internal so you can reuse them (without resorting to hackery). Since I needed the same functionality I put together a pair of classes which can be dropped into your designer projects which will allow you to get an array of Type instances back given a base-type.

Personally I’d like to see a ITypeResolutionService2 interface defined which would allow me to do this easily without having to write this code. I suspect that the chap who wrote the DataSet designer code would have liked that too!

Are you a .NET paratrooper?

Maybe its the distinctly military theme that seems to be on the idiot box these days, but I’ve found myself drawing analogies between what I do as a software engineer and the role that our service men and women play in combat.

Now obviously I am not saying that as a developer I put my life on the line day in day out, but COM interop code doesn’t exactly tickle either you know! More than once recently I have been working on complex problems that others had thrown their hands up at. And in most cases I’ve managed to do enough digging and investigation to uncover the problem and where there is no fix to apply, atleast suggest a workaround.

I know I am not the only person that is charged with this responsibility although some people go by a different title like “problem solver” or “the cleaner”. I like the last one, but I think .NET paratrooper is pretty cool too.

Do you spend all day solving seemingly unsolvable problems? Are you a .NET paratrooper?

New Floor – New Desk

Its that time of the week again and I am at Canberra airport waiting for my 7:45 flight to Sydney. I decided to go for the slightly later flight this week which has a small risk of getting me into the office a few minutes late – no meetings so its not a big issue.

The project team is moving nine floors up today to deal with the growth in numbers. I’m looking forward to it since to date I’ve been squatting at the end of someone elses desk. I got my username and password last week so I’ll actually be able to use the provided computer.

All in all, this consulting experience has been pretty good, building access was sorted out by the second day and I’ve been able to pair program (loose definition) with one or two of the staff members here. We actually managed to push out the first lump of work in nine days (actual).

The next piece of work is a little bit more interesting, if any of it is blog worthy I’ll be sure to post snippets up.

Choice VS.NET designer bits marked internal . . .

I’ve been spending quite a bit of time lately digging around in VS.NET designer internals teaching myself how everything works. My goal is to demystify the the designer technology in the product and encourage development teams, especially larger ones to build designers for the frameworks that they end up building to realise productivity improvements.

Over the past month or so that I have been stuck with my head in ILDASM.EXE and .NET Reflector (awesome tool BTW) one of the frustraitions has been that alot of the interesting bits are marked as internal. In my experience, frameworks with classes and their members marked as internal tend to mean that a compromise in functionality/flexibility in order to achieve the desired level of quality before shipping.

I appreciate why this is done (everyone wants a stable product), but I am hoping that over the next few versions the folks at Microsoft work hard to expose more and more of this functionality. That said – once you get your head around this stuff you can make things insanely easy for those that come after you.