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 SherWeb

Diabetes Walk 2007 - Blog Matching Challenge and Silverlight Presentation in Portland

May 5, '07 Comments [3] Posted in Diabetes
Sponsored By

Hopefully you've taken a look at http://www.hanselman.com/fightdiabetes and read my personal story. Many of you have donated and I appreciate it, more than you realize.

As of this blog post we've raised $13,808 in 22 days. That's 28% of our $50,000 goal! That's truly amazing, but we're not there yet.

Here's my ongoing "rolling thunder" plan to hitting this goal. There will be more ideas as we get closer to the day of the walk.

1. Portland, OR - BONUS "Silverlight" .NET User's Group Meeting with ALL proceeds benefiting diabetes research.

We're going to have a BONUS May Meeting of PADNUG, the Portland Area .NET User's Group. I'll be talking about Silverlight and sharing and demoing everything I learned this year at Mix. We're asking for a small donation for this meeting to benefit the ADA.

You can make checks out to the "American Diabetes Association," or you can paypal me at 'my first name at my last name.com.' I will be matching PayPal'ed donations personally.

The meeting is at the Corillian Cafe at 6pm this coming Thursday, May 10th, 2007. Please do join us and bring your friends. Even though we're a .NET Users Group, we're not religious zealots. Bring your Macs and Open Source Friends! Bring Python People and Ruby People! Do join us!

2. Blog "Donation Matching" Challenge

A number of folks have put this badge up on their blogs and linked it to http://www.hanselman.com/fightdiabetes or http://www.hanselman.com/fightdiabetes/donate.

Brian Hewitt, former co-worker, friend and world-traveler, wanted to a do a matching challenge, so we came up with the idea to do a 48 hour blog-matching challenge.

Starting Weds, May 9th at Noon PST until Friday, May 11 at Noon PST we'd like to ask any bloggers who'd like to be involved to volunteer to match donations that come in during that period up to a specified ceiling.

I'll keep this list updated with bloggers who are participating in the match:

If you've been hanging back and waiting for the right time to give, next Weds to Friday your tax-deductible gift will have even more kick and be doubled, tripled or more!

Let me know in the Comments of this post or in a Post on your own blog if you want to be involved in this matching challenge and I'll add your name here.

Thanks to everyone who has given or spread the word. You're making this the best walk ever, and giving me hope that we're going to fix this thing. I'm off to check my blood sugar.

3. Update - MicroISV Donations

The very awesome Martin Plante, lead at slimCODE Solutions, has offered to give all the earnings from his slimKEYS product during the May 6th to May 11th to help fight diabetes. An amazing idea and a very nice gesture.

I talked about slimKEYs in my post "Replacing Start Run." It's a Universal HotKey Manager with easy-to-code-to plugin model. As Martin says, "Help a good cause and get a lifetime slimKEYS license at the same time!"

Thanks Martin!

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 SherWeb

Hanselminutes Podcast 63 - Scott Guthrie and Jason Zander on Silverlight

May 3, '07 Comments [6] Posted in Mix | Podcast | Silverlight
Sponsored By

My sixty-third podcast is up and this one was a blast. I recorded this one at Mix just two days ago with Scott Guthrie and Jason Zander. Scott runs the teams that build IIS, ASP.NET, Atlas, CLR, Compact Framework, Windows Forms, Commerce Server, Visual Web Developer 2005 and Visual Studio Tools for WPF. Jason was a dev on the CLR 1.0 and is now the General Manager of the .NET Framework (DevFX) within the Developer Division. Needless to say, these gentleman know their stuff. It was fantastic to get a full 30 minutes of these guys' time. I hope you can tell just by listening how much they enjoy their work and how excited they are about Silverlight.

 There's a lot of Silverlight coverage out there right now, so rather than covering the basics, we attempted in this podcast to not waste your time and tried to get into some technical detail quickly. I hope you enjoy it.

ACTION: Please vote for us on Podcast Alley! Digg us at Digg Podcasts!

Links from the Show

Silverlight Home Page
Scott Guthrie's Weblog
Jason Zander's Weblog
Jim Hugunin introduces the DLR

Subscribe: Feed-icon-16x16 Subscribe to my Podcast in iTunes

Do also remember the complete archives are always up and they have PDF Transcripts, a little known feature that show up a few weeks after each show.

Telerik is our sponsor for this show.

Telerik is a new sponsor. Check out their UI Suite of controls for ASP.NET. It's very hardcore stuff. One of the things I appreciate about Telerik is their commitment to completeness. For example, they have a page about their Right-to-Left support while some vendors have zero support, or don't bother testing. They also are committed to XHTML compliance and publish their roadmap. It's nice when your controls vendor is very transparent.

As I've said before this show comes to you with the audio expertise and stewardship of Carl Franklin. The name comes from Travis Illig, but the goal of the show is simple. Avoid wasting the listener's time. (and make the commute less boring)

  • The basic MP3 feed is here, and the iPod friendly one is here. There's a number of other ways you can get it (streaming, straight download, etc) that are all up on the site just below the fold. I use iTunes, myself, to listen to most podcasts, but I also use FeedDemon and it's built in support.
  • Note that for now, because of bandwidth constraints, the feeds always have just the current show. If you want to get an old show (and because many Podcasting Clients aren't smart enough to not download the file more than once) you can always find them at http://www.hanselminutes.com.
  • I have, and will, also include the enclosures to this feed you're reading, so if you're already subscribed to ComputerZen and you're not interested in cluttering your life with another feed, you have the choice to get the 'cast as well.
  • If there's a topic you'd like to hear, perhaps one that is better spoken than presented on a blog, or a great tool you can't live without, contact me and I'll get it in the queue!

Enjoy. Who knows what'll happen in the next show?

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 SherWeb

Hanselminutes Podcast 62 - Inside the Mind of Chris Sells and The Next 15 Years of Programming - Part 2 of 2

May 3, '07 Comments [1] Posted in Podcast | Programming
Sponsored By

My sixty-second podcast is up. In this, the second part of a two part episode, I visit the home of Chris Sells and we make up a topic for the show! I suggested we talk about what programming will look like in 15 years, and Chris countered with the suggestion that we chat about the LAST 15 years first, then the next 15. In this episode with continue our discussion and speculate on what the NEXT 15 years of technical innovation will bring. Don't forget to listen to Part One.

ACTION: Please vote for us on Podcast Alley! Digg us at Digg Podcasts!

Links from the Show

 Chris Sells Blog

Subscribe: Feed-icon-16x16 Subscribe to my Podcast in iTunes

Do also remember the complete archives are always up and they have PDF Transcripts, a little known feature that show up a few weeks after each show.

Telerik is our sponsor for this show.

Telerik is a new sponsor. Check out their UI Suite of controls for ASP.NET. It's very hardcore stuff. One of the things I appreciate about Telerik is their commitment to completeness. For example, they have a page about their Right-to-Left support while some vendors have zero support, or don't bother testing. They also are committed to XHTML compliance and publish their roadmap. It's nice when your controls vendor is very transparent.

As I've said before this show comes to you with the audio expertise and stewardship of Carl Franklin. The name comes from Travis Illig, but the goal of the show is simple. Avoid wasting the listener's time. (and make the commute less boring)

  • The basic MP3 feed is here, and the iPod friendly one is here. There's a number of other ways you can get it (streaming, straight download, etc) that are all up on the site just below the fold. I use iTunes, myself, to listen to most podcasts, but I also use FeedDemon and it's built in support.
  • Note that for now, because of bandwidth constraints, the feeds always have just the current show. If you want to get an old show (and because many Podcasting Clients aren't smart enough to not download the file more than once) you can always find them at http://www.hanselminutes.com.
  • I have, and will, also include the enclosures to this feed you're reading, so if you're already subscribed to ComputerZen and you're not interested in cluttering your life with another feed, you have the choice to get the 'cast as well.
  • If there's a topic you'd like to hear, perhaps one that is better spoken than presented on a blog, or a great tool you can't live without, contact me and I'll get it in the queue!

Enjoy. Who knows what'll happen in the next show?

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 SherWeb

Putting Mix, Silverlight, the CoreCLR and the DLR into context

May 1, '07 Comments [28] Posted in ASP.NET | Javascript | Mix | Programming | Ruby | Silverlight | XML
Sponsored By

Updated: I got some feedback from some MSFTies and this is an updated ecosystem diagram. For reference, here's the original ecosystem diagram. This version is better, but still who knows, eh?

I'm over here at Mix. There were some big announcements at Mix07 this year. Many were expected, a few were not. I've been following WPF/E with interest for the better part of a year.

Overheard: "There's a lot of college kids, lotta high school kids out there who expect more things to move." - CEO of MLB.com referring to the increased expectations young folks have while on the web.

I'm off in a corner here at some party trying to put it all into context. For a complete list of links, I'll suggest you head over to Sam Gentile's site.

Most Awesome Marketing-Guy Quote of the Day: "This announcement opens up significant opportunities in both the 'lean-in' and 'lean-back' environments." - MLB Marketing Guy refererring to folks watching MLB.com at their desks, or on their couches.

 Here's what was announced in the driest terms:

  • Silverlight 1.0 Beta - Lightweight Browser plugin that can render XAML, play HD 720p Video with included VC-1 codecs and be accessed via JavaScript. Supports Windows and Mac OS X.
  • Silverlight 1.1 Alpha - All of the above including a CLR 2.0 (Whidbey) compiled CLR and Type System along with select BCL (Base Class Library) classes from the .NET Framework 3.5 (Orcas) including DLINQ. Also included is a new dynamic language runtime (DLR) layer and support coming for Python, Ruby, VBScript VBx (Visual Basic "10") and JavaScript (ECMAScript). Compiled/JIT'ed JavaScript is at least 1000x faster than interpreted. Supports Windows and Mac OS X.
  • Expression Studio - Design, asset management and interaction design application suite with XAML editing and Visual Studio integration, along with a Media Encoder.
  • Silverlight Streaming - More developer focused than YouTube, this service gives you 4GB of free storage and virtually unlimited streaming of video clips using Microsoft's content deployment network. Why? Because Silverlight looks bad if your web host sucks, and if Microsoft hosts your videos, you, Microsoft, and Silverlight all look good.

Some good places to start learning are:

Now, what follows is just me talking. Not my company, just me and everything here is just my opinion and ruminations. 

Everyone who saw the keynote has a different take on what they've seen, and what Silverlight means to them. While the Microsoft messaging was pretty spot-on, I think that some context couldn't hurt.

Silverlight has Flash-like qualities, and Adobe was brilliant to counter the coming announcement with the Open Sourcing of Flex. All this means more choices for me, the developer.

Overheard: "This is the biggest thing since God talked to Moses. Well, maybe not, but it's still up there."

While folks are justifiably stoked about the rich media and interaction benefits of Silverlight, and I don't mean to draw attention away from those good things, but I want to touch on the most game-changing aspects of this announcement while you all are watching 720p HD video over Silverlight and thinking this is a direct shot over the Flash bow.

1. The impact of the new Dynamic Language Runtime should not be underestimated.

This new layer on the CLR adds a number of features around code generation and dynamic type systems that take the CLR's already decent support for dynamic languages to a considerably greater level. This DLR will enable support for Python, EcmaScript 3.0, Visual Basic "10" (VBx - VB as Dynamic Language), and Ruby. Initially this support will be enabled in Silverlight in the browser sandbox, but will no doubt move to the server side soon.

A cool side note; John's team added a subtle nod to the Ruby team in their demo. If you want to access a .NET library, like say, List.AddRange(), when you access it from Ruby it'll be list.add_range. Subtle, but an important (and classy) statement of respect for one of the things that Ruby programmers feel strongly about.

1a. Code for the DLR, IronPython and IronRuby will be released under the Microsoft Permissive License.

This is nothing but a good thing. I look forward to seeing what the folks who use Boo (another alternate .NET language) and the MonoRail and Castle Project guys come up with in to exploit these new dynamic services for their languages and environments.

2. There's a "new" CLR in town, and it's for more than just animation.

During the demo, ScottGu showed a Windows Developer connecting to a "CoreCLR Remote Debugging Service." The text "CoreCLR" appeared briefly in the Attach to Process Window in Visual Studio.

Check out this great diagram of the Silverlight 1.1 world, at right - click for the giant version.

The CoreCLR term refers to the CLR that powers the Silverlight 1.1 Alpha. I like to think of this as a "reimagining" or refactoring of the current CLR. The Silverlight CLR isn't tiny, micro, or crippled. It's refactored, modularized, tightened, simpler with fewer dependencies. This new CLR design will likely power and influence future CLR versions. The diagram above is my own speculation, memory and from Googling around.

Also, the CoreCLR in Silverlight can live in the same process space as the existing CLR. So if Internet Explorer has a .NET plugin or toolbar loaded, Silverlight keeps working fine.

2a. You can use and re-use existing .NET assemblies, business logic even, in Silverlight

The assembly format is the same - it's the same CLR - so things that you've previously used on the server-side and potentially (depending on the libraries in the BCL you used) reuse them on the browser-side and finally put all these Core2Duos to work doing more than just waiting for <angle brackets to show up> for rendering.

2b. It works on a Mac. Same binaries, no cross compilation, just IL, working cross-platform.

The Mac version of Silverlight is a Universal Binary and runs the same code and renders the XAML exactly the same on the Mac as it does on Windows. There's also, as mentioned before, support for debugging Silverlight client apps running on a Mac directly from within Visual Studio.

Overheard: "It's the new smart client. It's a chubby client. Everyone knows chubby girls are smarter."

One great prt of the demo was done entirely in TextMate on a Mac where ScottGu created a Silverlight XAML file and CodeBehind in IronRuby. There was no Visual Studio or C# to be seen. The potential for Silverlight to energize the LAMP stack and complete with mXml is great. Silverlight might be the only Microsoft technology in a solution. Everything can be served by any Web Server as long as the mime-types line up.

3. Your XAML can be used all over.

One thing to know about the XAML rendering that's happening on Silverlight is that it's a different XAML parser/renderer than the one included in WPF.

If you're on Vista, try this cool test. Open up the Accessibility Magnifier and hover over any WPF app, like the New York Times Reader. Rather than little raster/bitmaps becoming large raster/bitmaps, you'll see beautiful scaled vectors. As long as what you're looking at is a XAML vector rendered on Vista with WPF, you can scale it forever.

I speculate - I haven't tried this yet - that if you put the Vista magnifier over a Silverlight XAML-created vector I suspect you'll get a scaled bitmap, not a smooth vector. This is because Silverlight will run on a bare-naked Windows XP (not even SP2) machine, and Silverlight's XAML renderer is painting via GDI. This is not a huge bummer, but it's a significant and very clear, visceral way to illustrate that there are two XAML renderers. Fortunately XAML is a clear spec, and both WPF and Silverlight (on both platforms)should both render identical XAML identically. It's not open to interpretation the way that HTML was/is.

4. It's a JavaScript/CLR Type bridge

Silverlight can act, it seems, as a bridge between the world over in-browser Javascript and in-Silverlight CLR-code. Your CLR code can get ahold of the DOM and manipulate it just as your in-browser Javascript can reach into Silverlight and access properties and dispatch events.

Overheard: "This is the most significant launch since .NET 1.0 and I don't think 10% of the audience gets that."

I'm pretty stoked about this whole thing, and I'm going to dive into both Silverlight and Flex, along with other options like OpenLaszlo as there's many ways to create a Rich Internet Application these days. The addition of an integrated client-side CLR will allow for greater scalability in large systems where the server is called upon to do calculations that really belong on the (increasingly powerful) client-side.

<disclaimer>I don't work for Microsoft, nor is any of the data on that diagram from NDA'ed sources. It's very likely wrong, so enjoy.</disclaimer>

I may also have overheard myself saying all those quotes, but one can't be sure about these things. :)

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 SherWeb

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