Scott Hanselman

The Myth of .NET Purity, Reloaded

May 30, 2004 Comment on this post [0] Posted in ASP.NET | Learning .NET | TechEd | Web Services
Sponsored By

An updated version of my Myth of .NET Purity rant is up on MSDN.  I recommend you show it to your boss if you're being force to justify why your solution isn't 100% .NET. 

Summary: Does a solution written for Microsoft .NET have to be 100% .NET? Scott Hanselman looks at how hybrid managed-unmanaged solutions are really the norm.

Here's a few choice quotes, IMHO: ;)


I've heard it said by many a CTO in many a technical briefing that, "We're planning to port our whole system to .NET." Why spend 18 months converting your application, so you can arrive at the endpoint you're already at?


The .NET Framework Library itself isn't "pure .NET," as it uses every opportunity to take full advantage of the underlying platform primitives.


If Microsoft were to truly virtualize the machine, they would have marginalized their investment in the Windows platform.

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 bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Movies That Are Disasters (or Disaster Movies)

May 30, 2004 Comment on this post [5] Posted in Movies
Sponsored By

I shall preface this with the apology you've heard before...I consider this a Technology Blog, and I hope only that the content found within is useful and of high quality.

That said - I give you, after having seen "The Day After Tomorrow," Disaster Movie Mad-Libs:

Open: Obscure nobody scientist who is an expert not in an obscure corner of science (climatology, seismology, genetics) but actually an expert in an obscure corner OF an obscure corner of science (paleoclimatology, seismological tectonophysics, quantitative genetics) is giving a talk at the Met, or the New York Library, or Berkeley (It's usually either a black-tie affair, perhaps the international conference of obscvure scientists, maybe it's in Bern, OR it's an empty auditorium in a random sub-wing of a Community College and there's three people paying attention) with a polished presentation (either using ridiculously advanced full 3D, OR using transparancies and an overhead projector.  Noone ever seems to use PowerPoint in these movies.

Scene: Outside that same talk (usually in the rain, at night, next to a large iron gate) and some one (usually wearing a London Fog standard-spy-issue raincoat, possibly smoking, and if he is smoking, he's smoking like a Nazi with his palm up and the cigarette is in a small plastic holder) comes up and says "I loved your talk, I read your paper on [something hyper-obscure] in the field of (paleoclimatology, seismological tectonophysics, quantitative genetics) and your thoughts [something only someone who cared could know] are revolutionary. 

Scene: We find that the scientist is having trouble at home (surprise) and he doesn't pay enough attention to his (kid, wife, dog, all of the above).  He's obsessed with his field and noone will listen.  He probably flips through a few envelopes that say "Final Notice" on them and opens a fridge that contains only Beer and a bottle of Ketchup.  He kicks a bunch of old (newspapers, scientific papers, hardcover books) aside, and sits down to watch (Knicks, Lakers, Manchester United).  The phone rings...

Scene: "Holy crap, something dramatic has happened in the field of (climatology, seismology, genetics) and birds are (acting weird, killing people, falling out of the sky) and all the animals at the New York Zoo are howling.  Come quick! 

Cut to the President: "Who's the best in this field?" "Uh, (consults a list), Dr. [scientist name], at Berkeley."  "Get him here.  Now."  Cue timpani...

Scene: He steps off of a (plane, government helocopter, limo) into (the white house, a secret (CIA, NASA, NSA, X-Files) base, to give an imprompu talk with even BETTER 3D graphics to a bunch of suits and a bunch of generals.  "Gentlemen, Mr. President.  You should have listened.  I've been presenting at Community Colleges all over the nation on this very subject for 15 years, and noone has listened.  Now, we're screwed if we don't (get some miners to detonate a nuclear bomb underground, run south, get some miners up to that Asteroid, get some miners down to the center of the earth, get Superman to turn back time) immediately.  I give us six to eight (weeks, months, hours)." 

Scene: His (kid, wife, dog, all of the above) are on vacation in an older red pickup in (Yellowstone, Alaska, Mt. St. Helens) and have almost (been swallowed up by the earth, buried by a mudslide, drowned in a flash flood, froze to death). 

Scene: "Dr. [scientist name], your (kid, wife, dog, all of the above) have just almost (been swallowed up by the earth, buried by a mudslide, drowned in a flash flood, froze to death)."

Scene: The (miners, astronauts, army) prepare the (bomb).

Scene: A shot of a helicopter flying over the Statue of Liberty, it's (buried in snow, burning, underwater, covered in lava, a metal carcass) Cue string instruments...

Scene: "I'm going after them."  "You can't! It's suicide!"  Stern serious look..."I made my (kid, wife, dog, all of the above) and I'm not going to let them down."  "I know Jack...that's why I'm (pause for effect) going with you..."

<<Insert Drama Here>>

Scene: The first sunrise since (the earth froze/didn't freeze, the volcano exploded/didn't explode, the lava flowed/stopped, the fires started/stopped, the meteor crashed/didn't crash)  The Scientist turns to his (kid, wife, dog, all of the above) and says "I think we're going to be OK..." 

Did I miss anything?

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 bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

The ErgoDex Alternative Keyboard and the Rise of "CodeRush IL"

May 28, 2004 Comment on this post [0] Posted in TechEd | CodeRush | Gaming
Sponsored By

When folks say that the differences between C# and VB.NET are "syntactic sugar" I like it.  Sure there are a few funky ; % & ^ things in C#, and every once in a while someone will add a new operator to VB.NET like "AndAlsoIsNotOnTuesday" but generally ifs are ifs and fors are fors, eh?

Since CodeRush lets you map something as innocuous as "c" to a complete class definition and "u" to "using{}" and the whole IDisposable thing in C#, the whole language is just sugar.

If you think "string" that's one syllable.  String.  Boom.  Why type s. t. r. i. n. g.  The whole middle "trin" part of "string" isn't value-added.  So, you type "sg"-space and you get string.

So, I was thinking, since in CodeRush if you select block of code and press "u" it will put "using{ (your code block) } around it, what should it do in VB.NET as they don't have "using."  But, even though VB.NET folks have to put a Try/Finally and explicit call to Dispose(), the semantics are the same.  Why not map "u" in VB.NET in CodeRush to something like:

Dim o As Object
Try
o = New Object()
Finally
If Not o Is Nothing Then
con.Dispose()
End If
End Try

See?  The semantics of "u" are the same regardless of language.  Now, I used to be all about VB.  I spent years getting paid for VB3/4/5.  But it's been a while, and I'm largely a semicolon guy now.  Even in VB.NET I'll sometimes type o = New Object()'; just for comfort (notice the '). 

Often I need to do demos in VB.NET and I don't remember the syntax.  I can, however, remember "c" or "u" or "pdt" (property that returns a DateTime).  I'm calling it "CodeRush IL" and it's making me not only more productive in my own language, but also in VB.NET.

<bigidea>Now, what about a keyboard JUST for the .NET Programmer</bigidea>

If you know me, you know I have a few gadgets.  I'm such an Early Adopter that I preordered Doom III when Castle Wolfenstein came out.

When I saw a new kind of game input device announced at E3, I know I had to have one.  What's the first thing you do when you get a game?  You have to make a conscious effort to marry syntax and semantics.  What's jump? What's crouch? What's "Build Farm"?

The Ergodex is a completely customizable personal input system.  I think of it as a combination tablet and keyboard.  The 25 Keys are LOOSE.  You can arrange them in any order or orientation you want and they will stick to the board.

You can also put templates and information under the plastic cover. 

I'm going to map the keys in whatever what I think is comfortable to various expansions in CodeRush.  I'll have the datatype section of keys, and the flow control section.  I may even hookup a number of keys just to refactor. 

It's going to be hot.

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 bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Karma and the TabletPC Pen

May 28, 2004 Comment on this post [3] Posted in TechEd | Speaking
Sponsored By

If you hung out with me at all you no doubt heard me complain that I had lost my TabletPC pen literally an hour after I arrive in San Diego. 

I had all these images of me in "Slate Mode" with my famed Toshiba m205, taking notes in OneNote 2003 SP1. (I was most excited about this feature: "Simultaneously view and edit the same pages of notes with multiple users in different locations."

But, alas it was not to be, and my convertible TabletPC was immediately rendered flacid by the loss of it's magnetic member. (Remember, you can't just use ANY stylus with a TabletPC, the screen isn't pressure sensitive.  You have to use a special Wacom-style stylus with charged pixie dust)  So, I used the keyboard.  Sigh.  I felt so 2001.

Then someone mentioned that there was a hidden reserve pen literally buried underneath the main battery.  Egads!  It was like discovering a new directory on a computer I'd owned for years.  How could I not have known about this feature!

I immediately ripped my battery off and was presented with...SHOCK...AMAZEMENT.  There was only a chalk outline of a replacement stylus.  Had it been murdered?  Stolen?  Gasp...sucide?  Why would Toshiba go to the effort of actually drawing an outline of a pen but NOT INCLUDING IT.

Cheapness.  Stingyness.  Turns out a little Googling explained that the Toshiba TabletPC m205 ships everywhere else in the world with a backup stylus.  Americans, however, are screwed.  Gotta save that 10 cents, eh?

A light in the tunnel...

So, dejected, I went online to the Toshba store and shelled out $50 to get a kit that includes a replacement stylus, a backup stylus (to cover up the chalk outline in my battery compartment) and a tether (yes, a tether) to keep my pen, well, tethered.  But, as things go, it was Saturday and they wouldn't be able to ship it until Monday.  Sigh.

I complained.  Bitterly.  To anyone at TechEd who would listen to my woes.  Then, someone (I think it was John Bristowe) said one day, "Is this your pen?" and handed me a pen that someone else had lost! (I'd lost mine at UCSD.)  Joy!  I was back in business!

I arrived back home with my newly found (someone else's) pen to a package from Toshiba with my ordered replacement and backup.  I secured my tiny reserve pen in it's cubby and moved on.  Then, a few hours ago, Michele emailed me with the news that someone at UCSD had actually found my originally lost pen.  Glory be, it's on the way in a envelope. 

I left a man without a pen, now, I am a man with three pens and one in reserve.

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 bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Edward Tufte is coming...you need to be there

May 27, 2004 Comment on this post [4] Posted in Programming
Sponsored By

I made a reference to Edward Tufte early this week when I made up the word "Tuftesque."  A few people asked what I meant.  So, if you've never heard of Edward Tufte, listen up.  If you've heard of him, but never seen him speak, listen up.  If you have a complete clean desktop with no icons, listen up.

Information Design just isn't sufficiently covered in most computer science courses, otherwise the average programmer wouldn't suck so bad at PowerPoint and Excel.  So, why not pony up and get a refresher.  To give you an idea about what Tufte's about, here's a great thread on his Forums about how Gantt Charts suck.

His book "The Visual Display of Quantitative Information" made Amazon's "Best 100 books of the 20th century."

Edward Tufte has written seven books, including Visual Explanations, Envisioning Information, The Visual Display of Quantitative Information, and Data Analysis for Politics and Policy. He writes, designs, and self-publishes his books on information design, which have received more than 40 awards for content and design. He is Professor Emeritus at Yale University, where he taught courses in statistical evidence, information design, and interface design.

He'll be in Seattle on June 21st and 22nd, and in Portland on the 24th.  Additional dates and cities are on his site.

It's only $320 for the one day course, AND you get ALL THREE BOOKS for the fee.  Believe me, it will make you a better person and a better computer scientist.  Get your boss to pay.

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 bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

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