CodeShare Week (March 8-14th 2009)

Friday, March 06 2009

Following the example of Jeff Blankenburg’s Contribupendence Day I’d like to declare next week (March 8th-14th, 2009) CodeShare Week.  “What’s this”, you may ask?  Well, it’s just like it sounds: sometime next week share some code with someone. 

“Why”, you may ask?  For the same reason that I thought the Bitslingers event was a good idea.  After several conversations at Open Spaces events and user group meetings I find that the .NET community doesn’t really share (code) well.  Maybe we are scared someone will run off and say the code was theirs, or maybe we weren’t taught to share when we were young.  Who knows.  I think we can all learn from each other’s styles and approaches.  Sharing code gives us new ideas and exposes us to new techniques.  Above all, sharing code is a way for us to learn.

So, now you might be thinking, “yeah, I buy that, but what now?”  Glad you asked.  Sometime next week I’d like you to share some code.  It doesn’t have to be a full fledged application or wizbang utility.  It can be a short PowerShell script on how to do some task, or a favorite utility method you use in every project.  It can be how you name your unit tests.  It can an interesting factoid on a .NET Framework class with a code example.  It can be in C#, Ruby, VB.Net, Pascal, Erlang, F#, Haskel, C, C++, Fortran, Perl, or Foo (okay, so there is, surprisingly, no Foo language I could find, but you get the point.  Write it in any language).  It can be anything you want as long as there is CODE.  Ideally, you’ll share it with the world via the internet in some fashion, but just showing some of your code to a coworker and walking through it is cool too.

If you don’t have a blog to share your code on then you can use several internet services that let you do this for free:

For short snippets:

For larger projects:

Your goal is to create, or use an existing, bit of code or a small project to convey some lesson, technique or just to have a usable utility method/project to be reviewed by others.  Write up the code, post it somewhere on the internet (your blog, one of the sites above, etc.) and then advertise it.  If you don’t want to create an account at any of the services above and don’t have a place to put the code, feel free to send it to me via my contact form and I’ll post it for you with all credits given. 

Now, maybe you are thinking “But my code sucks”.  I can’t say that it does, or it doesn’t.  What I can say is that posting your code will allow others to see it and provide feedback (hopefully very insightful, concise and constructive feedback).  Even if someone slams the code down, you’ve possible learned a few things (how to improve your code for one, and also who NOT to ask for advice from in the future). 

So, go forth and sling some bits.  Write code.  Post it.  Advertise it.  Share it.  Learn.

If possible, please put a comment on this post of where you placed your code snippet.  That will help provide a centralized location of where people can come to find the code snippets from the CodeShare Week.


Friday, March 06 2009 3:02 PM Chris Roland said:

This is a great idea and great timing since Sara Ford just announced the CodePlex Open Source Club:

I think I'm going to use the project they listed for March (Rawr) as my CodeShare week contribution :)

Monday, March 09 2009 11:25 AM Greg Finzer said:

I created some code in .net to delete .svn folders:

Friday, March 13 2009 7:02 AM Michael Wood said:

I've added my CodeShare entry at


Saturday, March 14 2009 7:40 AM Michael Wood said:

@jeremyasnyder ( has posted his code share at: with a description at

Saturday, March 14 2009 10:55 AM Carey Payette said:

Sharing some WPF data template goodness at


Saturday, March 14 2009 3:34 PM Matt Casto said: - Automatic Mocking Specification

Saturday, March 14 2009 8:40 PM Mike Amundsen said:

Great idea!

Sharing my Xslt.cs helper class

blogged: []

codeplexed: []

Thursday, April 02 2009 7:53 AM Brian Carter said:

I’m late to the party; sharing a SQL Server UDF for joining ASP.Net Membership Profile fields to any stored proc. Enjoy! (

Friday, April 03 2009 5:57 AM Michael Wood said:

Thanks Brian!