Scott Hanselman

Xamarin .NET Workbooks - Interactive Computing is a stellar learning tool

February 24, '17 Comments [11] Posted in DotNetCore | Learning .NET
Sponsored By

I've been thinking a lot about how to best teach .NET and C#/F# to folks who are new to the space. We've added an in-browser no-install C# tutorial at You can run through almost a few days lessons in C# without installing anything. Heck, it's useful even if you just want to brush up on your skills.

When I spoke with Safia Abdalla a few months ago she re-introduced me to the ideas behind Interactive Computing and the whole ecosystem around Jupyter Notebooks, and the Nteract project Safia works on. It's pretty amazing.

Pythonistas are familiar with Jupyter and the idea of a notebook that cleanly mixes prose and code. This ecosystem is very friendly to data scientists that are (perhaps) more scientist and less developer. People for whom an IDE is not as interesting as "electric paper."

In fact, many people don't realize that the Microsoft Azure Cloud supports hosting of Jupyter Notebooks using Python, R, and F#.

Azure Notebooks

Notebooks are a great learning resource that go beyond a REPL (an simple interactive console) in that they are effectively textbooks with islands of interactive code. It's even more powerful when you consider graphics, charts, and other interactive models.

Xamarin has a thing called Xamarin Workbooks (I'm calling them .NET Workbooks in my head) that you should download and check out RIGHT NOW. Go get Xamarin Workbooks & Inspector for Windows (or download for Mac). Start playing around with workbooks or try out the samples.

I'm going to try teaching my C# and .NET courses for at least the first day or two using Xamarin .NET Workbooks. I think they have huge potential and I'm thrilled that Miguel and friends are investing so much in them. The potential for these as a learning tool that sits between a REPL and an IDE is huge.

The page at is FILLED with amazing example workbooks and lessons, and it's growing. It has section not only on C# but Android, Games, Graphics as a concept, iOS, WPF, and so much more.

I run it and start here:

Xamarin Workbooks

Then I start typing...prose first! Just real sentences. Then I add some code. Notice that I'm not doing Console.WriteLine, I'm just assigning a variable. Xamarin Workbooks makes a nice visualization of my variable.

var scott = "Hanselman"

The prose is ignored (by the compiler) but the code cells and built upon each other and when you execute one you're executing up to that point. Great for building up concepts.

You can print in other libraries and built upon them like in this chart example using the Urho library.

Charts in Xamarin Workbooks

Not to put to fine a point on it, but you can write really fully featured examples or games in Xamarin Workbooks. Here's a fully 3D realized planet earth WITH SATELLITES. Again, with not just sample code but explanatory prose. It's a textbook come to life.

THIS is how I wish I learned programming 25 years ago. I'd loved to have turned (or demo'ed) a .workbook file. I'm thrilled to see C# folks be able to do simple things that Jupyter users have enjoyed for so long.

3D Earth in Xamarin Workbooks

What do you think? Would this be a good way to deliver a course on learning .NET and C#?

Sponsor: Big thanks to Progress! They recently published a comprehensive whitepaper on The State of C#, discussing the history of C#, what’s new in C# 7 and whether C# is still a viable language. Check it out!

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
Friday, 24 February 2017 09:07:34 UTC
I actually tried the project. But I was disappointed when I could not get aspnet core running by installing NuGet packages.
The UI is a bit slow and unresponsive.

The idea itself is great, and I would use it as a training tool as well. Hopefully it will run better in the future.
Friday, 24 February 2017 09:19:56 UTC
I love the work books (at least what I have tried until now). But I was wondering if you know anything about official workbooks for Xamarin.Forms? I know you can go through hoops to create your own but out of the box would be so great.
Sturla Þorvaldsson
Friday, 24 February 2017 11:49:37 UTC
For a beginners point of view: Workbook are AWESOME !!!
For experience developers: StackOverflow + Workbooks = Mega-Awesome !!
Joao Rocha
Friday, 24 February 2017 15:43:34 UTC
Is there any integration here with Azure ML?
From a data science perspective that might be nice.
Saturday, 25 February 2017 01:15:39 UTC
@Scott the "Python, R, and F#" link ( leads to a "Page Not Found" message.

It looks like the underlying page is Angular and the # is trying to match it to a route instead of the anchor on the page.

Changing the link to (sometimes) works for me.
Russell Kennington
Sunday, 26 February 2017 19:51:10 UTC
This is AWESOME.
I look forward to mva coming in this format.
I can then download workbooks and have an offline blast without breaking the bank on my capped data bundle.
Monday, 27 February 2017 08:00:14 UTC
Did someone just reinvent literate programming? :)
Monday, 27 February 2017 08:10:29 UTC
A few years late but better late than never - see ''.
This guy was/is way ahead of the curve...

But still nice to see this concept finally reaching a practical (and supported!) use.

Hope this goes from strength to strength.
Tuesday, 28 February 2017 12:26:41 UTC
This reminds me of Mathematica. I often used notebooks when studying to put in equations and questions to answers and record them in a notebook for later use.
Wednesday, 01 March 2017 01:36:48 UTC
amazing post man! awesome :D
Saturday, 04 March 2017 18:47:52 UTC
This is some impressive stuff, thanks for the article. I would love to see this used in academia, especially in middle and high schools for those that are interested in programming.
Comments are closed.

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