CMU 15-112 Syllabus
Fall 2016

Previous versions of 15-112/15-110/15-100:
S16, F15, S15, F14, S14, F13, S13, F12, M12, S12, F11, S11, F10, S10, F09, APEA-09, S09, F08, APEA-08, S08, F07
Description A technical introduction to the fundamentals of programming with an emphasis on producing clear, robust, and reasonably efficient code using top-down design, informal analysis, and effective testing and debugging. Starting from first principles, we will cover a large subset of the Python programming language, including its standard libraries and programming paradigms. We will also target numerous deployment scenarios, including standalone programs, shell scripts, and web-based applications. This course assumes no prior programming experience. Even so, it is a fast-paced and rigorous preparation for 15-122. Students seeking a more gentle introduction to computer science should consider first taking 15-110. NOTE: students must achieve a C or better in order to use this course to satisfy the pre-requisite for any subsequent Computer Science course.
Learning Objectives
  • Develop computational problem-solving skills using Python as a tool to be applied to new problems, especially in the student's home academic discipline
  • Produce clear, robust, and efficient code in Python by
    • employing modular, top-down design
    • using sequential, conditional, and loop statements where appropriate
    • using strings, lists, tuples, and dictionaries where appropriate
    • using objects and classes where appropriate
    • integrating recursive functions where appropriate
    • proactively designing and writing test cases to effectively test and debug code
  • Develop an effective programming style based on established standards, practices, and guidelines
  • Describe the difference between programming and Computer Science, and gain exposure to some of the Big Ideas of Computer Science (e.g., Computability)
  • Explain and analyze the efficiency of algorithms by:
    • proving the running time (Big-O) of various well-known searching and sorting algorithms
    • determining (not proving) the running time (Big-O) of a small piece of code
    • describing the difference between small code optimizations and more substantive algorithmic optimizations
  • Design and implement event-based graphical animations
  • Develop and write a substantial (500-1500 line) program in Python to implement a solution to a term project of their choosing over three to four weeks
Topic List
and Schedule
See the topic list and schedule here (includes schedule, notes, video mini-lectures, homeworks, quizzes, and tests).
Office Hours:

Instructor Office Hours:
     David Kosbie (koz): GHC 5001, Tue/Thu noon to 2pm

Head TA Office Hours:
Rohan Varma (rnvarma): by appointment

Associate Head TA Office Hours:
Kim Kleiven (kkleiven): by appointment
     Eddie Dryer (edryer): by appointment
     Tara Stentz (tstentz): by appointment

TA Term Project Office Hours

Mon Tue Wed Thu Sat Sun
GHC 5th Floor Teaching Commons (and nearby clusters)

TA Pre-Term-Project Office Hours
Mon Tue Wed Thu Fri Sat Sun
6pm-8pm 6pm-8pm 6pm-10pm 6pm-10pm 6pm-8pm 10am-8pm 12pm-8pm
GHC 5th Floor Teaching Commons (and/or nearby clusters)

Piazza Virtual Office Hours:
   * Daily (7 days/wk):  5pm - Midnight (on the hours, on most days)

Additional Optional Sessions
Sun in DH 2315 Mon in DH 2315 Tue in WEH 7500 Wed in WEH 7500
6:30pm - 7:20pm: quiz prep
7:20pm - 7:50pm: hw review
(duplicate of Sun night sessions) 6:30pm - 7:50pm: extensive previous-week review varies
of Classes:
  Days Lecturer / TA's Time Room
Lecture 1 TR David Kosbie (koz) 10:30am - 11:50am GHC 4401 (Rashid Auditorium)
    Section A/AA WF Max (nle), Joseph (youngchk), Bridget (bsoderna) 9:30am - 10:20am DH 1211, GHC 5208/7
    Section B/BB WF Anja (akalaba), Angela (angelali), Jessie (jessieli) 10:30am - 11:20am DH 1211, GHC 5208/7
    Section C/CC WF Arman (armanh), Sarah (sboyle) 11:30am - 12:20pm DH 1211, GHC 5208/7
    Section D/DD WF Christine (cwz), Amy (cs1) 12:30pm - 1:20pm DH 1211, GHC 5208/7
    Section E/EE WF Bernie (poyuy), Alex (yuzhes), Nikhil (nnilakan) 1:30pm - 2:20pm SH 222, GHC 5208/7
    Section F/FF WF Chaya (cwurman), Roman (rkaufman), Nitya (nraju) 2:30pm - 3:20pm WEH 4623, GHC 5208/7
    Section G/GG WF Cissy (moqings), Priyanka (pmishra1) 3:30pm - 4:20pm DH 2302, GHC 5208/7
    Section H/HH WF Michael (mdwagner), Habiba (hshalaby) 4:30pm - 5:20pm PH A18A, GHC 5208/7
Lecture 2 TR David Kosbie (koz) 3:00pm - 4:20pm DH 2210
    Section I/II WF Kevin (kevinzhe), Min (shwang1) 9:30am - 10:20am WEH 5312, GHC 5210/07
    Section J/JJ WF Abhi (angogate), Katja (kbrackel) 10:30am - 11:20am HH B103, GHC 5210/07
    Section K/KK WF Albert (youngjeh), Joyce (xinyiw), Fletcher (fmarsh) 11:30am - 12:20pm WEH 5320, GHC 5210/07
    Section L/LL WF Becca (rkstokes), Olly (oweiss), Madeline (mbgardne) 12:30pm - 1:20pm GHC 4102, GHC 5210/07
    Section M/MM WF Ananya (arajgarh), April (ruohuil), Sarah (sbien) 1:30pm - 2:20pm GHC 5222, GHC 5210/07
    Section N/NN WF Sanjna (sbhartiy), Ambika (ambikac), Mingnan (mingnanx) 2:30pm - 3:20pm PH 225B, GHC 5210/07
    Section O/OO WF Tiffany (yeukyul), Cathy (tiand), Rae (rlasko) 3:30pm - 4:20pm PH A19, GHC 5210/07
    Section P/PP WF Vikram (vshanker), Yong (yongyiz) 4:30pm - 5:20pm WEH 6423, GHC 5210/07
Every required software package we use is available for free on the web. This includes:
  • Python version 3.x (3.4 or later), which can be freely downloaded from
  • We may also use Brython, which is a version of Python that runs in web browsers.
  • We will also use one or more free IDE's (code editors) and other free software packages.
Participation in this course is required and consists of the following activities:
  • Attending and participating in all the lectures, recitations, and labs.
  • Reading the printed and online notes and other assigned readings.
  • Carrying out all the homework assignments and the term project with earnest effort.
  • Taking all the quizzes, midterms, and final.
Attendance is required (if not always strictly recorded). Repeated failure to attend lectures or recitations may result in a lowered semester grade regardless of your numeric average. You will be responsible for all materials presented in lectures and recitations. You should not expect that all lecture or recitation materials will be given to you in written form (including the online class notes we provide). Note that missed quizzes and tests may not be made up in general (though certain exceptions are permitted -- see the relevant sections below).

Any material covered in lecture, in recitation, in assigned readings, or in homework assignments may be included in any future homework assignment, quiz, or test.
 Course Component    Weight 
Final Exam 20%
Midterm Exams 20%
Quizzes 10%
Homeworks 30%
In-class Checks2%
Collaborative Labs5%
Solo Homeworks23%
Term Project 20%

Each homework, lab, check, quiz, midterm, term project, and final will be graded on a standard scale:
   A: 90 - 100
   B: 80 - 89
   C: 70 - 79
   D: 60 - 69
   R:  0 - 59

Half-Weight Policy:
The lowest 2 hw's, lowest 2 labs, lowest 2 quizzes, lowest 2 checks, and lowest midterm are all half-weighted.


Alternate Minimum Grading (AMG) Policy
This AMG policy is available to everybody, but is designed specifically for those students who struggle in the first part of the course and then through sustained hard work and dedication manage to elevate their performance in the latter part of the course to a level that merits passing with a C, even if their Standard Grade might be lower than that.

In addition to Standard Grading as described above, we will separately compute your grade using an Alternate Minimum Grading (AMG). Students do not sign up for AMG. Every student will be considered both for Standard Grading and AMG, and their semester grade will be the higher of the two (where the highest grade via AMG is a C).

To compute your Alternate Minimum Grade, first use the following to compute your raw score:
 AMG CourseComponent  Weight 
Final Exam 40%
Best Midterm Exam 20%
Best 5 Quizzes 10%
Best 5 Solo Homeworks 15%
Term Project 15%

The half-weight policy (for the lowest two scores) still applies to the best-5 quizzes and homeworks, but it does not apply to the best midterm (since that makes no sense with only one midterm counting towards the AMG).

Unlike the Standard Grade, effort is heavily factored into your AMG score, and in fact you cannot qualify for AMG unless you put forth sustained effort (as judged by the course faculty) on every homework, quiz, and exam.  The effort grade is determined by the discretion of the course faculty (in consultation with the course staff), and is a multiplier of your raw score, so your AMG score is (effort * rawScore).  Note that any cheating violation would typically result in an effort score of 0, and so disqualify students from AMG consideration. Also, just as a lack of sustained effort will result in disqualification, in a select few cases, students exhibiting exceptionally strong effort may receive an effort score exceeding 100% (by some small amount).  In any case, if your effort-adjusted AMG score is 70 or higher, you qualify for a C as your semester grade. Once again, the highest grade possible via AMG is a C.

Final Exam:
There will be a standard 3-hour final exam during the final exam period at the end of the semester. The final exam is worth 20% of the semester grade.

Midterm Tests:
There will be two midterm exams worth a combined 20% of the semester grade, given in class as noted in the course schedule.

Quizzes will be given about once weekly, generally in lecture on Thursday. Quizzes generally cover material from the previous week and the previous homework.

Homework-readiness checks, or simply "checks", will be given about once weekly, generally in lecture on Tuesday. They will cover material from the pre-published study materials for that check. Note that checks are not quizzes -- they are worth far fewer points than quizzes, and only cover pre-published material (unlike quizzes). Students who score below some threshold (typically around 70) on a check will be encouraged or required to attend an additional TA-led homework-readiness practice session as soon as possible (preferably on Tuesday). The point is to help everyone be ready for the homework as early in the homework cycle as possible.

Extended-Time Policy:
We gladly accommodate students with university-approved extended time (as approved by Larry Powell's office).  For in-lab (Friday) quizzes, the extended time will be provided immediately in the same lab period whenever possible. Please be sure to discuss this with your lab TA prior to the start of each quiz. For in-lecture quizzes, should they occur, the extended-time quiz will be administered at my office at noon. For those who have a university-approved time conflict at that time, please let me know ahead of time and we can arrange another time on the same day as the quiz, or by prior arrangement with Larry Powell.  For in-recitation quizzes, should they occur, the extended time will be provided immediately in the same recitation period.  For midterm and final exams, Larry Powell's office typically proctors the extended-time versions of these, and we will email you with details for each test.  Importantly:  to obtain extended-time, you must attend the extended-time quiz and not the normal-duration quiz.  You do have the option of attending the normal-duration quiz, but then you will have to complete it in the assigned time (without extended-time).  If you are attending lecture or recitation and a quiz is commencing that you have already completed (having taken the extended-time version of the quiz that morning), you may remain in the room and work quietly on other materials or you may leave the room for the duration of the quiz (your choice).

Late Policy:
No late / make-up quizzes or tests will be administered, except in the case of medical or family emergencies or other university-approved absences. For qualifying missed quizzes, students should obtain instructor approval before missing the quiz. Students may then make-up missed quizzes by attending Professor Kosbie's office hours up until 4 days following the quiz.

Homework Grace Days:
Homework is due at a specified time and date. However, the first 3 times you miss the deadline (by even one minute, according to Autolab's clock), you may use a single "Grace Day" for just the solo portion of that assignment, so that week's solo homework may be submitted up to 24 hours late without any penalty. This policy does not apply to collaborative labs which should be mostly completed in lecture/recitation-labs anyhow, and are always due at the specified time and date.

Late Homework:
Once you have used your 3 Grace Days, no future homeworks can be submitted late, except in the case of extensions (see below).

Homework Extensions:
Students who have medical or family emergencies or other pre-arranged university-approved absences may request an extension from the course faculty.

Homework Formatting Errors:
Misformatted homework in general cannot be graded by our autograder, and as such may receive 0 points. Thus, be sure to submit your homework early -- you can submit repeatedly, we only grade the last submission -- to be sure you do not have obvious formatting errors.

Show Your Work:
Some homework assignments, and most quizzes and tests, will include some written work (meaning: work that is not performed with access to Python or an IDE or a calculator (unless otherwise noted), whether or not it involves programming). In order to receive credit for these problems, you must show your work. Correct answers without supporting documentation will not be given full credit. Some questions may not require work to be shown (e.g.: "Name three software companies in Silicon Valley"), but most questions assuredly do. When in doubt, show your work.
The programming assignments are a critical part of the course. Experience has shown that the concepts covered in this course are best learned by direct engagement -- in our case by applying them to example problems or by implementing them in computer programs. Programming assignments will be graded based on style (modularity, effective use of data abstraction, readability, commenting, etc.) and functionality (correctness and efficiency of the program on the test inputs). A working program is not sufficient for full credit. Make sure you do a thorough data validation. Your code should be properly annotated with comments that are well-placed, concise, and informative. Your assignments will be graded by your TA, and by automated graders, and at times by your instructor.
Solo Homework Policy:

Unless otherwise noted, for Solo homework assignments, students are encouraged to talk to each other, to the course staff, or to anyone else about the assignments. This assistance, though, is limited to the discussion of the problems in general. Each student must develop his or her own solutions to the homework. Consulting another student's solution is prohibited, and submitted solutions may not be copied in whole or in part from any source.

Specifically: do not look at other students' code or written answers, and do not show them your code or written answers, until after the assignment deadline has passed and the assignment has been submitted and graded.

And: do not email or otherwise electronically or physically transfer your code to other students, and do not receive such transmissions from other students, until after the assignment deadline has passed and the assignment has been submitted and graded.

In particular, this precludes students helping each other debug their code (since you may not even look at their code). Of course, students may (and should!) seek debugging assistance (and any other help) from the course staff, who provide extensive support to all students via email, office hours, review sessions, and 1-on-1 tutoring by appointment.

Also, if you find a reference (say, in an optional textbook or some online source) that contains code or a written solution that is identical or overtly similar to an assigned problem, then you are required to not look at that code or written solution! You may still refer to supporting figures and explanatory text, but you may not look at or copy the code.

Collaborative / Group-Based Homework Policy:

Note that some assignments (or portions thereof) will be explicitly marked as collaborative or group-based. In those (and only those) assignments, you must work with the other students in your group, even writing code together, and certainly debugging each other's code. However, you may only work with your approved group members -- the restrictions for solo homeworks apply here, too, for everyone who is not in your group. Also, even when working in an approved group, you absolutely may not copy solutions from anyone or anywhere. In all cases, you must be intellectually involved in the authoring of everything you submit.

Autograder / Decompiling Policy:

Any attempt to decompile solutions, or object code that may help produce solutions, or in any way to extract solutions from the autograder, or to "hack" the autograder in any way, will result in your failing the course.

Plagiarism Detector Policy:

In addition to manual checks on homework and exam submissions, we will also routinely use an automated plagiarism detector. Here is a video demonstrating how it works (AVI or MP4).


Homeworks or portions thereof that are deemed overly similar (as opposed to mostly identical) will face these consequences:
  • 1st event: no penalty (just a warning).
  • 2nd event: will be treated like a cheating violation, which will generally result in letter-grade drop at the semester and a letter to the Dean of Student Affairs.
  • 3nd event: fail the course and another letter to the Dean of Student Affairs.
By contrast, homeworks that are mostly identical (even if they were edited and are somewhat different) are not "overly similar", but are an immediate cheating violation, and will face these consequences:
  • 1st event: letter-grade drop at the semester and a letter to the Dean of Student Affairs
  • 2nd event: fail the course and another letter to the Dean of Student Affairs
Finally, regarding proctored events (quizzes, exams): any copying or collaboration of any kind (no matter how seemingly minor) on any proctored event will face these consequences:
  • 1st event: fail the course and a letter to the Dean of Student Affairs
These are the general rules, and while we do not anticipate exceptions, we respect that they may occur, and so the faculty reserve the right to make appropriate adjustments as the particulars of any case require.

Online "Help" Policy:

There are many online 'help' resources, and while some may be legitimate, many are basically providing a homework outsourcing service, or otherwise violating the spirit (and often also the letter) of our course policies on cheating and collaboration. Importantly, we also cannot control the quality of 'help' students receive from such sources, and experience indicates many 'answers' from such sources are of very low quality (presumably in part as these are not always supplied by CMU Teaching Assistants or other similarly-qualified tutors). Finally, given the truly extensive support this course provides through daily office hours, private and small-group tutoring, email-based help, collaborative assignments, and so forth, not to mention the support of the broader CMU community of learners, there is no compelling reason students should need any external sources (except, presumably, to obtain assistance in violation of course policies). AND SO... Students may not post any course content. nor any questions related to any assigned material. to any online venue. Doing so may result in failing the course on the first offense.
Classroom Recording (audio or video): Students may not record lectures or recitations without explicit permission in writing from the instructor. Violations will result in your failing the course. Exceptions will be granted in accordance with university guidelines for accessibility concerns, but even then such recordings may not be shared publicly or privately and must be deleted at the end of the semester.

Electronics: Students may not use any electronic devices in lecture (no cell phones, laptops, iPads, iPods, iWhatevers, etc) without explicit permission in writing from the instructor. Students are expected to take notes, but to do so manually (pen and paper).
Well-being &
We care very much about your well-being and happiness. Yes, CMU students (and faculty) work hard, sometimes very hard. But we must keep our balance and always attend to our well-being and happiness. That comes first, academics follow. So be sure to get enough sleep, eat right, exercise regularly, and attend to your well-being and happiness. Here is a list of ideas that might help.

In any case, know that we DO take your well-being seriously. This course can be stressful, but we regularly take measures (mostly based on very helpful student feedback) to reduce that stress as much as possible. And we always welcome your feedback, if you have ideas on how we can improve on this (or any other) front.

Finally, if you are feeling overly stressed, or anxious, or unhappy about your performance or your general experience in this course, please do come talk to us. We will listen. We are here for you and we will try to help.

Addendum: Here is a great two-page one-stop-shopping summary of many CMU Student Support Services.