Posted by Shawn Oster on 2/26/2008 7:39 AM | Comments

Anyone that's using my Zune Marketplace Mp3tag source will probably want to upgrade to the latest version of Mp3tag, which as of today is 2.40!  I've been using the beta version for awhile and the tagging dialog is much better than in the original 2.39 release, easier to tag those albums where you only have a few of the tracks.

Get it from the official download site.

In a related note I've been using Mp3tag for about 2 years and I finally pulled the trigger and donated some dosh to this excellent free program.  Thanks to Florian Heidenreich for continuing to create such a great product!

Posted by Shawn Oster on 2/20/2008 8:47 AM | Comments

I'm starting to see more ASP.NET MVC samples and questions come out and I'm realizing that a large portion of the ASP.NET crowd doesn't even realize that a huge reason for the MVC movement is because of the Ruby on Rails framework.  A lot of new .NET MVC developers are struggling with architectural questions that have already been debated and answered in the Rails community, which makes Rails a great resource for when you're first starting out or you're curious how to handle certain situations, like nested resources or how to structure your controllers.

Speaking of controllers one great thing from Rails that I hope more MVC developers embrace is REST.  Instead of repeating everything just watch David Heinemeier Hansson's keynote speech from RailsConf back in 2006.  Sure, it's almost two years but for ASP.NET developers it may as well be yesterday.  I'd suggest starting from the second part since the first segment is just normal conference ra-ra-ra.

Check it out here (don't forget to download the slides that he refers to here).


He talks about using a semi-colon in the URL to denote an aspect/action of a controller, like this:


Well, you can ignore that and just assume he *really* meant to say:


They dropped that semi-colon silliness in Rails 2.0 and it feels much cleaner.

Posted by Shawn Oster on 2/8/2008 7:08 PM | Comments

Often you'll need to represent some hierarchical or parent-child relationship in your application and one thing you'll struggle with is how to cleanly mesh both the parent and child controllers yet keep them nice and RESTful.  The secret is in good routing.

The problem

A popular example is tickets belonging to events (event as in Burning Man, not OnClick) and you want to get all the tickets for a certain event, as well as be able to work with just tickets or events.  You want nice and pretty urls as well, so you're hoping for something like this:

/events/1/tickets all tickets for event 1
/events/1/tickets/new add a new ticket for event 1
/tickets/list all tickets for all events


The Messy Way

My first idea was to add a Tickets action to my Events controller so I could call EventsController.Tickets(int eventId) but that didn't really help when I wanted to view all the tickets for all the events.  Plus it broke the whole REST idea and that's bad for maintainability.

My second idea was a butt-ugly url along the lines of /tickets/list?event_id=1 but that just kicks the whole MVC, SEO-friendly url philosophy in the nuts.  Repeatedly.

The Routes Way

A Big Thanks goes to Adam Wiggins whose post about nested resources finally set off the lightbulb in my brain.  Instead of trying to make my controllers do all the work why not take advantage of the actual mechanism that's there to handle these sorts of things and put it to use.  That would be the routing mechanism that makes all your urls pretty and dictates which controller does what.  Here is the way to keep your urls pretty and to have both a separate Events and Tickets controller yet still maintain the cool parent/child relationship:

[code=csharp]RouteTable.Routes.Add(new Route { Url = "events/[eventId]/tickets/[action]/[id]", Defaults = new { controller = "Tickets", action = "List", id = (string)null }, RouteHandler = typeof(MvcRouteHandler) });[/code]

(yes, I know, my code formatting sucks, I'll update it this weekend)

Once I discovered this I smacked myself on the forehead for not realizing just how simple this whole thing was.

Posted by Shawn Oster on 2/6/2008 6:36 AM | Comments

I just saw a quote from Joe Rosenberg via the MSFTextrememakeover that included one of the most asinine and scary things I've ever heard about Microsoft:

Rosenberg said. "The company has lost sight of its principal focus, which is to produce value for shareholders."

What's scary is that this is from a "Chief Equity Strategist" yet after this quote I wouldn't trust anything this guy has to say about money or investing because if there is one common theme among the most successful companies and individuals it's that their primary focus is to do what they love and to be the best at doing it.  Once you start chasing money for moneys sake the game is over and you're done ever making any type of substantial financial gains.  Rosenberg should know this and if he doesn't perhaps he needs to pick up a BusinessWeek and read this article, "The Secret Behind Trump's Success".

So if you ever find yourself starting a venture simply because you think it'll net you millions or because you're secretly hoping you'll be bought out then stop, take a breath and get a grip on reality.  If you really want to make money find your passion and be the best at it, do everything you can with it, surround yourself with others who share the passion and push that passion, be uncompromising with it and don't change your vision to fit into a committee or shareholder view.

Posted by Shawn Oster on 2/5/2008 12:15 PM | Comments

Given that the current (and past) Zune software lacks any decent metadata editing I've been using Mp3tag to adjust the various tags as well as grab album art.  One cool feature of Mp3tag is that you can look up album information from a variety of online sources, most notably Amazon.  From there you can grab track listings and album art to help flush out your metadata.

Only problem is that sometimes the Zune Marketplace files an album differently than Amazon which means it won't show up correctly in your ZuneTag (see mine in the upper-right).  After poking around with Mp3tag's extensible "web sources framework" and using Fiddler to watch the HTTP traffic to and from I cobbled together a Zune source that will pull down the exact album information as listed on the Marketplace as well as the album art.

There is a bonus as well, I believe just made their 800x800 album art available via the back-end service I'm using so now you can grab full 800x800 album art even on tracks you didn't purchase directly from the Marketplace.

Just download and extract the single Marketplace.src into your %appdata%\Mp3tag\data\sources folder and you'll be rocking! I'd also suggest you download the very latest beta of Mp3tag because the tag sources (what Marketplace plugs into) dialog is much easier to figure out for first timers, plus I always include the artist in the track listing and version 2.39n supports splitting this into the correct tags.


If anyone actually uses this and needs help getting it up and running just drop a comment.


Thanks to Scott for catching something I should have mentioned but completely forgot.  The Zune software can't read ID3v2.4 tags, instead it can only handle ID3v2.3 so after you first install Mp3tag follow these steps:

  1. Go to Tools | Options
  2. Navigate to the 'Tags', then Mpeg options in the left-hand tree
  3. Set Write to ID3v2.3 UTF-16
  4. For those that like pretty pictures:

Posted by Shawn Oster on 2/4/2008 8:44 AM | Comments

I'm a big fan of SubSonic, a ORM/DAL generator slash utility belt of goodness.  Like any tool there is a little configuration and setup you need to do to get everything rolling and while Rob Conery has some great podcasts on doing just this sometimes you just need to remember that one little option vs. wanting to watch a 10 minute podcast again, regardless of how melodic and sweet are the dulcet tones of Mr. Conery's voice.

1. Download and Install SubSonic.

Seems simple but hey, some people need to be told everything :)

2. Create SubSonic DAL as an external tool

Even though SubSonic supports Rails-style auto-gen of your DAL via build providers I like putting my model/DAL in a separate class library and sadly build providers don't play well with class libraries. 

Go to Tools | Externals Tools... click "Add" and make it look like this:

  • That command is your path to sonic.exe
  • If you're working with the MVC Toolkit (and why aren't you?) then change "App_Code\Generated" to "Models\Generated"

3. Create SubSonic DB as an external tool

SubSonic can also version and script your database, very useful for source control and distributing your application.  Same as above but make it look like this:

4. Install SubSonic Schema

I dislike any warnings during a build and one you'll get with SubSonic is it not knowing about the SubSonic config sections.   I did a blog post on how to fix this awhile back but I'm repeating here for the lazy (like myself):

  1. Download SubSonicSchema.xsd (if you right-click to download make sure you save it with an xsd extension)
  2. Put it in C:\Program Files\Microsoft Visual Studio 8.0\Xml\Schemas (adjust accordingly for VS2008)
  3. Edit DotNetConfig.xsd in the same folder and add the following line:

    (I added it right underneath the <xs:schema> opening tag, seems to work.  Also, if you're using Vista you'll need to edit DotNetConfig.xsd in an editor that was started with right-click, Admin, otherwise it'll write a copy of the xsd into the Virutal Store and your changes will never take effect.  Trust me, I learned this the hard way.)

  4. Close Visual Studio if it's running, re-open, ta-da you now have IntelliSense as well as no more annoying "Could not find schema information for..." messages.

5. Install SubSonic code snippets

You add various sections into your web.config to wire up the magic and nothing is more boring than typing the same poop over and over again.  I created some snippets that provide the various bits that you can download here (actually not quite yet since the bits are at work and my VPN is broken right now).

And Bob's your Uncle, you have all the boring schtuff out of the way and now you're ready to start genning ya some code.  If you don't actually know how to start genning your code then I'd suggest watching some of those screencasts I mentioned above.

Tags: | Posted by Shawn Oster on 2/1/2008 6:57 AM | Comments

I'm one of those people that enjoy rebuilding their machines every so often, either for performance reasons or just because I like to tidy things up.  I rarely keep software installs around since there are usually newer versions by the time I re-pave my machine so this is my "must have" list of software I reinstall every time, in one easy place for my future self to grab the downloads from.


  • CCleaner - My favorite registry/file cleaner.  I run it at least a few times a week.
  • Trillian - Pretty much the one and only IM client.  It supports all major IM networks and the 4.0 beta version eve handles GTalk and MySpace so there really is no need for anything else.
  • Virtual CloneDrive - It's what I use to mount ISO's on anything from XP to Vista, though I hear MagicDisc does a great job as well.
  • Windows Live Writer - It's what I use to write my blog and it rocks, seriously easy.
  • Windows Live Photo Gallery - Great for tagging photos and includes built-in uploading support.  Really polished looking.
  • FeedDemon - My RSS reader of choice, if you only use Google Reader you're missing out on some really great features.  Awesome support for offline feeds and they just made it free!
  • ClipX - Great clipboard history manager.
  • Window Clippings - I'm always taking screenshots for various things, either blogs or product help or just to send off to a client to show them what they should be seeing.  Free, easy and awesome.
  • Password Agent - New - There are a slew of password vaults out there but for some reason I keep coming back to this one.  It doesn’t try to offer every feature under the sun, just the ones I need.

General Development

  • TortoiseSVN - Best subversion client I've used so far.
  • Intype - A TextMate-like clone text editor that I've started using more and more.
  • TextPad - Until Intype matures some more I still need a lot of the great features in this text editor.
  • Sysinternals Suite - When you need to know exactly what's going on in your system these tools will help you explore the plumbing.
  • Ruby - A beautiful scripting language that I find myself using more and more for little tasks that I used to write applications for.
  • Virtual PC 2007 - Because sometimes you just need to test on a different or clean OS and this is even better than a lab full of machines.

.NET Development

  • mbUnit - I find myself preferring mbUnit to NUnit to unit testing.
  • NCover - Ever wonder just how much of your application is actually being tested?  Here you go.
  • TestDriven.NET - Best way to run mbUnit, NCover, NUnit, etc. from inside of Visual Studio.
  • FxCop - Because it's always nice to know what the framework team would think of your code.

Delphi Development

  • GExperts - Best add-in for Delphi ever in my opinion.  Just the Ctrl-G makes it a must-have.
  • QC Plus - When you want to submit Delphi bugs or just browse the current issues the CodeGear provided QC client app sucks.  QC Plus pretty much blows it out of the water.


  • Chrome - New - This used to say Firefox but honestly I haven’t installed Firefox during my last three machine reinstalls.
  • Fiddler - When you need to debug HTTP traffic this is the tool I reach for.
  • SmartFTP -  I used to use Filezilla but honestly I'm a sucker for a good looking UI.
  • Gmail Notifier - Notifications of new Gmail messages in your tray.  Simple and useful.


I still do a lot of PHP work for a few clients so these are my "must have" tools for working with the LAMP stack.

  • PuTTY - For telnet/SSH access into a site's shell
  • SQLyog - GUI for managing MySql databases
  • LAMP Virtual Appliance - A LAMP stack in a virtual machine, with images for VMware and Virtual PC/Virtual Server.  Great for testing


  • Zune Software - Because I have a Zune and I love UI.
  • Mp3tag - My favorite metadata tag editor.
  • Winamp - Still the most powerful media player out there, plus it rips better MP3's than the Zune software since it uses the LAME encoder.
  • EncodeHD – There are a dozen if not hundreds of tools used to re-encode video out there yet oddly enough they either look like a boom box from the 80’s, are super complicated or are expensive.  This is free, open-source, requires a single installer and frankly rocks.  Highly recommended.

Uh, now I realize why it takes me so long to reinstall my machine :)

UPDATE: Okay, so I’ve updated my list for 2010, look for  - New – for the items I’ve added since I last made this list.

Posted by Shawn Oster on 1/28/2008 12:56 PM | Comments

Being a good developer is about a lot more than just slinging good code.  After you've compiled your application you've really just begun.  One important step that some developers forget is profiling.

If you're a .NET developer make sure you run FxCop over your code.  It's a free Microsoft tool that checks your code both for performance issues as well as basic coding standards such as avoiding Hungarian notation, correctly casing variables and basic good practices.  While FxCop is more geared towards framework developers it has some great performance checks and little insights into your code that can only make your applications better.  Some of my favorites are warnings about unused local variables and property collections with setters, which rarely make any sense on a collection yet are so easy to do when you're coding on auto-pilot.

If you're a .NET or Win32 developer a great must have tool for profiling and checking over your application is AQtime.  I've found more memory leaks and performance bottle-necks with this tool over the years that it's easily paid for itself many times over.  There is a lot to the tool and for the first year I used it I only used 5% of what this tool can do, and that was checking for memory leaks in our Delphi applications.  I finally explored it's profiling features when I was tweaking some XML parsing code and it really helps focus efforts one which lines of code you should really worry about vs. trying to optimize everything in sight.

Even if you don't have any coin to spend try running FxCop over your .NET code, you'll probably find a few interesting things and learn a bit about best practices.

Posted by Shawn Oster on 1/17/2008 5:45 PM | Comments

Remember that scene in Star Wars when Luke (or was it Han Solo?) cuts open that crazy goat-beast thing's belly and slides inside for life-giving warmth?  Well the .NET guys have done the same today by making the .NET Framework Library source code available for nerdly enjoyment.

When I was learning CodeGear's Delphi (still the best tool for creating native Win32 apps I must say) having the complete source to the VCL (the Delphi framework) was the best learning tool I could have asked for.  Whenever I was unsure of how to code up a certain pattern I went trolling through the source and found inspiration.   Sometimes I just browsed it for fun and other times it was a life-saver when it came to debugging and tracking down hard to find issues.

Even if you don't think you'll use it for debugging download it anyway and just browse the developer comments to see how the crew aboard a big ship like Microsoft treats their code.

Posted by Shawn Oster on 1/16/2008 6:36 PM | Comments

Just needed to reiterate my hate for the way ASP.NET WebForms munge the id attribute on rendered HTML controls.  Seriously, there is nothing more annoying than going to write a little JavaScript and wanting to grab an element by it's id and you can't because it's been turned into "cntHolder1_cntHolder2_cxtPlaceholderArea98_lblButtonMaybe".  It's obvious that whomever designed WebForms had never actually worked with HTML or CSS before.

If someone has an easy solution I'd love to hear it but this is one of the reasons I'm so excited about ASP.NET MVC.