In this lesson I'm going to show you how
to create a workspace on your system. Now
a workspace is simply just a directory
on our computer that we decide to store
all of our project code. One of the key
attributes separating a good developer
from a great developer is organization.
Now one way that I stay organized is I
decide to put all of my project code in
one location on my machine. As a software
developer you're going to be working
with many different projects. Now I used
to just store these projects all over my
system, so I'd have some on the desktop,
some in the documents, some on the
downloads. Now the problem with this it
makes it very difficult to find specific
projects when you're looking for certain
files. Another problem is it's hard to
backup your work, so if you wanted
to backup all of your code you're going
to have to dig through your system
locate all of the project files that
you've stored somewhere and make
sure that you copy them all. By storing
all your project files in one location
you can easily find any code that you're
looking for because you know where it is
it'll always be in the workspace and you
can easily back it up if you need to
back up all your code you simply just
plug in a USB disk copy the whole
workspace directory and you have all
your code backed up. So let's create a
workspace directory before continuing on
and working on this project. Load up the
file explorer on your system, so on
Windows this is the file explorer and
head over to the home directory. Now I
always create my workspace territory in
the home directory, I'll tell you why
later. So in the home directory,
right-click and click new folder. We're
going to call the folder workspace. Now
we're going to be using this workspace
folder a lot because it's going to have
all of our source code in. So let's
create a shortcut up here in the quick
access so we can get to it easily later
on in the course. Alright so now we have
our workspace directory, let's create a
folder inside that for the project we're
going to be working on. So go into the
workspace directory and the
project we're going to be working on
is going to be called the profiles REST
API. So create a new folder inside the
workspace called the profiles REST API
Now I recommend not using spaces or
capital letters when you create
the names of your projects. The
reason for that is we're going to be
using the git bash to navigate into our
directory and it makes it a lot easier
to do that if there's no spaces in the
names. So my personal preference is to
just avoid using spaces in the names in
general. Alright so now that we've
created our project directory I'm going
to show you how to open that project
directory in atom editor. So atom is a
text editor that we installed in the
previous videos of this course. Now if
you haven't already installed it, I
recommend going back to the previous
videos and getting that installed.
Because we're going to be using it a lot
during this course.
Alright so let's load up atom, click on
start search for atom and load up the
atom desktop app. When atom loads it's
going to show you a welcome screen like
this if you haven't loaded it
before. So this is just telling you some
information about atom. We can close
these tabs off for now and we're going
to load up our project folder in atom. So
the way that you do that is you click on
file and you click add project folder. From
the open folder menu select the
workspace and click on the profiles REST
API folder and click select folder. Now
the nice thing about this is you can
open up multiple different projects at
the same time so if you're working on
multiple different things or maybe
related projects you can open them all
up here in the atom editor and you can
navigate them using the tree view. You
can also create new files, new folders
you can rename files you can basically
do everything that you can do in the
file explorer in atom and that makes it
really easy to work with because you can
work with everything all in one place. Ok
so now that you know how to open up the
project folder in atom I'm going to show
you how to navigate to the project
folder using the git bash. Now if you're
on Mac or Linux you can
just use the terminal
for this. Because we're on Windows we're
going to use the tool called the git
bash. So if you click start and you just
search for bash or git bash you load
this up. This is a tool that we installed
earlier when we installed git on our
system. Now it basically is a replacement
for the command prompt window which you
may be familiar with but it gives you a
lot of the linux command
line tools that we're going to need to
use in this course. It also looks a lot
better and it's a lot easier to
work with git projects using the git
bash compared to the command prompt. Okay
so I'm going to show you how to navigate
to our project folder using the git bash.
The way that you do it is you use a
command called the change directory
command and it's abbreviated to CD. It
stands for change directory. So we can
just type LS here to list all of the
folders and files in the current
location so you can see here we have the
workspace directory, that's the workspace
directory that we created earlier. Now
the reason we created it in the home
folder is because whenever you load up
the get bash or the command prompt or if
you're on Mac or Linux the terminal it
automatically defaults to the home
directory. That's what this little
squiggly line here represents that
represents the home directory. So having
created our workspace in the home
directory it makes it really easy to
work with the terminal because you don't
have to go to fiddly
paths like locations on the system
because when you first load it up it
automatically defaults to the home
directory. So we're going to use the CD
command to change into the workspace you
simply do that by typing CD and then
workspace and hit enter. And now you can
see that we're in the squiggly line of a
home directory /workspace.
Now let's type LS and we can see all of
the project in our workspace. So far we
only have our profiles REST API. So use
the CD command again to move into the
profiles REST API.
And here's a hint if you start typing
the first few letters of a directory
name and then you hit the tab key it
will autocomplete based on the names of
the directories that are available in
the current location. So because we have
a directory that starts with profiles it
autocompleted it to profiles rest api
That saves you a lot of typing later on
as we go through the course. Okay so
after typing CD profiles rest api hit
enter and now we are in the profiles
rest api location. Okay so that's how you
navigate to it, now let's just say you
wanted to navigate back to the previous
location. Well you do that typing CD..
that stands for change directory
into the parent directory of the current
location. So if you type CD.. it will take
you back to the workspace. If you type cd
profiles again profiles rest api
it will take you back there. Okay so that's
how you create a workspace, open your
project up in atom and navigate to your
project using the git bash or the
terminal. Thank you so much for watching
this video, I hope you found it useful,
and I'll see you in the next lesson.