Programming workflow
Is always in a working directory
You can do most things you can do in a graphical interface
You can do a lot of things quicker than with a graphical interface (once you’ve practiced a bit)
Command followed by arguments (separated by spaces)
Cryptic commands might seem scary at first
pwdstands for 'print working directory'
cdstands for 'change directory'
lsstands for 'list' the files and folders in directory
...is the folder where you currently are
pwdprints out your working directory,
lslists all files and folders
cdchanges the directory and
lslists all files and folders
cd rubymonstas/se2changes the directory directly to se2
cd YOUR-FOLDERchanges your working directory to the selected folder
cd YOUR-FOLDER/ANOTHER-FOLDERchanges your working directory to the selected folder
cd ..takes you one level up
cd ../..takes you two levels up
You can access the history of previous commands you entered with ↑
Go back and forth with ↑ and ↓
You can autocomplete the name of the file with Tab
Try it now!
puts "Hello world, again!"
hello_world.rb(Ctrl + S or ⌘ + S)
cdcommand (use Tab for autocompletion of directory names)
ruby hello_world.rb
Make tiny changes (ideally only on one line)
Check if it works right away
If it doesn't, think about why (read error messages closely)
Repeat!
IRB lives in the terminal but you use ruby language
You can have multiple terminals open: one with irb and one with the command line.
You enter IRB by typing
irb
You exit IRB by typing
quitor
exitor pressing Ctrl + D
What questions do you have?