SlideShare ist ein Scribd-Unternehmen logo
1 von 24
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!

Weitere ähnliche Inhalte

Was ist angesagt?

Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Michael Lihs
 
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source ToolsTYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source ToolsMichael Lihs
 
Untangling spring week10
Untangling spring week10Untangling spring week10
Untangling spring week10Derek Jacoby
 
Untangling spring week2
Untangling spring week2Untangling spring week2
Untangling spring week2Derek Jacoby
 
Engage 2019: The good, the bad and the ugly: a not so objective view on front...
Engage 2019: The good, the bad and the ugly: a not so objective view on front...Engage 2019: The good, the bad and the ugly: a not so objective view on front...
Engage 2019: The good, the bad and the ugly: a not so objective view on front...Frank van der Linden
 
Engage 2019 Software documentation is fun if you have the right tools: Introd...
Engage 2019 Software documentation is fun if you have the right tools: Introd...Engage 2019 Software documentation is fun if you have the right tools: Introd...
Engage 2019 Software documentation is fun if you have the right tools: Introd...AndrewMagerman
 
Codecoon - A technical Case Study
Codecoon - A technical Case StudyCodecoon - A technical Case Study
Codecoon - A technical Case StudyMichael Lihs
 
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...Gaetano Giunta
 
Why use Go for web development?
Why use Go for web development?Why use Go for web development?
Why use Go for web development?Weng Wei
 
2015 WordCamp Maine Keynote
2015 WordCamp Maine Keynote2015 WordCamp Maine Keynote
2015 WordCamp Maine KeynoteScott Taylor
 
WordPress: Getting Under the Hood
WordPress: Getting Under the HoodWordPress: Getting Under the Hood
WordPress: Getting Under the HoodScott Taylor
 
Engage 2019 - De04. Java with Domino After XPages
Engage 2019 - De04. Java with Domino After XPagesEngage 2019 - De04. Java with Domino After XPages
Engage 2019 - De04. Java with Domino After XPagesJesse Gallagher
 
ZendCon 2015 - Laravel Forge: Hello World to Hello Production
ZendCon 2015 - Laravel Forge: Hello World to Hello ProductionZendCon 2015 - Laravel Forge: Hello World to Hello Production
ZendCon 2015 - Laravel Forge: Hello World to Hello ProductionJoe Ferguson
 
WordPress 4.4 and Beyond
WordPress 4.4 and BeyondWordPress 4.4 and Beyond
WordPress 4.4 and BeyondScott Taylor
 
eMusic: WordPress in the Enterprise
eMusic: WordPress in the EnterpriseeMusic: WordPress in the Enterprise
eMusic: WordPress in the EnterpriseScott Taylor
 
My Contributor Story
My Contributor StoryMy Contributor Story
My Contributor StoryMarko Heijnen
 
REST In Action: The Live Coverage Platform at the New York Times
REST In Action: The Live Coverage Platform at the New York TimesREST In Action: The Live Coverage Platform at the New York Times
REST In Action: The Live Coverage Platform at the New York TimesScott Taylor
 
Live Coverage at The New York Times
Live Coverage at The New York TimesLive Coverage at The New York Times
Live Coverage at The New York TimesScott Taylor
 

Was ist angesagt? (20)

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

Ähnlich wie Untangling fall2017 week2_try2

CSE 390 Lecture 9 - Version Control with GIT
CSE 390 Lecture 9 - Version Control with GITCSE 390 Lecture 9 - Version Control with GIT
CSE 390 Lecture 9 - Version Control with GITPouriaQashqai1
 
ePOM - Fundamentals of Research Software Development - Code Version Control
ePOM - Fundamentals of Research Software Development - Code Version ControlePOM - Fundamentals of Research Software Development - Code Version Control
ePOM - Fundamentals of Research Software Development - Code Version ControlGiuseppe Masetti
 
Git installation and configuration
Git installation and configurationGit installation and configuration
Git installation and configurationKishor Kumar
 
Introduction to git and Github
Introduction to git and GithubIntroduction to git and Github
Introduction to git and GithubWycliff1
 
Programming Sessions KU Leuven - Session 01
Programming Sessions KU Leuven - Session 01Programming Sessions KU Leuven - Session 01
Programming Sessions KU Leuven - Session 01Rafael Camacho Dejay
 
Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners HubSpot
 
Git for folk who like GUIs
Git for folk who like GUIsGit for folk who like GUIs
Git for folk who like GUIsTim Osborn
 
Que nos espera a los ALM Dudes para el 2013?
Que nos espera a los ALM Dudes para el 2013?Que nos espera a los ALM Dudes para el 2013?
Que nos espera a los ALM Dudes para el 2013?Bruno Capuano
 
August OpenNTF Webinar - Git and GitHub Explained
August OpenNTF Webinar - Git and GitHub ExplainedAugust OpenNTF Webinar - Git and GitHub Explained
August OpenNTF Webinar - Git and GitHub ExplainedHoward Greenberg
 
Get Ur Git On: Introduction and getting started with Github
Get Ur Git On: Introduction and getting started with GithubGet Ur Git On: Introduction and getting started with Github
Get Ur Git On: Introduction and getting started with GithubChristine O'Connell
 
Git 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using GitGit 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using GitGeoff Hoffman
 
Hackaton for health 2015 - Sharing the Code we Make
Hackaton for health 2015 - Sharing the Code we MakeHackaton for health 2015 - Sharing the Code we Make
Hackaton for health 2015 - Sharing the Code we Makeesben1962
 
Intro to Git: a hands-on workshop
Intro to Git: a hands-on workshopIntro to Git: a hands-on workshop
Intro to Git: a hands-on workshopCisco DevNet
 
3DC Intro to Git Workshop
3DC Intro to Git Workshop3DC Intro to Git Workshop
3DC Intro to Git WorkshopBeckhamWee
 
The Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHubThe Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHubBigBlueHat
 
Intro to Git for Drupal 7
Intro to Git for Drupal 7Intro to Git for Drupal 7
Intro to Git for Drupal 7Chris Caple
 
Hacking on WildFly 9
Hacking on WildFly 9Hacking on WildFly 9
Hacking on WildFly 9JBUG London
 
Git Obstacle Course: Stop BASHing your head and break down the basics
Git Obstacle Course: Stop BASHing your head and break down the basicsGit Obstacle Course: Stop BASHing your head and break down the basics
Git Obstacle Course: Stop BASHing your head and break down the basicsChris Bohatka
 

Ähnlich wie Untangling fall2017 week2_try2 (20)

CSE 390 Lecture 9 - Version Control with GIT
CSE 390 Lecture 9 - Version Control with GITCSE 390 Lecture 9 - Version Control with GIT
CSE 390 Lecture 9 - Version Control with GIT
 
ePOM - Fundamentals of Research Software Development - Code Version Control
ePOM - Fundamentals of Research Software Development - Code Version ControlePOM - Fundamentals of Research Software Development - Code Version Control
ePOM - Fundamentals of Research Software Development - Code Version Control
 
Git installation and configuration
Git installation and configurationGit installation and configuration
Git installation and configuration
 
Introduction to git and Github
Introduction to git and GithubIntroduction to git and Github
Introduction to git and Github
 
Programming Sessions KU Leuven - Session 01
Programming Sessions KU Leuven - Session 01Programming Sessions KU Leuven - Session 01
Programming Sessions KU Leuven - Session 01
 
Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners
 
Demo
DemoDemo
Demo
 
Git for folk who like GUIs
Git for folk who like GUIsGit for folk who like GUIs
Git for folk who like GUIs
 
Hello, Git!
Hello, Git!Hello, Git!
Hello, Git!
 
Que nos espera a los ALM Dudes para el 2013?
Que nos espera a los ALM Dudes para el 2013?Que nos espera a los ALM Dudes para el 2013?
Que nos espera a los ALM Dudes para el 2013?
 
August OpenNTF Webinar - Git and GitHub Explained
August OpenNTF Webinar - Git and GitHub ExplainedAugust OpenNTF Webinar - Git and GitHub Explained
August OpenNTF Webinar - Git and GitHub Explained
 
Get Ur Git On: Introduction and getting started with Github
Get Ur Git On: Introduction and getting started with GithubGet Ur Git On: Introduction and getting started with Github
Get Ur Git On: Introduction and getting started with Github
 
Git 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using GitGit 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using Git
 
Hackaton for health 2015 - Sharing the Code we Make
Hackaton for health 2015 - Sharing the Code we MakeHackaton for health 2015 - Sharing the Code we Make
Hackaton for health 2015 - Sharing the Code we Make
 
Intro to Git: a hands-on workshop
Intro to Git: a hands-on workshopIntro to Git: a hands-on workshop
Intro to Git: a hands-on workshop
 
3DC Intro to Git Workshop
3DC Intro to Git Workshop3DC Intro to Git Workshop
3DC Intro to Git Workshop
 
The Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHubThe Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHub
 
Intro to Git for Drupal 7
Intro to Git for Drupal 7Intro to Git for Drupal 7
Intro to Git for Drupal 7
 
Hacking on WildFly 9
Hacking on WildFly 9Hacking on WildFly 9
Hacking on WildFly 9
 
Git Obstacle Course: Stop BASHing your head and break down the basics
Git Obstacle Course: Stop BASHing your head and break down the basicsGit Obstacle Course: Stop BASHing your head and break down the basics
Git Obstacle Course: Stop BASHing your head and break down the basics
 

Mehr von Derek Jacoby

Untangling - fall2017 - week 10
Untangling - fall2017 - week 10Untangling - fall2017 - week 10
Untangling - fall2017 - week 10Derek Jacoby
 
Untangling - fall2017 - week 9
Untangling - fall2017 - week 9Untangling - fall2017 - week 9
Untangling - fall2017 - week 9Derek Jacoby
 
Untangling - fall2017 - week 8
Untangling - fall2017 - week 8Untangling - fall2017 - week 8
Untangling - fall2017 - week 8Derek Jacoby
 
Untangling - fall2017 - week6
Untangling - fall2017 - week6Untangling - fall2017 - week6
Untangling - fall2017 - week6Derek Jacoby
 
Untangling - fall2017 - week5
Untangling - fall2017 - week5Untangling - fall2017 - week5
Untangling - fall2017 - week5Derek Jacoby
 
Untangling the web fall2017 class 3
Untangling the web fall2017 class 3Untangling the web fall2017 class 3
Untangling the web fall2017 class 3Derek Jacoby
 
Untangling fall2017 week2
Untangling fall2017 week2Untangling fall2017 week2
Untangling fall2017 week2Derek Jacoby
 
Untangling spring week9
Untangling spring week9Untangling spring week9
Untangling spring week9Derek Jacoby
 
Untangling spring week8
Untangling spring week8Untangling spring week8
Untangling spring week8Derek Jacoby
 
Untangling spring week7
Untangling spring week7Untangling spring week7
Untangling spring week7Derek Jacoby
 
Untangling spring week4
Untangling spring week4Untangling spring week4
Untangling spring week4Derek Jacoby
 
Untangling spring week3
Untangling spring week3Untangling spring week3
Untangling spring week3Derek Jacoby
 
Untangling spring week1
Untangling spring week1Untangling spring week1
Untangling spring week1Derek Jacoby
 
Untangling the web11
Untangling the web11Untangling the web11
Untangling the web11Derek Jacoby
 
Untangling the web10
Untangling the web10Untangling the web10
Untangling the web10Derek Jacoby
 
Untangling the web9
Untangling the web9Untangling the web9
Untangling the web9Derek Jacoby
 

Mehr von Derek Jacoby (20)

Untangling11
Untangling11Untangling11
Untangling11
 
Untangling - fall2017 - week 10
Untangling - fall2017 - week 10Untangling - fall2017 - week 10
Untangling - fall2017 - week 10
 
Untangling - fall2017 - week 9
Untangling - fall2017 - week 9Untangling - fall2017 - week 9
Untangling - fall2017 - week 9
 
Untangling - fall2017 - week 8
Untangling - fall2017 - week 8Untangling - fall2017 - week 8
Untangling - fall2017 - week 8
 
Untangling - fall2017 - week6
Untangling - fall2017 - week6Untangling - fall2017 - week6
Untangling - fall2017 - week6
 
Untangling - fall2017 - week5
Untangling - fall2017 - week5Untangling - fall2017 - week5
Untangling - fall2017 - week5
 
Untangling the web fall2017 class 3
Untangling the web fall2017 class 3Untangling the web fall2017 class 3
Untangling the web fall2017 class 3
 
Untangling fall2017 week2
Untangling fall2017 week2Untangling fall2017 week2
Untangling fall2017 week2
 
Untangling spring week9
Untangling spring week9Untangling spring week9
Untangling spring week9
 
Untangling spring week8
Untangling spring week8Untangling spring week8
Untangling spring week8
 
Untangling spring week7
Untangling spring week7Untangling spring week7
Untangling spring week7
 
Untangling spring week4
Untangling spring week4Untangling spring week4
Untangling spring week4
 
Untangling spring week3
Untangling spring week3Untangling spring week3
Untangling spring week3
 
Untangling spring week1
Untangling spring week1Untangling spring week1
Untangling spring week1
 
Untangling the web11
Untangling the web11Untangling the web11
Untangling the web11
 
Untangling the web10
Untangling the web10Untangling the web10
Untangling the web10
 
Untangling the web9
Untangling the web9Untangling the web9
Untangling the web9
 
Untangling8
Untangling8Untangling8
Untangling8
 
Untangling7
Untangling7Untangling7
Untangling7
 
Untangling6
Untangling6Untangling6
Untangling6
 

Kürzlich hochgeladen

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 

Kürzlich hochgeladen (20)

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 

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!