Friday 21 September 2007

Visual Studio Auto-Attach Macro

Although using the debugger to attach to your running code to inspect things can be considered "a bad thing" in some circumstances (i.e.: why aren't you using Debug.Assert() to enforce the internal state you are examining with the debugger? why aren't you using unit tests to enforce the exit state you are examining with the debugger?); sometimes you just got to do it. Well I do at least.

For ASP.NET development (IIS, Development Server, Cassini, or whatever) this can be a pain. You need to:
  1. Open the "Attach to..." window.
  2. Find the process (web server) you are interested in.
  3. Attach, wait and close the window.
As an alternative, I've been using a small macro to do these three steps and bound it to a little icon in the toolbar. Very easy: click the gears icon (my personal choice) and you're attached. Click the detach icon (default) and you're out of debug mode.



Of course you will need to alter the name of the process to look for depending on your web server (IIS 5 will typically need "aspnet_wp.exe", IIS 6 depends on the process mode you choose to run in).

I must apologise, the idea for this macro was taken from a source I can't locate anymore. The code is slightly modified, but the idea is the same.

' This subroutine attaches to the first Development Web Server found.
Sub AttachToFirstDevWebServer()
Dim process As EnvDTE.Process

For Each process In DTE.Debugger.LocalProcesses
If (Path.GetFileName(process.Name) = "UltiDevCassinWebServer2a.exe") Then
process.Attach()
Exit Sub
End If
Next

MsgBox("No ASP.NET Development Server found")
End Sub

Tuesday 18 September 2007

It just made sense at the time...



After several weeks of ignoring Google Reader, I was playing catchup, and this one stuck a chord. It's so easy to pay out on advertising or marketing; but this one just seems right.

Tuesday 24 April 2007

My friends and co-workers are just smurfs

I can remember back when I was young, having a fascination with collecting Smurfs. I don't remember the exact details, but I think you collected them at petrol/gas/service stations (maybe BP?). I had a fair amount (about 20+ I recall). I'd try and force my parents to constantly stop at the service station so I could get more. More, more, MORE!

Then one day (maybe a year or two later), I was sitting around looking at my box full of small blue bits of plastic, and I realised: I never really liked Smurfs anyway. Sure it was something to collect. But there were better things to collect. Things that I actually liked. Transformers comes to mind. :-)

So I had one of my first experiences of feeling tricked into collecting something that I didn't actually like, by clever marketing and snappy logos.

Time moves on, and now I'm starting to get the same feeling with LinkedIn. At the start, it seemed like a good idea (join a network of my friends and colleagues, find old workmates, get access to the "inside" job offerings). Inside the website you notice little "meters" that let you know "if you invite x more people, you will reach 90% complete". Mini-nags to remind you that you should spread LinkedIn to all your friends. Which is fine - it's viral marketing, I should know - I work for a company that does the same sort of thing.

But today I had a similar epiphany to the Smurfs (does that make it smurf-tacular?): I hate receiving emails along the lines of "join this website so you can do x". I get enough in spam, I don't want to receive the same thing from my friends. Yet here I am, sending emails to some of my closest friends, asking them to join a website they may never have heard of, just so I can get an extra little mark on my progress meter.

I'm not so disgruntled that I will immediately quit LinkedIn, and ask all my friends to do that same (besides, that's up to them). But I think I might leave it alone for a while (say a month or two) and see if I still feel as annoyed with myself (after all, it's me that sends the invites, not LinkedIn) as I do today.

Tuesday 6 March 2007

So what is it?

This is simply a demo blog to compare features of blogger with my corporate (well who I work for currently) blog offering. I want to see if blogger is any easier, or has any decent feature to steal, err I mean "inspire".