Welcome
Web browsers
Workstations and Servers
Alice
Lab journals
Your first program
  Ex 1:
Your second program
  Ex 2:
On your own
  Ex 3:
How to submit?
Policies
Back to labs

Lab 1: Introduction: Browsers, Servers, Alice

Welcome

Welcome to the first lab.

Web browsers will be used mainly to read lab documents like this one that provide information and assign your tasks. In addition to simple text, the pages may contain links like the words in different color . There are also links that are used to answer questions.

or provide hints

Now be sure you click on the link for "Web browsers" on the left. The menu to your left will guide you through your labs. You need to make sure that you visit all the sections.




Web browsers

Web browsers are designed to access the World Wide Web, an Internet information resource. Web browsers can also be used to view hypertext documents on a local system. Common web browsers include Opera, Safari, Mozilla, Firefox, Internet Explorer.

In order to use web browsers effectively you should get familiar with the icons and menus that can be found usually at the top of the window. The icon Back gets you back to the location you came from. If you ever get lost, it can be useful sometimes to follow your steps backwards, using the Back icon, until you get to a location from which you can find your way out. If you do go back to one of the previous locations, the next icon Forward will be highlighted; you can then use it to make a step forward in case you need to return to the location you backed up from. Home stands for your default home page: you can set this to be your own home page (i.e., with information about you, your own set of links, etc.) or any other page you wish.

If you are on a machine where the default has not been set to anything else, Home will take you to the web browser's home page. If you are new to the Internet, this is a good starting point for exploring the World Wide Web. Just follow one of the many links offered by the page. Just make sure you don't waste the time allocated for the lab! Reload can sometimes be useful if there was an error during receiving information and some part of the text or graphics is not properly displayed as a result. Just click on this icon and the screen will reload. Stop stands for stop receiving information. If a connection takes too long or you decide not to follow a link after all, just click Stop and you will be left at the present location.

Next, let's take a quick look at the menus. Most of them are self explanatory. Some of the options in the menus are equivalent to the icons that have already been mentioned. The Go menu gives you a list of sites that you have visited most recently. You can jump to any of them by selecting them form this menu. The Bookmarks menu is a useful tool; you can use it to store locations that you visit often and jump right to them without having to type in the address each time. Whenever you want to make a bookmark to a site, just choose Add Bookmark from the menu and your list of bookmarks will get updated with the present location. In the File menu, the Open Page option will bring up a window in which you can enter the location of any site you want. Alternatively, simply type the location of the site in the Location window. In the Edit menu, the Preferences option allows you to adjust such features as font style, the home page that gets displayed when you load web browsers, and other preferences.

To find things on the internet, Google is a fine tool and easy to use. Some browsers have Google built in -- usually a text area you can type a query into and when you hit "Enter" the request is sent to Google. Google finds many webpages related to your query and sorts them in a fairly clever way. Google is your friend.






Workstations and Servers

The Dell or Sun computer you are working on in Tompkins 410 or 411 is a workstation. It has its own disk drive, called C:, where programs and data can be stored; and it also provides you access to a large filesystem called T:.

Anything that happens entirely within the workstation in front of you we will call a local action. For example, if you store a file on your C: drive, we will say that you are storing it locally. Your C: drive is usually subdivided into a number of directories. Those directories can also be subdivided into subdirectories, each of which in turn can be subdivided ... Some people and machines use the names "folder" and "subfolder" for "directory" and "subdirectory". Anything in a directory or subdirectory on C: is also being stored locally. One particular directory on C: is Desktop.

One of the problems with keeping stuff on a shared workstation, such as the one you're working on in the lab, is that other users will be using that workstation while you're away from it. Some parts of the C: drive are private to you (such as your desktop), but most is available to anybody who logs in to the workstation. We cannot guarantee that next time you come to this lab you will be sitting at the same workstation. Since you want to be sure that you can get the files you create today the next time you log into a workstation, it is best to store your files on a server.

A server is just another computer, but you're usually only interested in its storage facility. When you reference the T: drive, all the machines in this lab provide access to your personal piece of the same storage facility. If today you work on a machine in the front row and store all your files on the T: drive, then next time when you work on a machine in, say, the back row, you will see all the files you saved on your T: drive. Furthermore, the T: drive actually just refers to your sharre of a very large file system. Nobody else, even if they log in to the same workstation after you log off, will have access to what you put on your T: drive.

Anything you save to the server (T: drive)

  • Is not available to anybody else
  • Is available to you from any workstation in this room

Anything you save locally to the C: drive

  • May be seen by anybody else who logs in to that workstation
  • Is not available to you from any workstation except this one

Using the T: drive is almost like using your own storage device and taking it with you from one workstation to another.

While you are working on a project, you may choose to work with files all of which are held locally on the computer's C: drive. This may be because you believe that it is slow and wasteful to be performing such actions over a (relatively) slow ethernet link instead of taking advantage of the fast bus speeds that data transfers entirely within your workstation can achieve.

Or you may just work with all your files stored on the T: drive. My guess is that for projects developed for this class you will not notice any degradation in performance by doing so.

Before you leave your workstation, you should make sure all the files you have been working on are on the T: drive. This is because there is absolutely no guarantee that your files will still be on the workstation the next time you log on. In fact, given the regularity with which lab machines are cleaned, there is a good chance you will lose all your careful work. If you chose to work with all your files on the T: drive, there is nothing more to do. If, however, you stored to the C: drive you will need to copy everything over to the T: drive or to your own storage device before you log out.

Next time you log on to any workstation, you can move or copy all the needed files from the T: drive to the workstation C: drive if you wish, and then commence to do all your work locally.

In a nutshell

  • T: may be slow (I doubt you'll notice it), but it is a trustworthy custodian of your stuff
  • C: is fast (I doubt you'll notice the difference) but your stuff can evaporate once you log off

Investigate T: now. You will see it appear under "My Computer" as drive T: You will be able to copy files to and from T: by using "cut" and "paste". Before you leave a workstation, be sure to copy any stuff you created on C: from local drives to T: or to your portable USB storage device. For now, let's just make a suitable spot on T: where we will keep stuff from this course. See if you can create a directory within T: called cs53. Once you have done that, see if you can create another new directory called Lab1 as a subdirectory of cs53.

An alternative to using the T: drive is to use your own computer. If you do that you will need to install some software. For now you need to download Alice from alice.org. Follow the instructions: it's pretty easy.

Another alternative to the T: drive if you have one is to use your own USB thumb drive (or whatever you want to call it: you know, those little sticks you can carry with you and plug in to any computer you like.)

You are encouraged to use your USB thumb drives, and use T: drive only for backing up your work, in case something happens to your USB drive.






Alice

In order to do the actual lab exercises, you will need a program called Alice. It should be installed on the lab machines.

If you are on a lab machine, locate it now. Double click the icon to start the program and proceed to the next section (Using Alice). You can skip the rest of this section.

As stated in the previous section, if you are working on your own computer you will need to go to alice.org. You will download either Alice.dmg for a Macintosh or Alice.zip for a Windows machine. Full details are on page 2 of the textbook. (If you are running Linux you must figure it all out for yourself.)






Lab journals

For all labs in this course, you will need to prepare a lab journal. This should be a nicely bound paper notebook such as you might keep in any laboratory science course. You should write down the various stages of your problem-solving, design, and development: All the steps you follow before you begin to work at the computer.

You will show this lab notebook to your lab instructor at every lab session. Your lab instructor will base part of your weekly lab grade on the quality of your notes. At the end of term, at the final exam, you will hand it in to your course instructor who will evaluate the lab notebook as part of your final grade.

Your notebook will describe all the stages prior to your development of programs.






Your first program

This is the same program discussed in class and Chapter 1. of the text book. Let's make it work. Before you start, check that you have drive T:. Even if you choose to work locally, when you leave the room, you will need to back up your files by copying them to T:. So check you have a T: drive. Consult your lab instructor if there is any problem.

Fire up Alice.


Exercise 1

Read chapter 1 in the textbook and do exercise 6 at the end of the chapter. When asked to name the program, name it "Exercise1.a2w".







Your second program

Read the rest of Chapter 1 in the text book. After reading it you should be able to tackle the challenge of Exercise 2.


Exercise 2

Do exercise 9 from chapter 1.(If necessary) start up Alice again and save it as 'Exercise2.a2w'. Here is a prose description of a possible continuation of the story
The white rabbit pulls out a watch from his waistcoat. After glancing at his watch, he exclaims, "Oh, my! It is getting late." The white rabbit puts the watch back into his coat and then disappears. Alice turns her head to the left and then to the right. She says aloud, "Now where could he have gone?"
Convert the prose description into a program flow (be sure to do this in your lab journal, demonstrating your understanding of storyboard sketches, transition diagrams, etc.) and thence into an Alice program. Be sure your program is saved as 'Exercise2.a2w'.







On your own

When you click the add objects button in Alice and look among the local gallery People you will find hebuilder and shebuilder either of which brings up a tool that lets you custom-build an object. When you're done, the person object you make can be and will be imbued with various methods, including a walk method.

For this exercise I want you to make up a story involving a custom-built person and some of the pre-built objects in the gallery. Your story should be short enough to fit within one shot of one scene. But your story must involve making your custom-built person walk across part of the world.


Exercise 3

Make up a story involving a person you will build using shebuilder or hebuilder. The person must walk some distance, but otherwise you are at liberty to make up anything that appeals to your imagination. Keep it short: one scene and one camera shot only, please. Write up your story and the steps in its transition to an animation in your lab notebook. Use Alice to create your animation. Call your Alice program 'Exercise3.a2w'.






How to submit your homework

Create a folder on your computer and name it 'CS053-Spring10'. Create another folder and name it 'Lab1'. In the newly created 'Lab1' folder copy your solutions to the exercises: Exercise1.a2w, Exercise2.a2w, and Exercise3.a2w. In the future, I suggest that you create the folders for the labs and then directly save your sulutions to that folder.

Next, go back up to your folder 'CS053-Spring10', right click on your folder 'Lab1' and compress it either in a or file.

Your newly compressed file should be named:

  • FirstName_LastName_Lab_1.zip or
  • FirstName_LastName_Lab_1.rar

After you have compressed your homework, then proceed to submit it via Blackboard.

Got problems? If you have any problems make sure you clear them with your lab instructor because if you do not follow these requirements for submission your lab homework submissions will not be accepted and you will get zero points.