CSE 333 12su - Systems Programming - Overview

[ prereqs | topics | assignments | exercises | exams | grades| texts| policies ]


Requirements

Prerequisites
  • CSE351: rudimentary knowledge of C programming; the ability to write, run, and debug programs; familiarity with Linux and the use of Linux compilation, editing, and debugging tools; a solid mental model of the relationship between high-level code (C) and assembly-level compiled code; simple data structures such as linked lists, trees, hash tables, and queues.
Suggested
  • Courage and perserverance, even in the face of complexity and uncertainy.


    Several practices embody courage. One is the commandment to always design and code for today and not for tomorrow. This is an effort to avoid getting bogged down in design and requiring a lot of effort to implement anything else. Courage enables developers to feel comfortable with refactoring their code when necessary. This means reviewing the existing system and modifying it so that future changes can be implemented more easily. Another example of courage is knowing when to throw code away: courage to remove source code that is obsolete, no matter how much effort was used to create that source code. Also, courage means persistence: A programmer might be stuck on a complex problem for an entire day, then solve the problem quickly the next day, if only they are persistent. (Source: Wikipedia, Extreme Programming)


Approximate topic list

  • C programming (<2 weeks)
    • review of basic C programming and memory model from HW/SW interface course
    • pointers, lvalues & rvalues, structs, casts
    • arrays and strings
    • 2-D arrays with and without pointers
    • dynamic storage allocation (malloc/free)
    • C preprocessor, multifile programs
    • core C libraries (I/O, strings, etc.)
    • idioms for error handling without exceptions
  • Essential tools for C/C++ (1 week)
    • compilers, debuggers, make
    • advance tools (memory leak detection, performance profiling, code coverage)
    • version control, code reviews, unit testing
  • Memory management and system interface (1 week)
    • idioms for manual memory management; avoiding dangling pointers and memory leaks
    • memory management implementation
    • linking and libraries: how a program is assembled
    • relation between libraries and underlying OS services
  • C++ programming (3-4 weeks)
    • basic C++: "a better C", C with classes
    • class definitions, constructors, copy constructors, destructors, const, other details
    • dynamic memory allocation (new/delete), classes with dynamic data
    • classes and inheritance in C++; overloading, overriding
    • using C++ templates and STL
  • Best practices (1 week)
    • class design and patterns in C++
    • systematic program development and debugging
    • profiling and optimization
  • Concurrency in C/C++ (1 week)
    • concurrent programming beyond HW/SW interface course
    • asychronous I/O, networking, and user interfaces
    • if time, a brief reintroduction to threads
  • Security issues in C/C++ (< 1 week)
    • discussed throughout where appropriate, e.g., safe vs unsafe library functions


Assignments

This course is designed to give you substantial experience with programming. There will be three or four major programming assignments during the quarter; the assignments are designed to build on top of each other, so it is in your interest to make sure that earlier assignments are rock-solid.


All of our assignments assume you will be programming within a CSE Linux environment. There are three ways to do this:


Exercises

Great programmers write great code. People become great programmers writing lots of code and learningn from the experience.

We will be assigning one or two mandatory programming exercises each and every lecture, due before the next lecture. These will be short and simple, but they will reinforce the material from the lecture. We will grade them, but the grading will be course-grained:

  • 3: an exemplary solution in every way
  • 2: a good solution, but not perfect
  • 1: a solution with significant flaws either in program operation or code quality
  • 0: an incomplete or incorrect solution
We expect most people will get several 1s early in the quarter, and improve with practice as the quarter progresses. Most grades for good solutions will be 2. We expect 3's to be rare, corresponding to an A+.


Exams

We will have one midterm exam and a final exam. The dates are listed on the course schedule, though the midterm date is subject to change (with reasonable advance notice given).

There is no final exam period in the summer. The final exam will be held the last day of class and will basically be a "2nd midterm".


Grades

Grades will be assigned approximately as follows:
  • assignments: 45%
  • exercises: 20%
  • midterm: 15%
  • final: 15%
  • class participation, citizenship, other: 5%


Texts

Strongly Recommended

Optional

You might also find the C++ FAQ useful, as well as this article on x86 assembly for C programmers.


Policies

(Many of these policies are taken verbatim from other CSE courses.)

Late Policy: Assignments are expected to be done on time, however we realize that occasionally a bit of slack is needed for unexpected problems or to get rid of that "last" bug. For the entire quarter, you may have four five free "late days". You are strongly advised to save them for emergencies. You may not use more than two for the same assignment, and on group projects you may only use late days if all members of the group have them available, and all members of the group will be charged for each late day used. They must be used in 24-hour (integer) chunks. If you are not finished with an assignment and have no more remaining late days you should turn in your best effort for partial credit either on time or after using any available late day(s). This policy may not be the same as in other classes. You are responsible for understanding it if you choose to submit late work.

For exercises, we will not accept any late; you must turn them in on time.

Reasonableness: No set of rules can apply perfectly in every setting. We will make reasonable exceptions, and in return, we expect you to be reasonable as well.

Cheating vs. Collaboration: Please see the separate discussion of Academic Integrity. You are expected to read and understand every word in that document. Ask first if you have any questions.