thank you for joining me and today's
seminar is gonna be called the wonderful
world of github as I'm sure you all
agree I typically come up with the best
titles so let's jump right in okay so
first of all what is github I recently
heard github being called the Google
Drive of code and in many ways I really
really like that description so let's
take a step back the first thing I want
to say is congratulations if you've
taken cs50 then you already have a
github account so congratulations and
you've already used github how well you
may have not realized this but every
time that you've run check 50 or run
submit 50 what you've been doing is
you've been pushing your code that lives
on your computer onto github onto you
know so that it's now living in a github
repository okay so how does it work how
does you know code go from your computer
on to just you know Google Drive of code
well the way that you ask github to
connect with your computer is through a
series of git commands now Brian you
cs50 is current head TF has a really
really great seminar which is an
introduction to github and basic git
commands linked right above and if you
are not yet familiar with git commands I
highly highly highly recommend watching
this video I know I have myself to watch
it many many times
okay so in the seminar we're not going
to be talking about the nitty-gritty of
how it works exactly but instead I
wanted to take a step back and sort of
have a conversation about what github
can do for your programming experience
how github can connect different
computer scientists and sort of really
really get excited about using github
throughout the rest of your CS careers
so the first thing I want to talk about
is something that is very
very near and dear to my heart commits
and specifically commit messages so what
I mean by this let's take a step back so
essentially every time that you push
your code to github okay every time you
say hey github I'm about to send some
code that I've been working on on my
computer locally would you please go
ahead and save it and might get hub
repository so again every time you push
your work to github you have to attach a
commit message now when I first started
learning how to use github I didn't
really care about what messages I use I
really sometimes I'd like try to submit
it with no message which github doesn't
really like and then sometimes I just
like really send random random messages
you know really like could have been
anything could have been like elephant
or duck or something of the sort however
now that I've you know I'm deeper into
my computer science experience I have
realized that commit messages have this
incredible power and that they're
actually extremely extremely useful so I
wanted to share some of my learnings
about get Kumasi gist let's dive right
in so there are a couple different
reasons that making commits with really
nice messages is really useful so the
first one is stuff breaks okay stuff
breaks all the time you can have code
that you think is working and you might
break it and you'll likely break it and
you'll likely break it again and again
and it's going to be frustrating but
that's completely completely ok so what
can have lets you do is it lets you send
different versions of your code so that
you don't have to be worried about stuff
breaking because stuff will break and
when it breaks you can revert to an
earlier commit essentially say hey
github I slightly screwed up let's go
ahead and change the code that is on my
computer to something that I had before
that did work okay so I just included
some screenshots of some funny recent
commits situations I've been in where
stuff has broken and you'll notice that
you know sometimes you try to fix
something and I
work and you just sort of have to start
from a few steps behind but you know CS
isn't quite isn't always a programming
isn't always a very linear experience
it's sort of more like jumbled and
progress doesn't always look so straight
forward so that moves on to our next
reason which is that it lets you try
different things so I know that many
times I've been coding and I think I'm
like 80% of the way there and I think
just in the corner of my mind that
perhaps perhaps there's maybe a better
way to do it or perhaps one of the
problems that I have might be fixed by
doing a certain thing but sometimes I'm
nervous because I think I'm 80% of the
way there I think not sure that this 20%
is worth me potentially ruining
everything okay so this again brings us
back to get okay which by saving
different versions of your code you're
sort of empowered to really really try
different things and this has happened
to be many times where I will say okay
you know again I think I'm 80% of the
way there and I'm gonna try three
different strategies and I'm going to
make various commits and you know with
great commit messages along the way so
that I can track that and then I can
sort of free myself up to trying things
that might not work trying things that
very well might have devastating
consequences on my project but that's
okay so again and this one little thing
I've drawn it's just to highlight that
there are you know from a specific
starting point you might go in a bunch
of different directions get really
really letting you do that safely and
efficiently and again this sort of opens
up a whole new world reading code
without the fear of you know things
going so wrong that you won't be able to
get back to where you started
this brings me to another really really
really cool thing about commits and your
fun commit messages um so I'm a big
reflector and I like looking back and
then taking the time
process and and think through you know
my different approach my different
approaches to different problems and one
of the things that I found in you know
my extensive extensive commit making is
that it's actually really really really
nice to be able to look back and see oh
wow I remember that commit I remember
you know sitting in the library at 2
a.m. and thinking will I ever get
through this I remember that moment
where I made a change everything broke
and then I controlled Zeid and pushed my
push my code because I was you know very
worried that I was about to go into a
really crazy direction so usually at the
end of you know a piece at a problem
site for a computer science class or you
know just looking through some personal
project I've been working on I'll often
just scroll through those commits and
think through Wow
you know look how far I've come look how
hard some of those moments work look how
rewarding a lot of those parts were and
I think it's a really really really nice
thing about github lets us do okay so
moving on the last thing is just a small
note that one of the another great great
feature of github which again Brian
covers quite extensively is
collaboration
so github and git commands really allow
us to collaborate quite easily with
other people that are working on the
same project so in this screenshot it's
actually just me making all the commits
but I was using someone else's slide so
I just wanted to you know give them sort
of like a shout out which brings me to
one very important thing about commit
messages so I metaphor I use for those
often is let's say I wrote an English
paper and I give it to my teacher and
when my teacher returns it you know I
have a grade whatever I'm gonna have a
bunch of comments and I start reading
them and I the comments that I'm seeing
our small change here mmm tiny issue
here you should fix something you know
all these like very vague short messages
might not be that useful commit messages
are really similar so let's say you're
working on a project where a ton of
other people are also going to be
working on it with you well it's a good
idea to be transparent and about your
progress and about you know how
different things are going and it's just
very useful for other people that are
working on the same project to be able
to see sort of what's going on
so in fact I've included these
screenshots as poor examples of commit
messages okay
I'd highly recommend you know taking the
extra 30 seconds to write a commit
message that is specific that is clear
so that when you go back and especially
especially especially if someone else is
looking at that repository looking
through those commits but they can see
exactly what's going on and you know
maybe lend a hand if needed or at least
I'll have a better sense of how the
project is going so now let's move on to
my second favorite thing about github
which is the github explore page so
there are tons of platforms out there
where people come together and are
sharing and collaborating and those are
typically some of my favorite platforms
github is no exception
so the github explore page is
essentially a page where you can see
repositories and projects that people
have you know made public which is
typically the vast majority of them I
know that early on and my github career
I mainly focused on my personal github
repository so the personal projects that
would show up when I you know clicked on
my github profile and for a long time I
mainly stayed on those few pages but
would have since realized is that the
github explorer vage is phenomenal it is
so so interesting you can read about
other people's projects you can read
about things that you are using
okay so tools that you are using I
cannot stress enough how interesting it
is to read about how check50 works cs50
is automated tool for creating the
correctness of code and in fact many of
cs50 tools are all of the documentation
zhan github and you can go and just look
through the code and try to make sense
of how everything is fitting together
it's really really interesting and last
but not least back to this issue of
collaboration so when you're exploring
projects there's this thing that you can
do that's called a pull request which is
essentially someone has a repository a
project and you say something like hey I
think there's a way you know you can do
this better or hey I spotted a bug and I
am proposing a way to fix it and
essentially you can you sort of like
clone the project make that change and
then you create what's called a pull
request which is essentially you tell
the owner of that repository
hey I'm proposing something might you
accept this proposal okay and if they do
then that change will merge and you know
their repository will change in that way
and if you know they could say no if
it's maybe not a good solution or not a
good change
but-but-but-but I actually heard so many
stories of people that randomly made a
pull request you know to some repository
that is you know some organization sort
of like far away you know in a different
country or something of the sort and
they said you know hey listen I love
your work I noticed a small change
here's the way you could fix it they you
know create a pull request that
organization accepts the change and then
now you know you've made this connection
so something I sort of always like to
try to do is sort of go around the
github explorer page read about what
other people are up to see what I can
learn see what I can try to collaborate
on and again you it's a great place to
sort of make those connections again
especially if you are able to find a way
to improve something with you know on
someone else's project or if you find a
bug and have a proposal for a way to fix
it you can create a poor request and
make that connection in that way the
last thing I want to talk about Hispanic
websites through github pages so there
are so many different aspects of
computer science and I think one that is
particularly popular is web development
you know we all use websites we're all
on the internet all the time you
probably are right now
and a lot of us want to know how to
build these things but we spend so much
of our time on so I recently have
realized that there's this giant giant
push towards learning a bit of web
development however if you've looked at
you know HTML or CSS or even JavaScript
you may have realized that it can get a
little bit more complicated than you
realize and sort of like especially for
me when I was just learning how to
create websites it felt like there was
just a lot of moving pieces and I didn't
know where to start and I didn't want to
you know quite go so far on one extreme
of building something sort of from the
ground up and it also seemed not that
fun to just sort of like input stuff
into like a template like WordPress or
something of the sort
I kind of wanted something in the middle
and I found out something that was
really really really great to start with
was github pages so github pages is
essentially a way for you to create
static websites that are hosted on your
own github repository okay so it's
essentially a way for you to create
simple websites and have them sort of
live right away it's all very clearly in
your control you sort of our coding on
your computer and you can push changes
to github and then they'll sort of be
like updated on your repository so the
great great great great thing about
github pages they have phenomenal
documentation ok very much step-by-step
walking you through how to create your
first simple and static website okay
this is how I made my a couple of my
like early first websites like didn't
really know again where to start this is
a great great great place to start okay
so what are the big takeaways of this
git and github can often sound like big
scary things but they're not okay again
if you've taken cs50 you're like 70% of
the way there okay so just a couple
notes that I want to leave you with as I
said before commit messages matter
really commits matter for a bunch of
sort of the very small scale reasons
that we talked about like you know
clarity and collaboration but
so bigger picture it's you know a great
time to reflect on your problem-solving
process and a good time to sort of like
reflect on how you're growing as a
programmer and then the second one is
exploring awesome projects like you know
the internet is your oyster and Google
is great and you can sort of go and
Google a bunch of different things and
the great thing about the github explore
page is that everything that you're
gonna find is gonna be in a format that
you know and are comfortable with and
again pull requests are super super
interesting and super cool cuz Anna
gives you that chance to connect with
you know an organization a project that
might be countries or thousands of miles
away and the final thing is that you can
jump into simple web development with
github pages okay again you're 70
percent of the way there all you need to
do is read a little bit about how to set
up your first basic website and then you
can send that link out to your friends
and get everyone really excited about
how you're the next Steve Jobs
okay so last note I just leave you with
this commit message that I made recently
which is pile Sanders not the best
commit message in terms of you know
doesn't really convey much information
but what it does convey is my excitement
about github what it does convey is how
exciting these things can be and then
how fun and you know I promise you I
promise you I promise you got the second
that you dive in to github start with
watching Brian's seminar that you're
just gonna find this wonderful wonderful
world and you're never gonna want to get
out of it
okay I'm gonna now wait for a few
questions okay
okay looks like no questions at the
moment that's totally okay I'm probably
gonna stay here after for a bit if you
would like to chat or you know I can
show you some of my projects or
something of the sort but if that is all
then I think we will conclude thank you
so much for joining thank you