University of Toronto - Spring 1998
Department of Computer Science

CSC 148H: INTRODUCTION TO COMPUTER SCIENCE



This Week's Announcements

Tuesday 12 May: Horton's grades are done

Unofficial course grades for my section of csc148 are now posted on the corkboard outside my office.

Tuesday 28 April: Mitchell's A4's can be picked up

Assignment 4's from Mitchell's section are available for pickup in a box in front of SF2302 (Where the 148 Bulletin Board is). They are in alphabetical order.

Requests for re-grading will have to be made in writing (using a carefully filled out ``request for re-marking'' form from the handbook). Put the form, with your assignment and the grading sheet, in an envelope with my name on it and give it to the department secretary in SF3302.

I will accept requests for re-grading (for my section only) up to 4pm Thursday. No requests can be dealt with after that. (Because we will be submitting the final marks.)

Dave Mitchell



Tuesday 28 April: Mitchell's section: check your marks

Unofficial term marks for Mitchell's section are now posted on the 148 bulletin board outside SF 3202, and can also be found here.

Please check this listing for correctness, no later than Wednesday.

If you find an error:

  1. inform me by email at mitchell@cs.toronto.edu
  2. place the piece of work in question, and a note of explanation, in an envelope with my name on it, and leave it with the department secretary in SF3302.
I must receive all such materials before 4pm Thursday. (Note that this deadline may be different for different sections)

Dave Mitchell



Monday 27 April: Check your marks!

All term marks for Horton's section, including assignment 4, are now posted on my corkboard. Check yours to make sure they have been properly recorded. If you spot an error, bring the relevant marked work to an office hour, or slip it under my door with a note explaining.

You must correct any errors before the exam.



Monday 27 April: Assnt 4, big-oh solution

A solution to Part E of assignment 4 (the big-oh questions) is now available on the course web site.

Friday 24 April: Solution to proof from Assignment 3

A solution for the proof part of Assignment 3 is now available on the course web page.

Wednesday 22 April: Horton's A4's -- most are ready

Most of my assignment 4's are marked and can be picked up from a box outside of my office. It's in the hallway, so you can get your assignment at any time the building is open.

A small number of the assignments are not ready. I expect to have those in the next couple of days.



Thursday 16 April: Horton's marks

Revised marks, up to and including assignment 3 are posted on my corkboard. Check yours to make sure your marks have been properly recorded. If you spot an error, bring the relevant marked work to an office hour.

You must correct any errors *before* the exam.



Thursday 09 April: Leftovers for Mitchell's class

The remainder of Assignment 3 (and all earlier work) for Mitchell's section is now in the CSSU office for pickup.

Tuesday 24 March: A3 questions

Our head TA, Paul Gries, has posted answers to a bunch of your assignment 3 questions. Check the course newsgroup.

Thursday 19 March: Horton's class: Midterm 2 solution

A solution for my second midterm is now available on the Tests web page.

Thursday 19 March: Horton's class: Check your marks

Marks for the term so far (up to and including assignment 2) are now posted on the corkboard outside SF 2302c. It is your responsiblity to check and make sure that your own marks were recorded properly. If you spot an error, bring the relevant marked work to an office hour.

It is very important that you correct any errors immediately. Making changes after the final exam is difficult.



Sunday 15 March: Remarks for Assignment 2

There was an error in the times I posted for meeting one of the assignment 2 markers (Mary Ellen Foster). Please check again here to see the corrected time.

Wednesday 3 March: A3 is ready

The assignment 3 handout and starter code are all available on the course web page. We expect to distribute printed copies of the handout in the next lecture.

Monday 2 March: A2 -- reading input

A number of students have had difficulty with the code for reading in a graph from a file. Professor Mitchell has provided a sample A2Main class that includes code for doing this input. (See the Assignments page.) You may use it in your assignment. Or, if you prefer, you may "hard code" in particular graphs in your main method -- that is, write specific calls to addEdge with particular edges named right in the code.

Wednesday 25 February: More online homework available

The online homework on Recursion is now available on the Homework web page. This topic is coming up soon in lectures, and will be the main thing covered in Assignment 3.

The homework on ADTs will not be available this term. I haven't had a chance to finish preparing it.



Monday 23 February: Professor Mitchell's office hour today

For today only, his office hour will be 3-4, instead of 4-5.

Thursday 19 February: A2 starter code is ready

The starter code for assignment 2 is available on the Assignments web page.

Wednesday 11 February: Office hours during reading week

The following instructors' office hours will occur during reading week:
          Mon 16 Feb   4-5 pm   SF 2304a    David Mitchell
          Tue 17 Feb   5-6 pm   SF 2304a    Jeremy Sills
          Thu 19 Feb   3-4 pm   SF 2302c    Diane Horton
          Fri 20 Feb   11-noon  SF 2304c    David Mitchell
Professor Sills will also be available by phone (905 828-3811) as usual, that Monday and Wednesday, from 9-11 am.

Wednesday 11 February: Assignment 2 handouts

Assignment 2 handouts are available on the corkboard outside SF 2302c. It will also be available later on the web.

I strongly recommend that you take a look at it before the weekend, so that you can get your first batch of questions about the assignment answered before reading week.



Wednesday 11 February: Where to hand in late assignments?

If you have a late assignment and are using some grace days for it, hand it in to the normal 148 drop boxes, just like an on-time assignments.

If you you have your professor's permission to hand in an assignment later than Friday at 5:00 p.m., due to illness for example, do not hand it in to the drop boxes (we may not discover it for a long time and wont't be able to confirm when you handed it in). Instead, hand it in to your own professor if you've made an arrangement with him or her; or to Professor Horton's office (SF 2302c; leave it under her door if she's not in).



Wednesday 11 February: Where are the 148 drop boxes?

Your assignment must be handed in to the 148 drop box for your section. They will not be accepted anywhere else.

The boxes are located "on the second floor of the Sandford Fleming Building, near room 2305A. This is between the elevators and the bridge to the D.L. Pratt Building. Turn left as you exit the elevators and left again immediately. The boxes are labelled." [148 course handbook, page 7]. The location is near where your professor holds office hours.



Monday 02 February: Horton's midterm

The following information about my midterm was given out in last Friday's lecture. It pertains only to my lecture section.

Test format: 50 minutes; no aids allowed.
You are responsible for: Lectures, tutorials, assignments, online homework, and assigned readings, up to and including Friday 30 January. Note that the readings are intended mainly as reinforcement of what we're doing in lectures etc. I will not ask you detailed or nitpicky questions that pertain to something covered only in the textbook.
That includes these topics: Basic Java, classes, ADTs, linked structures. Linked structures are emphasized quite a lot on my midterm.
Kinds of questions: See old tests in the handbook, and last fall's tests (in Java) on the web. Note that some of the old tests in the handbook cover topics we haven't touched on yet and that you are not yet responsible for, such as induction. The order of topics in the course has varied over the years.



Monday 02 February: Advice about tackling assignment 1

My very strong advice is that you do not try to tackle this assignment all at once. If you do, you will spend much more time on it than you need to, and you may not even get the assignment done.

Here's a better approach. Pick a small part of the problem and begin by working on only it:

You now have a working subset of the program. (You could even hand it in for part marks if you weren't able to do more.) Build on it in small, incremental amounts, each time going back to the steps listed above.

This may seem like you are taking a big detour rather than heading straight for your ultimate goal of a complete program that solves the whole assignment. But you will get to your goal faster if you tackle it incrementally.



Wednesday 28 January: Using the lab at St Mike's

There has been some concern about the noise level in the cdfpc lab in the J.M. Kelly Reading Room at St. Michael's College Library. If you use this lab, please keep the noise down as much as possible.

We occupy these shared facilities by the grace of the Library. If noise continues to be a problem, students who fail to comply may have their account suspended.



Tuesday 27 January: Assignment 0 is marked

Your mark on assignment 0 has been sent by email to your cdfpc account. For your information, the 11 test cases used were:
       1       8 2 "315"
       2       2 8 "11001101"
       3       10 10 "420"
       4       11 11 "12345432"
       5       13 3 "A"
       6       2 13 "1010"
       7       7 5 "11111"
       8       2 10 "0"
       9       14 3 "0"
       10      2 16 "10101010101010101010"
       11      16 2 "AAAAA"
And the corresponding solutions are:
       1       11001101            
       2       315                 
       3       420                 
       4       12345432            
       5       101                 
       6       A                   
       7       42201               
       8       0                   
       9       0                   
       10      AAAAA               
       11      10101010101010101010


Tuesday 27 January: Preparing for Assignment 1

The third online homework, on the topic of linked data structures, is now available on the online homework page.

If you want to successfully complete Assignment 1 on time (and as painlessly as possible), I strongly recommend that you:

  1. Do online homework #2 (references and memory)
  2. Do online homework #3 (linked data structures)
  3. Do the exercises suggested in lecture (see slide 113)
  4. Run some simple Java code with linked lists. You can use the extremely simple code in the slides, code from tutorial (which you can download and play around with), code from the online homework, etc.
    Playing around with simple linked list code is a very important step. It will expose you to knew kinds of bugs that you haven't experienced before, and you might as well learn to deal with them in a simple program before tackling something as complicated as Assignment 1. This will save you time overall. Really!
These steps are even more important than doing the textbook readings.

Tuesday 27 January: Miscellaneous Java questions

Question: What happens if System.out.println (x) is executed and x is not a String?
Answer: Java tries to turn x into String for you. It does this by looking to see if x has a toString() method. If so, it just uses that. This is why, in A0, we called the method for converting a NIB into a string "toString" instead of something else. You'll notice that lots of classes that are part of the Java libraries include a toString() method. Take a look at the Java API documentation online (follow the link on the main 148 page), and you'll find toString() methods all over the place.

Question: Why can't we use Vectors instead of linked lists?
Answer: Vector is a class defined in Java.util, and it defines a "growable" array of objects. This seems like the ideal solution to the problem of fixed-sized arrays. However, this size flexibility comes at a price. When you have a Vector that needs to grow in size, Java has to do a lot of work behind the scenes. (Think about how Vectors might be implemented.)

You need to know about linked lists for a number of reasons:

Question: How can one have an object reference inside another object?
Answer: The data members inside a class can be primitive things like int, float or boolean; or they can be references to objects. This is completely acceptable, and quite useful. For instance, you might want to keep a linked list of Fractions.

One thing that might be bothering you is seeing class Node (lecture slide 116). One of the data members inside class Node is

	Node link;
So it seems that every Node has a Node in it -- which sounds like it leads to infinite regress. But in fact, what the Node class says is that every Node contains a variable that stores a reference to a Node. This is not a problem at all, and it is what lets you make one Node point to the next (or to null) in a linked list.

Thursday 22 January: Advice on debugging

I just added to the course web site a page with general advice on debugging, and information on how to bring a bug to us for help.

Look for "how to bring a bug to office hours" under "Other course information", or go directly here



Wednesday 21 January: Check it out!

The second online homework, on the topic of References and Memory, is now available on the Online Homework page. It includes some nice applets that show you exactly what happens when you construct a Node, what it means to have two variables referencing the same Node, and so on. So it's a good followup to this week's tutorial and preparation for assignment 1.

Wednesday 21 January: Was the TA there?

If you're at a 148 TA office hour and can't find the TA, he or she is probably there -- it's just a little hard to identify them sometimes. Please ask loudly "Is the 148 TA here?" If this doesn't work, then call me immediately (978-6024) and I'll try to find the TA and send him or her over to the lab.

Actual no-shows are quite rare. Last term it happened either zero or one time out of over 100 office hours.

By the way, in order to help you identify the TAs, I have distributed nametags.



Wednesday 21 January: Was your A0 submitted successfully?

You can check to see whether your submission was successful by using the 'Verify Submissions' button that has just been added to the 'Handin' program. Clicking on it will list all files successfully submitted, along with their size and datestamps.

There were a few students whose attempted submissions did fail, and I have contacted them by email to their cdf accounts.



Tuesday 20 January: Important re printing

When the CDF-PC lab is very busy, the printers can get quite backed up. If you have printed something and it hasn't come out yet, don't print it again until you check to see if it's still waiting its turn in the printer queue. You can check the queue using the printer icon found in the "Printers" folder on your desktop.

On a related note, do not print the online homework in the CDF-PC lab. The homework is meant to be viewed and interacted with on screen. It doesn't print terribly well -- for example, applets don't appear at all -- and yet printing it is very slow and will back up the CDF-PC printers. This is not fair to your fellow students. If you really feel you need to get it onto paper, print it at home.



Tuesday 20 January: Final batch of accounts

The final batch of 148 accounts has been created. A complete list of all accounts is available on my corkboard, outside SF 2302.

If your name does not appear on the list, then something is wrong with your enrolment. Check with your registrar's office.



Monday 19 January: Change to Mitchell's office hours

Professor Mitchell's Friday office hour has been rescheduled for the rest of the term. Instead of 11-12, it will be held 1-2 Fridays. His Monday 4-5 office hour remains the same.

Remember that students are encouraged to attend any 148 lecturer's office hours, regardless of section.



Monday 19 January: Problems reading or posting news?

Some students have reported problems reading or posting to the ut.cdf.csc148h newsgroup. This should certainly work without problems from the cdf-pc lab, but from another machine, here's what to do if you have a problem:


Back to the csc148 home page