Scott Hanselman

Clarity, Junior Engineers, Requirements, and Frustration

December 29, '04 Comments [0] Posted in Programming | Tools
Sponsored By

There's an amazing essay at The Spurious Pundit on "Picture Hanging." It's an allegory that explores how simple requirements in software aren't that obvious to folks who may not have context. The writing is wonderful, do check it out, it's worth your time. Subscribed.

A highlight:

You tell him to hang the photo of your pet dog, and he comes back a week later, asking if you could "just double-check" his design for a drywall saw.

    "Why are you designing a drywall saw?"
    "Well, the wood saw in the office toolbox isn't good for cutting drywall."
    "What, you think you're the first person on earth to try and cut drywall? You can buy a saw for that at Home Depot."
    "Okay, cool, I'll go get one."
    "Wait, why are you cutting drywall in the first place?"
    "Well, I wasn't sure what the best practices for hanging pictures were, so I went online and found a newsgroup for gallery designers. And they said that the right way to do it was to cut through the wall, and build the frame into it. That way, you put the picture in from the back, and you can make the glass much more secure since you don't have to move it. It's a much more elegant solution than that whole nail thing."
    "..."

This metaphor may be starting to sound particularly fuzzy, but trust me - there are very real parallels to draw here. If you haven't seen them yet in your professional life, you will. [Spurious Pundit]

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

Tsunami - Apple.com has updated their home page with links to Donation Sites...Microsoft next? Plus Indian Ocean Tsunami Satellite Pictures

December 29, '04 Comments [5] Posted in Musings
Sponsored By

Apple.com has taken mind-boggling severity of the Indian Ocean Tsunami and updated their corporate homepage to drive drive to donation sites.

It's a definite statement when a company chooses to remove products from their home page.

The power of the Net with this disaster will be realized if it's made fantastically easy to donate money to legitimate charities.

Here's some photos that show you the before, recoil and push foward of the tsunami in Sri Lanka. There is an excellent PDF analysis here.

Typical Shot (2004-Jan)

Srilanka_kalutara_beforeflood_jan1_2004_dg

Ocean pulls back 400 meters...(2004-Dec-26)

Srilanka_kalutara_beach2_dec26_2004_dg

Tsunami arrives...(2004-Dec-26)

Srilanka_kalutara_flood_dec26_2004_dg

 

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

Start a movement! Donate all your Google AdSense Revenue to Earthquake Relief

December 28, '04 Comments [5] Posted in Musings
Sponsored By

Greg Hughes and I were talking about this idea. The power of blogging isn't citizen journalism, it's the power to start a movement.

Nick Bradbury is donating his profits to the Red Cross. Kudos Nick. Let's ALL take our passive Google Adsense Revenue for the year and donate it directly to earthquake relief. Mine so far is US$-omittedduetogooglepolicy- since I started ads in June. I'm sure hundreds of thousands, even millions could be raised quickly in this manner.

To that end, let's pressure Google into allowing us to automatically donate our revenue from their side! Spread the word and trackback this link.

To me, spreading an idea like this is the power of blogging, more than citizen journalism.

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

More on Assembly Binding, Strong Naming, the GAC, Publisher Policy and Dynamically Loaded Assemblies

December 28, '04 Comments [0] Posted in ASP.NET | NCover
Sponsored By

Certainly Suzanne Cook is the definitive source for details on Assembly.Load and Binding Contexts, a black art tantamount to voodoo that few people understand. Patrick and I have been hip-deep in it lately, and have discovered/uncovered/madecleartoourselves how some of this voodoo works. Here's a (annotated) writeup from Patrick that was sent out internally. Another great resource is Mike Gunderloy's article on Binding Policy in .NET.

  • Assemblies will only EVER be loaded from the GAC based on a full bind (name, version, and public key token).  A partial bind with name and public key token only WON’T load from the GAC. 
    • If you reference an assembly with VS.NET you're asking for a full bind. If you say Assembly.Load("foo") you're asking for a partial bind.
  • However, the way this usually works is…
    • You do a partial bind on assembly name, or name and public key token with Assembly.Load
    • Fusion (the code name for the Assembly Loader/Binder) starts walking the probing path looking for an assembly that matches the partial bind.
    • Counter Intuititive: If it finds one while probing (the first one) it will then attempt to use the strong name of the one it found to do a full bind against the GAC.
    • If it’s in the GAC, that’s the one that gets loaded.
    • Any of that loaded assemblies will try to load from the GAC first without going to the probing path, since the embedded references constitute a full bind.
    • If they aren’t found in the GAC, then it will start probing.
    • It’ll grab the first one it finds in the probing path.  If the versions don’t match, Fusion fails.  If they do match, Fusion loads that one.
    • So, if you specify a partial name, and the file is in the GAC, but not the probing path, the load fails, since there’s no way to do a full bind.  

All this is mostly an issue for plugins that we load dynamically.  It shouldn’t be an issue for compile-time dependencies, since they use full binds.  One way to make sure you get what you expect is to specify a full bind in your config files via an Assembly Qualified Name (QN) like:  "Foo.Bar, Version=2.0.205.0, Culture=neutral, PublicKeyToken=59388ae2d2746794" and doing something like this:

  100 public static object CreateInstance(string assemblyandtype)
101 {
102 Type type = Type.GetType(assemblyandtype);
103 object instance = null;
104 instance = type.InvokeMember(String.Empty,BindingFlags.CreateInstance, null, null, null);
105 return instance;
106 }

Thanks to Patrick for the writeup!

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

[OT] 22,000 dead, and This White Guy - Western Media and the Devaluing of Brown People

December 27, '04 Comments [19] Posted in Musings
Sponsored By

earthquake1.jpg

This is a technical blog, so note that I don't do this all the time so forgive me ahead of time if you don't like my rants.

I'm looking at the home page of CNN.com.  There are currently over 22,000 brown people dead, and apparently this white guy. I feel for his family, but I feel more for the countless hundreds of thousands of displaced and suffering others.

I am tired of the American Media (last night it was ABC News) who spend 5 minutes on a massive natural disasters, and then gloss over it when we are told "and no Americans were injured." Notice the text of this CNN blurb - 22,000 dead and 27 Western People, which details the counts of British, French and Italians.

This is unspeakably ethnocentric and it makes me a little ill.  I'm not trying to be P.C. here, but these are humans, and whether it was a hundred Somali Fisherman, or this guy from Illinois, I expect more from a leading news organization. This is like a home-town newspaper concerned about its native son away on mission.

We must never forget that tommorow isn't promised to us. One day there will be an earthquake off the coast of Oregon. No doubt that will get media coverage.

God help us all, but thanks for the time I've had.

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.