Archive for October 2008

Lab 8 due dates

As announced during lecture today:

  • Lab 8, exercise 1 (the improved guessing game) is due this Friday in lab and is now worth double the points of a regular lab exercise (24 points).
  • The due date for lab 8, exercise 2 (Mastermind) has been postponed to next Friday, and the exercise will be worth triple the regular points (36 points).

Students that wish to turn in exercise 2 early may do so, but the point worth of the exercise will not change.

midterm.rb

For students curious about (some of) the solutions to the midterm exam problems, you can download midterm.rb and run it to see for yourself.

Midterm grades posted

All midterm exam grades have been posted to blackboard, and I’ve also computed and uploaded midterm grades to Banner. You should be able to view them via the my.iit.edu portal. Because we don’t have final exam scores, the weights I used for computing the midterm grade are as follows:

  • Labs – 50%
  • Quizzes – 25%
  • Midterm – 25%

For those who missed a quiz, I used the single quiz score I have record of.

We’ll be going over it together in class, but for the impatient, here’s a statistical breakdown of the midterm exam grades.

Lecture: Midterm review

Download the slides here.

On Collaborative Lab Work

Things are, I’m sure, getting a little more interesting in lab. A point in the semester has been reached where we’ve accrued that necessary critical mass of information and can start tackling the more challenging problems. More challenging problems = more difficult labs = greater senses of satisfaction upon completing them.

To complete the upcoming labs, though, you really need to have mastered all the material we’ve covered to date. If you haven’t — and it’s quite likely you haven’t entirely — you’ll essentially be forced to. This is a good thing, really!

Besides banging your head against a keyboard, monitor, or other solid object, a great way to wrap your head around a problem and come up with an approach is with someone else. Two heads are better than one, especially when it comes to programming — the silliest problems and bugs are often invisible to our own eyes, and team sessions are invaluable for brainstorming a solution to a seemingly intractable problem.

That said, though, we cannot evaluate your personal progress based on team output. Please remember that solutions to lab exercises must be entirely your own. Discussion is highly encouraged between students (and their TAs), especially where the approach to a problem is concerned. Coding up a solution, though, should be an individual exercise. If you really need help debugging a program, enlisting a friend is okay, but take care not to share lines of code. If in doubt, ask your TA or myself.

The policy I’ve stated and asked the TAs to enforce is, quite simply, that plagiarism of any sort will not be tolerated. It’s a clear policy that’s fair to everyone.

Please leave your comments below, and happy coding!

Lab 8: Branches and Loops, Part II (Updated)

Objectives

Lecture: Arrays and Iterators

Download the slides. Note that we haven’t gone through all these yet — we’ll cover the second half on Monday.

How to use the concept of String Building

A brief description: String Building involves the careful preparation of strings to be used elsewhere in the program. Typically this takes the form of manipulating a string to be used with a puts statement.

Say you have a puts statement. We all know that puts adds a hard return (new line) at the end, so two puts back to back will print on different lines. There are ways to stop puts from doing that, but it’s typically more clear to simply avoid the problem. Say also that the reason you want to use different lines is because you are printing something that takes a lot of space to calculate. It can also be used to build single lines of repeating patterns.

Continue reading ‘How to use the concept of String Building’ »

Lab 7: Branches and Loops, Part I

Objectives

Examples updated

The examples repository at gibhub has been updated to include all the sample code we’ve gone through in class together, including the program containing solutions for Quiz 2. You can check it out here.