# Lecture 2

## Files, folders, and text

---

# 📆 Today

- Quick intro to a our first lab/project
- Inclass "Lab Jam" 🎸
- Start our first project!

---

# Folders and Files and Paths (oh my!)

- Folders are directories
- Files are pieces of named data with a file extension
- Paths are where the files and folders are located

<!-- show terminal ls/tree? -->

---

# Example folder structure

```text
my-project/
├── src/
    ├── index.html
    ├── styles.css
    ├── script.js
├── README.md
```

- Q: How many file types are in the project?
- A: 4
  - `.html` = HTML
  - `.css` = CSS
  - `.js` = JavaScript
  - `.md` = Markdown
- Q: How many folders are in the project?
- A: 1, `src`
- Q: What's the path to the index.html file?
- A: `my-project/src/index.html`
  - On Windows: `my-project\src\index.html`

---

# Plain text files

- A file that contains normal text characters (ASCII, UTF-8, etc.)
- ASCII, UTF-8? What are these?
  - ASCII = American Standard Code for Information Interchange
  - UTF-8 = Unicode Transformation Format 8
  - Why? Everyone needs to agree on what characters mean.
- In practice, text files mean "plain human readable text"
- All of the previous examples are text files (`.html`, `.css`, `.js`, `.md`)

---

`my-notes.txt`

```text
My Class Notes
The professor was...
a bit boring
talked too fast
slides glitched out
```

---

`my-notes-v2.txt`

```text
My Class Notes

The professor was...

- a bit boring
- talked too fast
- slides glitched out

```

^ Some light structure

---

`my-notes.md`

```markdown
# My Class Notes

The professor was...

- a bit boring
- talked too fast
- slides glitched out
```

^ Voilà! Markdown!

---

# Markdown is plain text

```markdown
# A heading

A paragraph with **something important**.

- one idea
- another idea
```

---

# Source → transformer → output

```mermaid
flowchart LR
  A[Markdown source] --> B[Parser or tool]
  B --> C[Web page]
  B --> D[PDF]
  B --> E[Slides]
  B --> F[Prompt]
```

The same source can drive many outputs.

---

# Why are we learning this?

- Learning to clearly define and shape our thoughts
- Provide agents with clear, structured, instruction
- An industry standard for writing and communicating

^ Fun fact: this entire course is written in Markdown!

---

[Markdown Prompt Lab Jam 🎸](./markdown-prompt.lab.md)
