Scott Hanselman

Teaching Children and Kids to Program the Old School Way

June 15, 2007 Comment on this post [25] Posted in Learning .NET | Musings | Programming
Sponsored By

computerolympicsSee that book on the right there? That's how I learned to program. This book was THE book in 1984. I typed in the whole book on a Commodore 64. 

Originally, there was a meeting between the principal and my 5th grade teacher, Mrs. Hill. They said I was "at risk." I was probably going to be voted "Most Likely to Be Convicted of a White Collar Crime." Anyway, they set it up so I could sneak an Apple II out of the school as long as it was back before Monday morning. After it was clear I'd found my (or "a") calling, Dad decided to get a C64 for me. My dad sold his Van to get me that C64.

You can spend some time reliving your C64 by using the in-browser Java-based C64 Emulator (and games) over at DreamFabric, or by downloading a C64 emulator from Per HÃ¥kan Sundell.

I wonder if a book like this could hold a 10 year old's attention like it did for me. I burned weekend after weekend typing in Hex Codes from Compute! Magazine. I paid other kids on the block to read them to me so I could type them faster.

CCS64 V3.2

While I'd love for Z to be a little more well-rounded than I, it couldn't hurt to teach him at least the logic around general purpose programming.

Will younger kids "in the future" program by scripting in Second Life? Don Box asked this question two years ago and came up with answers like, Teach them Lisp, or ML, or Smalltalk or Ruby. I'm not sure what he decided...Don?

Should kids learn a "real" language like Lisp? Or an artificially Kiddy language like Toontalk? Possibly a world like Scratch (from MIT's Lifelong Kindergarten)?

Should kids have their own programming environment as an introduction to the world of engineering? Mark Verber considered these languages for his 10 year old and has a great write up on research he did:

  • Logo: good for simple projects (and younger kids). Once scratch is released, use it instead.
  • Squeak (smalltalk) for older kids whose focus is building artifacts more than programming
  • Scheme for kids focusing on learning computer science
  • Java, Python, or KPL for kids that want a quick path to vocational program

Perhaps what's needed to help Johnny learn to program is a connection to the physical world like Mindstorms Kits or a Viper Robot and PowerShell (video) or the creation of games using tools like BlitzBasic.  Maybe Supercard (remember Hypercard?)

In the end, I suppose it depends on the kid's personality and natural thirst for learning. I plan to let Z know there is a nearly infinite number of cool things to do. The trick will be explaining it without overwhelming him (or myself.)

Technorati Tags: , , , ,

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

Error connecting to undo manager of source file "whatever designer"

June 14, 2007 Comment on this post [7] Posted in ASP.NET | Bugs
Sponsored By

This error is more than a little irritating, especially considering this is Visual Studio 2005 SP1. I'm getting this, now, for one file, every time I run my application.

Microsoft Visual Studio

The way I "fixed" it was to exclude the file from the Web Application Project, recompile, then re-include, the recompiles.

Seems to me that the error handler that threw this message box should spend more time fixing the problem automatically and less time informing me of a problem I can do little about. Maybe that's just me.

Technorati Tags: , ,

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

A Toy Train for Z

June 14, 2007 Comment on this post [25] Posted in Musings | Parenting | Z
Sponsored By

We love bargains. We shop a lot at Goodwill, a local thrift shop where folks donate their old stuff. Sometimes you can find some amazing deals. I got an iPod Car Kit once, still in the original packaging, for $2. This evening we stopped by after dinner and while Z was running around bumping into things, he bumped into and knocked over a non-descript box.

Inside was a huge set of wooden trains and many feet of track - nearly a complete set. This is the kind of high-quality toy that costs $50-$100. I've always wanted to get Z a kit like this, but they are just too expensive to justify. It was only $9, so I had to pick it up.

We watched the news while I set up the tracks...as I was getting finished I revelled in the deal. I just love saving money and finding a fantastic thing like this, especially when I know Z will have fun with in in the morning.

I started putting it together and my wife wondered if I bought the train for myself or for Z. I began to take some pictures of the setup...

...and this story came on the news, literally as I was taking photos of the layout...I turned and took a picture.

...crap. You ever have one of those days?

How would one recall a piece of software...just release a patch? What if it were such a bad piece of software that it hurt babies? What a nightmare for these people.

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

Some Guiding Principles for Software Development

June 13, 2007 Comment on this post [22] Posted in Learning .NET | Musings | Programming
Sponsored By

Patrick Cauldwell is one of the architects on our Next Generation Banking System. A while back I asked him to write up our guiding principles for not only educating new developers but also for indoctrinating existing team members into our world view. He published it on his blog as This I Believe...The Developer Edition.

It's a great list. Here's a partial listing of the first two levels of his outline. Be sure to visit his post for the complete outline. It's bent towards .NET, because the stuff he's doing is .NET, but the general ideas are usable elsewhere.

  • Our "guiding principles"
    • Test Driven Development
    • Continuous Integration
  • Unit Tests
    • Two kinds of tests
    • Automation is equally possible for both sets of tests
    • All UI development should follow the MVP pattern for ease of testing
  • Test Coverage
    • 90%+ is the goal
    • NCover runs as part of the build, and reports are generated
  • Buy, Not Build
    • Take full advantage of the platform, even if it only solves the 80% case
    • Don't write a single line of code you don't have to
    • Take full advantage of .NET 3.0, SQL 2005, Windows 2003 Server, plan for- and test on Longhorn.
    • Don't invent new solutions to solved problems.
  • Limit compile time dependencies on code you don't own
    • Everything not owned by us should be behind an interface and a factory method
  • Define your data contracts in C# (think "active record")
    • All persistent storage should be abstracted using logical interfaces
  • Fewer assemblies is better
    • There should be a VERY good reason for creating a new assembly
    • The assembly is the smallest deployable unit, so it's only worth creating a new assembly if it means NOT shipping something else
    • Namespace != assembly name.  Roll up many namespaces into one physical assembly if they all must be deployed together.
  • Only the public interface should be public
    • Only make classes and interfaces public if absolutely necessary
    • Test code should take advantage of InternalsVisibleTo attributes
    • VS 2005 defaults to creating internal, not public classes for a reason
    • If it's public, you have to support it for ever
  • Windows authentication (good)
    • Just say no to connection strings
    • Windows authentication should be used to talk to SQL, ADAM, the file system, etc.
    • You can take advantage of impersonation without impersonating end users
  • Tracing
    • Think long and hard about trace levels
    • Use formatted resource strings everywhere for localization
    • For critical, error, or warning, your audience is not a developer
  • Error Handling
    • Method names are verbs
    • If anything breaks the contract, throw an exception
  • The definition of "done" (or, how do I know when a task is ready for QA?)
    • Any significant design decisions have been discussed and approved by the team
    • For each MyClass, there is a corresponding MyClassFixture in the corresponding test assembly
    • MyClassFixture exercises all of the functionality of MyClass (and nothing else)
    • Code coverage of MyClass is >=90%, excluding only lines you are confident are unreasonable to test
    • No compiler warnings are generated by the new code
    • Before committing anything to source control, update to get all recent changes, and make sure all unit and integration tests pass
    • FxCop should generate no new warnings for your new code
    • Compiling with warnings as errors will flush out any place you forgot documentation comments, which must be included for any new code

What guiding principles do you follow at your development shop?

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 Value of Writing Windows PowerShell Cmdlets

June 13, 2007 Comment on this post [2] Posted in Corillian | PowerShell | Programming
Sponsored By

image The folks at Channel 9 dug up another interview I did with Jeffrey Snover, PowerShell architect. Here's the one I did in November of 2006, for contrast. The project has grown

I think we filmed this in March. In this one I sing the praises of PowerShell and our team at Corillian that wrote "Project Evergreen," a deployment philosophy that turned into our Corillian Member Advantage product. Check the video out. Watch it via Windows Media or download the WMV. I hope you enjoy it.

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.