I love doing this! I have to refactor some pieces of a big production application for a client. This also means stripping some functionality of the application and turning it into individual components which I have wanted to do, but could not justify billing my client for. But now I must do this in order to incorporate some new functionality that will also need access to this logic. Sometimes, working with “old code” is a huge bore, but this is fun because I’m making my code smarter and that makes me feel a little smarter.
Monthly Archives: September 2004
Delegates and the VB programmer
When I first started looking at .NET, one of the new concepts that I kept running into was the “delegate” thingies. I kept seeing things written about them, but never walked away really understanding what they were. So it becamse my mission and the first time I really had a “DING!” go off in my head was an explanation in The Book of VB.NET by Matthew MacDonald. Unfortunately, I have long since passed this book on to someone in the user group so I can’t quote it.
Anyway, I thought of this because Avonelle mentioned delegates and the difficulty that she has had getting her head around them and pointed to this article on KnowdotNET that gave her the “aha!” moment.
I actually had a more interesting realization about delegates this summer at TechEd when I was doing a TabletPC Hands on Lab that was all in C#. I couldn’t understand why I had to keep writing so many delegates and then I realized that the delegates were creating event handlers! And THIS is why us VB background people have such a hard time grokking delegates. IN VB (past and .NET), event handlers come free. They are already there. If you drop a control onto a page, then you automatically have access to that controls list of events in your code. If you instantiate a class in your code, the class’s events are available in the dropdown. So we never had to use delegates (not even available to use before .NET anyway) and therefore they didn’t come naturally.
So you C++ and C# developers, next time your walking down the street and you see someone who is scratching their head muttering “delegates…I just don’t get it”, and you are kind enough to attempt to explain and they STILL don’t get it, don’t just shake your head and walk away. You need to relate them to something that already IS in VB so that they have a bridge. Event Handlers are that bridge.
update with just a little more goo: Just an FYI for you VB’ers. I’m working on converting a login form from VB to C# …oh the drudgery of solving casing problems! 🙂 Anyway, I thought I would point out that when you double click on a control to get it’s default event, C# automatically codes up the delegate in the InitializeComponent method. So I clicked on an OK button and not only did I get my event code but it’s delegate was auto generated as well (that’s backwards – because the delegate makes the event handler possible)
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
So if you just consider the relationship between this delegate and the familiar event handler
private
void btnOK_Click(object sender, System.EventArgs e){}it might help a bit…
SSL, Intermediaries, WS-Security and Recruiters
…and recruiters? Well, yes, actually.
I was reading this post of Casey Chesnut’s where he is ranting about some of the annoying things recruiters do and says :
that disconnect being recruiters. you’ve got a high tech company on one end, then you’ve got technical workers on the other … and smack in the middle, somebody that does not know technology
I couldn’t help but think immediately of one of the SSL issues that is avoided with WS-Security. Things are secure when they are in the SSL pipe, but if you have an intermediary en route, your message has to exit the pipe and you can’t be sure that the intermediary is secure. With WS-Security, you *do* have end to end security as the sender and receiver are the only ones who can interpret the message.
So I had to laugh when Casey made that statement, because I just couldn’t help thinking of the somewhat skewed analogy!
Michele comes to Vermont

(forgive the crappy photo – it’s really hard to take one good pic of speaker and audience in a dark room and darn, all the chicks were on the edges of the room – but there were a bunch!)
Almost a year ago, Michele and I arranged through INETA for her to come to speak at Vermont.NET and of course come for a fun weekend visit. It was originally scheduled in June, when the lupine were in full bloom and “livin’ is easy”, but unfortunately, in late May, Michele had some unexpected travel coming up so we rescheduled for September as she was already planning to go to Jim Murphy’s group, NHDNUG in New Hampshire.
Although the weekend thing didn’t work out wtih everyone’s crazy schedules, Michele and I did get to spend a really fun day hanging out and hiking in the Appalachian Gap on the Long Trail. Luckily for her, the leaves have started turning early, so it is really beautiful here right now. She really had an insane trip, flying into Boston from San Diego on Sunday, driving the 4 hours to my house that night and then had to drive back to Boston on Monday night after the user group meeting. So I really wanted to be sure it was worth the effort she had put in to come all the way here.
Reading this post-meeting entry on her weblog, I think we did okay!
After a fun day on Monday we drove into Burlington for the meeting which was at a new location- the revamped offices of Gardener’s Supply which is in a very special place called the Intervale in north Burlington.
Although I had told everyone the meeting would end at 8 so that Michele could get on the road (she had an 8am talk in Boston at SD East the next morning), she ended up giving us the equivalent of two incredible presentations and talked until 9!
I have never seen Michele present before and I was really bowled over by not only her knowledge (which I am *well* aware of 🙂 ) but her really professional presentation style. Although quite focused on her content, I did keep thinking about my presentation style (which is pretty nascent right now) and wondered if time and experience would help me come near her confidence (which I’m sure she will say is just percieved) and ability to communicate deeply technical information.
I have to say that the women at the meeting were pretty thrilled to witness Michele. The only other woman that has ever presented at our group is me and I really have paled in comparison to most of the other pros that have presented there. So it was everyone’s first real experience of having a serious female presenter. So for the women, I think a lot of them were just really psyched because they suddenly didn’t feel as out of place as usual as the group is naturally dominated by guys. It’s hard to explain, but sometimes these things really do matter even if you don’t want them to.
All in all, I think Dave Burke’s post sums up the general feeling of the whole group about Michele’s presentation. It was basically….awesome.
And to top it off, she was wearing a pretty cool shirt from Newtelligence!
Some Microsoft Tims make moves
Tim Sneath teases us that he was leaving MIcrosoft U.K. and finally explained it was to go work at Microsoft in Redmond. Hmmm, now I can’t bug Tim about trying to get into TechEd Europe as a speaker….as if that was even a remote possibility anyway. But you can’t blame a girl for trying! 🙂
Tim Ewald really is leaving Microsoft. But he will be working at MindReef (he already lives in NH) which is quite a coup for them – both MindReef and Tim. MindReef has some serious brainpower there. I only happen to know Dave Seidel (who coincidentally went to a very small and special college with my sister) and Jim Murphy who runs NHDNUG and came to Vermont to speak at one of VTdotNET’s early meetings.
Congrats to all.
Yasser Shohoud speaking at VS Connections
Yasser blogged that he is speaking at VS Connections. VS Connections is wrapped up with ASP Connections and SQL Server Connections too at DevConnections in Las Vegas in November. I sure hope his talk isn’t scheduled at the same time as one of mine, so I can go learn!

Blog activity
(update: check out Dare’s post on NewzCrawler (and others) as Denial of Service clients)
There must be a few people who have their aggregators set to check rss feeds every 10 seconds or something. I very rarely look at my stats because they don’t really tell me much. But I have to say I was a little surprised to see that there were over 14,000 hits to my website today (from 12am to almost 5pm).
So where do they come from?
10,000+ are from NewzCrawler then a whole lot of other aggregators and then a small # of browsers.
Very strange. I get a few links and fewer comments, so I really don’t think there’s a lot of people reading this and of course I know that the high aggregator number is from frequent refreshes.
One thing that I love to see coming in through referrers is that people are starting on the Vermont.NET website that has a feed from my Jobs category here and there are a lot of click throughs, which means that my posting local IT jobs that I find in the local papers over coffee (or that my hubby is kind enough to point out) is a good resource for some people.
GetCurrentDirectory vs. Application.StartupPath
(talking smart client – windows forms app here, not asp.net)
I was using System.IO.Directory.GetCurrentDirectory to find DLL’s that are to be loaded by reflection in a particular app. But when a user goes out and does something like look up something in windows explorer, that changes the definition of the system’s current directory and you are no longer pointed to the startup path. Then when the user tries to load up the next form – it can’t’ be found! Oops.
GetCurrentDirectory’s definition is “current working directory“. And even in the reference it explicitly says: “The current directory is distinct from the original directory, which is the one from which the process was started.“
So when you need to use the startup path, use the Application.StartupPath which is in the System.Windows.Forms namespace.
(oh, I’m just so embarrassed! 🙂 )
Pet Pile
The camera was handy, what can I say? Can you believe this cat, G.B.. He just loves newfoundland dogs! That’s Daisy he’s cozying up to. She’s one of my parent’s dogs who is visiting for a while – maybe permanently. Tasha is also a Newfie, just one who had an unexpected major haircut in July. We’re hoping it will hurry up and grow back in before it gets cold!

Fall Vermont Leaves – 2004
well, it started a little early! If you check my last year’s pics, we are now about 10 days earlier with the amount of color than last year.
Here are some pics I just took standing in front of my house. As I sit here, I can see the same stuff out of my glass doors in my office. These photos do not capture what I am seeing truly in terms of the colors so you might have to look elsewhere for some professional pics. It’s just a wee Kodak DX3600 digital.
Dave Burke is putting Vermont fall pictures on his weblog too. You’ll see from his photos why I love to kayak so much on our beautiful lake (the 6th largest lake in the country)!


