Scott Hanselman

The Weekly Source Code 3

August 29, 2007 Comment on this post [10] Posted in Source Code
Sponsored By

In my new ongoing quest to read source code to be a better developer, I now present the third in an infinite number of a weekly series called "The Weekly Source Code." Here's some source I'm reading this week that I enjoyed.

  • 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.
  • - 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.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service
August 29, 2007 16:42
There are lots of source code to be found at the - Open Source Alternative. However, it is in the shape of software packages that are alternative to well-known commercial software products. E.g. 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.
August 29, 2007 18:49
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
August 29, 2007 22:39
I didn't know about 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 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.
August 30, 2007 0:59
Hey Thomas. I just went to . 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.
August 30, 2007 8:17
While not strictly source code, reading standards can also make you a better developer... like the new draft of OpenID v2: (since being a better developer isn't just about writing code).
August 30, 2007 11:17
For the readers interested in finding open source code I would like to recomment 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!
August 30, 2007 18:42
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...
August 30, 2007 20:31

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...?
September 03, 2007 13:33
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..)?

I'm also eagerly waiting for your answer on Mathews question.
September 06, 2007 2:18
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.

Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.