Scott Hanselman

Silverlight Samples

May 9, '07 Comments [13] Posted in Silverlight
Sponsored By

There's a lot of Silverlight in the air right now. I haven't seen the 'net abuzz like this since FutureSplash Animator. ;)

I've been collecting links to samples out there. Since Silverlight is all text (XAML, JS, etc) there's a whole world of copy/pasting out there just waiting for us (developers) to create Green and Purple blinking abominations like we did with Visual Basic 3.

I'm enjoying XAML, but I'm not at the point where I'll do it all in a text editor like Chris Sells or all in black and white like Charles Petzold, so I'll stick with using Expression to draw my XAML for now. I've also I haven't gotten my brain around the object model yet...I can't remember who said it, I think it was Bret, but they said it, and they are awesome:

"Drawing with code is like painting over the phone.

Here's links to some of the choicest samples that I've been viciously copy/pasting from after Getting Started and viewing the screencasts and the Silverlight Comparison Chart from Alexander Strauss:

I'm sure the coming months are going to bring lots of good samples. I also want to dig into OpenLaszlo, JavaFX, and Apollo, as well as Flex. Does anyone have contact info for Ted on Flex? I'd like to do a show on Flex for Hanselminutes.

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

Call for Sessions: Portland Code Camp v3.0

May 9, '07 Comments [5] Posted in Programming
Sponsored By

Code Camp in Portland is in only 10 days. It starts on May 19th and 20th. There's a good list of sessions so far with topics like Cardspace, XNA (XBox Development), PowerShell, Amazon S3, Silverlight, and many others by a great list of presenters. There's also an even party on Saturday, so be sure to register/RSVP ahead of time.

Remember that Code Camp is always free and you're welcome to present in this low-pressure environment. There's still time to submit a session of your own. If you've been thinking of presenting a topic or want to try presenting in public, now's the time to make it happen.

This is an open event, so come talk about Ruby, C#, Smalltalk, COBOL, Robots, whatever, as long as you're excited about it. You can submit any level session from Beginner to super-Expert. What are you working on at your job that is so awesome you're overflowing with excitement about it? Come give a session on that.  Are you building a PacMan arcade in your garage, or hacking your TV remote control? Come talk about that.

CodeCamp is just over the bridge in Vancouver at the WSU Campus. It's an easy drive from Portland. If you're coming from Seattle, there's many hotels nearby.

Spread the word around town as all are welcome at Code Camp in Portland.

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

Software Estimation: Remember that Targets are not Estimates

May 9, '07 Comments [12] Posted in Programming
Sponsored By

I was asked recently to help in creating some estimates. Dates were mentioned, features were requested, but generally the information given was pretty vague, as is common with many estimates. So, we start digging. What is needed, when is it needed, in what form is it needed? What does success look like?

There's lots of estimation tools out there. Steve McConnell's Construx Estimate (even though it's written in VB6 and was created in 2001) is well thought of, and can certainly get one jump-started with an estimate. Of course, garbage-in, garbage-out still applies. 

Patrick's been using the PlanningPoker technique for estimating lately. It's a useful technique that relies on the folks doing the work also doing the estimating. (Always nice.)

If you take a look at the White Papers section of the Construx website (free registration required, but it's worth it) you'll find a number of excellent presentations in PDF format that are good reminders and primers when dealing with daunting Software Estimation tasks.

Pick up Steve McConnell's book "Software Estimation: Demystifying the Black Art" if you want a nice introduction to the voodoo that is estimating.

I've been reminded of a few important tenets doing this estimating processes.

Know your scope

Negotiating the scope of your project, the features, subsystems, etc. with your business stakeholders is a good first step in getting your head around "what are we really trying to accomplish." User stories and complete and accurate Use Cases are invaluable when trying to nail down how large something is.

Targets are not Estimates

Folks sometimes come up with dates, like "February 2008" as a target for a project to hit. After a while that target date starts getting treated like an estimated date. It's important that everyone on a project remember (or be reminded regularly) that targets are not estimates. If you want to hit a date, you'll likely not know when if an estimate is good enough to hit a target until you start moving far enough into the Cone of Uncertainty.

Ask for Worst Case - then Double That

Jeff Atwood points out, after reading Steve's book, that asking for multiple points (best case, worst case) when asking folks for an estimate is important. He quotes Steve, emphasis mine:

Considering that optimism is a near-universal fact of human nature, software estimates are often undermined by what I think of as a Collusion of Optimists. Developers present estimates that are optimistic. Executives like the optimistic estimates because they imply that desirable business targets are achievable. Managers like the estimates because they imply that they can support upper management's objectives. And so the software project is off and running with no one ever taking a critical look at whether the estimates were well founded in the first place.

This quote nails it for me. No one wants to give a realistic estimate. It's hard and sometimes it's potentially career-limiting.  Steve quotes Fred Brooks (who, as a random aside, is the uncle of a good friend of mine from high-school):

It is very difficult to make a vigorous, plausible, and job-risking defense of an estimate that is derived by no quantitative method, supported by little data, and certified chiefly by the hunches of the managers.
Fred Brooks (1975)

A few companies encourage worst-case estimates in the hopes that you can look like a hero if you make it happen. A few companies ago I worked somewhere with the philosophy: Underpromise, over-deliver. It was the founder's belief that this idea was fundamental to making happy customers. It seemed like a good idea, except when you actually delivered and things turned out to be simply: Promised, delivered. Which isn't all that bad, actually, considering that folks say that fewer than 1/4 of projects actually do deliver on time.

Learn From the Past, and Don't Forget It

There's a great slide in the 10 Keys to Success PDF up at Construx that compares 120 projects at Boeing, juxtaposing those that were estimated with Historical Data and those that were done without. Seems obvious, but it's useful to see these kinds of things and "learn from the sins of our fathers."

When estimating based on historical data, however, sometimes people use the historical estimate rather than the historical actual. In fact, a lot of companies don't closely track the actuals. You'll be better off if you not only keep the actual datas, but also compare the original estimate with the actual result in a project post-mortem.

  • How do you estimate your projects?
  • Do you estimate?
    • If so, what tools do you use?
  • Do you use Function Point Counting?
    • Do you use other techniques?
  • What does success look like for your project?
    • What's your success rate?

Discuss, dear reader.

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

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

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