Scott Hanselman

Garage Sales and Garage-Sale Quality Code

May 8, '07 Comments [13] Posted in Musings | Programming
Sponsored By

Z and I went garage-saling on Sunday.

(If you're not in the US, a Garage Sale is when folks open up their garages, sometimes their homes, and sell all the stuff they don't want. They are called Garage says because "Garbage"-sale doesn't have the same ring to it. Some folks just put stuff on their front lawn with a sign that says "Free," then get some drinks and sit in their driveway waiting for the stuff to disappear. This is common with old computers and printers, as well as Washing Machines.)

We were lucky on this trip. We picked up a small toy kitchen construction set made out of Toy Bricks for only US$5. Z is 17 months old now and he's getting deeper into role-playing. Here he is frying imaginary fish. 

Cartoon by Linda CauseyIt struck me how someone else's garbage, er, discarded well-loved pre-owned items, could be our find-of-the-day. The toy was used, to be sure, but otherwise intact, complete and totally useful. I hate to waste and I hate to throw useful things away when they could be passed on, so I like the idea of a garage sale.

It's charitable giving, if you do it right. The 25 cents you'll pay for a paperback isn't meant to make a profit, it's just there to keep folks from ransacking your sale.

One woman wanted $250 for a maple rocking chair. She insisted it was worth $500 new. I politely suggested that she was not only insane, but that perhaps she wasn't really interested in getting rid if the chair. I offered $100 cash, which she refused with an insulted stare. It was a shame because the chair wasn't worth more than $50 in the Real World. She clearly wasn't interested in selling it, or she got the (wrong) idea that Garage Sales can make you rich.

Why aren't there more Code Garage Sales? Sure there's a lot of code out there that is lying by the side of the road with a "Free" sign on it, you can find it on blogs (mine included) and CodeProject.

You don't have to go so far as to make an Open Source Project. You also might want to do more than just release a choice snippet. Why not try a middle place, and have a Code Garage Sale?

I think that Garage Sale-quality Code should be of a higher quality. Perhaps if there was a way to charge me a quarter when I downloaded it, it might be more like a garage sale. For me, Garage-Sale code is slightly different from code snippets in that it's complete (no missing parts) and organized on your website - like a Garage Sale.

Garage Sale Code should follow at least 4 of the 5 C's:

  • Complete - It's a whole library or application.
  • Concise - It does one discrete thing.
  • Clear - It'll work when you get it.
  • Cheap - It's free or < 25 cents.
  • (Quite Possibly) Crap - As with a Garage Sale, you'll never know until you get it home if it's useless.

There's lots of great Garage Sale code out there, but as with a real sale, sometimes you have to look for bargains. I find this kind of code more valuable than the "flea market" code snippets on (some places on) CodeProject and Google Groups. It's a shame that more companies, especially small ones, don't release their discarded code with a liberal license. All that typing, wasted. Surely someone might find part of it useful?

I like the following sites because they are PERSONAL. Again, like a Garage Sale, they are well-loved and useful things. Things that someone made for a reason, but just doesn't need anymore.

I KNOW I've missed a thousand good sites, so...

Garage Sale Code - Call To Action

If you've got a Garage Sale Code section of your blog or website, leave a comment on this post and include the link to your side in the URL text field, not in the comment itself. That way it'll get linked automatically.

If you KNOW you've got good code lying around your house, but you've just never taken the time to have a Garage Sale, now's the time to put up a section of your site dedicated to your old crap code, or just a single blog post with a zip file full of it. Get it out there so Google Code Search can get to it, and make sure there's a LICENSE block, license.txt, or comment with the word LICENSE, even if you intend to use the WTFPL as your primary license. Go have a Code Garage Sale!

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
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web
Tuesday, May 08, 2007 12:50:54 AM UTC
My garage-sale code: ObjectListView, a complete IBindingListView implementation that gives you a sorted and filtered view of any list of arbitrary .NET business objects. It's free.
Tuesday, May 08, 2007 1:07:36 AM UTC
Tuesday, May 08, 2007 5:09:30 AM UTC
http://tools.veloc-it.com/

I tend to err on the side of setting up open source projects these days though. Too many garage sales get abandoned after a few years. At least on a project hosting site like CodePlex, SourceForge, or Google Code keeps it living a while longer (yes, GotDotNet is an example to the contrary).
Tuesday, May 08, 2007 5:49:06 AM UTC
One more try, following directions this time.
Tuesday, May 08, 2007 12:37:14 PM UTC
Great idea, Scott. I have bunches I'll have to pull out of the attic sometime soon.

Here's one item that might catch someone's eye:

Silverlights Out

See it!
http://www.cjcraft.com/Blog/content/binary/silverlightsout.gif

Use It!
http://cjcraft.com/silverlight/silverlightsout/silverlightsout.html

Download It! (source code and all) [quick and dirty garage project, that's why it is so CHEAP]
http://cjcraft.com/silverlight/silverlightsout/silverlightsout.zip

Umm, Describe It!:

Lights out is a one player puzzle that is played on a 5 by 5 grid of squares in which every square has two states: on and off. The game starts off with all squares off, where the goal is to turn on every square. By selecting a square, all the surrounding squares' (up, down, left, right) state is turned toggled. For example, on a 3 by 3 grid of squares with all squares off, if the center one is selected, it will turn "on" the 4 up, down, left, right squares from it.
Tuesday, May 08, 2007 12:42:50 PM UTC
Hmm..., looks like I posted then read the instructions... :)

"If you've got a Garage Sale Code section of your blog or website, leave a comment on this post and include the link to your side in the URL text field, not in the comment itself. That way it'll get linked automatically."

I think I got it right this time. Although, I did have to use a URL compactor site since link was too long by default.

http://qurlyq.com/55 expands to http://cjcraft.com/silverlight/silverlightsout/silverlightsout.html.
Tuesday, May 08, 2007 7:27:24 PM UTC
A declarative syntax for parsing XML with .NET's XmlReader.
Tuesday, May 08, 2007 7:55:08 PM UTC
Great bargains (free code) at www.GotCodeSnippets.NET.

If you are shopping around for some small snippets of code, this is the place! Remember, these code snippets are specially designed for Visual Studio 2005.
Tuesday, May 08, 2007 8:59:32 PM UTC
A small sale from me. Included Visual XPath which is surprisingly included in Scott's list of ultimate tools :).
Tuesday, May 08, 2007 9:17:26 PM UTC
An email code generator( picture and 3 different types of hiding email by javascript)
A generator for displaying various "can be read with " for RSS
A CNP( Romanian SSN) verifier
Wednesday, May 09, 2007 2:04:54 AM UTC
Lots of little snippets in Ruby and C#.
Rumbster - Ruby Fake Email Server
Wednesday, May 09, 2007 8:03:10 PM UTC
Toldja Z would love a kitchen!
Thursday, May 10, 2007 7:45:07 AM UTC
Don't know if scripts count?

From an Admin perspective, I have a bunch of PowerShell scripts, a lot of which are focused on Active Directory management:

http:www.leadfollowmove.com
Comments are closed.

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