Ruby Monstas

Programming workflow

Programming workflow

Programming workflow

  1. Think about what you want to do
  2. Switch to your editor
  3. Edit the code
  4. Save the file
  5. Switch to the terminal
  6. Run your code
  7. Watch what it does
  8. Go to 1.
TODO: Explain terminal: cd, ls, tab completion, arrow keys (history)

Hello world, again!

  1. Open your editor (Visual Studio Code)
  2. Create a new file (Ctrl + N or ⌘ + N)
  3. Type:
    puts "Hello world, again!"
  4. Save the file as
    (Ctrl + S or ⌘ + S)
    Important: Know in what directory you saved the file!

Hello world, again! (cont.)

  1. Open the terminal ("Powershell" or "Terminal")
  2. Change to the directory using the
    command (use Tab for autocompletion of directory names)
  3. Run your code:
    ruby hello_world.rb

Frustration curve

To avoid the frustration curve

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)


Additional Resources

Ruby For Beginners: Terminal

Ruby For Beginners: Programming workflow

What questions do you have?