Today, I'm going to show you how you can learn and teach C sharp
F sharp and PowerShell, all using visual studio code with the dotnet
interactive notebooks extension.
It only takes seconds to install and get ready.
So tune in.
Hi everyone.
I'm James Monson Magno.
And I'm back with another video talking about some previous technology that
I was using and the Nicola coalescing video, put a link up over there, uh,
to talk about that video and I was using specifically.net interactive
notebooks, which is an extension for vs code completely for free.
That enables you to write basically C sharp F sharp or PowerShell.
Execute them.
And also write mark down.
Side-by-side is documentation.
This is great.
If you're a library author or you're exploring different concepts, or you're
doing data science, or you just want to learn one of these different languages,
the extension takes seconds to get set up.
And what's nice about it is that if you've ever used.
Jupiter notebooks, which is Python based and also enables you
to run, um, different things in binder in, in the, in the browser.
It's based on that same exact technology.
So you can actually leverage the dinette interactive notebooks
with Jupiter notebooks as well.
So let me show you how to get up and write.
So the first thing that you'll need to do of course is get
dotnet interactive notebooks.
This is the extension for vs code, how it is in preview today.
As of when I'm recording this in September of 2021 to date this video, but you can
install this and see this extension.
So all you need to do is get vs code, which if you haven't gotten, you
can click on that link and get BS code for Mac windows, or PC PC, and
then you'll need dotnet five STD.
Now or Donna at six or whatever you have, you can always go to dot.net
D O t.net, click on download and it'll show you the recommended
thing that you need to install.
And then you're at that.
You're good to go.
You're basically good to go.
So let's open up vs code and here I am in vs code and let's go to
the extensions part control shift X I'm gonna type in.net interactive.
There we go.
And Donna interactive notebooks is right there.
So I'm going to hit install.
And I'm good to go.
I'm dumb, basically done at that point, which is awesome.
So let's go back over to files, close this down, and I'm going to go to
view command pallet control shift P.
Now with the Donna interactive extension installed, I get a lot of
new options for Donna interactive, like opening a notebook, saving a
notebook, or creating a new blank.
No.
Now, let me zoom in here because there's actually two file formats that you can
use with dotnet interactive notebooks.
The first one on top is DIB or DIB, and this is a dotnet interactive book.
I think I'm going to call it.
And that is something specific to Don and interactive notebooks.
That is a markdown based, um, file format that gets loaded.
What's nice about that is that it's very editable because it's marked down
and you can create markdown, did files basically, and edit them in the browser
or anywhere else, and then reopen them.
The IPY and B that is the standardized Jupiter notebook file format.
So you can read and write and use all the.net interactive notebooks
with Jupiter notebooks as well.
So it's up to you.
Um, what's nice about IPY and B.
So you can take a, B, C sharp, sharp, or power shell.
Notebooks and open them in Jupiter, notebooks and binder
and all those good things.
I'm going to create a dip here and here I can select between
C sharp F sharp or PowerShell.
So I'm going to hit C sharp here and close this down.
And I have my dotnet interactive.
There you go.
Now I may have installed a few more things based on your setup.
I've installed this before, but the museum in here and you can
see, I'm kind of good to go.
And here I can see I'm using Don and in her note and interactive notebook, I
can add a code block, a markdown block.
Um, I can just start writing stuff so I can do console dot write
line, and I'll say hello world.
And I can hit.
Execute and it runs it.
I can run it again.
I can do sorts of things like VAR name equals James.
There we go.
And I can do string interpolation here.
I'll say hello.
Name and here and I'll run it.
There we go.
Hello James.
I can also do things like using statements.
So system dots, whatever I can load IntelliSense in here and get all the
things that I would know and expect, um, you know, system dot, you know,
system dot area, and I can get all the different.net goodness in here.
If I wanted to use component model or command line or drawing or anything
like that, it's all in there.
Now what's nice about this is that now I can, I write these different code blocks,
but I can also add a mark down block too.
So here I can do things like hello world, and I can put like
a list in here, one to do stuff.
And then I can hit this little checkbox.
All right.
So what's nice about that is that that little checkbox enables me
to actually render that mark down.
So that would happen if I was just opening it fresh for the first time.
So that's what the user would see.
So you can do little challenges in here.
You can bring in different libraries into the applicant, into the Donna interactive
notebook, and you'd be good to go.
You could save it so you can just save it here.
I'll save it to my desk.
And now I have a dip file right on my desktop.
And that's it.
If I close it and I say open file and I browse here to the dim and open it
up and then we'll see that it opens the dinette interactive notebook immediately.
And I'm ready to go, which is cool.
Now let's say I also do a new interactive notebook.
I P Y N B.
And I say C sharp.
Now I have basically for all intents and purposes, the same exact IPY and
B, but it's going to install some other extensions that are required.
Cause it could also run Python and other things like that.
You get a few other things in here too.
I'm not a hundred percent all up to speed on the IPI and B
and then Jupiter notebooks.
But as you can see, it looks pretty much, very, very similar, um, right there.
And you get two different file format.
Now you can do a lot more than just write code.
In fact, when you go to the, uh, repository for, uh, Don and interactive
notebooks, the repo here you can scroll through and can see it's
actively, weren't worked on by the team, latest releases three days ago.
And as you scroll down, You'll see all sorts of things about what it's
for how to create one multilanguage.
And there is some other support for like JavaScript and HTML writing,
Cousteau support and looking at Python and R so all bunch of stuff.
And here you can actually see that, that then not only can you just write C-sharp,
but you can interact with different blocks, like JavaScript, the blocks,
for example, uh, you could be mixing and matching these different pieces of
technology as we can see their C-sharp.
HTML and JavaScript.
They're all for all intents and purposes, different blocks over
here, there's visualization.
So this one's actually using a sand dance and trace data explore.
And this is going to basically put a big, uh, chart and graph, uh, here.
So you can plot data points if you're doing data scientist stuff, and
then there's all sorts of different visualization libraries that you can use.
All right here, which is really, really cool.
So this is more than just writing some code.
You can do all sorts of cool stuff here, so, and it'll show you how to open
it and project Jupiter, uh, as well.
And you can do the C sharp F sharp, and of course, PowerShell, which is really cool.
So you can do all these different things, which is nice.
There's some samples in here, but I also want to show you a few other things.
For example, if you go to the Don net website and go to DOTD.
Dot net slash learn to code.
That'll take you to the dinette website slash lender code.
Put a link in the show notes.
They're looking at learning seashore for the first time.
There's actually an education pack that bundles everything you
need into a single installation.
And then here there is actually the explore C-sharp one-on-one
notebooks, which is pretty cool.
So it'll actually look to launch the very first one, this onto that
really quick, but you can look at the GitHub repo here for all of them.
And what's cool is that, uh, there are over 15 notebooks ready to go,
and you can see that there's actually videos to correlate with all of them.
The C-sharp one-on-one videos I'll put links to though those envelope.
But let's say I wanted to learn, um, like what are loops.
I'm just going to click on this notebook and hit open.
This is going to launch that notebook.
Inside a vs code.
Okay.
And here we can actually start learning about all the different
loops that are all for us here.
What's really cool is that, uh, Sophia was an intern on the.net team, uh, on
the community team wrote all of these notebooks while she was entering it.
She had a bunch of other awesome projects.
So shout out to Sophia, uh, as well.
Uh, and, uh, and it's really, really cool.
You can actually do next module last monitor module J school
playgrounds at the bottom.
So you can start learning about all these different things.
Inside of C-sharp and to start running the code immediately look at this.
This is really, really cool.
All right.
So, uh, this is a great way of getting started learning and teaching
C-sharp as sharp or PowerShell.
This thing is completely free.
The Donna interactive notebooks, you can use it inside of the vs code.
You can then share all of your lessons up on GitHub or anywhere else, because
they're just marked down files or IPY and B files, and you can get.
I'll put links to everything that I showed here below.
If you have any questions at all, feel free to reach out to me.
I'll also probably reach out to Maria nigga and the team who have been working
on the Donna interactive notebooks.
And it blows my mind, all the amazing things, but I love that if
you're just getting started to learn C-sharp or F sharp or PowerShell,
you can just go grab those one-on-one series and just kind of get started.
Right.
Hopefully you enjoyed this video.
If you did give it a thumbs up, really appreciate that.
That helps it go into that YouTube algorithm of goodness
and recommend it to other folks.
And of course, don't forget to subscribe, hit that notification bell.
I'll tell you that, use that at the end of every video, but honestly it really helps.
This channel myself and others find these videos.
I guess that if you have any questions, let me know and happy life.