Skip to main content

Files, Applications and Working State

What this concept is​

A file is stored data; an application interprets and changes it. A running instance of an application has working state, which may include changes not yet saved. The operating system manages processes, storage and access. A browser is an application; a website can depend on a remote service and your connection to it. This model helps locate a failure before choosing a fix.

Why it matters here​

Before learning shell commands, understand what they will affect. The readiness repair teaches opening and saving a file. This lesson adds a state model: which copy changed, where the change exists and whether another application can observe it.

Concrete example​

Create note.txt with the sentence “First saved version.” Save it in a disposable practice folder. Open it in a second window or viewer. In the first editor, add “Unfinished thought.” Before saving, predict what the second viewer shows. Save, reopen the viewer and compare. Some editors autosave or share buffers: record that actual behavior rather than forcing the expected result.

Draw: keyboard → editor working state → saved file → reopened viewer. Closing a window is not the same operation as deleting the file.

Common confusion / misconception​

“I can see it” does not establish that a durable copy exists. An open cloud document may be waiting to sync. Conversely, closing a tab does not necessarily erase server-side data. File size and available memory describe different resources.

How to use it​

Name the artifact, its location, the application and the last confirmed save. When work seems missing, inspect those facts first. Use a new scratch document to investigate autosave behavior; never test crash recovery on your only important copy.

Check yourself​

If a second device cannot see a recent edit, list two explanations. The edit may not be saved, or it may be saved locally but not synchronized. Neither observation alone proves the document was deleted.

Mini drill or application​

Make a four-state timeline: open, edit, save, reopen. Mark what evidence shows each state. Explain it to someone who has never used your editor. Keep a text record if screenshots are inconvenient.

Read this only if stuck​

Use the archived CS50 Understanding Technology hardware material for a conceptual explanation. The course was retired in 2024; do not use archived product advice as current setup instructions.