CMPT 127 - Computing Laboratory

Instructor: Richard Vaughan

News

  • 11 Sept: site posted.

Schedule - Fall 2017

Task deadline: 23:59:59 4 December 2017 (i.e. the end of the last day of classes).. Nothing submitted after that time will be graded.
The ant-cheating strategy is still being discussed and the students will be consulted in the first lab.
Details of the grading scheme are subject to change until the second lab.

Labs are held in CSIL's main room (ASB 9838) at these times:

  1. Wed 10:30 - 13:20 D100
  2. Wed 13:30 - 16:20 D200
  3. Wed 16:30 - 19:20 D300

Vaughan and two TAs are available in lab hours.

TAs are also available in CSIL 9840 (usually) at the times shown on the calendar below. The calendar also shows holidays, reading break, etc.

That's 3 + 10 = 13 hours per week of TA-supported lab time: use it well.

Instructor office hours:

  • None. See me in the lab or by appointment (email requests).

Overview

This class will teach you the basics of programming in C and C++, with an emphasis on program design and testing. We will use the standard UNIX command-line build and version control tools.

The class is intended to be taken simultaneously with CMPT 125, and the material is closely synchronized.

Why C?

More than most modern languages, learning C helps/forces you to understand how the computer and operating system works. C was designed as a system-programming language, so it is small, works everywhere, and (when well-written) can be very high-performance. However, it is very easy to write bugs in C code. You will learn strategies for testing and debugging, but most of all we will discuss approaches for writing correct and well-designed code in the first place. You can learn C in a semester, but becoming expert takes longer.

Assignments == lab tasks

This class consists of ten labs plus a simple warmup Lab 0. Labs are issued to you every tuesday starting from Week 2 of the semester. Each lab contains several tasks, small assignments that are submitted individually.

You submit your code solutions to an online version control system, and they are automatically tested. You may submit solutions at any time, and you may make multiple attempts.

All lab tasks are due before the midnight following the last day of classes, that is, your entire repo at the moment of the deadline will be graded.

This means that:

  • You can commit code at any time, as many times as you wish.
  • The only version that gets graded is the one that exits at the deadline.
  • There is no penalty for not keeping up with the weekly schedule.
  • Each task has equal weight and there is no penalty for skipping one beyond the obvious loss of credit for that task.

An anonymous league table shows everybody's progress.

Grading

Your grade will depend on how many tasks you solve correctly. You need at least 75% to pass the class. The class is not graded on a curve.

Help

Resources:

  1. Beginners guide to using the Linux terminal
  2. CS Undergrad Labs (CSIL) Information
  3. A concise introduction to C by Nick Parlante of Stanford. See also their nice library of related topics.
  4. Richard Feinman on what computers are doing.
  5. MIT 6.00 Intro to Computer Science by Grimson and Guttag (examples in Python but CS ideas are universal).
  6. Harvard CS50 CS 1 by Malan (examples in several languages including C).

Procedure for getting help:

  1. Read the instructions through very carefully.
  2. Think about the instructions.
  3. Repeat steps 1 and 2.
  4. Google it. Practice formulating questions as searches: this is an incredibly useful skill. Experts do this.
  5. Ask an instructor or TA in the lab
  6. Read these notes on getting help by email, then send email to cmpt-127@sfu.ca.
  7. Do not mail the instructor directly, except about personal matters.

Labs

See your progress in the labs on the leaderboard.

Restricted to enrolled students. Labs are set weekly, and content may change up to a lab's release day.

  1. Getting Started in CSIL
  2. Getting Started in C
  3. (labs will appear here week-by-week)

NASA's Mars Science Laboratory "Curiosity", currently running 2.5M lines of C on a RAD750 CPU on Mars. NASA has very strict and interesting coding standards that help them create highly reliable software.

Margaret Hamilton of MIT in 1969, with listings of the Apollo Guidance Computer source code. As lead designer of the Apollo on-board guidance software, Hamilton pioneered engineering methods for reliable code. You can browse the code here.