Introduction to computer programming and problem-solving using the C++ language.
|8/21 – 8/27||Welcome||• Course policies||#1||—|
|8/28 – 9/3||Linux||• Kevin Heard's UNIX Tutorial 1 through 5||#2||Log into hills and send in the file /proc/dma.|
|9/4 – 9/10||Machine instructions||• Chris Dannen's Why Does The World Need More Programming Languages?||#3||Use the editor to write two grammatically correct English sentences about a place you would like to live. Introduce an error to each, such that one sentence still makes sense to a human reader, and one doesn't.|
|9/11 – 9/17||Programs||• Downey 1||#4||Enumerate the complete set of steps, turns, and actions you take to travel directly from your kitchen sink to your front door. How many kinds of actions did you use?|
|9/18 – 9/24||Development||• Outspeaking's What is Programming?|
• T.S. Nguyen's g++ Tutorial
|#5||Make a copy of /users/abrick/resources/empty.cpp and add a comment to it. Make sure it still compiles.|
|9/25 – 10/1||Output||• Downey 2||#6||Write a program that outputs a list of the ingredients that you need to prepare lemonade. Identify the lemonade recipe you are using and where you got it.|
|10/2 – 10/8||Integers||• Downey 3.1 through 3.4||#7||Extend last week's program by adding the prices of the ingredients in cents and summing them for the total cost.|
|10/9 – 10/15||Mathematics||• Downey 3.5 through 3.11||#8||You are hired to make and sell 1000 cups of lemonade at the county fair. How much does it cost you to prepare each serving?|
|10/16 – 10/22||Randomness||• Mads Haahr's Introduction to Randomness and Random Numbers||#9||Write a program that acts like a fair twelve-sided die.|
|10/23 – 10/29||Conditions||• Downey 4||#10||Extend last week's program to make a saucy remark if the die rolls the same number twice in succession.|
|10/30 – 11/5||Loops||• Programiz's C++ while and do...while Loop|
• Downey 6.1 through 6.5
|#11||Your aunt plays a lottery where the odds of winning are a million to one, and she always plays the same number. Write a program that plays her number until it wins, indicating how many rounds it took for this to happen.|
|11/6 – 11/12||Arrays||• Programiz's C++ Arrays||#12||Your aunt wants you to simulate five thousand rounds of her lottery and tell her the mean winning number.|
|11/13 – 11/19||Functions||• Downey 5 and 6.6 through 6.11||#13||Write a program with an exuberantGreeting() method and use it to greet the user.|
|11/20 – 11/26||Strings||• Downey 7|
• Kurt McMahon's C strings and C++ strings
|#14||Expand last week's greetings method by making it choose randomly between three possible greetings texts.|
|8/21 – 8/27||Welcome||• Course policies||#1||—|
|8/28 – 9/3||Server||• Kevin Heard's UNIX Tutorial 1 through 5||#2||Log into hills and send in the file /proc/dma.|
|9/4 – 9/10||Interpreter||• Severance 1||#3||Write a program that prints out the address of a restaurant you dislike.|
|9/11 – 9/17||Types||• Severance 2|
• Floating Point Arithmetic: Issues and Limitations
|#4||Every state in the U.S. has two senators, but Florida has 20 million people to Idaho's 1.6 million. Write a program that shows how many Floridians it takes to equal the Senatorial power of one Idahoan.|
|9/18 – 9/24||Math||• Severance 3||#5||Wisconsin has eight congressional districts covering its land area of 169,790 square kilometers, while Alaska has just one district for its 1,717,856 square kilometers. Write a program which determines how many times bigger than the average Wisconsin district that Alaskan district is.|
|9/25 – 10/1||Containers I||• Severance 6 and 8||#6||Write a program that prints out its own command line arguments in reverse order from last to first.|
|10/2 – 10/8||Containers II||• Severance 9 and 10||#7||Write a program that prints out the unique command line arguments it receives, in alphabetical order.|
|10/9 – 10/15||Flow||• Severance 5||#8||Extend last week's program so that it also reports the number of times each argument occurred.|
|10/16 – 10/22||Functions||• Severance 4||#9||Write a program that responds to a positive integer passed on the command line with the number of bits needed to express that number in binary. The number can be calculated either with a logarithm or by producing a binary representation and measuring its length.|
|10/23 – 10/29||Object orientation||• Severance 14||#10||Write a class inheriting from int which has a method returning the number of bits needed to express the number in binary.|
|10/30 – 11/5||Exceptions||• Aaron Maxwell's Exceptional Logging of Exceptions in Python||#11||Extend last week's program so that it can be run from the command line with any number of integer arguments. Ensure that the class is still safe to import and that it handles any exceptions resulting from faulty user input.|
|11/6 – 11/12||Files||• Severance 7||#12||Write a program that shows all words in the dictionary /users/abrick/resources/english that start with the first command line argument (the stem).|
|11/13 – 11/19||Web service||• python.org's CGI (Common Gateway Interface) Scripts|
• python.org's cgi — Common Gateway Interface support
|#13||Write a CGI program which serves up all the words from the dictionary which start with a given stem. Expect the stem to be passed as an HTTP parameter called stem.|
|11/20 – 11/26||Web client||• Severance 12|
• Mouse vs. Python's Python 101: An Intro to urllib
|#14||Write a client program for the stem CGI services which expects two command line arguments, a stem and a program URL without stem. The program should make the query and output the response, functioning similarly to the standalone program.|
- Machtelt Garrels's Bash Guide for Beginners (2008, LDPL)
- Gareth Anderson's GNU/Linux Command-Line Tools Summary (2006, FDL)
- GNU Bash Reference Manual (2014, FDL)
- Course Outline of Record and SLOs
|8/14 – 8/20||8/19 Welcome & Server||• Course policies||—||—|
|8/21 – 8/27||8/26 Comprehensions||• Mary Rose Cook's A practical introduction to functional programming||—||Write a program that prints the number of palindromes in /users/abrick/resources/english in only one line.|
|8/28 – 9/3||—||—||—||—|
|9/4 – 9/10||9/9 Functional programming||• A. M. Kuchling's Functional Programming HOWTO||—||Use map and filter with lambda expressions to find the accounts with shell access disabled in /etc/passwd.|
|9/11 – 9/17||9/16 Generators||• Jeff Knupp's Improve Your Python: 'yield' and Generators Explained||—||Write a function that, given a directory, yields all the files it contains, recursively. Make sure to catch PermissionError and distinguish between relative and absolute paths.|
|9/18 – 9/24||9/23 Development||• The Hitchhiker's Guide to Python: The Community|
• PEP 8
• David Goodger's Idiomatic Python
|—||Write a generator function that yields progressively more accurate approximations of the Leibniz formula for π, and a consumer function that requests as many approximations as a number passed on the command line.|
|9/25 – 10/1||9/30 Time||• Basic date and time types||—||Calculate the time elapsed between each pair of events appearing in the Apache access log.|
|10/2 – 10/8||10/7 Persistent stores||• Python object serialization||—||Write a program that creates pickle files at any pathnames passed as command line arguments, each one recording the current user, date and time, and the argument number.|
|10/9 – 10/15||10/14 Debugging||• Lisa Tagliaferri's How To Use the Python Debugger||—||Debug /users/abrick/resources/war-buggy.py using the interactive debugger and send in the correctly working program.|
|10/16 – 10/22||10/21 Testing||• Mike's Python 3 Testing: An Intro to unittest||—||Use at least three types of unittest.TestCase assertions to confirm that /proc/driver/rtc keeps good time.|
|10/23 – 10/29||10/28 Decorators||• Real Python's Primer on Python Decorators||—||Write a function that writes some text to a file, and then decorate it with behavior that checks beforehand whether the process has write access to the file.|
|10/30 – 11/5||11/4 Code & Implementations||• Allison Kaptur's Python Bytecode: Fun With Dis (2013)|
• David Beazley's Understanding the Python GIL
• Nick Coghlan's Efficiently Exploiting Multiple Cores with Python
|—||Write a program that expects as its argument the path to another Python program. Indicate how many unique bytecodes are used in it, and which one is the most common.|
|11/6 – 11/12||11/11 Profiling||—||Implement a relatively fast method and a relatively slow method which both do the same work, and use profile or cProfile to time them.|
|11/13 – 11/19||11/18 Concurrency||• Powerful Python's The Python Concurrency Story Part 1|
• Powerful Python's The Python Concurrency Story Part 2
|—||Write a threaded program emulating grep -n that uses one thread to search in each filename passed. Regex can be included or ignored as you see fit.|
|11/20 – 11/26||—||—||—||—|
|8/21 – 8/27||8/23 Welcome||• Course policies||—||—|
|8/28 – 9/3||8/30 Software||• Edsger Dijkstra's A Short Introduction to the Art of Programming: Some Fundamental Notions (1971)|
• Grace Hopper's The Education of a Computer (1952)
|—||Enumerate the complete set of steps, turns, and actions you take to travel directly from the boundary of campus to your seat in this class. How many kinds of actions did you use?|
|9/4 – 9/10||9/6 Engineering||• Frederick P. Brooks's The Mythical Man-Month (1975) 1-4|
• Claire Cain Miller's Tech's Damaging Myth of the Loner Genius Nerd
|—||Identify and describe a very expensive failure in software engineering, such as E.T. The Extra-Terrestrial Atari game.|
|9/11 – 9/17||9/13 Requirements||• Paul Seibert's How do you write software requirements? What are software requirements? What is a software requirement? (2011)|
• Dean Leffingwell's Calculating Your Return on Investment from More Effective Requirements Management
|—||Write prioritized requirements for a new social network.|
|9/18 – 9/24||9/20 Functional specification||• Joel Spolsky's Painless Functional Specifications (2000) 1-4||—||Write a short functional specification for your proposed social network.|
|9/25 – 10/1||9/27 Methodology||• Joel Spolsky's The Joel Test: 12 Steps to Better Code (2000)|
• Martin Fowler's Technical Debt (2003)
• Kristof Horvath's Agile Operations: The Evolution of DevOps (2015)
• Peter Wayner's 7 bad programming ideas that work
|—||Write a methodology and technical debt strategy of 200-400 words that will support your development work.|
|10/2 – 10/8||10/4 Version control||• Vincent Driessen's A successful Git branching model|
• git-scm's gittutorial - A tutorial introduction to Git
|—||Write 200-400 words describing your experience cloning a GitHub project of your choice on hills, then making some edit to the repository and asking git to display the diff.|
|10/9 – 10/15||10/11 Issue tracking||• David Baron's Moving bug history out of the primary display of a bug report|
• Github's Mastering Issues
|—||Find and study an issue in any tracker which was finally resolved years after its filing. Write 200-400 words describing the problems that had to be overcome in order to resolve the issue and include its URL.|
|10/16 – 10/22||10/18 Quality, testing, & security||• Miller, Fredriksen, and So's An Empirical Study of the Reliability of UNIX Utilities (1989)|
• Mozilla's Test Case Writing Primer
• Jacob Kaplan-Moss's Don't include social engineering in penetration tests
|—||Study marketplace conditions and identify three of the most advantageous requirements your project could adopt.|
|10/23 – 10/29||10/25 Communication||• Alastair Cockburn's Characterizing People as Non-Linear First-Order Components in Software Development (1999)|
• Guy Kawasaki's Book Review: The No Asshole Rule by Robert Sutton
• Tony You's Programming Doesn't Require Talent or Even Passion (2016)
• TechBeacon's Remote vs. in-office software teams: Which is better?
|—||Interview five people outside your team about your project plans, and write 200-400 words on changes that could address any concerns raised.|
|10/30 – 11/5||11/1 Data economics||• Peter Wayner's 12 ethical dilemmas gnawing at developers today||—||Write 200-400 words on the ownership and risks of the data that will be necessary to make your project a success.|
|11/6 – 11/12||11/8 Documentation||• Ian Sommerville's Software Documentation (2001)||—||Compose a complete glossary for your product.|
|11/13 – 11/19||11/15 Optimization||• Jeff Knupp's Software Optimization: A Systematic Approach (2012)|
• Paul Hsieh's Programming Optimization (1996-2016)
• David Auerbach's Chat Wars: Microsoft vs. AOL (2014)
|—||Imagine that your product has attracted a few power users. Write 200-400 words predicting what they will ask for.|
|11/20 – 11/26||11/22 Usability||• Don Norman's Logic Versus Usage: The Case for Activity-Centered Design (2006)|
• Yael Grauer's Dark Patterns are designed to trick you (and they're all over the Web) (2016)
• Fabricio Teixeira's The worst volume control UI in the world
- Aaron Brick, email@example.com
- M.I.M.S., Berkeley, 2005; B.S., Johns Hopkins, 2000
- Batmale Hall 462, office hours Monday, 10 – 12
Assignments.Assignments are listed in the course calendar and syllabus and are always due Sunday night at midnight. Programs must operate correctly on the student server hills. Late assignments are not accepted. Source code or response text for each assignment must be submitted using the ~abrick/send program. Your grade will not suffer due to incapacitation or a system bug. See also Peer Review.
Canvas.The college provides a Learning Management System called Canvas for for online courses. We rely upon it for our discussion, announcements, and exams. All assignments and peer review take place on the student server. Canvas incorporates the syllabus, calendar, and grade data published on my web site (disregard Canvas's own gradebook).
Caveats.All dates, scores, and texts published on this site are provisional. Please inquire if you think there may be an error.
Contact.I am always available to students by email and at my office hours. I generally respond to messages within three working days. You can make contact with me on LinkedIn when you pass one of my courses.
Enrollment.During the first two weeks of the semester, I offer add codes at my office to any students, wait listed or not, who need one. You are responsible for dropping yourself if you decide to leave the class.
Exams.Expect two comprehensive exams per semester, each consisting of five conceptual and technical problems. Books, notes, and computers are permitted for all exams. You will not be asked to compose complete programs. Prepare for exams by reviewing the assigned reading. Online classes' exams are online and vice-versa. Late exams are not possible but early ones can be taken during office hours.
Extra Credit.To earn extra credit while enrolled in my class, propose to me an interesting or useful project you want to pursue. See also independent study.
Grades. Your current grades and detailed comments on your work will be published on this site through the semester. Click or mouse over an italicized score to see details pop up in a tooltip. Correctness and readability scores reflect the mean of peer and instructor reviews. Assignment grades are 25% correctness, 25% readability, and 50% peer review performance. Term grades are 80% assignments, lowest one dropped, 10% midterm exam, and 10% final exam. A, B, C, and D grades represent final scores in the first, second, third, and fourth deciles of the range.
Help.We all need help, all the time. Every course has group discussion in a classroom or an online forum. The Academic Computing Resource Center in Batmale Hall offers orientations and peer tutoring. You may always come to the instructor's office hours with your questions and without making an appointment.
In-person classes.Studying in person, on campus, means having more personal interaction and interchange with your peers and instructor. This context is conducive to group discussion, but requires class attendance at certain hours, which is logistically challenging for many students. The college's academic calendar cancels classes on certain days such that a week might go by with no class meeting happening. See also online classes.
Independent Study.I supervise independent study projects. They have to be useful, novel, and serious to be worth our time. Propose your project to me in person so that we can discuss it. See also extra credit. Here are some project ideas to get you started: a tally of the property taxes paid on each city block; a ranked-choice peer evaluation system; a model of the flight of a Frisbee; an improved search API for MediaWiki; a microtonal tilt audiogame; a long-running location detection app.
Online classes.Online study is a learning experience suited for self-starters and remote learners, including the same readings and assignments that your peers in an in-person class see. You will interact with the class community each week by reviewing completed programs and talking in a message forum. There is always an optional evening in-person orientation when the course begins, and no campus attendance is required. Online courses run every week during the semester. See also in-person classes.
Peer Review. Students collaborate to anonymously review each others' work. On the same weekly schedule as assignments, you will use the ~abrick/review tool to read and test each other's work. This mechanism exposes you to others' useful design ideas and offers you meticulous feedback on weekly assignments. Your identity will not be revealed to your classmates if you do not include it in your submissions. For information on what types of comments are allowed, see the Rules of Student Conduct.
Plagiarism.All students must do their own work. If you turn in plagiarized work, be prepared to receive a zero or even negative credit at the instructor's discretion. See the Rules of Student Conduct.
Readability.Stylistic conventions enhance readability. If a program lacks useful comments; violates norms of indentation, or name capitalization; contains redundant, copy-and-pasted code; or employs meaningless names, others may see it as less readable.
Schedule. Every week is named and contains resources or tasks. Begin with the assigned reading, and in an online class, read the Instructor’s Notes afterwards. Use class time or the class forum to clear up anything you found mysterious. Exercises and assignments are designed to be tackled using each week's own concepts and techniques.
Services. You will need to access the student Linux server hills.ccsf.edu using an ssh client. On Linux and Mac systems one is preinstalled with the name ssh. On Windows you can try PuTTY and on Android, ConnectBot; any alternative is fine. Your hills username is the same as your CCSF email name: up to eight characters long. Your initial password is based on your birthday and first and last initials, in the form jan0188.fl. Passwords will not be shown as you type them, and you will have to change the default right away. If you mean to connect wirelessly on campus, the network to use is CCSF Student.