VSX – Know Your Tool

If you’ve ever read The Pragmatic Programmer, and you should, it makes a mantra of DRY (don’t repeat yourself).  The point is that you have enough to do developing good software.  Don’t waste time on repetitive tasks.  I apply the same principle to DRY that I apply to OOP.  If I see the same scenario in code three times, I abstract it into a class.  So, if I have to perform some boring, or at least repetitive, task three times, I automate it.  Well, that’s the plan anyway.

This is my motivation for getting into VSX.  I don’t want to perform the grunt work involved in creating Model View Presenter designs.  I want to focus on the interesting job.  It is the what, not the how that is difficult to get right in software development.  I hope to build some tools that allow me, and my fellow developers, to focus on the interesting work.

I decided to begin my investigation with the Visual Studio Extensibility QuickStart Tutorials.  These six labs promise step-by-step introductions to the various forms of VS extensions.  Below are my notes, so you can follow along from home.


In order automate tasks at a fine grained level in VS, you’ll want to use the Managed Package Framework (MPF).  This is a managed API introduced in Visual Studio 2005.  Classes in the MPF are found primarily in the Microsoft.VisualStudio.Package and Microsoft.VisualStudio.Shell namespaces.  In order to manipulate the MPF, you interact with numerous interfaces.  You will implement many of these IVs* interfaces in your classes, so that VS knows how to interact with your package.

The primary elements available for creation are tool windows, document windows and commands.  In the new VSPackage wizard, the options are listed as Menu Command, Tool Window and Custom Editor.  Commands display visually as buttons on menus and toolbars.  Commands are also available in the command window by category.  Type “build.” in the command window, and intellisense lists the commands available in the build category.

It can be useful to bind a keystroke to your custom commands.  The comments in the template for VS commands warn:

Notice that Visual Studio has a lot of components and commands, so it can be difficult to find a key binding not used by somebody else; if the key bindings are conflicting only one will be used and one problem is that the shell will not inform the user that a conflict was found. The only  way to detect the problem is to start Visual Studio under debugger, try to execute any command and look if there is a message in the output window about a duplicated accelerator found.

In order to distribute your package, you must request a Package Load Key from the VSIP site.  This is an unnecessary hassle, it seems to me.  I’ve requested a PLK for the package I created following the tutorials.  I understand the need to track commercial packages which extend the VS shell, but it seems like overkill for personal extensions.


It’s 11:30, and I’ve only finished the second tutorial.  I’ll pick this up again tomorrow.

Cheers,

++Alan

Going Deep with VSX

I’m taking some time off around the Independence Day holiday this week.  I have several projects queued up for attention.  One that has priority for me is an investigation of VSX.  I was introduced to the latest efforts by Don and Ken while I was at TechEd.  I don’t have much to report yet, but I would like to share some resources that I’ll be exploring:

That ought to keep me busy for a few days!  I’ve got some ideas that I would like to implement in the IDE, but I don’t know how to get started as yet.  I’ll report back when I’ve learned something.

Cheers,

++Alan

Is LinkedIn Useful?

View Alan Stevens' profile on LinkedInYesterday, I responded to some requests for connections on LinkedIn.  I’m terribly lazy about this.  Both of these invites had languished in my inbox for over a week.

Once I logged into my account and accepted the invites, I began looking around for evidence of value.  I had a few connections with co-workers and people in the .NET community, but I couldn’t see what good it had done me.

I added a link to my LinkedIn profile to this blog a while back during my blog renovations.  That allowed one person I met at Tech Ed to get in touch with me.   Because of that, I decided there may be value in this service.

I began searching all the connections of my connections, that I knew, and inviting them to connect directly to me.  I dug around for email address online of people I didn’t have in my address book.  I added my address books from Outlook and Gmail, and invited anyone I thought might be interested.

On a roll, I installed the Outlook plugin for LinkedIn and had it search my archived mail for contacts. I have to admit that this became addictive.  I would send a batch of invites, and wait for email confirming that people had accepted.  I drooled like one of Pavlov’s dogs every time I saw the blue toast in the corner of my screen.

This went on well into the evening.  I was very happy to get an email response from an old friend whom I hadn’t seen in a few years.  We caught up.  I learned that he was in Memphis and engaged, while he learned about my marriage.  This was a very pleasant exchange, and one that I could have initiated with a simple email, but it resulted from inviting him to join my network.

This morning I moved on to collected business cards.  I was pretty bold by this point and I invited people whom I had barely been introduced to.  This surprised one person who asked how I got his email address!  I explained that I had interviewed for a job with him two years ago, and wanted to connect with him because he supervised many developers who might be interested in our user group.  He was pleased with this, and accepted the invitation.  He also asked me to send him information about the user group meetings, so he could distribute it to his employees.  Now, I was seeing some value.

I believe the best proof of value came when I connected with another user group leader I met at Tech Ed.  He responded to my invite by asking me to speak it their “Day of .NET” in November.  That was definitely a valuable connection.  Again, it was a circumstance that I could have initiated through simple email, but it happened by connecting on LinkedIn.

I still have a couple dozen invites pending.  I’m considering inviting all the regular attendees of the user group, so we can build a network for ETNUG on LinkedIn.  I’m also adding my LinkedIn profile to my email signature.  I’ll report back in a month or so to let you know if any of this was worthwhile.  My fear is that LinkedIn is just another friendster dressed up to be appealing to us “professionals”.

We shall see,

++Alan

My Birthday is Overdue?

Upon logging in at the office this morning, I was greeted with an Outlook reminder that Alan Stevens’ Birthday is two days overdue.  Perish the thought!  My birthday is a commitment I always keep. 🙂

Wally completed another circle of the sun yesterday.  Cheers mate!

++Alan

What’s Your Programmer Personality Type?

I can’t get enough of these dumb online personality tests:

DHTC

You’re a Doer.
You are very quick at getting tasks done. You believe the outcome is the most important part of a task and the faster you can reach that outcome the better. After all, time is money.
You like coding at a High level.
The world is made up of objects and components, you should create your programs in the same way.
You work best in a Team.
A good group is better than the sum of it’s parts. The only thing better than a genius programmer is a cohesive group of genius programmers.
You are a Conservative programmer.
The less code you write, the less chance there is of it containing a bug. You write short and to the point code that gets the job done efficiently.

Now it’s your turn to take the Programmer Personality Test.

Cheers,

++Alan

Tech Ed 2007 Day 5

By the last day of Tech Ed, I am exhausted.  Many people have already left, and the ones that remain are often burned out.  The only reason any of us attend day 5 is that there are always awesome sessions saved for the last day.

I spent the morning in the Dev Lounge, trying to blog, but mostly talking to people.  My first session was the Birds of a Feather that Shawn and I were moderating.  On the way to the session, I ran into Don Demsak and invited him to join the discussion.  Don came, and added many insights.

I was pleased with the interaction in our BOF.  Attendees seemed interested in the subject, and contributed frequently to the discussion.  Shawn had someone take notes, and we’ll each post those on our respective blogs.

Douglas White, whom I had dinner with two nights previous, attended the BOF, and we continued discussing the topic through lunch.  After lunch I attended a talk on implementing CMMI with Team Foundation Server.  This was a niche topic, but I’m square in the middle of that niche.

I was totally conferenced out by this point.  I met up with Geff and Randall to say goodbye, and I went back to the room to catch up on some sleep.  I’ll have some reflections on the week once I return to Knoxville.

Cheers,

++Alan

Tech Ed Day 4

After picking Michele up at the airport and settling her into the room, I headed to the Convention Center for more interaction.  I didn’t attend any sessions on Thursday.  Instead, I spent my time in the Technical Learning Center talking to people.

I had a very intense conversation with Tim Mallalie from the Entity framework team.  He helped me understand the difference between the Entity framework and the Entity Data Model.  As teh conversation proceeded, we got into a discussion of the tools support for the entity framework.  He reported that they will have limited tooling at release in April, but they will have an extensibility model to encourage third parties to begin building tools and utilities to work with the EF and EDM.

I let Tim know about the conversations I had with Ken Levy about VSX, and offered to look into extending the EDM tooling options.  He seem very excited, and gave me his contact info, along with the contact in charge of the extensibility API.  After that, I talked to Ken about this development, and he asked me to get in touch with him once I had the VSX installed, and I was ready to work with it.

This is a very exciting development.  I think this could turn into a useful Codeplex project by the time the entity framework ships in April 2008.  Watch this space for further developments.

Thursday evening is always the big conference party.  This year, I was able to bring Michele with me, and we both enjoyed it very much. 

Adios,

++Alan

Tech Ed Day 3

Wednesday was exciting and choc full-o-goodness.  I spent a lot of time talking to people inside Microsoft.  If you’ve never been to Tech Ed, you may not appreciate how valuable this interaction is.  There are representatives of every team inside Microsoft standing around for the sole purpose of interacting with customers.  This is a terrific opportunity to find out about features and technologies you may be interested in. 

I attended one breakout session on test driven development.  It was the best session I’ve seen this week, and I will be sharing the slide with my peers when I return to the office.  This is a difficult practice to sell to people with little experience.  There were some good examples used to explains the benefits of a TDD approach.

At lunch, I had a great discussion with Noah Coad and Abhijit Rao about encouraging change at the developer level.  We agreed that developers must experience the pain of suboptimal practices before we embrace best practices. 

Back in the developer area, I sat down with Sam Guckenheimer to discuss organizational change around development process.  Sam said that most decisions to pursue CMMI or ISO process certification are motivated by the desire to pursue business opportunities that require those credentials.  This correlates with my experience.

Sam agreed that this is not a technological problem, but an organizational change issue.  Sam recommended the book Leading Change for guidance in implementing change at that level.  I’ll most likely constrain my efforts to developer practices, but it’s good to know about the resources.

I took a few minutes to visit with Bill Vaughn at the SQL CE booth.  I didn’t realize that CE could be hosted in an ASP.NET session.  Bill asked why I might want to do that.  My reply is that my blog runs on flat xml files currently, and SQL CE would handle more performance and scalability than this solution, while maintaining the xCopy flexibility.

I spent some more time configuring my laptop, and a VPC to demo some tools for Ken Levy. I had a problem forming a network connection between the laptop and the running vpc image.  After fooling with it for a few minutes, I realized I could get expert help.  I found the VPC kiosk, and a MVP there, got me straightened out.

Once I had things running, I found Ken Levy and demoed my extensions to the Visual FoxPro IDE to connect to Team Foundation Server.  I showed the Version control tool I built for my employer.  Ken understood this tool immediately.  Next I showed the work item editing control I built using the Windows Forms Interop Toolkit.  Ken wasn’t familiar with the toolkit, and it took a minute for him to see what I was doing, and what the potential uses are for the interop user control.

Ken then called his boss and Amanda Silver, a PM for Visual Basic, over to show them the potentials for this toolkit.  Ken then jumped into brainstorming about how to render WPF inside this control.  Next, we talked about how to provide tools for VFP developers to move to .NET.  We agreed that I could use the VSX tools to build some familiar tools in Visual Studio, so that Fox developers can get up to speed faster.  This conversation was probably the climax of Tech Ed for me.

Next I sought out the Entity Framework team.  I met with a couple of PMs and grilled them on the features, and future extensibility.  I’m pleased to report that we were all on the same page.  They have an excellent mapping solution, and planned integration with synchronization services and reporting services.

Before I left, I stopped by the WPF stand.  I asked Rob Relyea about hosting WPF inside a winforms user control.  I learned about the ElementHost and ControlHost.  Next, I asked about generating dynamic XAML and rendering it at runtime.  The answer lies in XamlReader.Load().  I also saw part of the “Booyah” video from MIX.  This is exciting because I can generate dyanmic XAML in VFP and render it inside of an Interop User Control.  I look forward to sharing this at Southwest Fox.

With my head full of exciting possibilities, I left the convention center to prepare for the Microsoft Influencers Party.  This party is a way Microsoft acknowledges people who promote their technologies in the community.  This includes user group leaders like me.

I wanted to visit the Corona Cigar Co. and get a nice smoke for the evening.  I found the most amazing cigar store/wine bar that I have ever seen.  I picked up a few smokes, and made plans to return on Friday.

The party was at Margaritaville, and it was packed.  I had dinner with Douglas White and Bill Vaughan.  We had a good time shouting our conversation over the sound of the live band.  🙂

After dinner, I made my way out to the patio to enjoy my cigar.  There I ran into Dustin Campbell, whom I met at last evening’s flying adventure.  We had a great time smoking cigars while discussing agile practices and functional programming until they closed the upstairs including the patio.

The evening carried on at the Red Coconut where I enjoyed the company of Keith Elder, whom I had never met before.  There were many others there including Peter DeBetta,  Paul Ballard, Cory Smith and many others. I hung out far too late, and I paid for it the next morning.

Cheers,

++Alan