CIS 330: C/C++ and Unix
Lecture Time: Mon/Weds 10:00-11:20
Lecture Location: 125 McKenzie Hall
Lab Time: Fri 10:00-11:00
Lab Location: 125 McKenzie Hall
Instructor: Hank Childs
Instructor Office Hours: Tuesday 2pm-3pm, Friday 11am-noon
Office Hours Location: 301 Deschutes Hall
Teaching Assistant: Brenton Lessley
Brent's Office Hours: Monday 4pm-5pm, Wednesday 4pm-5pm, Thursday 4pm-5pm
TA OH Location: 100 Deschutes Hall
|
Expectations
This is a projects-driven class. The projects will help prepare you for
the 400-level classes, and also for professional employment. I ask you put a lot of
time into this course, and I believe the payoff will be significant for each of you.
The projects in this class will be hard work.
It is difficult to quote exactly how much time,
since there is variation in background and programming skill.
I expect those who have less developed programming skills will find this class to
be a considerable effort, but also that they will have significant improvement
by the end of the course.
Course Materials
In previous terms, I have not used a textbook. But this term we will incorporate the textbook by Prof. Sventek: C and Data Structures -- A Well Structured Approach. We will use chapters 2 and 3, which cover Unix and C.
The textbook is being provided for free (in electronic form) for students of this course, and has been uploaded to Canvas. Please note the legal
statements on the first page of the textbook. In particular, you may not post or reproduce the electronic version.
Quoting from the book:
- This book contains copyrighted material. You may use it for this class under
the following constraints:
- Permission is granted for one time classroom use for registered learners
only. The duration of use is only for the duration of the course. The
material may not be published and distributed outside of the course.
- Thus, you may make a copy for your use on your own machine. You may
NOT share this book with anyone outside of the class, nor may you post it
ANYWHERE on the web, Facebook, or any other social media platform.
- Failure to abide by these rules will lead to significant legal difficulties for the
University, the Department, your instructor, and yourself.
Projects
There will be 4 projects, and each project will contain multiple sub-parts.
In total, you will turn in about 18 assignments this quarter.
- Project 1: Learning Unix
- Project 2: C/C++ primer
- Project 3: Large System + Object Oriented Programming
- Project 4: Debugging and Profiling
Grading
- Project 1: 5%
- Project 2: 15%
- Project 3: 40%
- Project 4: 10%
- Final: 30%
Note: the projects will be adapted to the pace of the class. As a result,
these percentages may be changed slightly. No project will change by more
than 5% in total. Further, the Final will stay fixed at 30%.
Up to 5% of extra credit is possible for participation in the forum.
Project 1: Learning Unix
- Project 1A (assigned April 2, due April 4): practice Unix editor (1%)
- Project 1B (assigned April 6, due April 11): Unix script (2%)
- Project 1C (assigned April 9, due April 16): makefile (2%)
Project 2: C/C++ primer
- Project 2A (assigned April 4, due April 9 in class): worksheet on memory/pointers/arrays (3%)
- Project 2B (assigned April 18, due April 23): file I/O (4%)
- Project 2C (assigned April 23, due April 28): structs (4%)
- Project 2D (assigned April 30, due May 5): subtype/supertype (4%)
Project 3: Large System + Object Oriented Programming
- Project 3A (assigned April 23, due May 1): I/O with images (4%)
- Project 3B (assigned May 2, due May 9): Move to C++, more functions (3%)
- the main program that calls your functions
- functions.h
- Makefile
- The grader script we will use
- input in PNM,
output in PNM, and
output in PNG
- If you want to test everything before Blend (through img7), then here is the output: PNM and PNG
- img.pnm,
img2.pnm,
img3.pnm,
img4.pnm,
img5.pnm,
img6.pnm,
img7.pnm (img7 is a repeat of no_blend)
- Note that none of the files above should be modified ... you need to adapt to their interface, not vice-versa.
- ... of course, you may want to modify them for testing purposes, like changing the main program to only do some filters. Just make sure to switch it back before you submit...
- Project 3C (assigned May 9, due May 16): object-oriented approach (7%)
- Project 3D (assigned May 9, due May 16): C++ file I/O (3%)
- Project 3E (assigned May 16, due May 23): demand-driven execution (3%)
- Project 3F (assigned May 20, "due" May 27): logging and exceptions (3%)
- the main program that calls your functions
- Makefile
- logging.h: interface for your logging module (you write the methods)
- logger: the output of my logging instrumentation. You don't have to match exactly, but I think it is a good idea to match exactly anyway ... it helps find subtle bugs.
- Project 3G (assigned May 25, "due" May 30): more filters (7%)
- Project 3T (assigned May 30, due June 2, 10pm (no late)): write a test (2%)
- Project 3H (assigned June 3, due June 8th (13th)): pass the regression tests (11%)
- tarball with everything you need.
- video of getting started with 3H.
Project 4: Debugging and Profiling
- Project 4A (assigned April 11, due April 20 IN CLASS): debugger practice (3%)
- Here are the programs to debug.
- Here are worksheets to fill out in PDF and MS Word forms.
- Project 4B (assigned May 30, due June 9th (13th)): memory error and leak free (4%)
Academic Misconduct
- The programming projects are individual efforts
- You may discuss the projects with your classmates.
- Do not let someone look at your code on your screen.
- Absolutely, positively do not email code.
- Do not search the internet for previous implementations.
- If I detect collusion, all individuals involved will receive
an F in the course immediately
- I choose to not enumerate cases that involve collusion. Having a conversation without showing code is as far as you should go. Whiteboard conversations are fine. If you feel you are in a gray area, then you should email me.
- Please note that if you are the one providing too much help, then you will also get an F
Form from the first day of class.
Piazza
I have set up a forum on
Piazza. Brent and I will monitor
(and respond) to the forum and encourage you all to do the same.
I may award extra credit to
students who are particularly helpful on the forum. The amount of credit will vary based on involvement, with
a maximum of 5%.
Late Policy
You have 2 "late passes." Late passes allow you to turn in your project
(specifically a sub-project, i.e., project 1A) two days after the due date for
full credit.
You may also use two late passes on one assignment and get a four day extension.
For example, you submit a project that was due on a Wednesday on Friday (i.e., two days later) and get full credit if you use one late pass.
If you run out of late passes, then you may continue to earn half credit on any project up until we take the Final. Once we get to the Final (Tuesday June 12th, 2018 at 10:15am), I will no longer accept homeworks.
Note that projects will initially be marked as late and scored half credit.
At the end of the term, you will tell me which projects you want to apply
your late passes to, and the scores for those projects will be increased.
There is no need to indicate your desire to use a late pass as you submit;
I find it often changes as the term goes on.
If you miss the Final exam period, you may take the Final afterwards for half-credit. Exceptions for full credit will be granted in appropriate situations. These situations include medical emergencies, etc, and do not include oversleeping, forgetting the day of the final, etc.
Lectures
- Lecture 1, April 2nd: syllabus / shells / files / editors
[
PPTX
|
PDF
]
- Reading: C and Data Structures, Chapter 2.1, 2.2, 2.3, 2.4., 2.5, and 2.6.1.
- Lecture 2, April 4th: memory in C
[
PPTX
|
PDF
]
- Reading: C and Data Structures, Chapter 4.1 (but not 4.1.2), 4.2-4.5.2 (stuff you should know from 314), 4.6 (today's material)
- Lecture 3, April 6th: permissions, more memory
[
PPTX
|
PDF
]
- Lecture 4, April 9th: build systems, character strings, tar
[
PPTX
|
PDF
]
- Reading: C and Data Structures, Chapter 2.6.1, 2.7, 4.1.2
- Note: 2.7 uses "pipes" from 2.6.2. When you see "tar -cvf CaDS.tar CaDS | column", just ignore the "| column" part.
- Lecture 5, April 11th: tar / C strings / stack vs heap (re-use lecture 4 slides)
- Lab 1, April 13th: gdb/lldb, valgrind, ssh/scp
[
PPTX
|
PDF
]
- Lecture 6, April 16th: finish up memory (re-use lecture 4 slides)
- Lecture 7, April 18th: file I/O, more Unix
[
PPTX
|
PDF
]
- Lab 2, April 20th: grade 4A, continue with Lecture 7
- Lecture 8, April 23rd: enum, struct, union, function pointers, subtyping, more Unix
[
PPTX
|
PDF
]
- Lecture 9, April 20-something: Images
[
PPTX
|
PDF
]
- My presentation via YouTube
- Corrections to the presentation on Piazza
- IMPORTANT: the dates listed on the presentation are from three years ago. 3A is due on May 1st, 2018 *NOT* May 6th, 2015.
- Lab 3, April 25th: Helpful Unix Content
[
PPTX
|
PDF
]
- Lecture 10, April 27th: function pointers, subtyping, building large projects
[
PPTX
|
PDF
]
- Lecture 11, April 30th: building large projects, moving to C++, C++ structs
[
PPTX
|
PDF
]
- Lecture 12, May 2nd: C++ structs
[
PPTX
|
PDF
]
- Lab 4, May 4th: exercises on memory
- Lecture 13, May 7th: C++: inheritance and memory
[
PPTX
|
PDF
]
- Lecture 14, May 9th: more on classes, C++ streams
[
PPTX
|
PDF
]
- "Lab 4", May 11th: Brent finishes lecture 14
- "Lab 5", May 14th: Brent goes over 3C, 3D
- Lecture 15, May 16th: more pointer stuff, virtual function table
[
PPTX
|
PDF
]
- Lecture 16, May 18th: exceptions, virtual function table
[
PPTX
|
PDF
]
- Lecture 17, May 21st: virtual function table, potpourri
[
PPTX
|
PDF
]
- Lecture 18, May 23rd: re-use lecture 17 slides
- Lab "6", May 25th: debugging
- Lecture 19, May 30th: live code of project 3
- Lecture 20, June 1st: templates
[
PPTX
|
PDF
]
- Lab "7" and "8", June 4th and 6th: Q-and-A sessions with Brent in MCK125. (Replaces Brent's Monday and Weds OH)
- Lecture 21, June 8th: final review
[
PPTX
|
PDF
]
Contact Information
Email: hank at cs.uoregon.edu
Phone: (541) 346-3414 (terrible way to get in touch with me!)
Fax: (541) 346-5373
Address:
301 Deschutes Hall
1202 University of Oregon
Eugene, OR 97403-1212 USA