CSC 115.005/006 Sonoma State University Spring 2022
Scribbler 2
CSC 115.005/006:
Programming I
Scribbler 2
Instructor: Henry M. Walker

Lecturer, Sonoma State University
Professor Emeritus of Computer Science and Mathematics, Grinnell College


Course Home References Course Details: Syllabus, Schedule, Deadlines, Topic organization MyroC Documentation Project Scope/
Acknowledgments

Notes:

Editing, Storing, and Retrieving Files in CS 115

This reading discusses the basics of working with files during CS 115 labs. Discussion in this reading is divided into three main sections:

High-level Overview

Working in the lab on CS 115 activities involves interactions with two separate computers:

The basic set up is illustrated in the diagram on the right.


A student/user works at a workstation in the lab. Typically, the Desktop and three other windows will be open.

Since many students may use the same lab equipment, files developed on the lab machines are not saved from day to day. Rather, students will use a departmental server, called blue.cs.sonoma.edu for long-term storage of any lab work.

working with a lab workstation and remote server

A Typical Flow of Work During a Lab

When You Log On

To use a lab computer in Darwin Hall, you will log in as a "student", using the password written on the whiteboard.

In summary, when you first log onto a lab computer, you might find some materials left over from previous users, but you are not likely to find your work from previous sessions on a lab machine.

Beginning Your Work

As you begin your session, you will need to make a fresh start on your workstation. This can be done in either of two ways:

Making Progress on a Lab, Project, or Assignment


Much work in this course will involve creating, editing, compiling (see note ↠), and running programs. In practice, this work is best done using three separate windows, as shown in the above diagram.

Although the browser will be accessing materials on the Web, editing, compiling, and running programs require that the various windows all are set up to access the same file(s) in the same directory. (More about this shortly.)

As we shall see in the next few labs, compiling is a process of translating programs from a generally-readable format, such as C, to machine language—but more about that in a few days.


Finishing Your Work—Saving Your Files for the Next Time

When you have completed your work for the session, you will need to save your materials on the department's server. This involves two basic steps:


Mechanics

This section reviews the specific steps needed to accomplish the tasks described above.


Creating a New Folder on the Desktop

After you have logged into the workstation, the menu at the top-left of the screen should begin "Finder", "File".


Opening an Editor

For this course, you must use a simple editor when writing programs.

At the bottom of the screen, you might find an icon for Aquamacs (or another editor of your choice).

The Aquamacs logo

Aquamacs logo

Opening a Terminal Window

When working with programs (e.g., running them), you will need to work with a Terminal window; a Terminal window is an area where you will type commands, and the machine will respond based on what you requested. Opening and using a Terminal window can be done in either of two ways:

When a Terminal window opens, it recognizes the folder/directory where you logged in—a home directory for "student". When working with your files, you will want it to recognize the folder/directory you created for your own session. This is usually done in two steps.

If you have created and saved some files in your working directory, you can use the "ls" command to obtain a listing of all files saved in that directory:

  ls

The Terminal Window logo

Terminal Window logo

Setting Up Your Account for Storage on the Departmental Server

To store (and retrieve) files from the departmental file server, you first must connect to the server in three steps:

Although you are free to organize your files in any way you wish, the following is recommended:

With a "current-work" folder, you could start each session by connecting to the departmental server and copying your recent work to the lab workstation. This might be an easy way to pick up work where you left off from a previous session.



created January 11, 2022
revised January 12, 2022
Valid HTML 4.01! Valid CSS!
For more information, please contact Henry M. Walker at walker@cs.grinnell.edu.