Archive

Archive for the ‘.NET’ Category

Sending Email From This Site

July 26, 2010 Comments off

Hi folks, this is just a house cleaning message.

I just wanted to let you know that apparently the email service from this server has been non-functional for quite a while and no one knew it.  It appears to have been corrected and I am receiving email submitted from this site again as of last week sometime.

On the off chance that you submitted an email to me through this site over the last couple of months and I never responded, then it means your message was never delivered.  I pride myself on responding to every message a reader sends me, so I don’t want anyone to think I’m ignoring their messages.

Just a reminder that you can also contact me on Twitter.

Categories: .NET

Holy Cow, what a week!

July 6, 2010 1 comment

This last week has been awesome, probably the best week of my professional career, and I’m just bursting to share.

Wednesday, June 30th

If you follow me on Twitter you may have seen me mention that I took and passed the .NET 3.5 Windows Forms certification exam.  While I already had an MCTS for WPF, I needed this one to qualify for the MCPD (Windows Developer).  If you check out the requirements, you’ll see only the Windows Forms exam counts.  I would go on a rant about how little sense this makes given that WPF is the future of Desktop development and WinForms is on it’s last legs, but this is a happy post so I’ll skip it this time.

I had debated about whether or not I was going to pursue MCPD, but then Microsoft sent me a voucher for a free exam, so I figured why not?  I won’t lie to you: I was surprised I passed.  It’s been 2 years and 2 versions of VS since I last developed for WinForms, and on top of that I barely had time to review.  Still, I did pretty well on the exam and so now I have another MCTS.

Thursday, July 1st

I posted last week about being awarded Expression Blend MVP: I am ecstatic, honored, and humbled.  I spent the next few days in a haze just trying to adjust, it really is a great honor.  A friend asked me at lunch the other day if I was going to slow down the crazy community schedule now.  Naturally I informed him that it would be quite the contrary!  I expect things will get even more intense and I can’t wait!

Monday, July 5th

Pathetic though it may be, I was in the office working yesterday while everyone else was out frolicking for the holiday weekend. It was near the end of the day and I was about to go home when an interesting email arrived informing me that I had been selected as an INETA Community Champion!  Looking at the past winners shows me I’m in pretty good company.  Again I am honored and humbled.

The accolades are certainly nice, everyone likes a little recognition once in a while.  I want to thank Microsoft and INETA, and specifically those who nominated me for these awards: I hope I can live up to your expectations.

However, while it may sound cliche, the truth is that being part of this community is its own reward: I wouldn’t change a thing.  Thanks everyone, and I’ll see you in the community!

Categories: .NET

Expression Blend MVP

July 1, 2010 4 comments

Hi Folks!

I wanted to share a bit of good news with you all: I just received the official announcement that I am a 2010 Microsoft Expression Blend MVP!  You can tell by my overuse of exclamation marks!!!!

I am truly honored, there aren’t a lot of Blend MVPs and it means the world to me that I’m now on that list.  I’ve got a great year planned and some big announcements coming up, so if you are interested in Expression Blend, watch this space!

In the meantime, make sure you attend Blend-O-Rama! Only 18 days left!

Categories: .NET

Processing Command Line Arguments in an Offline ClickOnce Application

June 23, 2010 11 comments

Several years ago when ClickOnce first emerged I thought it was a great idea.  Unfortunately at the time, I found it so difficult and tedious that I didn’t play with it for long.  My buddy Stuart was at my office recently and I was lamenting some distribution issues I was having with one of our WPF apps. 

One of our deployed apps changes frequently, and I don’t send out updates as often as I should because our users environments typical limit their install rights (not to mention many of them don’t even have IT staffs).  This means they rarely have the latest and greatest because it can be a serious ordeal to deploy the changes.  Stuart brought up ClickOnce, and the discussion quickly came to the question “what happens when the user doesn’t have administrator rights?”  Naturally, we had to put this to the test!

What I love about ClickOnce

I love how easy it is to setup and use – We spent about an hour playing with ClickOnce and I was amazed to find how far the tooling has come since I last checked it out.  The setup is pretty straight forward, so I’m not going to cover that right now.  If you specifically want me to write a post or do a video about it, respond in the comments below.

I love the control that I have – The options are pretty sophisticated: you can make an application available online only or online and offline.  When you make one available offline it creates a Start Menu option for you.  You can select Prerequisites, like the .NET Framework version, and where to download them if they aren’t present at install time. NOTE: Some caveats may apply to that, like needing administrator rights to install the Framework.

I love Automatic Updates – You can configure the application to automatically check for updates, the exact feature I needed.  You can configure when to check for updates, how often, etc.  You can even configure it NOT to check for updates.  I set mine to check for updates every time the application starts, which will prompt the user to install the new version before the software executes.

I love that users without administrator rights can install apps – This is a huge win for us.  We did a little testing and found that a user without Administrator rights can install these applications.  I presume this is because they operate in some kind of a sandbox, but I don’t actually know.  Pssst: if this is a bug, please don’t tell Microsoft – I love this feature!

Again, I was struck by how easy all this was to setup and configure, and once again I’m beating myself up for all the time I spent NOT using a supplied feature.

What I don’t love about ClickOnce

So far I have discovered two things I don’t like about ClickOnce: the first is that while I can easily create a desktop shortcut, I don’t seem to have any control over the Icon that gets displayed.  Even more strange is that the icon that is being displayed is a Blend icon of some sort.  It seems to me that this would be a pretty common requirement, so I’m surprised there isn’t a readily apparent way to assign an icon.

But far worse than that is the fact that conventional wisdom says that ClickOnce applications can’t handle command line arguments.  This was a deal breaker for me: virtually all of our desktop apps need to be executed from AS/400 sessions.  These sessions pass arguments into the applications via the command line, and losing that capability would negate most of the value of the software.  While I’m sure I’ll figure out the Icon issue, the command line arguments problem needed addressing immediately.

Command Line Arguments

So it is not entirely true that ClickOnce applications can’t handle command line arguments, but until .NET 3.5 SP1, they could only handle them as query string parameters.  This underscores the fact that ClickOnce is a heavily network dependent technology.  You may get an application that installs on your machine with a Desktop Shortcut, but this is still a network deployed application, and as such it relies on some URI scheming.  For me, this isn’t going to help much, so what I was after was the ability to pass in arguments in offline mode using a more traditional approach, like C:\> MyApp.exe arg1 arg2 arg3

I want to get to the nitty gritty of the blog post, so I won’t go into all the details, but here are a few things you need to know:

  • You have no idea where the app is actually installed.  If you do manage to find it, it will have a user-unfriendly name
  • The Shortcut name is the same as the “Product Name” field in the Publish Options Description in the ClickOnce configuration
  • The Shortcut on the Desktop has a special extension: .appref-ms
  • The easiest way to execute the application from the command line is like so: C:\> %userprofile%\Desktop\AppName.appref-ms
  • If your “Product Name” has spaces, you will need to wrap that in double quotes: C:\> “%userprofile%\Desktop\My App Name.appref-ms”

What would be perfect is if I could just append the Command Line Arguments to the end of that call, so it would look like this: C:\> “%userprofile%\Desktop\My App Name.appref-ms” arg1 arg2 arg3

Try it out, though, and you’ll quickly find that this does nothing: the standard args string array is empty.

Not A New Problem

Naturally I hit the Interwebs in search of a solution, I mean, it has to be out there, right?  I was quickly discouraged though to find hundreds of references all saying the same thing: you cannot pass command line arguments to an offline ClickOnce application.

Go ahead, go search for yourself, I’ll wait.

See what I mean?  The question has been asked a million times all with a resounding NO as the answer.  I was about to give up when I spotted something that gave me hope.  An article on MSDN entitled How to: Retrieve Query String Information in an Online ClickOnce Application has a note block with the following text:

Starting in .NET Framework 3.5 SP1, it is possible to pass command-line arguments to an offline ClickOnce application. If you want to supply arguments to the application, you can pass in parameters to the shortcut file with the .APPREF-MS extension.

That sounds like exactly what I want!  Problem is, I’ve already tried that and it doesn’t work.  And naturally, there is no related article on MSDN telling me how to do it, just that it can be done.  Finally, something to give me a little hope!

Finally, I hit the mother lode: an article by RobinDotNet explaining How to pass arguments to an offline ClickOnce application.  Robin’s blog is all about ClickOnce, and interestingly enough I found plenty of earlier posts and forum entries by Robin stating this couldn’t be done, even as late as January 2010, long after .NET 3.5 SP1 was released.  I’m not criticizing, but I am pointing out that even to those “in the know” it would appear this is a non-documented feature.

A Simple Solution

So I read through RobinDotNet’s post and it seemed like a lot of stinking work, and I try to avoid that as much as possible!  She explains a bunch of stuff I didn’t need, like how to locate the shortcut using SpecialFolders, and ho
w to programmatically execute the application.  She even discusses how to create and pass the arguments.  Good stuff, but overkill for me.

There is one key line of code I found in her post that was exactly what I needed:

//Get the ActivationArguments from the SetupInformation property of the domain.
string[] activationData =
  AppDomain.CurrentDomain.SetupInformation.ActivationArguments.ActivationData;

What I found is that this will return the arguments provided on the command line.  Well, sort of …

From the code above you can see that ActivationData is a string[].  At first, I assumed I would be able to simply replace the old e.Args with this value, but I found that only the first argument is available in ActivationData.  I don’t know why this is, and it doesn’t make sense, but all my testing proved this out.

To solve this, I changed the way the arguments are passed in by making them comma delimited.  It doesn’t seem to matter what delimiter you use, as long as it isn’t a space.  Then, I parse ActivationData[0] using Split.  In the code sample below, I am also checking to see if this is a ClickOnce application and checking for NULL, the default value of ActivationData if no arguments are passed.

string[] args = null;
if (ApplicationDeployment.IsNetworkDeployed)
{
    var inputArgs = AppDomain.CurrentDomain.SetupInformation.ActivationArguments.ActivationData;
    if (inputArgs != null && inputArgs.Length > 0)
    {
        args = inputArgs[0].Split(new char[] { ',' });
    }
}
else
{
    args = e.Args;
}

I assume if I wanted I could still deploy this with a traditional MSI, so doing it this way supports compatibility with a traditional command line execution. In this case, I am parsing it to build another string[] because I have existing code that works with Command Line Arguments.  This example is executing inside my WPF application’s App.xaml.cs file’s Application_Startup event handler.

Getting it to work in .NET 3.5 SP1

In order to get the code above to compile, you will need to add a reference to System.Deployment.Application, which is in System.Deployment.dll.  If you are coding against .NET 4.0, this DLL is available in the “Add Reference -> .NET” dialog.  When I tried to add the reference to an existing .NET 3.5 application, the DLL was not available in the list.  I thought this was a little strange, since the documentation claims it is supported as far back as 2.0.

I did a little digging and found the DLL location.  I was then able to Browse for the DLL and add a reference to it manually and everything seems to work:

C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Deployment.dll

The Results

The results are just what the doctor ordered: I can now call my application from the command line and pass it arguments like so: C:\> “%userprofile%\Desktop\My App Name.appref-ms” arg1,arg2,arg3

It’s not perfect, but it is easy.  The biggest change is sending all the arguments as a single string, but that is easily handled.  Now if I can just figure out that Icon …

Categories: .NET

Free Blend Event: Blend-O-Rama!

June 15, 2010 4 comments

I’m happy to announce an event that I have been working on with Kevin Griffin, president of the Hampton Roads .NET User Group (HRNUG).

One of the frustrating things for me as a Blend Speaker and self-proclaimed “Blend Evangelist” is that at most Code Camps or User Groups I just don’t feel like I have enough time to really dig in and show as much Blend goodness as I would like.  And my presentations always run long because I’m just so excited and I hate to leave anything out!

Last year I was lamenting the situation to Kevin, and he joked around and said we should have a “Joel Camp” so I could talk about Blend all day long.  We’ve had a lot of laughs about that ever since, but as time went on we got a little more serious about it.  After one Code Camp, where I had submitted 5 separate Blend presentations, the idea of a “Blend Camp” became something we were seriously discussing.

That was last fall, and no one’s schedule was allowing any such event to go forward.  Intrigued by the idea, I also began thinking about putting a site together dedicated to hosting Blend Tutorial Videos.  I even purchased a domain name and some hosting access, but time and laziness being what they are, I never got very far in the project.

Meanwhile, Back at the Ranch…

So between all the Code Camps and other things going on in the Mid-Atlantic, the idea of an all day event just kept losing ground.  Fortunately, Kevin never quite forgot the idea and he came up with a viable alternative: instead of one long day, what if we did a week of lunch and learn webcasts? That’s great! I can do that! 

And so I am proud to announce the first ever Blend-O-Rama! Kevin and HRNUG are going to host the event on LiveMeeting, and I will be giving the presentations.  We are going to do one presentation each day, Monday through Friday, July 19th – 23rd,  from 11:30 to 1pm EST.  Each day will cover a different topic:

July 19th – An Introduction to Expression Blend
Microsoft Expression Blend is the premier GUI editor for WPF and Silverlight applications.  In this presentation you will receive an introduction to the Blend UI and how to use it to quickly and easily build an application interface.  Topics will include Configuration, Layout Controls, how to leverage Blend with Visual Studio, and more.

July 20th – Data Binding in Expression Blend
Data Binding is one of the key features of WPF and Silverlight.  This presentation demonstrates and explains the Data Binding tools and features of Blend.  Includes discussions of Data Context, Value Converters, Element Binding, Sample Data and more.  With these tools you really can bind anything to anything.

July 21st – Templating in Expression Blend
An introduction to using Microsoft Expression Blend to leverage Templating in WPF and Silverlight applications. Templates provide a powerful way to enact GUI changes in the application presentation layer without requiring code behind manipulation. The power of Templating provides unlimited potential for enhancing your GUI.

July 22nd – Animating Business in Blend
Discusses how to use animation to enhance line of business applications and demonstrates how to create and employ them in Blend. Topics will include Animations, Triggers, Events, and the Visual State Manager.

July 23rd – Advanced Topics in Blend
Discusses how to take Blend to the next level. Topics will include Behaviors, Graphic manipulations, Audio and Video, Theming, and more.

Registration is now Open

The most awesome news of all is that, thanks to HRNUG, this event it totally FREE!  Registration for the event is now open.  You can also click on the banner in the sidebar or this page, or watch Kevin’s website or HRNUG’s website for more details.  Please pass the link around, tweet about it, etc., everyone is welcome!  And through the magic of LiveMeeting we will be fielding questions from you the audience!

Drum Roll Please …

I’m probably going to regret this later, but remember that Video Tutorial website I mentioned above? Today I am officially announcing that I will launch the website during the event.  Who knows, it worked for getting my certification: maybe setting a date will be the motivation I need to finally get the website going!

Categories: .NET

Code Snippet Basics – now with NUnit!

May 27, 2010 6 comments

Download the NUnit Code Snippets.


As I was working through using NUnit for the first time, I started to notice that the majority of the tests I wrote followed this pattern:

var expected = someValue;
var result = methodUnderTest();
Assert.AreEqual(expected, result);

Realizing that I was liable to write hundreds, if not thousands, of these tests, I decided this was an excellent opportunity to finally try my hand at writing Code Snippets.

Code Snippets

If you Code Snippets are old hat to you, skip on to the next section.  If you haven’t used Code Snippets yet, you are in for a real treat.

I remember the first time I saw Code Snippets.  I was at a presentation at VSLive! in 2005, and the presenter kept making code templates (seemingly) appear out of nowhere.  Then he was able to quickly tab through them and fill in bits of the code.  I immediately recognized how cool this was, and a few code snippets in particular have become second nature to me.

If you aren’t sure yet what I’m talking about, try this out. Open a project in Visual Studio.  Go to a class, and just inside the class declaration type the letter “c”.  Intellisense should popup with something like this:

CodeSnippetIntellisense

What we are looking for is anything with the orange box icon: this indicates a Code Snippet.  If you select that item and press Tab, Visual Studio will place a template in your code.  This template may even have defined sections that you can navigate with the Tab key and fill in with the correct data.

You can search through the library of snippets by going to Tools –> Code Snippet Manager.  This will open a window that will allow you to browse your snippets.  For starters, expand the C# folder and you will see it is chock full of goodies.  Here are a few that I use all the time:

  • ctor – this snippet will insert an empty Constructor
  • prop – this snipper will create an automatic property and allow you to easily fill in the return type and name (also check out propg, which will make the property setter private)
  • foreach – lays out the template for a foreach loop (you can also use for to insert a traditional for loop.)
  • try – inserts a try…catch… block template.

There are many more shipped by default with Visual Studio.  You can also import snippets from a different source, which we’ll discuss in a little bit.

Writing your own Code Snippet

A Code Snippet is an XML file that lays out the rules for inserting this block of code.  To create one, just create an XML file and name it whatever you like with a .snippet extension.  The name of the file doesn’t matter, but I named mine based on the snippet shortcut, so “nutm.snippet” for Code Snippet nutm.  When you edit it, of course it has to conform to the snippet standard.  I don’t claim to be an expert: I just found a couple of samples on line and butchered them until they did what I want.  All in all it was pretty easy. If you are really interested in trying this yourself, I suggest you read the MSDN Documentation – Creating Code Snippets.

For my purposes, I created two Code Snippets.

  1. nutf – creates an NUnit Test Fixture (the class that holds the Unit Tests)
  2. nutm – inserts an NUnit Test method. 

Here is what the snippet XML looks like for nutm, the Code Snippet for inserting a Test Method:

<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <Title>NUnit Test Method</Title>
      <Author>Joel Cochran</Author>
      <Shortcut>nutm</Shortcut>
      <Description>Inserts an NUnit Test method</Description>
      <SnippetTypes>
        <SnippetType>Expansion</SnippetType>
      </SnippetTypes>
    </Header>
    <Snippet>
      <Declarations>
        <Literal Editable="true">
          <ID>method</ID>
          <Default>Method</Default>
          <ToolTip>Insert the Method name you are testing.</ToolTip>
        </Literal>
        <Literal Editable="true">
          <ID>scenario</ID>
          <Default>Scenario</Default>
          <ToolTip>Insert the name of the scenario you are testing.</ToolTip>
        </Literal>
        <Literal Editable="true">
          <ID>expectedBehavior</ID>
          <Default>ExpectedBehavior</Default>
          <ToolTip>Insert the expected behavior of your test.</ToolTip>
        </Literal>
        <Literal Editable="true">
          <ID>expectedValue</ID>
          <Default>ExpectedValue</Default>
          <ToolTip>Insert the expected return value for this test.</ToolTip>
        </Literal>
      </Declarations>
      <Code Language="CSharp">
        <![CDATA[
      [Test]
      public void $method$_$scenario$_$expectedBehavior$()
        {
            var expected = $expectedValue$;
            var result = _instance.$method$();
            Assert.AreEqual(expected, result);
        }

      $end$]]>
      </Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>

Importing a Code Snippet

There are lots of Code Snippets available online for download, including my NUnit Code Snippets.  Whether you are writing your own snippets or importing them from somewhere else, you will need to go through the same process to make them available to Visual Studio.  Once you have the snippet on your local machine, just follow the documentation.

I will share a frustration with you: I had no way of knowing whether or not my Code Snippet was valid until I tried to import it into Visual Studio.  If the format is invalid, the Code Snippet will simply not import, and that is all the help you get.  Once the format is acceptable the import goes off without a hitch.  Abd that’s all the help Visual Studio will give you.

Using Your Code Snippet

Now that your Code Snippet is installed, you use it just as we defined before: enter the snippet shortcut, press Tab, and watch the magic!  Unfortunately, there is one bit of bad news.  Intellisense does not show your snippet in its listing.

At least, it doesn’t for me: that’s not to say it can’t, but more that I don’t know how to make it show up in Intellisense.  It’s possible that there is a way to define it in the XML, or perhaps it is ReSharper intruding on Intellisense a little (although I doubt it.)  In either case, I don’t know how to do it: but if you do, please post it in a comment below!

Categories: .NET

Richmond Code Camp 2010.1 Coolness

May 22, 2010 1 comment

As I write this, I am at Richmond Code Camp 2010.1.  If you read this blog regularly, you’ll know that I think code camp is a lot of fun, and Richmond is no exception.  This is my 4th Richmond Code Camp and it is always a top notch event.  This time in particular is special for me because I was asked to be on the Planning Committee. 

It’s very cool to watch an event like this build from the inside.  It’s probably a little cliche, but you really can’t appreciate all the work it takes to successfully pull off an event like this until you’ve seen it from inside the ropes.  And it is truly rewarding to know that I contributed something that was helpful and appreciated.  Kudos to the rest of the team: they are very very good at running this event.

I Love Learning

I can’t tell you how much I enjoy a good presentation.  I admire people who are knowledgeable enough in a tech area to teach others and are willing to freely do so. I especially appreciate it when that knowledge comes from real world experience.  I also think it’s fantastic that so many developers are passionate enough about their craft to spend precious free time coming to code camps and user group meetings.

Even when the presentations are not specifically applicable to my current projects, I still get a lot out of them, but there is nothing like sitting in a presentation on Saturday and being able to use the information on Monday.  This time at Richmond, I hit the trifecta: I sat in 3 sessions in a row that will increase my skills and abilities on Monday.  Considering I could only attend three because I was presenting at two, this was a real treat.

First was Andy Leonard’s “Database Design for Developers”, where I saw some really cool scripting tricks for SQL database generation.  Perfect timing since I am working on just such a project.  Second was Dane Morgridge’s presentation entitled “Getting Started with Entity Framework 4” – also perfect timing since I am using EF4 for the first time.  Dane and I even got together later and geeked out over using StructureMap for Dependency Injection and a new CodePlex project he’s working on (write up coming soon!)  Finally, a great time was had by all in Curtis Mitchell’s session on Distributed Version Control using Mercurial, which I wrote about recently.  Thanks to him and Dugald Wilson I finally got my head around branching!

More Rewards

As much as I enjoy presentations, I have to admit I enjoy giving presentations even more.  I get a lot out of the experience: honing my skills, considering questions that never occurred to me, camaraderie, meeting people, and the list goes on.  Today, though, I experienced some extra coolness in the form of two encounters.

This morning I was standing near the speaker wall looking at the schedule when someone came up and stood next to me.  They looked at the wall, they looked at my badge, looked at the wall, looked at my badge, and asked if that was me on the wall.  I said yes, and he said “I read your blog!”  I think it was the first time I was ever recognized in relation to this blog, and best of all he was very excited about meeting me.  He even recalled the series I wrote about taking the Graphics Design class at the local community college.  It was a nice experience: he was happy and it made me happy!

Another bit of coolness happened after lunch when I ran into a coder I’ve know for a couple of years but hadn’t seen for a while.  I asked how he was doing and what he was working on, and he said that he is the only one in his office who knew anything about Blend, so he was in charge of their current WPF application development.  Then he said something way cool: he said he had seen me present a couple of times on Blend, and that it was because of me that he was doing what he id doing now.  Wow!

Personally, I’m just blown away: thanks to both of these guys for making today a great day.  It means a lot to think that my little contributions are helping people.  It really is a true reward.

Categories: .NET

MIX10 Favorites

March 17, 2010 1 comment

I think it’s awesome that the MIX10 presentations and keynotes are recorded and published for all the world to see.  While it obviously doesn’t replace the experience of being there, it certainly eases some of the pain a bit! 🙂

As part of the #NotAtMix crowd, I will be living vicariously through my Tweeps’ posts and the online sessions.  This post will be a repository of the must see videos from MIX.  I should be updating it several times this week, so be sure to check back once in a while for changes.

Day 1 Keynote

Odds are you already saw the Day 1 Keynote: I was fortunate enough to be able to watch it livecasted, and the excitement in the room was very evident at the time, largely by the Twitter traffic.

The big news, of course, is Windows Phone 7.  I’ve never been much of a phone guy: I did quite a bit of PDA and WM5 development when it was new, but it fell out of favor for me and my company.  Phone development just never appealed to me – until now.

I mean, seriously?  Silverlight on the Phone?  You mean I can use the same language and dev tools, not some weird subset?  Scott Guthrie said “This isn’t Silverlight Lite, this isn’t Silverlight Different: this is Silverlight.”  Oh, and in case you haven’t heard – the tools to develop WP7 are free, now and forever.

The implementation of this is mind blowing.  I already have a couple of apps planned for our line of business.  I can’t wait to get my hands on some real hardware. 

Understanding the MVVM Pattern

Laurent Bugnion of IdentityMine gave a stellar presentation on Model View ViewModel development.  I’ve been doing MVVM for a while now, at first unintentionally and more recently as the result of a formal effort, and I’m a big believer in separation of concerns.  My recent presentations typically include a little MVVM because I’m believing more and more that this should be one of the first things a new WPF or Silverlight developer learns. 

Overall, I’d say I’m pretty comfortable with MVVM … or so I thought!  I really got schooled today, and I loved every minute of it. I even learned a couple of things about Blend!  I’ll be watching this video more than once, and I suggest you do the same.

Categories: .NET

Giving Back at Southern Maryland Give Camp

March 16, 2010 Comments off

Hey Folks, I’ve mentioned before that I will be participating in the first Give Camp in the Mid Atlantic region, the Southern Maryland Give Camp.  The event is this weekend, so I wanted to give one more plug in hopes of finding a few more volunteers…

What is Give Camp?

Give Camp is essentially “Coding for Charity”, an opportunity for us geek types to help out nonprofits by donating valuable programming time and resources.  This weekend event promises to be a real challenge: basically 48 hours to design, develop, and deliver real world applications that otherwise the nonprofit agencies could not afford.  Of course, it will also be a great chance to socialize with other developers: I for one expect to learn a lot in the process!

Cool, give me the details!

The event is fast approaching: this weekend, Mar 19-21, a slew of developers, DBAs, designers, and other volunteers will be descending on St. Mary’s College of Maryland.  As of this writing there are 87 registered volunteers for 19 nonprofit projects.  That sound great, but we need 100!

Obviously, the more people we get the more good we can do, but there are a couple of added bonuses if we hit that mark.  First of all, the event organizer, Jim Pendarvis, has promised to have his head shaved on a live video stream and then posted on YouTube!  In addition, our beloved Microsoft Developer Evangleist, G. Andrew Duthie (aka The DevHammer), has promised to have his head shaved into a Mohawk  – although he declined to have the same done to his mustache 🙂

Whatever your motivation, the event could sure use your help!  Go sign up today!

Other Give Camp News

You can follow the event at SOMDGC, and the official hashtag will be #DCAGC.

You can read the University’s press release about Give Camp.

Categories: .NET

Code Camp Season Opener

March 15, 2010 Comments off

Wow!  This past weekend was the 2010 edition of Roanoke Code Camp, and let me say what a fantastic way to start the season!  I’ve been jones-ing for a Code Camp for a while now since my last event was CMAP Code Camp back in November.

Over the last few years, Code Camps and similar events have become vital to my health as a developer.  Beyond the technical knowledge available at the presentations, there is a real sense of camaraderie that exists among the attendees.  This morning back at work someone asked me how the weekend went and I said “Great! It was a weekend full of Geekdom!” 

The Value of Geekdom

I’d be willing to bet that most of us aren’t surrounded by other geeks on a regular basis.  Even for me, working at an ISV where software is our business, I am alone in my geekness.  For others it must be far worse: stuck in an IT shop or on a business team where others don’t appreciate or understand the need for geek.  In most business environments, we stand apart.

But at an event like Code Camp, we are but one of many.  While we should all treasure and embrace diversity, it is nice once in a while to be among one’s own!  I had several highlights this weekend, like Alan Stevens’ wonderful presentation “Does your Code Tell a Story?”, but I want to share with you the unexpected high point of the trip for me.

Kevin Griffin and I rode part of the way together, and on the way back we had an awesome discussion about the database design for a new project I am beginning.  We were not in agreement on how to approach the problem, each one passionate about his viewpoint, so the conversation was very lively – and educational.  It really challenged me to rethink how I look at database design and confirmed something I already knew: I don’t know enough about SQL Server.

But the best part was at the end.  I came to the realization, and shared it with Kevin at the time, that THIS was why we need community.  That conversation would have never happened inside the walls of my company.  And it wouldn’t have happened on Twitter or on a forum because it was spurred by a random comment in a face to face conversation. 

And there it really is: we need to guard against cloistering ourselves in our own technology.  We need real, human interaction.  And we need to have those conversations, whether it’s about the tech du jour, or process, or what have you.  We need community time with fellow geeks.

More Geekdom!

I often write about why you should go to Code Camps and User Groups, and I will probably keep doing so as long as they keep having a profound effect on me.  And you know what?  So far I haven’t been let down.

As I said, this was just the season opener: there are plenty of community opportunities coming up this year.  Here are a couple coming up in the near future I plan on attending:

And of course, these don’t include all the possible User Group meetings!  So as always, this is my challenge to you: do yourself a favor and get involved. Find a User Group in your area and check it out. And while you are at it, be sure to join the newly created Mid Atlantic Developer List

So, what are you waiting for? Join a User Group, go to a Code Camp, see some great presentations and meet some great people. Immerse yourself in Geekdom for a day: I’ll bet you’ll like it!

Categories: .NET