Scott Hanselman

Dance Dance Revolution and the need for Alternate Human Computer Interaction

April 5, '07 Comments [8] Posted in
Sponsored By

Z and I went over to my buddy John's yesterday to borrow his XBox360 copy of Dance Dance Revolution. I've been avoiding this game for nearly ten years. Partially because I can actually dance in real life (my wife can attest to this, and as she's an African, it's high praise, let me tell you) and DDR doesn't seem like dancing to me, but also because I know I'd get too into it.

But, John talked me into it and I talked my wife, begrudgingly, into playing it once. We didn't stop until 30 songs later. To quote my wife, "I won't stop until I get an 'A'!" She did, on Rapper's Delight, by the way.

I think that we took to this game for the same reason we took to the Wii - it's so physically interactive. After twenty years of twitch-gaming with a controller and my thumbs, and fifteen years of typing for a living, the last thing I want to do is come home and use a controller.

What so funny to me about Dance Dance Revolution to me is that it's just another version of Simon - a frenetic real-time psycho game of Simon set to house music while dancing with much gnashing of teeth - but Simon nonetheless.

Really immersive gaming (computing) requires one of two things. Either...

...a controller that mirrors something in reality...

Guitar Hero, another game I played at John's (loan that to me also, John!), is basically the same thing - it's Dance Dance Revolution with a fret. Addictive, surely, and I'm sure the wife will get a kick out of it, but it's a little too close to typing for these hands.

The original Xbox had an amazing (and VERY expensive) game called Steel Battalion that included a custom controller with over 40 buttons. It was brilliant. We played it at work (at lunch) for months. It was the most immersive gaming experience I'd had short of going to an arcade and getting into one of those $100K flight simulators. Of course, the controller was $200 - as much as an Xbox.

We've got to break out of this Mouse and Keyboard rut we're in as a culture (this includes you Quake and Unreal Tournament folks who insist a mouse and keyboard is the Only Way to Play - you're not helping!) and move into the Minority Report Multi-Touch Interaction world that folks like Jeff Han are pioneering.

...or intuiting intent via hand gestures

Now, $30k for something like Jeff Han's solution is (currently) untenable, but surely with all these Web Cams along with the brilliance of folks like Ashish and his Gesture Recognition stuff or the amazing uMouse stuff that Larry Lart (seriously, rush over there, now and read what he's doing) is working on (Hopefully I'll get a review of his stuff and he'll get a download link up soon. He said it'll be in beta the next week or so.) should give us some reliable moving of windows using our hands.

I figure it can't be that hard to watch a hand with a webcam, and that combined with the fact that there's only so many windows at a time on the screen - that lowers/narrows the number of things you'd want to do. Fine control of the mouse via gestures is a start, but a REALLY compelling solution would augment the mouse by using the web cam to track your hands and allow the push windows from monitor to monitor in a multimon scenario, minimize windows, launch Google, etc.

Certainly we could make it even easier by putting things on our hands (video of Atlas Gloves and Google Earth) and making the functionality very specialized.

Frankly I'm surprised that BillG would put so much work into Voice Recognition and Tablet but miss out on the opportunity to revolutionize User eXperience via a simple webcam. I don't need my webcam or computer to tell me if I'm sad - I'd like it to recognize my intent and act on it.

There's lots of Alternative Pointing Devices to choose from, but they all fall into the same tired metaphors. As mice go, personally I really like the Evoluent Vertical Mouse (it doesn't turn your hand unnaturally) and I also have Tablets for all my computers. I love my Ergodex, but I don't use it for coding like I used to.  I'm convinced that gestures are the next big thing - and no, I don't mean mouse gestures. It's a huge shame that the Fingerworks guys went out of business. Their pad was brilliant. I know Rory is a huge fan of their iGesture pad. It was just too expensive. All these mechanisms are tired shadows of what a good gesture system could do.

Making cheap webcams recognize our hand gestures - even if I have to point the camera at my hand on the mouse - has huge potential. This is a 100% solvable software problem.

Of course, the real tragedy in all this? I'll never dance (or, "Dance Dance" rather) as well as this five-year-old.

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

Programmers, keep your wits about you and Code Mindfully

April 3, '07 Comments [19] Posted in Programming
Sponsored By

I was talking with Patrick Cauldwell the other day about what makes a "Good Developer." We talked about a number of different characteristics.

My intent was to write up a list of good personality characteristics that describe effective programmers, but Patrick said, "The real problem with most developers is that they don't keep their wits about themselves."

This was like a slap in the face to me. I realized when I was going through the Programmer Phases of Grief that I hadn't kept my wits about me.

You ever have the very frightening experience when you're driving along, perhaps lost in thought, and next thing you know, you've driven two miles and you don't remember the driving process that got you there?

Many of us who've been programming for a long time, or folks who are very gifted and take get from A to C while skipping B, can have these fugue states while programming. I don't literally mean that one blacks out while coding, but rather one goes "running down a one-way dead-end street." A lot of time is wasted before we realize that some original assumption was wrong.

I think one can be a more effective programmer if they can avoid not-thinking. Call it Mindful Coding if you will. The act of actually thinking while writing code is challenging, especially when your mind is jumping to the next idea or if you're writing code you've written a dozen times before.

Sometimes I'll catch myself asking a question of someone around here, and halfway though the question I'll realize that I haven't really THOUGHT about the problem space. For me, and my learning style, this might involve explaining it to someone (often my wife, who nods in all the right places, but cares not about such things) or drawing a picture.

For many, analytical thinking isn't a passive thing. Often just making the decision to "sleep on it" can be all that's needed to break through a hard problem.

"If you can keep your wits about you while all others are losing theirs, and blaming you. . . . The world will be yours and everything in it, what's more, you'll be a man, my son." - Rudyard Kipling

So, I say, programmers, keep your wits about you. Code Mindfully. I vow to try harder.

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 on Channel 9 - Video #2

April 3, '07 Comments [0] Posted in Musings | Podcast | TechEd
Sponsored By

It's Video #2 in the Hanselminutes on 9 series.

Rory and I did a few videos together a while back to promote TechEd 2005. (Baby Carrots, Designing Software) They kind of worked, but were perhaps a bit forced. We thought they'd be cool at the time because when Rory and I hang out and just riff, we're a hoot. A hoot and a half, even. So, the Rawdawg got the idea for he and I to wander around Microsoft's Building 42 (Developer Division or "DevDiv") and simply pop in to folks offices and ask them "What are you working on?"

For me, I wanted to get back into the "Roots of Channel 9" - raw discussions, preferably with folks who know what they are talking about.

Here's video #2 in our travels through Building 42 on the Microsoft Campus. We didn't plan anything, nor did we warn folks we were coming.

In this short video, we interviewed Vance Morrison, an Architect on the .NET Runtime Team, specializing in performance issues with the runtime or managed code in general.

We actually stopped and bothered Vance because he had a trebuchet on his desk that we saw through the window. We had to stop.

Vance does some pretty amazing stuff around Managed Code Optimization. Take a look at the micro-optimizations around typeof() calls over at his blog. Vance is a busy guy so this video is only six minutes long. 

The first video in this series is still over here: Hanselminutes on 9 - #1.

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

Gamma Correction and Color Correction - PNG is still too hard

April 3, '07 Comments [27] Posted in ASP.NET | Musings
Sponsored By

If you're not reading this post in a feed aggregator you can tell that Alexander and I collaborated on a new design over the weekend. (Yes, he was paid.)

By "collaborated" I mean that Alexander is awesome and I learned a bunch of obscure browser-specific nonsense that I didn't know before. I thought that at least some of these problems were fixed by 2007. Oy, what a mess.

I was looking forward to using PNG on this site, and it's the One True Format, right? You'd thing it'd be a no-brainer.

We put that brown background in the header in a div, as a background-image.

<style type="text/css">
#header1 {
height: 79px;
background: url(header-background2-gamma.png) scroll no-repeat;
background-color: #5C4837;
background-position: right 50%;
}
</style>

The original design was fixed in width, so we made it fluid and stretchy. Because the header is a fixed weight, I wanted it to be right-aligned. It's aligned via background-position to the right.

In order to make it stretchy, I made the background color match the left edge of the graphic. This technique worked great in FireFox, but looked lousy in IE6 or IE7. You can see a rendition below or visit a sample page. If you're running IE, you'll see a graphic like the one seen below. If you're running Firefox, you'll see two identical bands.

Nutshell - PNGs look darker on IE than anywhere else. Even IE7 Release!

What different is that, as you probably know, IE doesn't seem support the Gamma Correction data that is added by most PNG-producing applications. Or, it supports it too well! :)

Not only is there crappy PNG support out there, as most don't completely implement other very interesting parts of the spec, like Color Correction, but the spec itself was apparently ambiguous for a number of years.

I went around and collected this bunch of links...

The real frustration for me here, is why should I still care about this stuff? It should be WAY easier...I wonder when the larger problem of color on the web will be solved. I'm really frustrated and a little shocked that I'm still having to sweat this kind of detail these days.

Big thanks to Jon Galloway for helping me figure this out and remove the Gamma Correction from my PNG.

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

Rescuing the Tiny OS in C#

April 2, '07 Comments [15] Posted in Learning .NET | Programming
Sponsored By

About four years ago (in the middle of the last fifteen years of writing software for money) I graduated from college. I took a round-about way through school at OIT - my four-year degree took eleven years (I actually had to make deals with four different deans to allow me to keep my credits from expiring) but it turned out OK.

Some where in the middle of going to school at night we were asked in an Operating Systems class to write a "Virtual CPU and OS." More of an interpreter, we were given a description of the OS, some op-codes and an ASM-like machine language. We were to write the OS, and feed test programs into the system. It was a fun exercise and a good way to teach folks how virtual memory and memory mapping works, threads vs. processes, etc. I was the only student who chose to write it in managed code. Quite the coup for 2002.

I turned in the project and threw it up on GotDotNet (this link will be dead in July of 2007), but of course, GDN will be gone soon. Just so it wouldn't be lost, it's now available here in C#. It's actually kind of fun, I think, as I put in some "jokes" - funny to me at least. For example, the OS pages it's virtual memory to XML files when it runs out of "physical" memory. It behaves like a real little OS. It'll thrash with low memory, and get fragmented if a lot is going on.

A tiny virtual CPU and OS written entirely in C#. The TinyOS simulates the scheduling, memory management (including paging and virtual memory) and other operations of theoretical Operating System. You’ll see many Framework classes and techniques in use including Regular Expressions, XML Serialization, generated Strongly Typed Collections, XML Comments and a generated Help file. You won’t get much useful work out of the TinyOS itself, but the techniques you’ll learn can be applied to real life.

Since this little ditty, others who really know what they are doing have written more serious OS's in C# that are worth looking at.

I presented on my little CPU/OS at TechEd Malaysia 2002, and the PPT slides are available as well. I also did it again in VB.NET if you like with a little trouble.

I looked at this code in 2005 and was shocked and offended with myself - well, not really, but it was enlightening to say the least. 

Go find some code that you wrote at LEAST FIVE years ago and tell me how it looks today...

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.