Not long ago I created a video on using Visual
Studio Code for writing documentation, which a lot of you
liked. Now I want to revisit that topic, but this
time also using GitHub Copilot. If you're new to Copilot
or don't have it set up, check out this video
here and circle back, because in this video we're going
to see how Copilot can simplify the.
Process of writing documentation.
In this video I did before, I covered the basics
of using Markdown in VS Code for documentation, and in
this one I introduced Copilot and how it's used with
a variety of coding languages. But can Copilot be used
for writing Markdown for some forms of documentation? Well, before
we can get into that, I should mention that there's
an array of documentation types software engineers write, which include.
Readmes, API documentation, bug reports, installation docs, release notes, functional
and technical specifications, testing docs, and much more. So let's
use Copilot and see how it could assist us with
our Markdown for a few of these. So right now
I'd like to create a README file, specifically one that
could be used as a template. So since it's going
to be a template, we'll want it to have a
project name, and I'm just going to leave the term
project name.
Up here and just add in Read me. So you
could already see that Copilot is trying to predict for
almost anything that I'm trying to type right below this
project name, first set, project description, which is what I
want. But I want the heading to be a little
bit smaller so I'll be using £3.00 signs for the
heading description. So I'm going to say use this project
read me and that's pretty good. It ends with.
To describe your project in detail, but I wanted to
say to create a read me for your project and
you can see how it looks on the right hand
side here for the preview. Now I'm going to want
to add an image to lighten this up so that
it doesn't look so boring. So I'll just drag my
image file that I already have prepared and place it
right over here.
And so now within a read me file, there are
going to be several sections to it. So I'm going
to number my sections and see if Copilot could start
suggesting other sections. Usage for a particular project is something
that could be found in a read me in addition
to contributing. Just after adding just three letters, it needs
to add contributing and that's pretty good. What else? Credits.
I'll tab to add that and right after just adding
the first two sections, it already knows OK, he wants
to add more sections, so let's go ahead and suggest
some more. So after credits license, that's another good one.
I will add that questions is good also, but I'm
going to go ahead and stop here and actually want
to add version history just with the V it already
predicted version history. That is really great.
Now under usage, I'm just going to add within brackets
just a description what goes in here and that will
be instructions on how to use this project. So just
by having added that, now when I go to contributing
and I hit enter, it now suggests instructions on how
to contribute to this project. And that's the magic of
Copilot. I mean it's not perfect, so you do have
to be the pilot itself it.
Is called Copilot for a reason and it makes suggestions,
but you have to be the main one to make
sure that the suggestions make sense. So for three credits
credit to the project that makes sense and I'll do
the same for license and also version history. And within
a few seconds we already have a nice little template
set up. Now just to make this a little bit
easier on the eyes, sometimes I like to use emojis
if it makes sense, so for usage.
I'll add an emoji of a worker that would use
it and for contribution. Now Copilot saw that I use
an emoji. It wants to start suggesting emojis to me.
I'm not sure what this is right here. Oh okay,
it's two hands and that makes sense for contributing. You'd
want to shake someone's hand after they made some contribution.
Not for credits. Thank you. Symbol license. We have a
document and version history. Another document.
Maybe we'll try to change this and make this some
type of a book. So using Copilot it was able
to help us create this README template by assisting us
in.
Not only writing the title, but each section of the
read me in addition to the instructions for each section
and last but not least suggesting emojis. OK, in this
next demonstration what I want to do is show you
how a copilot could assist and writing some documentation is
for installation, specifically software, and in this case we're going
to want to install MySQL database and I have an
image ready prepared that I'll just drag and drop right
over here. Let's change this to installing.
MySQL And let's just start with the steps. Right after
I put #1 immediately tells me, hey, you want to
install MySQL, you're going to want to download it first.
That's pretty good. Now it suggests the URL that I
need to go to, so I'll accept that. Now it
tells me to select the MySQL for Windows. Why don't
we go ahead and just change this for Mac? Now
since it's a Mac, it is a dmg file that
I'd need to download and right now it's not suggesting
anymore. So why don't we go to Step 2 and
now we're ready to just install.
It tells us to open up the DMG file, double
click on the installer. It tells us to follow the
instruction we need to set a password for the root
user. We'll click finish and now #3 to start MySQL.
We're on a Mac, we have to open up the
system preferences. Looking good so far.
Click on MySQL. Click on Start MySQL Server. We'll need
to enter our passwords. Now it's saying to click on
server again. Now I'm writing this documentation down, but I'm
not actually going through the steps. I'm trying to feel
it out. And of course I'll have to go back
to make sure that all these steps work accordingly. But
we're getting the bulk of the work done. Verify MySQL.
Open up the terminal. It gives us the command that
we need to enter. Next we need to enter our
password and then run the command to display our databases
and.
Now it's going to suggest a table of what we
should see. So it's actually drawing it out using different
characters and I'm tabbing to accept it. And this is
the database line 30. I'll tab and continue hitting enter
and tab and this is a text representation of the
schema that we should see and then we can quit.
So as you can see we got a good chunk
of the documentation down. It might not be perfect. I
actually need to step through this to make sure that
there's no steps that are not needed.
Or there's additional steps that I need to add to
make sure that this works as I expected to, but
a lot of time has been saved with the assistance
of.
Copilot and that's it. So let me know in the
comments how you might use Copilot for documentation. Thanks for
watching. And if you got value out of this video,
don't forget to hit that like and subscribe button. Also
check.
Out some.
Of these other Copilot videos here.