Skip to content

Commit

Permalink
cleaning up
Browse files Browse the repository at this point in the history
  • Loading branch information
kallewesterling committed Apr 30, 2020
1 parent 5c7d500 commit a5325ac
Show file tree
Hide file tree
Showing 16 changed files with 282 additions and 234 deletions.
11 changes: 7 additions & 4 deletions sections/01-what-is-the-command-line.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@

[<<< Previous](../README.md) | [Next >>>](02-text-editors.md)

# What is the command line?

The command line is a text-based way of interacting with your computer. You may hear it called different names, such as the terminal, the shell, or bash. In practice, you can use these terms interchangeably. (If you're curious, though, you can read more about them [in the glossary](glossary.md).) The shell we use (whether terminal, shell, or bash) is a program that accepts commands as text input and converts commands into appropriate operating system functions.
The command line is a text-based way of interacting with your computer. You may hear it called different names, such as the terminal, the shell, or bash. In practice, you can use these terms interchangeably. (If you're curious, though, you can read more about them [in the glossary](https://github.com/DHRI-Curriculum/glossary/blob/master/sections/command-line.md).) The shell we use (whether terminal, shell, or bash) is a program that accepts commands as text input and converts commands into appropriate operating system functions.

And yes, "the command line" is also laden with masculine and military metaphors, which is reflective of the history of computing and programming. As Wendy Hui Kyong Chun discusses in ["On Software, or the Persistence of Visual Knowledge" (2004)](https://doi.org/10.1162/1526381043320741), almost all computers (as in human comput-ers) in the US during World War II were young women. Human computers received commands from analysts——predominantly men with the military—that they then had to interpret and act upon the machine. As Chun (p. 34) argues

> computation depends on 'yes, sir' in response to short declarative sentences and imperatives that are in essence commands ... The command line is a mere operating system (OS) simulation.
And yes, "the command line" is also laden with masculine and military metaphors, which is reflective of the history of computing and programming. As Wendy Hui Kyong Chun discusses in ["On Software, or the Persistence of Visual Knowledge" (2004)](https://doi.org/10.1162/1526381043320741), almost all computers (as in human comput-ers) in the US during World War II were young women. Human computers received commands from analysts--predominantly men with the military--that they then had to interpret and act upon the machine. As Chun argues, "computation depends on 'yes, sir' in response to short declarative sentences and imperatives that are in essence commands ... The command line is a mere operating system (OS) simulation" (page 34). The command line (of computers today) receives these commands as text that is typed in.
The command line (of computers today) receives these commands as text that is typed in.

## What does "text-based" mean?

For those of us comfortable reading and writing, the idea of "text-based" in the context of computers can seem a bit strange. As we start to get comfortable typing commands to the computer, it's important to distinguish "text" from word processed, desktop publishing (think Microsoft Word or Google Docs) in which we use software that displays what we want to produce without showing us the code the computer is reading to render the formatting. Plain text has the advantage of being manipulable in different contexts.
For those of us comfortable reading and writing, the idea of "text-based" in the context of computers can seem a bit strange. As we start to get comfortable typing commands to the computer, it's important to distinguish "text" from word processed, desktop publishing (think Microsoft Word or Google Docs) in which we use software that displays what we want to produce without showing us the code the computer is reading to render the formatting. Plain text has the advantage of being manipulable in different contexts.

Let's take a quick moment to discuss text and text editors.

Expand Down
30 changes: 17 additions & 13 deletions sections/02-text-editors.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

[<<< Previous](01-what-is-the-command-line.md) | [Next >>>](03-why-is-the-command-line-useful.md)

# Text editors
# Text editors

## What is text?

Expand All @@ -19,31 +18,36 @@ Word documents which look like "just words!" are actually comprised of an archiv

For the purposes of communicating with machines and between machines, we need characters to be as flexible as possible. Plain text include characters of readable material but not graphical representation.

According to the [Unicode Standard](https://www.unicode.org/versions/Unicode12.1.0/),
According to the [Unicode Standard](https://www.unicode.org/versions/Unicode12.1.0/),

"Plain text is a pure sequence of character codes; plain Unicode-encoded text is therefore a sequence of Unicode character codes."
> Plain text is a pure sequence of character codes; plain Unicode-encoded text is therefore a sequence of Unicode character codes.
Plain text has two main properties in regard to rich text:

"plain text is the underlying content stream to which formatting can be applied. Plain text is public, standardized, and universally readable."
> plain text is the underlying content stream to which formatting can be applied. Plain text is public, standardized, and universally readable.
Plain text shows its cards—if it's marked up, the markup will be human readable. Plain text can be moved between programs more fluidly and can respond to programmatic manipulations. Because it is not tied to a particular font or color or placement, plain text can be styled externally.

Plain text shows its cards-- if it's marked up, the markup will be human readable. Plain text can be moved between programs more fluidly and can respond to programmatic manipulations. Because it is not tied to a particular font or color or placement, plain text can be styled externally.
A counterpoint to plain text is rich text (sometimes denoted by the Microsoft rich text format .rtf file extension) or "enriched text" (sometimes seen as an option in email programs). In rich text files, plain text is elaborated with formatting specific to the program in which they are made.

A counterpoint to plain text is rich text (sometimes denoted by the Microsoft rich text format ".rtf" file extension) or "enriched text" (sometimes seen as an option in email programs). In rich text files, plain text is elaborated with formatting specific to the program in which they are made.
## Choosing a text editor

## Text editors
An important tool for programming and working in the command line is a text editor. A text editor is a program that allows you to edit plain text files, such as .txt, .csv, or .md. Text editors are not used to edit rich text documents, such as .docx or .rtf, and rich text editors should not be used to edit plain text files. This is because rich text editors will add many invisible special characters that will prevent programs from running and configuration files from being read correctly.

An important tool for programming and working in the command line is a text editor. A text editor is a program that allows you to edit plain text files, such as .txt, .csv, or .md. Text editors are not used to edit rich text documents, such as .docx or .rtf, and rich text editors should not be used to edit plain text files. This is because rich text editors will add many invisible special characters that will prevent programs from running and configuration files from being read correctly.
While it doesn't really matter which text editor you choose, you should try to become comfortable with at least one text editor.

While it doesn't really matter which text editor you choose, you should try to become comfortable with at least one text editor.
Choosing a text editor has as much to do with personality as it does with functionality. Graphical user interfaces (GUIs), user options, and "hackability" vary from program to program.

## Default recommendation

Choosing a text editor has as much to do with personality as it does with functionality. Graphical user interfaces (GUIs), user options, and "hackability" vary from program to program. For our workshops, we will be using [Visual Studio Code](https://code.visualstudio.com/). Not only is Visual Studio Code free and open source, but it is also consistent across OSX, Windows, and Linux systems.
For our workshops, we will be using [Visual Studio Code](https://code.visualstudio.com/). Not only is Visual Studio Code free and open source, but it is also consistent across OSX, Windows, and Linux systems.

You will have downloaded VS Code according to the [instructions](https://github.com/DHRI-Curriculum/install/blob/master/sections/vscode.md) on the installations page. We won't be using the editor a lot in this tutorial, so don't worry about getting to know the editor now. In later workshops we will discuss syntax highlighting and version control, which Visual Studio Code supports. For now we will get back to working in the command line itself.

[<<< Previous](01-what-is-the-command-line.md) | [Next >>>](03-why-is-the-command-line-useful.md)
---

[More information about text editors](13-text-editors-ides.md) can be found in the resources at the end of the lesson.

[More information about text editors](text-editors-ides.md) can be found in the resources at the end of the lesson.
---

[<<< Previous](01-what-is-the-command-line.md) | [Next >>>](03-why-is-the-command-line-useful.md)
6 changes: 3 additions & 3 deletions sections/03-why-is-the-command-line-useful.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[<<< Previous](02-text-editors.md) | [Next >>>](04-getting-to-the-command-line.md)

### Why is the command line useful?
# Why is the command line useful?

Initially, for some of us, the command line can feel a bit unfamiliar. Why step away from a point-and-click workflow? By using the command line, we move into an environment where we have more minute control over each task we'd like the computer to perform. Instead of ordering your food in a restaurant, you're stepping into the kitchen. It's more work, but there are also more possibilities.
Initially, for some of us, the command line can feel a bit unfamiliar. Why step away from a point-and-click workflow? By using the command line, we move into an environment where we have more minute control over each task we'd like the computer to perform. Instead of ordering your food in a restaurant, you're stepping into the kitchen. It's more work, but there are also more possibilities.

The command line allows you to...

Expand All @@ -14,7 +14,7 @@ The command line allows you to...

In addition to being a useful tool in itself, the command line gives you access to a second set of programs and utilities and is a complement to learning programming.

What if all these cool possibilities seem a bit abstract to you right now? That's alright! On a very basic level, most uses of the command line are about **showing information** that the computer has, or **modifying or making** things (files, programs, etc.) on the computer.
What if all these cool possibilities seem a bit abstract to you right now? That's alright! On a very basic level, most uses of the command line are about **showing information** that the computer has, or **modifying or making** things (files, programs, etc.) on the computer.

In the next section, we'll make this a little more clear by getting started with the command line.

Expand Down
34 changes: 20 additions & 14 deletions sections/04-getting-to-the-command-line.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,41 @@

# Getting to the command line

## Mac OS
## macOS

If you're using Mac OS:
If you're using macOS:

1\. Click the Spotlight Search button (the magnifying glass) in the top right of your desktop.
2\. Type "terminal" into the bar that appears.
3\. Select the first item that appears in the list.
4\. The terminal will look like this:
1. Click the Spotlight Search button (the magnifying glass) in the top right of your desktop.

![Terminal in Mac OS](images/osx_term.png)
2. Type "terminal" into the bar that appears.

3. Select the first item that appears in the list.

4. The terminal will look like this:

![Terminal in Mac OS](images/osx_term.png)

When you see the `$`, you're in the right place. We call the `$` the command prompt; the `$` lets us know the computer is ready to receive a command.

*You can change the color of your Terminal or BashShell background and text by selecting `Shell` from the top menu bar, then selecting a theme from the menu under `New Window`.*

Bonus points: if you really want to get the groove of just typing instead of pointing and clicking, you can press "Command (⌘)" and the space bar at the same time to pull up Spotlight search, start typing "Terminal," and then hit "Enter" to open a terminal window. This will pull up a terminal window without touching your mousepad. For super bonus points, try to navigate like this for the next fifteen minutes, or even the rest of this session--it is tricky and sometimes a bit tiring when you start, but you can really pick up speed when you practice!
Bonus points: if you really want to get the groove of just typing instead of pointing and clicking, you can press "Command (⌘)" and the space bar at the same time to pull up Spotlight search, start typing "Terminal," and then hit "Enter" to open a terminal window. This will pull up a terminal window without touching your mousepad. For super bonus points, try to navigate like this for the next fifteen minutes, or even the rest of this sessionit is tricky and sometimes a bit tiring when you start, but you can really pick up speed when you practice!

## Windows

We won't be using Windows's own non-UNIX version of the command line. We installed Git Bash, following [these instructions](https://github.com/DHRI-Curriculum/install/blob/master/sections/git.md), so that we can work in the cross-platform Unix command line for this session.
We won't be using Windows's own non-UNIX version of the command line. We installed Git Bash, following [these instructions](https://github.com/DHRI-Curriculum/install/blob/master/sections/git.md), so that we can work in the cross-platform Unix command line for this session.

1. Look for Git Bash in your programs menu and open.

2. If you can't find the git folder, just type "git bash" in the search box and select "git bash" when it appears.

3. Open the program.

1\. Look for Git Bash in your programs menu and open.
2\. If you can't find the git folder, just type "git bash" in the search box and select "git bash" when it appears.
3\. Open the program.
4\. You know you're in the right place when you see the `$`.
4. You know you're in the right place when you see the `$`.

## Command prompt `$`

`$`, which we will refer to as the "command prompt," is the place you type commands you wish the computer to execute. We will now learn some of the most common commands.
`$`, which we will refer to as the "command prompt," is the place you type commands you wish the computer to execute. We will now learn some of the most common commands.

In the next section, we'll learn how to navigate the filesystem in the command line.

Expand Down

0 comments on commit a5325ac

Please sign in to comment.