SlideShare a Scribd company logo
UNTANGLING THE WEB
CLASS 2 – GIT, GITHUB, VSCODE
THE HARDWARE AND PROTOCOLS THAT POWER THE WEB
INTERVIEW QUESTION: WHAT HAPPENS WHEN YOU TYPE A URL IN THE
SEARCH BAR?
AGENDA FOR TONIGHT
• Command line introduction
• Javascript intro + what is programming in general
• Text editors
• Online editors
• Source code control
• Project 1
FROM LAST WEEK
• Make a github account. This will be your developer’s portfolio,
so we’ll start populating it!
• Install git on your computer (install “git bash” from https://git-
scm.com/downloads)
• Please make sure you’ve gotten on the slack channel. Send me
email at derekja@gmail.com to get access.
SOFTWARE COMPONENTS OF A COMPUTER
Hardware and devices
Graphics
subsystem
BIOS
Operating system and device
drivers
Window
manager
Terminal and
utilities
Applications such as word processors,
browser, etc.
TERMINAL (COMMAND SHELL, BASH SHELL)
• We’ll be using the command line a lot in this class
• It is the lowest normally accessed level of interaction with the
computer
• In many ways it’s simpler than a graphical user interface
because it is so precisely defined
• But that definition isn’t obvious until you learn about it, unlike
a graphical user interface there is no easy discoverability of
commands and features
FILES AND DIRECTORIES
• Your hard drive contains files (packages with stuff in them, either text or
binary data) and directories (containers of files)
• There are also links, or shortcuts, but these are really just a special kind of file so
we’ll ignore those for now
• In the command window (otherwise known and the terminal, or shell) you
are always in a specific directory
• You can always tell what that directory is with the command “pwd” (which
stands for Present Working Directory)
• In windows, names are not case-sensitive, but on unix and mac they are, so
be careful of case
SOME TERMINAL COMMANDS
• We’ll all be using the git bash command window, which will be more
similar between mac and pc.
• A detailed command line reference is found at http://ss64.com/
• To get the directory listing, on mac it is “ls” and on the pc it is “dir”
• Once the git bash install has occurred we will use “ls” on both
systems, for example
• If you open a terminal on your computer other than
the git bash shell things will work differently than you
expect!
REDIRECTION OF COMMAND INPUT
• command > filename Redirect command output (stdout) into a file
• command >> filename Redirect command output and APPEND into
a file
• command < filename Redirect a file into a command
• command1 | command2 Redirect stdout of command1 to
command2
• These work the same on all shells, but after you install bash, use that
and reference the page here: http://ss64.com/bash/syntax-
redirection.html
EXAMPLES
• To put the listing of a directory into a new file on a pc
• “dir > output.txt”
• Or to append to an existing file (creating a new one if it doesn’t
exist)
• “ls >> output.txt”
• To get information about a computer
• On the PC, “systeminfo” or on the mac, “system_profiler”
EXERCISE 1
• Create a directory for the class in your git bash terminal
• Where did you put it?
• Navigate to the top of your home directory
• Can you get back?
• List the contents of your home directory and put them into a
file called directory_listing.txt
EDITING TEXT FILES
• Visual studio code is my preferred editor, it is on these lab
machines
• Can you edit the directory listing you just created?
• How does a text editor differ from Microsoft word?
• Is plain text, no formatting, no tables, no embedded images, etc.
• Is optimized for writing code rather than documents
• Is a different file format
GITHUB AND GITHUB PAGES
• Source code control is the essence of modern website
development
• Never develop anything that is not in a repository
• Safer – can track changes and prevent accidental loss
• Portable – can develop on multiple machines
• Workflow – can share development with other people
• Portfolio – employers look at github
INSTALLING GIT AND GIT BASH
• Windows
• Download from https://git-scm.com/download/win
• Run to install
• Open the “git bash” desktop app
• Mac
• Might already be there ($ git –version)
• If not, you can get an installed from https://sourceforge.net/projects/git-
osx-installer/files/
• Or use homebrew, “brew install git” then check the version
SOURCE CODE CONTROL
• Github, Gitlab, SVN +many, many proprietary solutions that you’ll
never use (if you’re lucky!)
• We will focus on github
• Gitlab is very similar, based on GIT
• “Global Information Tracker”? Other less savory acronyms
• May not stand for anything other than not having a UNIX command
named git previously and kind of sounding like “get”
• Written by Linus Torvalds (of Linux fame) to manage linux sources
USING GIT
• Avoid most of the GUI tools!
• They may be easier initially but they will eventually get in your way
• Technically called a “BASH” terminal in the version I’ll be having
you install
ESSENTIAL GIT COMMANDS
• In a bash shell, create a new directory (mkdir untangling)
• Create a new repository in the github.com website (or use git init if you want
to do it locally)
• Clone that repository to your local machine (git clone $projectpath)
• Edit or add a file using an editor (I like visual studio code -
http://code.visualstudio.com/)
• Make sure git picked up the change (git status)
• Add the file (git add $filename)
• Commit the add (git commit –m “message”)
• Push the commit to github (git push origin master)
THE GIT BASH TERMINAL
• Demo of git in a bash terminal (https://www.youtube.com/watch?v=DQUcmNO4diQ we’ll probably do
this live, but if you want a refresher later this video is decent. Longer one at
https://www.youtube.com/watch?v=HVsySz-h9r4 is even better)
SHORT GIT TUTORIAL WALKTHROUGH
• May or may not have time to walk through this in class
• https://www.atlassian.com/git/tutorials/using-branches
USING JSFIDDLE
• JSFiddle.net is a site where you can make quick sketches of
code and see them run. (good intro:
http://doc.jsfiddle.net/tutorial.html)
• It’s sometimes easier to use a site like this than to code from
scratch, but in the end developing locally and on github is more
useful
• Console.log is very useful, but it doesn’t print on the page!
Have to use the dev console.
Access DevTools On Windows On Mac
Open Developer
Tools
F12, Ctrl + Shift +
I
Cmd + Opt + I
WHAT IS JAVASCRIPT?
• A programming language
• - variables
• - APIs (Application Programming Interfaces)
• - control flow (if/then, while, switch, etc.)
• - objects and methods – JS is an Object Oriented programming language (OO)
• There is another class of language called functional programming that we may
introduce later. Neither is superior, but the require different ways of thinking,
and some problems are best suited to one or the other.
GITHUB PAGES
• Just an easy way to use a webserver for free!
• That is driven from a source-code controlled environment
• https://www.youtube.com/watch?v=FiOgz3nKpgk (again, we’ll
probably go through this live, but this if you don’t remember what
we did here’s a run-through)
• Personal and project pages, we’ll mostly use project pages
• Use by cloning or forking a project and then turning on github pages.
Whatever is in index.html will get served up!
• https://pages.github.com/
PROJECT 1
• Write a javascript program that will take a comma separated list
of words input, split those words up into individual variables,
alphabetize them, and present them back in proper
alphabetical order
• Your program should be able to accommodate anywhere
between 2 and 12 words to be alphabetized
• Submit this as a github repo showing a proper set of commit
messages and host it on github pages
HOMEWORK 2
• Create a new project in github, add a readme from the webpage
• Clone that project to your computer in a directory you set up
for this class
• Create a short javascript program to add 3 numbers that are
entered from prompts and are output to an alert box.
• Check that file into your github repo
• Send me your github repo link in email before next class
FOR NEXT CLASS
• Work on some javascript, look through https://www.teaching-
materials.org/javascript/
• Install the visual studio code editor on your computer,
instructions are here:
• https://code.visualstudio.com/download
• Work on your project so that you can get help next class!

More Related Content

PPTX
Untangling spring week12
PPTX
Untangling fall2017 week1
PPTX
Untangling the web - fall2017 - class 4
PPTX
Untangling spring week11
PPTX
Untangling - fall2017 - week 7
PPTX
A Personal Journey
PPTX
Untangling spring week6
PPTX
Untangling spring week5
Untangling spring week12
Untangling fall2017 week1
Untangling the web - fall2017 - class 4
Untangling spring week11
Untangling - fall2017 - week 7
A Personal Journey
Untangling spring week6
Untangling spring week5

What's hot (20)

PDF
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
PDF
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
PPTX
Untangling spring week10
PPTX
Untangling spring week2
PDF
Engage 2019: The good, the bad and the ugly: a not so objective view on front...
PPTX
Engage 2019 Software documentation is fun if you have the right tools: Introd...
PPTX
Mini-training: Let’s Git It!
PDF
Codecoon - A technical Case Study
PDF
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
PDF
Why use Go for web development?
PDF
2015 WordCamp Maine Keynote
PDF
WordPress: Getting Under the Hood
PPTX
Engage 2019 - De04. Java with Domino After XPages
PDF
ZendCon 2015 - Laravel Forge: Hello World to Hello Production
PDF
Web Leaps Forward
PDF
WordPress 4.4 and Beyond
PDF
eMusic: WordPress in the Enterprise
PDF
My Contributor Story
PDF
REST In Action: The Live Coverage Platform at the New York Times
PDF
Live Coverage at The New York Times
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
Untangling spring week10
Untangling spring week2
Engage 2019: The good, the bad and the ugly: a not so objective view on front...
Engage 2019 Software documentation is fun if you have the right tools: Introd...
Mini-training: Let’s Git It!
Codecoon - A technical Case Study
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
Why use Go for web development?
2015 WordCamp Maine Keynote
WordPress: Getting Under the Hood
Engage 2019 - De04. Java with Domino After XPages
ZendCon 2015 - Laravel Forge: Hello World to Hello Production
Web Leaps Forward
WordPress 4.4 and Beyond
eMusic: WordPress in the Enterprise
My Contributor Story
REST In Action: The Live Coverage Platform at the New York Times
Live Coverage at The New York Times
Ad

Similar to Untangling fall2017 week2_try2 (20)

PPT
391Lecture0909 Vision control of git.ppt
PPT
CSE 390 Lecture 9 - Version Control with GIT
PDF
ePOM - Fundamentals of Research Software Development - Code Version Control
PPT
Git installation and configuration
PPTX
Introduction to git and Github
PDF
Programming Sessions KU Leuven - Session 01
PDF
Git 101: Git and GitHub for Beginners
PPTX
PDF
Git for folk who like GUIs
PPTX
PPTX
Que nos espera a los ALM Dudes para el 2013?
PDF
August OpenNTF Webinar - Git and GitHub Explained
PDF
Get Ur Git On: Introduction and getting started with Github
PPT
Git 101 - Crash Course in Version Control using Git
PPSX
Hackaton for health 2015 - Sharing the Code we Make
PDF
Intro to Git: a hands-on workshop
PPTX
3DC Intro to Git Workshop
PDF
The Basics of Open Source Collaboration With Git and GitHub
PDF
Intro to Git for Drupal 7
PDF
Hacking on WildFly 9
391Lecture0909 Vision control of git.ppt
CSE 390 Lecture 9 - Version Control with GIT
ePOM - Fundamentals of Research Software Development - Code Version Control
Git installation and configuration
Introduction to git and Github
Programming Sessions KU Leuven - Session 01
Git 101: Git and GitHub for Beginners
Git for folk who like GUIs
Que nos espera a los ALM Dudes para el 2013?
August OpenNTF Webinar - Git and GitHub Explained
Get Ur Git On: Introduction and getting started with Github
Git 101 - Crash Course in Version Control using Git
Hackaton for health 2015 - Sharing the Code we Make
Intro to Git: a hands-on workshop
3DC Intro to Git Workshop
The Basics of Open Source Collaboration With Git and GitHub
Intro to Git for Drupal 7
Hacking on WildFly 9
Ad

More from Derek Jacoby (20)

PPTX
Untangling11
PPTX
Untangling - fall2017 - week 10
PPTX
Untangling - fall2017 - week 9
PPTX
Untangling - fall2017 - week 8
PPTX
Untangling - fall2017 - week6
PPTX
Untangling - fall2017 - week5
PPTX
Untangling the web fall2017 class 3
PPTX
Untangling fall2017 week2
PPTX
Untangling spring week9
PPTX
Untangling spring week8
PPTX
Untangling spring week7
PPTX
Untangling spring week4
PPTX
Untangling spring week3
PPTX
Untangling spring week1
PPTX
Untangling the web11
PPTX
Untangling the web10
PPTX
Untangling the web9
PPTX
Untangling8
PPTX
Untangling7
PPTX
Untangling6
Untangling11
Untangling - fall2017 - week 10
Untangling - fall2017 - week 9
Untangling - fall2017 - week 8
Untangling - fall2017 - week6
Untangling - fall2017 - week5
Untangling the web fall2017 class 3
Untangling fall2017 week2
Untangling spring week9
Untangling spring week8
Untangling spring week7
Untangling spring week4
Untangling spring week3
Untangling spring week1
Untangling the web11
Untangling the web10
Untangling the web9
Untangling8
Untangling7
Untangling6

Recently uploaded (20)

PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
RMMM.pdf make it easy to upload and study
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PDF
Classroom Observation Tools for Teachers
PDF
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
PPTX
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
Business Ethics Teaching Materials for college
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
Complications of Minimal Access Surgery at WLH
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PPTX
Week 4 Term 3 Study Techniques revisited.pptx
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
Supply Chain Operations Speaking Notes -ICLT Program
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
RMMM.pdf make it easy to upload and study
Module 4: Burden of Disease Tutorial Slides S2 2025
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
Classroom Observation Tools for Teachers
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
STATICS OF THE RIGID BODIES Hibbelers.pdf
Business Ethics Teaching Materials for college
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
VCE English Exam - Section C Student Revision Booklet
Complications of Minimal Access Surgery at WLH
Microbial diseases, their pathogenesis and prophylaxis
Week 4 Term 3 Study Techniques revisited.pptx
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
O5-L3 Freight Transport Ops (International) V1.pdf
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester

Untangling fall2017 week2_try2

  • 1. UNTANGLING THE WEB CLASS 2 – GIT, GITHUB, VSCODE THE HARDWARE AND PROTOCOLS THAT POWER THE WEB INTERVIEW QUESTION: WHAT HAPPENS WHEN YOU TYPE A URL IN THE SEARCH BAR?
  • 2. AGENDA FOR TONIGHT • Command line introduction • Javascript intro + what is programming in general • Text editors • Online editors • Source code control • Project 1
  • 3. FROM LAST WEEK • Make a github account. This will be your developer’s portfolio, so we’ll start populating it! • Install git on your computer (install “git bash” from https://git- scm.com/downloads) • Please make sure you’ve gotten on the slack channel. Send me email at derekja@gmail.com to get access.
  • 4. SOFTWARE COMPONENTS OF A COMPUTER Hardware and devices Graphics subsystem BIOS Operating system and device drivers Window manager Terminal and utilities Applications such as word processors, browser, etc.
  • 5. TERMINAL (COMMAND SHELL, BASH SHELL) • We’ll be using the command line a lot in this class • It is the lowest normally accessed level of interaction with the computer • In many ways it’s simpler than a graphical user interface because it is so precisely defined • But that definition isn’t obvious until you learn about it, unlike a graphical user interface there is no easy discoverability of commands and features
  • 6. FILES AND DIRECTORIES • Your hard drive contains files (packages with stuff in them, either text or binary data) and directories (containers of files) • There are also links, or shortcuts, but these are really just a special kind of file so we’ll ignore those for now • In the command window (otherwise known and the terminal, or shell) you are always in a specific directory • You can always tell what that directory is with the command “pwd” (which stands for Present Working Directory) • In windows, names are not case-sensitive, but on unix and mac they are, so be careful of case
  • 7. SOME TERMINAL COMMANDS • We’ll all be using the git bash command window, which will be more similar between mac and pc. • A detailed command line reference is found at http://ss64.com/ • To get the directory listing, on mac it is “ls” and on the pc it is “dir” • Once the git bash install has occurred we will use “ls” on both systems, for example • If you open a terminal on your computer other than the git bash shell things will work differently than you expect!
  • 8. REDIRECTION OF COMMAND INPUT • command > filename Redirect command output (stdout) into a file • command >> filename Redirect command output and APPEND into a file • command < filename Redirect a file into a command • command1 | command2 Redirect stdout of command1 to command2 • These work the same on all shells, but after you install bash, use that and reference the page here: http://ss64.com/bash/syntax- redirection.html
  • 9. EXAMPLES • To put the listing of a directory into a new file on a pc • “dir > output.txt” • Or to append to an existing file (creating a new one if it doesn’t exist) • “ls >> output.txt” • To get information about a computer • On the PC, “systeminfo” or on the mac, “system_profiler”
  • 10. EXERCISE 1 • Create a directory for the class in your git bash terminal • Where did you put it? • Navigate to the top of your home directory • Can you get back? • List the contents of your home directory and put them into a file called directory_listing.txt
  • 11. EDITING TEXT FILES • Visual studio code is my preferred editor, it is on these lab machines • Can you edit the directory listing you just created? • How does a text editor differ from Microsoft word? • Is plain text, no formatting, no tables, no embedded images, etc. • Is optimized for writing code rather than documents • Is a different file format
  • 12. GITHUB AND GITHUB PAGES • Source code control is the essence of modern website development • Never develop anything that is not in a repository • Safer – can track changes and prevent accidental loss • Portable – can develop on multiple machines • Workflow – can share development with other people • Portfolio – employers look at github
  • 13. INSTALLING GIT AND GIT BASH • Windows • Download from https://git-scm.com/download/win • Run to install • Open the “git bash” desktop app • Mac • Might already be there ($ git –version) • If not, you can get an installed from https://sourceforge.net/projects/git- osx-installer/files/ • Or use homebrew, “brew install git” then check the version
  • 14. SOURCE CODE CONTROL • Github, Gitlab, SVN +many, many proprietary solutions that you’ll never use (if you’re lucky!) • We will focus on github • Gitlab is very similar, based on GIT • “Global Information Tracker”? Other less savory acronyms • May not stand for anything other than not having a UNIX command named git previously and kind of sounding like “get” • Written by Linus Torvalds (of Linux fame) to manage linux sources
  • 15. USING GIT • Avoid most of the GUI tools! • They may be easier initially but they will eventually get in your way • Technically called a “BASH” terminal in the version I’ll be having you install
  • 16. ESSENTIAL GIT COMMANDS • In a bash shell, create a new directory (mkdir untangling) • Create a new repository in the github.com website (or use git init if you want to do it locally) • Clone that repository to your local machine (git clone $projectpath) • Edit or add a file using an editor (I like visual studio code - http://code.visualstudio.com/) • Make sure git picked up the change (git status) • Add the file (git add $filename) • Commit the add (git commit –m “message”) • Push the commit to github (git push origin master)
  • 17. THE GIT BASH TERMINAL • Demo of git in a bash terminal (https://www.youtube.com/watch?v=DQUcmNO4diQ we’ll probably do this live, but if you want a refresher later this video is decent. Longer one at https://www.youtube.com/watch?v=HVsySz-h9r4 is even better)
  • 18. SHORT GIT TUTORIAL WALKTHROUGH • May or may not have time to walk through this in class • https://www.atlassian.com/git/tutorials/using-branches
  • 19. USING JSFIDDLE • JSFiddle.net is a site where you can make quick sketches of code and see them run. (good intro: http://doc.jsfiddle.net/tutorial.html) • It’s sometimes easier to use a site like this than to code from scratch, but in the end developing locally and on github is more useful • Console.log is very useful, but it doesn’t print on the page! Have to use the dev console. Access DevTools On Windows On Mac Open Developer Tools F12, Ctrl + Shift + I Cmd + Opt + I
  • 20. WHAT IS JAVASCRIPT? • A programming language • - variables • - APIs (Application Programming Interfaces) • - control flow (if/then, while, switch, etc.) • - objects and methods – JS is an Object Oriented programming language (OO) • There is another class of language called functional programming that we may introduce later. Neither is superior, but the require different ways of thinking, and some problems are best suited to one or the other.
  • 21. GITHUB PAGES • Just an easy way to use a webserver for free! • That is driven from a source-code controlled environment • https://www.youtube.com/watch?v=FiOgz3nKpgk (again, we’ll probably go through this live, but this if you don’t remember what we did here’s a run-through) • Personal and project pages, we’ll mostly use project pages • Use by cloning or forking a project and then turning on github pages. Whatever is in index.html will get served up! • https://pages.github.com/
  • 22. PROJECT 1 • Write a javascript program that will take a comma separated list of words input, split those words up into individual variables, alphabetize them, and present them back in proper alphabetical order • Your program should be able to accommodate anywhere between 2 and 12 words to be alphabetized • Submit this as a github repo showing a proper set of commit messages and host it on github pages
  • 23. HOMEWORK 2 • Create a new project in github, add a readme from the webpage • Clone that project to your computer in a directory you set up for this class • Create a short javascript program to add 3 numbers that are entered from prompts and are output to an alert box. • Check that file into your github repo • Send me your github repo link in email before next class
  • 24. FOR NEXT CLASS • Work on some javascript, look through https://www.teaching- materials.org/javascript/ • Install the visual studio code editor on your computer, instructions are here: • https://code.visualstudio.com/download • Work on your project so that you can get help next class!