Scott Hanselman

Coding4Fun: Microbric Viper Robot with an Iguanaworks IR Serial Port and PowerShell

February 19, '07 Comments [2] Posted in Coding4Fun | PowerShell
Sponsored By

UPDATE: Speaking of Robots, also check out what Ashish is doing with a Laser Pointer and Remote Controlled Car - he's created an autonomous robot!

I finally got around to creating Part 2 of my article on controlling a Microbric Viper Robot with an Iguanaworks IR Serial Port. This time I used Lee Holmes (with permission) LOGO in PowerShell sample and extended it to control the robot. A video is at left hosted on SoapBox and also hosted at Channel9.

Purchasing these Parts

The Microbric Viper can be ordered online in North America, check out www.microbric.com for North American distributors. It's only US$89 at Saelig and CAD$99 at RobotShop. They have a number of educational robots that can be assembled by kids of all ages and skill levels. They're great for the classroom, and include projects like Sumo Robots, and a line-following bot, as well as a Spiderbot that climbs rope - all from the same kit.

You can order the IR Transmitter/Receiver from IguanaWorks. The serial version works on Windows or Linux, and there's a Linux USB version. It's not just a Transmitter, but also a learning receiver that works with WinLIRC and turns your computer into a learning remote control and can be used for nearly any project that utilizes IR

Robotics Studio

A number of folks asked why I didn't use the Microsoft Robotics Studio to do this project. Well, here's my reasoning:

  • I'm ignorant about what the Robotics Studio can do.
  • Early CTPs of the Studio - before it was released - seemed really confusing to me, very abstract and generally obstuse. Not obtuse on the BAD way, just in the "I didn't immediately get it with a few hours and gave up" way.

If anyone thinks that this project and the Microbric Robot could really benefit from the Robotics Studio - or even if you're on the Studio team - do contact me and educate me. I'd love to do a podcast on the Studio, but I don't want to talk about a topic I know so little about. School me!

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

Baby Sign Language - Update at 14 months

February 18, '07 Comments [24] Posted in Parenting | Z
Sponsored By

UPDATE: Check out http://www.babysignlanguage.com for more info on Babies and Sign Language!

Teaching our son Sign Language has been a dramatic success for us. He's 14 months old now and the last six weeks have been an explosion of communication. Two months ago he was just barely starting to use the sign for "more." Today, he knows at least 30 signs (says Mo, at least 40, says I) and is learning at least one new one a day.

Just yesterday Mo mentioned that he'd be pointing to a book and making a sign she didn't recognize. I said, show me...he'd been signing "pig" all day, a sign I'd taught him the week before, because he wanted a book about Pigs read to him.

As a new parent, I can't tell you how thrilling it is to connect with a baby, your baby, on a conceptual level...sounds silly to say, but Baby Sign Language can be about more than just "milk." We were reading "Goodnight Moon" just this evening, and my son signed "moon all done" when we got to the page where the moon was gone from the sky. That moment really sealed the deal for me. Sticking with Sign Language was the right thing for us to do.

It's not that much work to learn the signs. As you learn a few dozen, you'll see a pattern, and other signs will get easier to learn. We carry a picture dictionary around with us in the baby bag.

Sometimes folks see us sign to him in public and say "oh, is he deaf?" with a kind of worried face. We reply that we're teaching him Sign Language so we can see what's on his mind a year or two early.

There's lots of opinions about teaching kids sign language. Here's my reasoning.

  • I'm gaining at least a year of time communicating with my son. Not using sign language would mean that our communication would be limited to pointing and the occasional made up gesture.
  • Many families in America use some sign language like Milk and More and basically leave it at that. I say you're missing out on something amazing. Take it to the  next level.
    • Imagine taking your 1 year old to the zoo and having them sign "monkey sleeping" when you get the Gorilla House and the monkey's not around. Things like this happen ever day for us, and they are utterly magical.
  • Some folks believe that "Mommy knows what baby needs." I'm sure that's true, but Mommy also appreciates when baby says "apple" using sign, rather than simply throwing his banana at Mommy. Why not give him the tools to express himself?
  • Many temper tantrums are caused by frustration at not being understood. Sign language has given us a way to find out what he wants and what he needs. We give him 100% of what he needs, and probably 10% of what he wants. We haven't seen any temper tantrums at all caused by our son not being understood. (I checked that statement out with the wife ahead of time and she agreed.) He is eager to make himself understood and it's clear that he has fun signing.
  • ASL-based Signing qualifies as a foreign language in most colleges and more and more high schools. If you stick with signing, not only will you have an additional language between you, but you'll have given your child a language firmly based in kinesthetic learning.

What do you need to do to start signing?

  • Check your local community center. They often offer Baby Sign Language classes. We took classes before Z was born, and when he was 6 months old.
  • If Baby Sign Language is unusual or unused in your country, either find some Deaf Folks and learn your country's specific Sign Language, or use ASL (American Sign Language). The trick is to be consistent and have an illustrated dictionary to refer to.
  • Stick with it. Don't give up. We started when he was six months old and signed every day without a single clear response until he was a year old. We nearly quit a dozen times before that.
    • Then one day he signed "light" as clear as day in his bedroom. We turned on the light and our son lit up with a small as wide as his face. That's when we connected with him. I'm not talking about the standard Mom/Dad/Baby we-love-you connection. I'm talking about the baby's opinion matters kind of connection.
  • Get picture books, lots of them, and learn the signs for the animals. I highly recommend the Priddy Books series of books for baby.
    • Learn the signs for animals and common objects and use them every time you see one out in the world. We went for a walk on the Portland Waterfront today and our son was signing bird and dog and plane and sharing those discoveries with us. It's great when he sees something interesting and points at it, but it's something different when he signs about something we didn't see.
  • Pay Attention and prepare for the unexpected.
    • Example: The baby was frantically signing ball recently, gesturing wildly at a dog. We tried to correct him..."No no sweetie, that's a dog, not a ball." The dog lifted it's head and we saw that the dog was in fact playing with a ball that we hadn't seen.

There's a great Dictionary of Baby Signs (ASL) here that uses Windows Media Player. I also highly recommend the Baby Signing Time Series of DVDs, particularly Volumes 1 and 2. They are the only videos that let the baby watch.

I don't know when he'll start talking. It doesn't really matter. I'm not really sure where he is "developmentally" or what a 14 month old is supposed to be doing at this point. I figure kids all even out by the time they're 18 years old anyway. But, while we look forward to him talking, be it at two years or four years old, I've already got a way to communicate with him. I can ask him what's on his mind and he'll tell me.

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

RFC: How FeedReaders and MacGyver report blog subscribers - Tunneled User-Agent Data

February 17, '07 Comments [3] Posted in ASP.NET
Sponsored By

Sometimes I get ever so slightly depressed that the Web is so fantastically hacked together. The way we revel in AJAX sites but forget how dizzyingly high up we are, floating in layer after layer of abstraction. IP, TCP, HTTP, UTF8/ASCII Text Encoding, HTML, XML, XHTML, CSS, ECMAScript, DOM, the list goes on...there's a lot of moving parts. I wonder how the next generation will learning all the plumbing?

They can happily drag a button from the Toolbox onto their Form and Start Programming™. I think this means I'm officially old and crusty because I'm finding myself, internally, thinking "these young punks with their Ajax and their MacGyver techniques! Assembling websites with CSS Box Hacks and Paper Clips! Feh!"

At any rate, Google Reader, an online feed aggregator whose interface I'm still slightly not digging, is now reporting their subscribers.

There's different classes of Feed Readers/Aggregators that can retrieve content two ways. There's, of course, desktop and web readers who can retrieve content directly or centrally. (These are my four classifications.)

RSS Bandit and SharpReader and NetNewsWire are actual applications that you install and run locally. They reach out from your computer directly to the feed and download it directly. FeedDemon can do this too, but is a kind of hybrid, in that if you have a NewsGator subscription it's actually getting the feed content from NewsGator, not the publisher, so in that "hybrid" (my word) mode, FeedDemon looks like an online reader.

Here's a very incomplete, but you'll-get-the-idea-it-is-just-trying-to-make-a-point table:

Reader Desktop/Web Direct/Centralized
Google Reader Web Centralized
Bloglines Web Centralized
FeedDemon Desktop Direct
(can talk to NewsGator also)
NewsGator
Online
Web Centralized
SharpReader Desktop Direct
RSS Bandit Desktop Direct
(can talk to NewsGator also)
IE7 (RSS Platform) Desktop Direct
(but shared and
centralized to the OS)

FeedBurner hosts my Feed for this site, and they have a wonderful Feed-specific Special Sauce that figures out, approximately, how many folks are subscribing/reading my site. They use lots of metrics like IP address and what not to figure out Desktop readers, and they have some algorithms to recognize that IPs change and what not.

What's interesting is how these Web and/or Centralized readers reports statistics. When a bot for one of these readers retrieves your feed, they include (or tunnel ala MacGyver), the number of subscribers in their database within the User-Agent like this. (I talked about this some two years ago):

Doesn't seem ever so slightly distasteful to you? This data is totally non-standard, and living in the HTTP Headers for User-Agent. Oleg thinks it's OK per the HTTP spec, but I say bleh.

Why hunt for older headers to stuff this data into? Four years ago Tim Bray brainstormed some ideas and thought about the URL itself, then the referrer: header, or the from: header. Why not a new one?

HTTP Headers themselves are name/value pairs, fairly well structured, but it seems that rather than forcing FeedBurner to keep tables of the various formats of the various readers and make them Regular Expression their way thought it...

Old Joke but still a Good One: So you've got a problem, and you've decided to use Regular Expressions to solve it....so, now you've got two problems...

...why not add a new HTTP Header? I mean, the blogosphere has long abandoned many of the slower standards bodies in favor of a de facto standard-building process. If enough people do it, it's standard.

RFC: Why don't the bots and online aggregators start requesting feeds like this:

GET / HTTP/1.1
Host: www.hanselman.com
User-Agent: MyFeedReadingBot
Feed-Subscriber-Count: 45

It worked for SOAP Action back in the day, why not standardize a new header now? Let's let MacGyver rest.

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

Adding a Timeline to DasBlog with the SIMILE Timeline Library

February 17, '07 Comments [8] Posted in ASP.NET | DasBlog | Javascript
Sponsored By

I've been exploring recently the amazing Timeline Javascript library from the SIMILE folks over at MIT.

What a joy to work with! I've not historically been a fan, by any means, of JavaScript. Of course, debugging it can be a hassle and the development process always feels very unstructured to me. Heh, probably a side-effect of the language, right?

Anyway, the API for the SIMILE Timeline is very well thought-out. It's very JavaScripty, to be clear, but it is even easier to pick up than the Google Maps API.

So easy, in fact, that I was able to add Timeline support to DasBlog over my lunch hour. Check it out at http://www.hanselman.com/blog/timeline.aspx. Try typing in the Highlight boxes, as shown in the screenshot above. Notice the highlighting in both bands of the timeline. I've checked the server-side TimelineHandler that creates the XML that Timelines consume into the head of the DasBlog tree.

Also, take a look at their "Exhibit" project. Maybe Web 2.0 will turn out something useful after all! :)

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

Clean up your Temp Files

February 16, '07 Comments [6] Posted in ASP.NET | Tools
Sponsored By

I was doing some tidying up on a website for a family friend recently. His ASP.NET application was taking longer and longer to start up. It also happened to use a lot of XmlSerializers, and of course, as an ASP.NET app, there's a lot of page-by-page compilation as he's not on 2.0 and doesn't use aspnet_compiler.

Additionally, there's some code that this client wrote that writes out temp files but doesn't clean up after themselves. When there's this many files in a folder, calls to GetTempFileName can block for many seconds.

Not only can "excessive temp file growth" cause pain at runtime, but it'll easily crush Explorer.exe's usefulness. It'll also become impossible to apply Attributes to the folder.

The point is, that there's a few folders that you need to watch out for file growth in.

I like to modify the options inside Microsoft Drive Cleanup using Shawn A. Van Ness's registry file. You can extensively modify what appears in the Drive Cleanup list, even adding your own file types and your own application-specific directories and files that you might want cleaned up.

Check out your own systems...drop out to a command prompt (cmd.exe) and do:

  • cd %tmp% and cd %temp% - You'll usually end up in C:\DOCUME~1\username\LOCALS~1\Temp.
    • At this point, I like to do the equivalent of a deltree and go up a directory and:
      • cd ..
      • rd Temp /s (it usually won't manage to delete the whole dir. Someone will have a file open and the final directory deletion will fail)
      • md Temp (in case it was deleted.)
  • Everything in %windir%\temp - There's lots of Perfmon counters in here, so you won't be able to delete everything. Often you can del *.* and anything that shouldn't be deleted is currently open.
  • If you are a developer, and have developed ASP.NET for years/months, clean up %windir%\Microsoft.NET\Framework\ <VERSION> \Temporary ASP.NET Files. I had 4 dozens sites in here.

Tidy up, my friends.

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.