Chapter 1 |
![]() |
When you look closely at the computers at Bryn Mawr, you will notice that some are PCs and some are Apple Macintoshes. The first kind are so-called "IBM-compatible" Personal Computers (because IBM created the first ones), sometimes also called Pentiums, or Pentium III's, or Pentium IV's. The numbers/names refer to the "central processor unit" (usually called the CPU, and pronounced "cee pee you") inside. Some of the popular brand names are Compaq, Gateway, Dell, IBM, etc. Most people refer to them simply as PC's after "personal computer" (pronounced "pee cee"). Macintosh is a product line from Apple Computers Inc. These also come in varieties: G3's, G4's, G5's, iMac, etc. People generally refer to them as Macs unless they want to show off, in which case they might say, G5 ... yadda yadda.
The computers that we use on our desktops have two main components: the hardware, and the operating system. Most people run Microsoft Windows operating system (or O.S., pronounced "oh ess" for short) on their PC, and maybe OS X (pronounced "oh ess ten"). But technically, any software could run on any hardware. If Apple wanted to, they could make their OS X run on PC hardware, and Microsoft could make a version of Windows that ran on the Mac hardware. So, you can't tell what software operating system might be running on a specific piece of computer hardware: you can't judge a book by its cover!
But most people would assume that if you have PC hardware then you must be running Windows. This is such a common combination people sometimes call a PC computer a "WINTEL computer" (after Microsoft Windows OS, and Intel, who make the main chip of the hardware). But they might be wrong!
There are many operating systems that run on PC hardware (BeOS, Unix, FreeBSD, OS/2 Warp, NextSTEP, DOS, Solaris, and many, many others). We will use one called Linux (pronounced "lin ucks" or "line ucks"). Linux is an operating system that is a version of Unix. We will discuss some of the more interesting aspects and philosophy of Unix/Linux throughout the course, but for now you need only know that it is the OS that you will be using. (Here's a tidbit though that you may already know: Linux is free. No one owns Linux. You can download the entire OS from the web, change it, and make your own version! You might imagine that Microsoft is not happy about that!)
You can do your work for this class from anywhere in the world, but to make it easy, you'll probably want to do most of it in Park Science room 231, your designated computer lab. It has a coded locked door, but you'll get the code in class. So, let's head over to the lab, get through the coded locked door, and log in!
Once you have located a PC, grab a comfortable chair, pull up to it, take a deep breath, look at the screen, and you might see something similar to the screen shown below:
Figure 1: Linux Login Screen
If you
don't see a screen that looks like the Linux login window, then it might be
running Windows. Exit out of Windows by selecting "Shut down..." and select "Reboot
the computer". When it boots up, it will default to Linux.
If the computer is in Linux, but not at the login screen, someone may have forgotten to log out. Click Desktop at the top right-hand corner of the screen, and then click on "Log Out", select "Log out" and click "OK".
Once you have a login screen, type in your account ID (usually all lowercase letters, and probably the same ID as your BMC email account). Then, press the Enter key. Now, you should enter your password that was given to you in class. Once you successfully login, you'll see a screen like:
Figure 2. The Linux Desktop
We use a
version of Linux called "Fedora Core".
Let us spend some time familiarizing ourselves with this screen layout. What you see above is called a desktop. It is not real, just a virtual one. The computer presents itself as a desktop so that you can organize it (or keep it cluttered) just like your real desk.
The bottom and top lines of the screen are called panels. This is where you start programs running. You can customize it to do many things, such as tell you the time, date, weather, what programs are currently running, etc. You can even put a little dictionary lookup window there!
What you would normally place in a drawer of your desk is stored in a disk on the desktop. Depending upon the hardware configuration of the computer, you may have one or more hard disks. The hard disk is made up of files and folders. You can see an image of your own folder in the upper left-hand corner of the desktop.
Figure 3: Part of the desktop showing the "home" folder.
We can examine the contents of any folder on the disk by double-clicking the mouse on it. An arrow, also called a pointer, indicates the location of the mouse on the desktop. Move the mouse and see the pointer move with it. Move it all the way to the "Home" folder icon and click the (left) mouse button twice in quick succession. A window jumps out of the disk icon and it may look something like this:
Figure 3. Your Home Folder
If the
folder doesn't open, simply try again.
The files that you see are those found in your own space on the hard disk. This place is called your home. Since the above account is very new, there isn't much there. Soon you will be populating this folder with your files, folders, and Java programs.
To view any file that you see, just double-click its icon.
The View menu of the folder window gives you several options for the way a window's contents are displayed. The dot against the entry as View as Icons above indicates that the contents will be displayed as icons (as seen above). Click on View as List release the button. The contents of the window will change to show the same contents, but now shown as a list of names.
Try it!
Notice that the contents are now in a list form. Feel free to try other options
(as well as menus). The contents displayed are from my computer. The computer
you use will have different contents.
When you interact with a computer mainly by manipulating icons, using pointers, menus, and windows, the interface is called a WIMP interface. WIMP stands for Windows, Icons, Menus, and Pointers.
Several items in the folder window are displayed using a Manila Folder icon. Like real folders, the folders on your computer can hold documents as well as other folders. You can organize your desktop by creating several folders and storing things in them. You can examine the contents of a folder by double-clicking on the folder icon. Alternately, if you are viewing as List, you can double-click on the folder. The contents of the folder will be displayed in the window.
When you open several windows, you will notice that the windows overlap and hide each other. Generally, depending on the size of the monitor you are working on, only one window will be fully visible at any time. In order to see a partially hidden window, simply point the mouse arrow to the exposed part of that window and click once. That window will expose itself and become active. You can also hide away a window by double-clicking on its top bar. Double-clicking the top bar again will bring the window down. Sort of like a window shade effect. You can close a window by clicking the mouse in the little box on the upper-left corner of the window. You can also resize a window by pressing the mouse in the bottom-right corner and dragging it. Try it!
Next, drag the mouse to the Trash can icon, press the button, and drag again. Notice that the icon also moves. You can move any icon any where just like that. The trash can is used to discard unwanted contents from a disk/folder. You can simply drag the icon of any unwanted item into the trash can and discard it from your desktop (or life, sometimes).
Next, lets create a folder called cs110 where you will write all your Java programs. In the window showing your home folder (Figure 3 above), click on the File menu and then select the Create Folder option. When the new folder appears, enter its name: cs110 and hit the RETURN key. The window will rearrange and you should now see the follosing contents in your home folder:
Notice that there is now a folder icon with the name cs110. You've done it. You have successfully created a folder where you will write all your Java programs. Go ahead and click on the cs110 folder. What do you see? It is empty....well, that's because you have not yet written a Java program. We'll do that in the next session.
You noticed above that folders may be inside of other folders, which in turn may be inside other folders. This structure forms what we call a tree in computer science: the root of the tree is the top-most folder; the branches of the tree are the disks and folders, and the leaves of the tree are the individual files (images, documents, etc.)
One curious thing about computer scientists is that their trees grow upside down. That is, the root (desktop) is considered the top of the tree, and the leaves (files) are considered the bottom of the tree. Why do you care about what's up and what's down? Because, we talk about going down into our disks and folders to find out files, and moving back up to the enclosing folder or disk. Usually, we try to start at the desktop and work our way down, but some of the interfaces we deal with may require us to move up as well.
The proper way to excuse yourself from Linux is to simply log out. To do this, select the Desktop option from the top panel and then select the Log Out option from there. The system will give you a confirmation dialog, go ahead and confirm by pressing OK.
Congratulations, you have now mastered getting into the lab, logging in, creating folders, and logging out!
Next, we will learn how to write and exceute Java programs.
Back to Chapter 0 | Over to Chapter 2 | Back to CS110 Course Materials