An Introduction to Re-introducing Ourselves to Computers

In this session we will get intimate with our own computers and write poetry with their logic. This workshop is an introduction to writing folder poetry, and navigating the command line interface using a language called Bash.

Coding isn’t something that just happens behind your screen. It can be a holistic practice surrounding the computer, the programmer, the relationship they have with each other, and the environments they create together.

This workshop assumes no coding experience and simultaneously takes the position that everyone who interacts with computers in some way is already a programmer.  

This image has an empty alt attribute; its file name is folder-collage-b.png

Setup + Tips!

Text Editor

  • Install Atom
    • Uncheck the show welcome messages check box
    • on the top left, Atom > Install Shell Commands

Mac Terminal: 

  • We’ll use Iterm or the default Mac Terminal
  • To open, press CMD + SPACE & search for iterm or terminal (it’ll also be in your applications folder
  • We will use bash instead of zsh if you are new to terminal. To switch from zsh to bash, enter the following line in your terminal:
chsh -s /bin/bash

Windows Terminal

  • Download Git Bash
  • How to copy and paste a line in Git bash?
    • Ctrl + Shift + C / V

Download the Garden of Forking Paths

  • Download and unzip the Garden of Forking Paths
  • by default this will probably land in your Downloads folder
    • you should see a folder called ‘garden-of-forking-paths’
    • move this folder into your ‘home’ folder that we will open using terminal
  • Locate your ‘home’ folder. This where we will work from and store files in class, not on the Desktop ☺︎
    • Open Iterm (a terminal app) by pressing CMD + Space to pull up the search bar. Then type Iterm
      • Enter this command to open finder in your home folder (Macs):
      • open .

Helpful Terms

Word Notes
Folder Poetry The practice of using the structure of computer folder organization as a new kind of poetic form like the haiku or iambic pentameter. By naming and nesting folders and files, we can create unfolding narratives, rhythmic prose, and choose-your-own-adventure poetry.
terminal An application to control and make changes to your operating system by typing text commands. In this class we'll use the terminal to create folder poetry. On Windows, the terminal program we'll use is called Git Bash
terminal commands text commands to control your computer when entered into a command prompt like the terminal. The commands we'll learn will be in a language called Bash.
Bash is the programming language we use in the terminal, often one line at a time, but we can also put Bash code in a file and run that file.
command prompt is a symbol or series of characters at the beginning of a line that indicates the system is ready to receive input. It other words, it prompts the user for a command. The default command prompt looks something like: username@computername ~ $
folder (also referred to as directory) is an organizational regime imposed on your computer used to store and organize files and other folders
file is an object on a computer which stores data, information, settings, or commands to be used with various computer programs
file types indicate how data has been stored and how to read or open files in specific programs. for example, .txt files open in a text editor, .jpg files open in an image viewer/editor. full list of file formats and extensions here
file path tells you the location of a file in a system. for example users/username/Desktop/cat/meow.txt

Folder Poetry Best Practices

  • All lowercase filenames and folder names
  • No spaces
    • Use dashes or underscores. for example: my_file.txt or my-file.txt

Bash commands

🎲 Bash & Terminal commands

Command Description
cd change directory
cd .. change directory one level back
ls list contents of directory
pwd print working directory
mkdir foldername create a folder named foldername
touch dandelion.txt create a file named dandelion.txt
echo "woof woof" > kitty.txt creates a text file called kitty.txt that contains the words, "woof woof"
cat filename.txt print contents of file
atom filename.txt Opens file in atom (this is why we installed the shell commands!)
source ~/.bash_profile (macOS) restart your terminal config file
source ~/.bashrc (Windows) restart your terminal config file
rm -rf filename.txt . remove a file or folder this way (BE CAREFUL TO NOT DELETE ANYTHING UNINTENDED
mv filename.txt newfilename.txt rename a file
open . (macOS) open the current folder in Finder
explorer . (Windows) open the current folder in Explorer
open filename.txt (macOS) opens file in Text Edit
notepad.exe filename.txt (Windows) opens file in Notepad
cp filename.txt filename2.txt copy file
say "hello, what is poetic computation?" (macOS) speak out loud
https://superuser.com/questions/223913/os-x-say-command-for-windows (Windows) speak text out loud
man cd show the manual for 'cd'. Press q to quit
curl wttr.in check the weather in our local locations!⛅️🌧🌈

Keyboard Terminal Shortcuts

Command Description
Up + Down Arrow keys scroll through history
Tab Key autocomplete
CMD + CTRL + SPACE Emoji Keyboard (Mac OS) 🍒🦋💌🥬

Editing a text file

command Description
echo "woof woof" > kitty.txt creates a text file called kitty.txt that contains the words, "woof woof"
nano textfile.txt open file in the nano text editor
CTRL + X , y , ENTER exit and save changes

Editing your Bash config file

  • In these steps, we are using terminal and nano to open and edit a file called ~./bash_profile
  • In steps 2-4, the lines of code are meant to be pasted into nano when editing the ~./bash_profile
  • In the other steps, the commands are entered in terminal

The ~./bash_profile or ~./bashrc is a configuration file for the terminal.

First make sure you are running bash instead of zsh by running this command: chsh -s /bin/bash

You can use an editor called nano that is built into terminal instead of using a separate editor like vs code

  • Macs:

    • Nano: nano ~/.bash_profile
    • Vs code: code ~/.bash_profile
  • Windows: nano ~/.bashrc

    • This command will open your ~./bashrc in nano

Remember to reboot your terminal

Mac:source ~/.bash_profile Windows: source ~/.bashrc

OR close and reopen terminal : ) OR if you created an alias for this, enter sp (short for source profile) : )

This image has an empty alt attribute; its file name is 11-1.png

☽☼ Homework Due Next Week

Folder Poems

Create a Folder Poem Using only terminal and (optionally) a text editor. This can be based off of your liberatory learning environment from last week or it can be a totally new idea for a folder poem!

  • Suggestion: What folder poem would you make for someone specific that you care about?
  • What would your favorite prose poem look like as a folder poem?
  • Your poem can be narrative driven, prose driven, aesthetic driven, or interactive!

To share your poems:

  1. Add a screenshot of your poem to this arena channel
  2. If you sketched out your poem design on paper first, add your sketch to arena too!

create screenshots of your poem in the way that makes most sense for your poem. The tree command in terminal can be nice for showing an overhead view of your poem, a place to take screenshots. If your poem is very expansive, highlight the parts that are most meaningful to you in screenshots.

Read:

More Guiding Resources

Homework is a gift to yourself, and often to each other, not to me so please take and leave what serves you

~~~~misc items below~~~~

To test which shell we’re using, copy this line into your terminal.

From Wikipedia on Shells, “In computing, a shell is a user interface for access to an operating system‘s services. In general, operating system shells use either a command-line interface (CLI) or graphical user interface (GUI), depending on a computer’s role and particular operation.”

echo $0

we should see the terminal return: -bash, let me know if you see zsh instead

Let’s check the weather in our local locations!

Paste the following line in your terminal to check the weather

curl wttr.in

This image has an empty alt attribute; its file name is Screenshot-2020-06-23-18.25.29.png