Lecture 1. AMES 5, Tuesday, Jan. 5, 1999

Welcome to AMES 5, Quantitative Computer Skills! Please look over the Course Outline to see the course description and what we will be doing this quarter. The primary purpose of this class is to teach you to program a personal computer in the True Basic language. Since we have Macintosh computers in the AMES 5 computer laboratory in Engineering Building II, room 205, the type of personal computer emphasized will be macs, but you can probably survive the class even if you happen to own an IBM clone running on a Microsoft disk operating system, possibly with Windows. The textbook Let's Program It in True Basic, by Avery Catlin (which you should get in the bookstore) assumes that you have either type of computer. If you have no personal computer of your own your should probably get one, but you can still survive the course since you can get into the AMES 5 computer laboratory any time to use the machines. There are nearly 200 Macintosh computers on campus that you can use to work on your homework assignments in this course, listed in the Academic Computer Services webpage.

An important secondary purpose of the course is indicated by the course title; that is, to help you develop your computer skills. Since you are reading this lecture, apparently you already know a very useful computer skill , which is how to use the internet. You are able to access a huge amount of information this way, including these lectures about this course and the various links provided to other sources of information which I have provided in the course webpage. You might want to explore the possibility of constructing your own webpage, since this is allowed using your course computer account which gives you email capability. Simply type "help www" at the command line when you are in your course computer account and follow directions (read all the help articles that appear about the world-wide-web). It takes about ten minutes to create your own webpage once you know how to do it. Then you can learn how to put useful information about yourself in the webpage, such as a resume when you are ready to get a job. You can learn everything about constructing webpages using the internet using the Beginners Guide to HTML.

During the first meeting of the class you were given a piece of paper with information about your course account (eg. your username such as am5wab, including the password you will need to use the account (your StudentID). The AMES 5 course accounts (UNIX) are on computer iacs5 and the AppleShare accounts are on GreenServer. You will also get a pink handout titled "Mac Labs Step 1, Guidelines for users of ACS Mac Labs". Read both of these documents carefully. You will find directions for mac-lab logon procedures to open your AppleShare course account, where you can save your work. You should also buy a few computer disks (3 or more) to use for your personal copies of True Basic (paid for by the UCSD Site License) and TB Ref (freeware by Prof. Richard Herz of AMES) which can be copied in the AMES 5 laboratory or downloaded from TB Ref freeware . You get a copy of all textbook program examples along with the textbook. Back up all of your homework on one of your floppy disks to be on the safe side. Please do not leave your homework in the Workspace portion of the computer hard disk, since it might be a temptation to others to make copies, which is forbidden.

The schedule of reading, project stages, and homework for the course is given in the course outline. The quiz schedule is not known, so please bring a number 2 pencil and a scantron form (the blue kind, #20788-ERI, $0.15 in the bookstore) to all lectures. You must submit your homework by placing a folder containing your program files in the one-way drop folder AMES 5 Drop Box in the GreenServer laboratory computer (server). The folder and files must be labeled so your TA can easily find it, know it is yours and what you have done; for example, "A02-HW1, Doe, S." would be an appropriate name for the folder containing the program files for Sally Doe's homework assignment number 1, for week number 1, due in the AMES 5 Drop Box before her section begins in week 2 (no later). In the program files, programs must be clearly labeled with REM statements (or ! statements) giving the same information, plus the due date, name and purpose of the program. For example,

First file, labeled MEX2-1:

! A02-HW1-MEX2-1, Doe, S.

!CodeWord FAWN

! Due: Jan. 13, 1999

! MEX2-1 means "modified example program 2-1" from p22 of the text.

! Modification: Change the greeting from Hello! to goodbye.

! Following is the program.

PRINT "goodbye."


Second file, labeled MEX2-2:

! A02-HW1-MEX-2, Doe, S.

!CodeWord FAWN


! Change the number to be printed.

PRINT 35.6 ! print a different number



Last file, labeled PP2.2 (ie, Practice Program 2.2)

! A02-HW1-PP-2, Doe, S.

!CodeWord FAWN

! Display your name, local address, and telephone number on separate lines on the screen.

PRINT "Sally Doe"

Print "5566 La Jolla Farms Rd., La Jolla CA 92093"

Print "555-8312"


Be sure to check that your modified programs work as well or better than the textbook examples since this is the purpose of the homework assignment. Grading will be 10 points for each homework set, consisting of the Modified Example Programs (MEXs) and Practice Program problems (PPs). Consider that your TA only has 5 or 10 minutes to spend grading your homework, which consists of dozens of modified programs you have spent hours preparing, so it is likely that only spot checks can be made of what you have done. Try to make the grading easy for them. Signal the MEXs that you want them to see most (for example: *****MEX2-2 could be the file name for this program if you spent a lot of time on it and you want it to be seen). Give enough remark statements to convince your TA that you know what you are doing. Quizzes are about all aspects of the course (including the webpage and lectures). Read the Summary of Important Points, Common Errors, Self-Test Questions, and unassigned Practice Programs at the end of each chapter very carefully, since these sections will be a source of questions for the Quizzes.

You should get started as soon as possible in this course. Go to the lab (the lock combination will be given out in the first class and will get you in at off hours), get familiar with the equipment and start programming. Copy the True Basic and TB Ref files to your own disks so you can use them on your home computer, or at other computers around the campus for student use (Academic Computer Services ). Send an email to your TA to let them know how glad you are that you're in their section. Type "pine" when you get into your account and follow directions to use the PINE email program. Note that you must use the control key rather than the Apple key to send your message. Go through the first part of the TB Ref HyperCard stack as a tutorial. Learn to use the Do Trace command described in Chapter 6 so you can step through the operation of programs. Try out the demonstration True Basic programs and look up the commands in the text that you don't recognize. Make changes to see how they work. Do your first few homework assignments early. Read ahead. Get started on your term project, building in every trick in the book. Feel free to discuss the material with your fellow students (but don't copy or allow copying of homework, since this doesn't teach anything). Use your head first, but don't be shy about asking questions if you get hung up. Programming is fun once you get started and build some confidence.

Computer Joke Link


Lecture 2. AMES 5, Thurs., Jan. 7, 1999

This week the first Sections begin, but you can go to the AMES 5 laboratory in EBU205 anytime to get familiar with the equipment and software. The first week you want to make sure you know how to use the Macs to produce True Basic programs, copy the free software to your disks (True Basic and TB Ref), produce a backup copy of Catlin's disk that came with your textbook, and prepare a homework disk containing files you will download to the AMES 5 Drop Box before the homework sets are due next week.

Codeword file:

We need your codeword! If you don't get a chance to provide one on the section lists circulated the first class meeting, please include a file with your first homework set indicating a four letter codeword we can use to display your grades, and that is known only to you and us. For example:

Filename: CODEWORD Sally Doe

! Dear beloved TA:

!My Name is Sally Doe

!Please use FAWN as my codeword so I can find my grades in coded lists for AMES 5

!You are very kind.

!Best regards,


TB Ref:

The hypercard stack TB Ref is a good place to start learning True Basic and the associated computer skills you will need to maximize your rate of progress in AMES 5. Open the stack (click on the program) and follow directions. Read from the top of the Topics list and try out each option. Open up True Basic so you can copy the programs given and try them out. Use of Do Trace, the debugging program for True Basic is nicely demonstrated by copying and using the program included in the topic "elements of programs" (the bullet shows there is a program available to copy). It's a good idea to know how to use this early so you can follow the sophisticated Demonstration Programs included in the True Basic folder, and be thinking about your Final Project.


Final Project:

The Final Project will be an original program constructed by you to show off your True Basic skills accumulated by the end of the quarter. The Final Project will be graded in two stages, so you'll know how you're doing early. Pick something that you are interested in doing, and that you'd like to show off to others. It can be a game, or a flashcard program for True Basic, a graphics program...whatever. Be creative!

Homework 1:

We'll go through the first homework set, as time allows.


Try out the course account you are assigned for AMES 5 on the computer iacs5 using the information about your username and password included in the account slip you get from your TA during your first Section. Your username is in the format am5wab , where am5 refers to the course, w means Winter Quarter, and ab is you. Type "pine" once you get in your account and follow directions.

Joke of the day

As mentioned previously, you should test all of your Modified Example Programs (eg.: MEX2-2) and Practice Programs (eg.: PP2.1) using the PowerMacs in the AMES 5 laboratory before you submit your folder (eg.: A07-HW1, Roe, R.) by dragging it to the AMES 5 Drop Box folder (or the alias of the folder you'll see when you open the PowerMac hard disc, and follow the directions). There is a conversion program called "Mac _-_ PC file conversion" which you can use if you do your homework using an IBM clone PC. This program can be copied, so you can put it on your disks for use on other machines. You can use it to convert the Catlin example programs to PC format for use on IBM clone machines.

Quiz # 1


Quantitative Computer Skills

Quiz 1, January 7, 1999

(closed book, closed notes, Scantron form #20788-ERI, StudentID, CodeWord)


1. True BASIC is one of the first commercial versions of the Full BASIC programming language conforming to ANS BASIC standards. BASIC is one of the most widely used programming languages, and was first developed at Dartmouth College in:

(a) 1946 (b) 1996 (c) 1974 (d) 1964 (e) 1994.

2. Computers store information in bits and bytes. A bit is either 0 or 1 (false or true, off or on). If the bit is off, it represents the number zero. If it is on, it represents the number one. Thus it stores numbers in the range zero to 21 - 1 = 1. A byte is 8 bits, and can store numbers in the range zero to 28 -1. Therefore the largest number that can be stored in a byte is zero to:

(a) 8 (b) 28 (c) 204 (d) 255 (e) 127.

3. There is a difference between a text file and a binary file:

(a) true (b) false.

4. True BASIC is case sensitive. It is important to give the command PRINT instead of the command print. The numeric variable M is different from the numeric variable m:

(a) true (b) false.

5. The output of the program PRINT hello! (with an END statement following) is:

(a) hello! (b) 0 (c) hello (d) an error message (e) disaster.

6. The output of the program PRINT "hello!" ! print a line (with an END statement following) is:

(a) hello! (b) 0 (c) hello (d) an error message (e) disaster.

7. The output of the program PRINT "hello!" REM print a line (with an END statement following) is:

(a) hello! (b) 0 (c) hello (d) an error message (e) disaster.

8. The output of the program REM print a line (next line) PRINT "hello!" (next line) END is:

(a) hello! (b) 0 (c) hello (d) an error message (e) disaster.

9. All programs must contain the following command or they won't run:

(a) hello! (b) PRINT (c) END (d) REM (e) SudentID.

10. The command INPUT name$ produces a question mark and expects you to type in a value for name$. What is name$?

(a) a numeric variable (b) a string variable (c) a numeric constant (d) a string constant (e) George.