Sunday, July 08, 2007

My 2007 Speaking "Tour"



# 

In 2005, I began giving talks at our local user group.  In 2006, I spoke at the Atlanta Code Camp, FoxForward and DevLink.  This year, I joined Toastmasters in anticipation of even more speaking opportunities.  I have not been disappointed.

In January, I delivered a talk on Creating Windows Services at the NashDotNet users group.  I am currently preparing six talks for three different conferences on a wide variety of topics.  Fortunately, I picked the topics. ;-)  Each of these presentations is on a topic of great interest to me.

In September, I'll be at FoxForward near Atlanta, discussing TDD and an approach to application architecture I call OGLE. In October, I'll first head to Nashville for DevLink, where I'll be talking about VSX, and the Entity Framework.  The following week I'll be in Phoenix at Southwest Fox, where I'll do a longer pre-conference session on TDD, and a regular session on extending Visual FoxPro applications with Windows Forms elements.

In addition to these great events, I've committed to speak at the Memphis Day of .NET in November.  Details are still being finalized for that event.  I'll also be giving a talk introducing the Entity Framework at ETNUG, most likely at the August meeting.  I'm hoping to add a couple more engagements before the end of the year.  I'll let you know if anything works out.

If you have ever considered giving a technical presentation at a user group, or regional event, I encourage you to act on that thought.  Sharing ideas and interacting with other members of the community at these events has been extremely rewarding for me.  If you attend any of these events, please introduce yourself.

Cheers,

++Alan

 Thursday, July 05, 2007

When the Pattern Is Its Own Anti-Pattern



# 

I'm totally digging Alex Miller's "Patterns I Hate" series.  So far he's taken down Singleton and Template Method.  I love to study patterns and "best practices" in general, but I realize they can do harm when slavishly copied in inappropriate contexts.

While on the topic of Patterns, I must give a shout out to my co-worker Geff Ivey.  I mentioned my liking of Design Patterns Explained as an alternative to the GoF, and Geff convinced me to finally take a look at Head First Design Patterns.  I'm sure this book isn't for everyone, but it was useful to me.  They finally helped me to wrap my head around Model View Controller.  They did it better than the Pragmatic Programmers, or Martin Fowler, although Fowler has more context on the evolution of the design.

Anyway, Alex appears to be a fan of dependency injection, which will soon be promoted by agile practitioners, as a cure for cancer, or at least cancerous code.  Alex has some excellent, thoughtful comments.  You should read them, highly recommended.

Enjoy,

++Alan

VSX - Slow Progress



# 

I'm still working on the tutorials, but the holiday has offered a nice break from technology.  It's good to be reminded that I have other roles in life, like "Dad" and "friend".  Here's the latest I have to report.

After ranting about the annoying CTC files, I learned about the new VSCT file format.  There is also a prerelease compiler for the new file format.  This looks like a major improvement to VSX, but it isn't part of the tutorials, so I'll plow ahead.

I looked over the VSSDK Assist site, and decided this was a tool I wanted to use.  Unfortunately, it failed to install for me.  I've reported the bug.  I'll try it on an XP box and see if I have more luck.

++Alan

VSX    Comments [2]

Fun With New Macbook video drivers on Vista



# 

I run Vista on my Macbook.  It's a great machine, but some of the drivers are flaky, because they were intended for XP.  Until Apple updates Boot Camp for Vista, you must use the XP drivers.

Today, I noticed a Windows Update for the chipset drivers.  I was feeling bold, so I let it install.  I hadn't noticed a difference until a few moments ago while surfing a web page.  I wanted to return to the top of the page, so I pressed "fn+ctrl+left arrow" (which is the equivalent of ctrl+home), or so I thought. 

Actually, I pressed "ctrl+alt+left arrow" and my display rotated 90 degrees to the right!  I realized what I had done, and tried "ctrl+alt+right arrow" to remedy the situation.  That put the display 90 degrees rotated to the right.  Finally, I tried "ctrl+alt+up arrow" and the screen returned to normal.  Can you guess what I tried next? :-)

++Alan

 Wednesday, July 04, 2007

Congratulations to John Kellar



# 

I just read on Rob Foster's blog that my buddy John Kellar in Nashville was recently named a Microsoft MVP.  I can't think of anyone more deserving.  John is the inspiration (and much of the blood, sweat and tears) behind DevLink.

Speaking of DevLink, I need to get my session descriptions to John before he takes me off the speaker list. :-)  In honor of John's incredible efforts for the .NET community in Tennessee, I would like to dub him "The Hardest Workin' Man in Software."  We'll see if it sticks.

Cheers,

++Alan

 Tuesday, July 03, 2007

VSX - First Impressions



# 

You only get one chance to make a first impression.  I want to record mine regarding VSX before I get too familiar with it.

First, the documentation and comments in the project template are very thorough and helpful.  If the legacy systems I've supported in my career were half as well documented, I'd probably be less obsessed with TDD these days.

Speaking of TDD, there is a great set of sample projects in the SDK.  These are found in %VSSDK_InstallDir%\%Version_Number%\VisualStudioIntegration\Samples\IDE\CSharp\.  In that folder, there are some reference projects, each of which include a TDD\ folder with unit tests.  Sweet!

So, kudos to the VSX team for the good documentation and the unit tests, on to what was less than stellar.  There must be a way to abstract the CTC file.  It isn't poorly formatted for a config file, but It could be so much better.  XML anyone?  I know XML takes it's lumps when it is used for scripting, or as a data serialization format, but it is ideal for a config file.

At the very least, there needs to be a CTC Editor GUI tool to prevent me from fat fingering some comma separated value.  Here is an excerpt from the tutorial:

This line contains comma-delimited fields. The first field is the command that will receive the key binding. This field is in the form GUID:ID, where the first part is the GUID for the package, which is defined in Guids.h (also in the CtcComponents folder). The second half is the command identifier you typed in when you ran the wizard; this identifier is defined in CommandIds.h (which is also in the CtcComponents folder).

The second field is a GUID representing where this keyboard shortcut will be available. Different parts of Visual Studio can have different keyboard handlers. For example, when you are inside a text editor, the keyboard shortcut CTRL+I runs the Incremental Search command. But when the Solution Explorer is active, CTRL+I has no key binding. Thus, CTRL+I is only available to the text editor.

We want our keyboard shortcut to be available everywhere in Visual Studio; thus, it will be global. For global keyboard shortcuts, we use the GUID defined by guidVSStd97.

The third field is not presently used; for now, you use the same identifier from the second field, guidVSStd97.

The fourth and final field is the keyboard shortcut. This takes the format 'character':otherkeys, where the character for the shortcut goes in single-quotes. The otherkeys portion represents SHIFT, CTRL, and ALT with the letters S, C, and A, respectively. In this sample we're using CS, which means CTRL and SHIFT. The letter used in this example is M; thus, this keyboard shortcut is CTRL+SHIFT+M.

Couldn't I have an editor that allows me to select values from lists, rather than manually locating them in guids.h?  This is "hold your mouth right" programming.  How am I supposed to remember that the third field isn't used, and why do we put in a value if it isn't used?  How about creating an enum that I can access in code, rather than making me remember the constant guidVSStd97?  How long can I continue with these rhetorical questions?  Seriously, this aspect of VSX screams for better tooling.  Perhaps this is what VSSDK Assist does.

Finally, I have a real issue with the PLK.  It is a bottleneck to community development to request a new key for every dll.  Perhaps we could have one key for all community created packages, while commercial vendors are required to have unique keys.

If I sound negative, it's only because I know I will become accustomed to these annoyances in my quest to master VSX, and I want to record them to remind myself what it was like to be a noob. :-)

Cheers,

++Alan

 Monday, July 02, 2007

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

 Thursday, June 28, 2007

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

 Monday, June 25, 2007

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