Paint.NET - It's not just the world's shiniest free .NET paint program, but it's also 140,000 lines of yummy (and very well factored (in parts)) source code. It's all here. A plugin model, COM interop, a Command Dispatcher, crazy WinForms stuff, multi-platform support and even TabletPC usage. You can get the source from SkyOrb.

CoPilot.com - This is one of my favorite tools for connecting to a family member's PC when they are in trouble. Plus, it's an extension of VNC which is GPLed, so they make the source available for both Mac and Windows. Reminds me I'm happy to not be coding in C/C++ anymore.

JobObjectWrapper - I don't know why, but I love wrapper classes. I just like seeing really clean .NET wrappers to really horrible Win32 APIs. It's like watching a car crash for me; I can't look away. This is a simple API abstraction over the Win32 Job Object.

World of Solitaire - This isn't Open Source, but since it's AJAX/JavaScript goodness we can explore it. It's insane. Created by Robert at CosmicRealms, it's a brilliant and amazing piece of cross-browser DHTML.

Url Reservation Modifier - I wish utilities like this were built in. This is a GUI and a Library (separation is always nice) to modify URL Reservations in Http.sys (on systems that support it). This lets you hook up System.Net.HttpListeners as a limited user.

Feel free to send me links to cool source that you find hasn't been given a good read.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

There are lots of source code to be found at the http://www.osalt.com/ - Open Source Alternative. However, it is in the shape of software packages that are alternative to well-known commercial software products. E.g. Paint.net is mentioned as an alternative to Photoshop, but there are also alternative for Norton Ghost, Nero Burner and more. This site really helps people find high quality open source software that can replace an expensive commercial software product.

Thomas Pedersen

Wednesday, 29 August 2007 14:49:30 UTC

Hey Scott,

I love your weekly source code idea. Could you point to some source that has, in your opinion, examples of good/great Test Code.

Thanks ~matt

Matty J

Wednesday, 29 August 2007 18:39:42 UTC

I didn't know about osalt.com but it's also one of those "open source" web sites which bug me. I see many sites which mention "open source" all over the site but *WHY* do they make it so hard to find out what language they used. I am specifically talking about some of the sites osalt.com links to. As a developer interested in open source, I need to find out upfront what language is being used.

I come across many open source sites where I had to download the source, open the archive just to find out what language it's written in. It boggled me I have to go through. These are the sites which host their own source instead of using something like Sourceforge.

Then you get source which doesn't compile and no documentation on how to set the thing up. An example of a developer who's focused on coding only and not thinking on how to make it easy for others.

abdu

Wednesday, 29 August 2007 20:59:17 UTC

Hey Thomas. I just went to http://www.osalt.com/ . What exactly makes it open sources? 3 out of 4 products I checked try to sell their licences and there is no mention of sorce open or not.

alex

Thursday, 30 August 2007 04:17:09 UTC

While not strictly source code, reading standards can also make you a better developer... like the new draft of OpenID v2: http://openid.net/specs/openid-authentication-2_0-12.html (since being a better developer isn't just about writing code).

For the readers interested in finding open source code I would like to recomment http://www.krugle.com/. It will search through a lot of open source code and try to find the code snippet you're searching for. From there you can go on and explore the projects source code.

There is no ranking in how good the code is so Krugle serve another purpose than Mr Hanselman's weekly source code post. Keep them going!

I gotta say that I am very impressed with Paint.NET and I am thankful it is free. Started using it a few months ago and I like it alot! It ain't photoshop but it does the majority of simple jobs and it does them fast. I just checked out that World of Solitaire and that is also very sweet!! Thanks...

Do you have any particular method for approaching new code? For example, do you start where the program starts and then follow some sort of thread through the code, or do you read from top to bottom, or...?

Matthew

Monday, 03 September 2007 09:33:44 UTC

Hi, thanks for the list.

I was wondering if you knew any such open source sample apps that would stand out as good examples of the .NET 3.0 features (WCF, WPF..)?

Matthew - I try to pick a feature that I like from a UI perspective (if there's a UI) then walk the stack, as it were. I want to see from front to back, what happens. Then I go inside-out...starting with the Utility Classes. There's always Utility classes that someone writes as a way of saying "here's stuff the framework SHOULD have done." I think that gives one a lot of insight into the mind of the programmer(s) that wrote it.