JUNIOR

ACADEMY

course overview 

Junior DevLeague Academy will be like the Pokemon League. The Pokemon gyms will be the coding classes, and you progress through them until you become a Pokemon/Coding master. 

 

If the Pokemon analogy doesn't make any sense: there are a bunch of coding classes beginning with App Development and you advance through them and win at life. 

 

rules 

  • Everyone gets respect
  • Leave no one behind
  • No phones/tablets/miscellaneous devices not approved by instructors
  • No installing/downloading unauthorized programs/files
  • No food/open bottles in front of computers
  • No spinning on chairs when instructors are speaking
  • Ask your peers before asking your instructor for assistance

icebreaker

  • Introduce yourselves to each other
  • You will get 5 minutes to interview the other person 
    • Find out 3 interesting facts about them
  • Afterwards, you will introduce that person and their 3 interesting facts to us

languages

  • To dispel any misconceptions you may have:
    • Computer language DOES NOT MEAN programming language
  • Some types of computer languages you can learn here:
    • Programming Language:  translatable into machine language, compiled and executed by system 
      • examples: Java, C, Python
    • Markup Language: used to define layout of documents
      • examples: ​HTML/CSS, XML
    • Scripting Language: a subset of programming languages that doesn't use a compiler
      • examples: ​Bash, Windows PowerShell, JavaScript

languages

what is a shell?

  • A shell is the program that passes keyboard commands to the operating system (such as Windows, OS X, GNU/Linux, BSD) to carry out
    • Also referred to as the terminal emulator (commonly known as the terminal) or command line
    • The terminal is where we interact with the shell
      • Basically allowing us to directly and completely control the computer as well as execute commands
  • The shell for UNIX (more on that later) based operating systems (like Mac OS X and Linux) is Bash.
    • Bash == Bourne Again Shell 
  • Basically: Bash is the command language you enter terminal commands in

survey time!

  • Please help your instructors help you and answer honestly and to the best of your abilities 
  • Open Google Chrome browser and go to:
    • https://www.surveymonkey.com/r/CY2FY7Z

learning terminal

  • To get you used to using terminal and learn some basic Bash, we will play a game
    • It is a really fun game where you explore a world and discover things
  • In Chrome, enter the following url:
  • http://mprat.org/Terminus
  • Follow along with the directions and read carefully
    • Remember: ask your 3 of your peers for help before you ask an instructor

UNIX file system

  • Looks like a tree
  • How your files look/are arranged in your computer
  • We will navigate the UNIX file system using the commands you learned in Terminus 

paths

  • What is a path?
  • A path in the file system traces out the location of a file/folder from a given directory
    • When you first open terminal, by default you are placed in your User directory
    • ex. Let's say we're looking for the index.html file in John's Profile folder, which is in his App Development folder, which is on his Desktop, which is in his User directory, under Home, which directly branches from root. To get to that location, we specify a path:
      • "~" or  tilde stands for /home/user
      •  ~/Desktop/JRDLAppDev_John/Profile

basic bash

  • cd [Folder] change directory
  • ls list
  • pwd print working directory
  • touch [file] make a file
  • mkdir [Folder] make a directory (folder)
  • cp [file] [destination] copies the file to the destination
  • mv [files] [destination] moves or renames the file
  • rm [file] permanently removes the file
  • less [file] read and display the contents of a file
  • cat [file] prints the contents of a file in the terminal
  • grep [pattern] [file] searches the given file for the pattern
    • It prints out the lines containing the pattern
  • Case sensitivity matters!

bash syntax

  • command -option [argument]
    • The command is the command that Bash executes
      • Ex. cd, touch, mkdir, ls
    • The option is written after a dash (-), it allows you to undergo different ways of executing the command
      • Ex. ls -a     The a option lists all of the files, including hidden ones
      • You can use multiple options at once, a la: pacman -Syu
    • The argument is whatever you're passing into the command
      • Ex. cd Desktop, passes in the Desktop argument to be cd'd into
  • Use spaces to separate commands, options, and arguments

manual

  • If you don't know how to use a command, use man command to open a manual for the command
  • It tells you the syntax for that command
    • The possible options
    • What to pass in for arguments 
  • If you try using a command and something doesn't work, check the manual!

navigation

  • cd [Folder] will bring you to a certain folder
  • ls will list the contents of your present directory, so you can decide which folder to cd into next. IF YOU DON'T KNOW WHERE TO GO, USE ls.
    • ​If you don't know where you are, use pwd
  • cd .. will take you one directory up on the file system. This means you can go backwards. 
    • ex. Your are in: ~/Desktop/JRDLAppDev 
    • cd .. will take you to ~/Desktop
  • You can cd past/back multiple folders at once if you know the path to that file/folder you want to access.
  • Tab completion is your friend

valid file names

  • When naming folders/files do NOT:
  • Begin your file/folder names with numbers: 
    • ex. 5ever.txt
  • Have spaces/special characters/periods in the middle of your filenames
    • Digital Design
    • di.gital_Design
  • In lieu of spaces, we use underscores, and camel case: thisIsCamelCase

exercise

  • cd to your Desktop
  • On your Desktop, create a new folder with your first and last name. 
    • Remember the file naming rule about spaces when doing this
  • Inside the folder named after you, create three new folders: Project1, Project2, Project3
    • Within each project folder, create:
      • a file called "index.html"
      • two folders: "js" and "css"
        • within the css folder, create a file called "styles.css"

treasure hunt

  • Let's put your newfound knowledge to use
  • cd back to your Desktop
  • git clone http://github.com/junior-devleague/HackMyPlanet.git
  • cd HackMyPlanet/TreasureHunt
  • ls to view the contents of the directory
  • Begin!

scp

  • Secure Copy protocol
  • It's how you remotely copy files over a network to other machines
  • scp user@host1:source_file user@host2:destination
    • user is the username of the desktop profile (what you see in the terminal), host is the name of the computer (or in this case, the IP address)
    • If it's localhost, then you don't need the first part before the colon (:)
    • Ex. scp ~/Documents/file.txt Jrdevleague8@192.168.0.2:~/Desktop
  • Find out your IP address by clicking on the network icon while holding the option key
    • OR, type in ifconfig into the terminal and find your "inet address" under wlan0

scp excerise

  • Use scp to send each other a file with a message
    • Place it into their Desktop
  • Remember to use the man command if you forgot how to use SCP

github

  • What is version control?
    • Is a management system for programs with many versions or configurations. 
    • What is git version control?
      • Collaborative programming
      • Developer Cloud interface 
      • git != GitHub
  • What is GitHub?
    • GitHub is a code sharing site for programmers

sign up

  • Setting up your GitHub account
  • Go to github.com and click "sign up"
  • Fill out the form and click continue
    • Pick a username you will not be embarrassed to share with others.
    • MAKE SURE TO USE A EMAIL YOU HAVE ACCESS TO
  • When finished it will prompt you to confirm your email
    • Go to your email and find the GitHub email
    • Click on the confirmation link and it will take you back to GitHub automatically
  • You're done!!
Made with Slides.com