CSCI 221: CS Fundamentals IIThis is a second course in computer science that serves as an introduction to computer systems fundamentals and provides its students a transition to advanced programming. We introduce students to how programming systems are constructed— from transistors, to logic gates and registers, through an instruction set architecture, to the runtime system of C and C++ programs. This is a dense survey so students gain maturity in how programs actually execute on computer systems. This has value in two ways (1) it gives them a realistic sense of the performance and optimization of programs, and (2) it provides a foundation for thinking about the tools and systems they might someday construct themselves. Furthermore, learning these fundamentals is useful for understanding the various security vulnerabilities that arise in our current hardware and software infrastructure. The course also serves as an introduction to C programming and to modern object-oriented programming in C++. To master these languages, we cover techniques for structuring code and representing data, including using standard object libraries and widely adopted idioms for careful management of object heap data, and of a program’s references to it. There will be significant programming projects in C, MIPS assembly, and C++ as well as logic circuit construction in a logic circuit simulator. Program development tools including the Unix command line and editors, compilers, building and debugging tools, and repositories for version control and sharing will also be covered. We meet once a week (Tuesday) for lab exercises, have weekly homeworks (assigned either Wednesday or Thursday, due Wednesday), and have several longer term programming projects usually due every third or fourth week. Prerequisite: CSCI 121 or the equivalent. Lecture: MW 3:00-4:20pm in TRL 150/Zoom. Instructor: Jim Fix
Teaching assistants (grading and tutoring): Schedule OverviewPart I: C programming and low-level data structure
design. (4 weeks) This schedule is detailed below. Texts and ResourcesThe course draws on material from written texts and also on-line, and we will share references to these throughout the semester. Most reading will not be required—your main goal is to work with the lecture and lab materials to complete the assignments— but you will find it useful to consult references on the technical material and also to do some background reading on the topics we cover. We encourage you to consult the following texts during the semester. The first four C++ books are often required in courses, the first two are references to the language, the third is an attempt by the C++ author to write a programming textbook, and the fourth’s goals seem to be a mash-up of the first three’s, but not written by the language inventor. The two following texts are each a nice overview of the non-C++ components of the course, giving a tour of how computer systems are constructed from the transitor level to the C/C++ language level. The last is an advanced text on digital circuit logic, but some of you might just enjoy delving into the deep details. I don’t require texts, since many people are good at picking up languages without a text, and there are also lots of reference materials available on C++ on-line. Recommended Texts A TOUR OF
C++ THE C++
PROGRAMMING LANGUAGE **PROGRAMMING:
PRINCIPLES AND PRACTICE USING C++ C++
PRIMER Optional Additional Texts THE
ELEMENTS OF COMPUTING SYSTEMS: INTRODUCTION
TO COMPUTING SYSTEMS: Fundamentals
of Digital Logic In addition, here are some links for the tools we will use this
semester: • Unix
command-line: how we compile and run C/C++ programs. Detailed Schedule and Daily MaterialsThis section will update as lectures happen and as materials are posted. Part I: The C programming language and runtime system.Week 01: Introduction to C programming. Week 02: Functions and procedures. The call
stack. Week 03: Arrays and structs. Pointers and addresses.
Stack vs heap. Week 04: Heap-allocated structs. Linked data
structures. Week 05: Finish linked lists. Start digital
circuits. Part II: Circuits and processor design. Week 06: number encodings and arithmetic
circuits Week 07: Flip-flops. Sequential circuits. The
MINICS2 4-bit processor. Week 08: Intro to MIPS assembly. Week 09: MIPS assembly programming. Function calls
in assembly. Week 10: MIPS redux Part III: Object-orientation with C++; the C++ Standard Template Library Week 11: C++ classes, objects, methods; heap
vs. stack objects; Week 12: inheritance; templates; reference
type Week 13: the C++ STL Week 14: last bits Final Exam: Thursday, December 10th, 1-5pm. Final Homework: Due Tuesday, December 15th
11:59pm. this weekThe course has ended. Scroll up to see prior weeks. ResponsibilitiesYou are responsible for all material discussed in class and assigned as reading, and you are required to read course-related email and slack posts, and also the course web pages linked here. There will be two in-class exams during the semester, a final comprehensive exam at the end of the semester, and an occasional in-class quiz question to foster questions and discussion. There will also be a mix of lab exercises, homework assignments, and programming projects detailed below. Lab Exercises Homework Programming projects EvaluationWe evaluate your understanding of the material through the assigned work you submit, a mix of exams, labs and quizzes, homework, and programming projects. Below is a rough breakdown of how each kind of assignment will be weighted to determine your final grade for the course:
You will write a number of computer programs throughout the semester. Your code is expected to compile and execute correctly in the course’s virtual machine, independent of any IDE, to receive any credit. Students are normally expected to take the midterm exams, quizzes, and the final exam at their designated times. These will not be given at alternate times unless there are truly extenuating circumstances. If a student anticpates an absence, say due to some special extra-curricular opportunity or some major health problem, they should contact an instructor as soon as possible, preferably at least one week in advance of that day. Students eligible for disability accommodation should contact the instructor in advance also. They should of course be able to provide college documentation for the accommodations requested. Participation in laboratory sections is optional, but we require that you make an earnest attempt to complete every weekly lab exercise. Labs are an opportunity to ask us or your fellow students questions, to collaborate in programming teams, and to learn the material hands-on. Working on them will help you keep up with the material of the couurse. Homework and project work should be handed in on time, otherwise you
risk getting no credit. We do give some partial credit for homework
exercise solutions that are handed in shortly after the due date. The
scoring is roughly thus: SupportThis class can be challenging, but the instructors are excited (and geared up) to help you learn the material. You are not alone! We encourage you to talk with us, seek help often if you need it, either at class meetings or in office hours. Though we do have to evaluate your work and give you a grade for the course, our goal is to help you master the material so that your work will be good. Start early. That way, should you struggle to complete an assignment, you’ll have plenty of time to seek our help. We are more than happy to offer it. Not understanding the material when you first approach it is to be expected, otherwise you are not learning it! There is no shame in asking questions. We assign problems to challenge you, to make you puzzle things out, to provoke questions, to have you refigure or refine your knowledge, and to help reveal the less obvious aspects of what you are learning. Think of this as a collaboration between us and you. Leran to work with us when you’re figuring things out, be brave in that way. It’s what we get paid to do! We can help better as we get to know you better. We’ve appointed several student experts with past experience in CS2 as teaching assistants and tutors for the class. We encourage you to attend the evening tutoring sessions (in Library 387, see the schedule) and maybe also seek one-on-one tutoring provided by Student Life. See the DoJo pages for details, including the drop-in tutoring schedule. As a student you may experience all sorts of things that may be barriers to learning and to accomplishing your studiers. Strained relationships, anxiety, alcohol/drug problems, feeling down, difficulty concentrating, lack of motivation— these are a common enough part of some students’ college experience. These can be stressors and can certainly diminish your academic performance, as well as get in the way of a having healthy and rich intellectual and social life here. Reed College is committed to advancing the mental health and well-being of its students. If you or someone you know is feeling overwhelmed, depressed, or in need of support, services are available with the Office for Student Life, including a broad range of confidential mental health services available on campus. Honor System and Collaboration PolicyWe assume that each of you is honorable and will abide by the Honor Principle. Unless provided to you by the instructor, you may not look at assignments, exams, or solutions from previous instances of this class. Nor can you look at similar assignments, exams, or solutions that you can find on the Internet or elsewhere. You may use the Internet to look up compiler errors and how to use different programming language libraries and functions, but you may not use the Internet to look up how to solve specific problems you have been assigned. If you have questions about this, please ask the course staff. You may not receive assistance on assignments from any students who are not serving as staff (e.g. tutors) associated with this course, and you must follow the corresponding collaboration policy for working with students enrolled in this course. For lab assignments, you may be assigned a programming partner (or partners). Pair or team programming involves two or several programmers working together on a single piece of source code, interacting to arrive at a single solution. One person might be put in charge of editing, while another is reviewing that work, looking for errors or suggesting refinements, and everyone in the collective is brainstorming about what coding needs to be done next. Roles should switch (say, who is typing) from exercise to exercise, or even within an exercise. When completed, it’s important that everyone understand the completed solution. Should one person have a better sense of what was just done, it is their responsibility (and usually a fun challenge) for them to explain it to their partner(s). For other assignments, the collaboration policy will be stated on each assignment. For many assignments, you will be allowed to work with other students in the class on the problems according to the “empty hands” policy. This policy states that you must each tear up all notes, delete code, or discard recorded material created while discussing the problem with those students PRIOR to beginning to write up the solution you intend to turn in. You may not discuss the problem again once any of you has started writing up your solution. Other assignments will limit the level of collaboration permitted. Failure to comply with each assignment’s collaboration policy will be treated as an honor principle violation. |