This primer class is voluntary and not graded. It will consist of lecture components that teach you the essentials along with embedded hands-on exercises that will take place interactively during class. You are required to bring your laptop and should have some intuition and comfort in using the command line (know how to navigate, create files and directories as well as being able to edit files with an editor or IDE of your choice). You will not be given homework for this class.
The class consists of 10 lectures at 75 minutes duration. These lectures will be held in the evening to avoid possible conflicts with your schedule. A previous class taken for either language or experience gathered through other means may be helpful.
Location: SEC LL2.224 SU Family Classroom
Time: 5:30PM - 6:45PM
Date: 09/19 - 09/30 (calendar week 38 and 39)
Meeting times: Lectures are held on each week day Monday to Friday.
You can register for the class by joining our mailing list. You can enroll the class by sending an email to
code-primer+subscribe@g.harvard.edu
(subscribe by sending a blank email to this address; use the email address associated with your HarvardID)
You will be asked to confirm your enrollment.
If you have questions about the class, you can send an email to the class mailing list
code-primer@g.harvard.edu
Messages will be sent to all subscribed students such that they can benefit from your question as well.
Lectures 1-4 discuss basic concepts that were first introduced in C
. Lectures
5-10 focus on C++
specific language features that are not available in C
.
- Procedural languages and Object Oriented Programming / General overview
- Compiled languages / Stages of code compilation / Get to know your compiler
- Building code /
make
/meson
/cmake
- Basic built-in types
- Arrays
- Pointers
- Pointers are not arrays
- Pointers and dereference operator
- References (
C++
specific) - Basic operators and operator precedence
- Functions and function pointers
- Anonymous functions / Lambdas (
C++
specific)
- Function arguments: Pass-by-value / Pass-by-reference
- Memory allocation
- Stack and heap
- Input/Output (IO) / Streams
- Object Oriented versus Data Oriented designs / Where is
C++
good at and where can it hurt you - Classes: Constructors / Initializer lists / Destructors / Members / Attributes
- Access modifiers
- Resource Acquisition Is Initialization (RAII)
- Operator overloading
- Inheritance and the
this
pointer
- Base class pointers
- Polymorphism and interfaces
virtual
methods
- Abstract base classes
- Pure
virtual
methods - Operator overriding
C++11
extension modules forpython
- Generic programming
C++
templates- Implementation approaches
- Standard Template Library (STL)