CS107 - Lab 1

Due Monday 09/15 at the beginning of class.

In this lab you will cover:

The reading for this lab is Chapter 1 in the textbook.

Getting used to the computer

Login to your machine and pick your favorite web browser (Safari, Netscape, Internet Explorer). A browser is a program that can access documents on the World Wide Web written in HTML. Access the class webpage at http://www.bowdoin.edu/~ltoma/cs107. Browse over the syllabus and the course information, and follow the link to Lab 1. You will be reading this page.

When you log onto the machine, you will see a Macintosh HD folder (corresponding to the local hard disk), and two network folders, one called CLASS'XX (your class), and the other called your-login-name (your home directory on the Bowdoin network). Both these folders should be mounted automatically when you login.

Open a new browser window and open the URL http://www.google.com. Google is computer scientists' favorite search engine. It was developed by two graduate students at Stanford. Now Google is a big company. Try searching for something by typing in some keywords. Everybody likes Google because it is very good at finding information (one of the first few hits is typically what you were looking for).

Using basic Unix commands

Open a Terminal, from you MacintoshHD->Application->Utilities->Terminal. You will get a window and a promt that looks like this:


This is the operating system prompt. On Macintosh machines, the operating system is Mac OSX, which is built on top of Unix FreeBSD. Therefore, in the terminal window you can type Unix commands.

Everything you type at the prompt is interpreted as a command and the operating system tries to execute it. If it can, you will see the result, otherwise you will get an error message. We will talk in class about the tree-structure of unix file system and commonly used Unix commands like cd, pwd, ls.

Creating a web page

You can find instructions for setting up your Bowdoin web page here.

To create a web page you will need to create in your network home directory a folder (directory) called public_html and inside it a file called index.html or welcome.html. This file will be your "homepage". You should be able to access its contents at http://www.bowdoin.edu/~your-login-name/.

To create this file you need to remotely login onto the Unix server, called polar, or onto arctos. To do this, in the terminal window, at the unix prompt, type:

$ssh polar

and enter your login name and password. You should get a similar Unix prompt on polar:


At the polar> prompt, type

polar> websetup

and follow the instructions. Basically, websetup is a program written by the IT people at Bowdoin that sets up your default initial homepage welcome.html automatically. Look at the default web page that you have just made by typing in the web browser http://www.bowdoin.edu/~your-login-name/.

You can now start modifying your page to make it look the way you like it. To do this, you will need to edit the file welcome.html using a text editor. Modify it, save it, and then re-load the page in the browser to see the changes. A basic file will look something like this (you can use File->ViewSource from the browser's menu to see precisely how an html file looks like).

Your task for the first lab is to write some information about youself and include a photo. You will update the homepage throughout the semester.

Algorithmmic problem solving

Complete exercises 3,4,6,7,8,9 on pages 23-24 of your text.

Be sure to justify your answers! You may do this work either by hand or with a word processor (e.g. MS Word). Also, you may choose to do this assignment either by yourself or in a group. However, solutions should be written up individually and handed in on Monday, at the beginning of class.