SENG 475 and ECE 596C — Advanced Programming Techniques for Robust Efficient Computing (With C++)

NOTE: Please be sure to use the "refresh" button in your web browser to ensure that you are viewing the most recent version of this web document.


Table of Contents

  1. What is the Course About?
  2. Testimonials from Past Students
  3. When is the Course Offered?
  4. Prerequisite Knowledge and Requirements of Course
  5. Registering for the Course
  6. Accessing Course Materials
  7. Software Development Environment (SDE) for the Course
  8. Accessing the SDE on the Lab Machines (Fully Supported)
  9. Accessing the SDE via Virtual Machine Disk Images (Only Partly Supported)
  10. Accessing the SDE by Installing From Scratch (Not Supported)
  11. Instructor
  12. Office Hours
  13. Tutorial/Marker Teaching Assistants (TAs)
  14. Course Outline
  15. UVic Coursespaces
  16. Tutorials
  17. Course-Materials Bug-Bounty Program (CMBBP)
  18. Feedback on Course/Teaching
  19. Announcements
  20. Required Texts/Materials
  21. Optional Texts/Materials
  22. Video Lectures
  23. Assignments
  24. Project
  25. Miscellaneous Handouts and Documents


Please Show Your Support for Open-Access Learning Resources for Students

Lecture Slides. The instructor invested a very substantial amount of time preparing the lecture slides for the course. If you find the lecture slides to be a valuable resource for learning, the instructor would appreciate if you could show your support of them by posting reviews of them online. Reviews can be posted using the following links:

(Information about posting reviews can also be found in the document Showing Your Support for Affordable Learning Resources for Students.)

Video Lectures. The instructor also spent a very considerable amount of time in preparing all of the video lecture content used in the course, including both the course video lectures as well as all of the supplemental video lectures. If you find the videos to be particularly helpful for learning, the instructor would appreciate very much if you could "like" some of them on YouTube or subscribe to his YouTube channel:

Additional Remarks. Since the lecture slides and video lectures are all publically available, you are also most welcome to tell people outside the course about these learning resources.


What is the Course About?

Motivation Behind The Course

Collectively, the programming-related courses offered by various programs in the Faculty of Engineering tend to go for breadth of coverage of programming languages rather than depth. That is, students are typically exposed to several programming languages at a relatively basic level, with no one language being covered in great depth. While there is certainly considerable value in breadth of knowledge, not knowing at least one programming language commonly used in industry in depth places the student at a significant disadvantage when seeking employment and can also limit the scope of projects that the student can reasonably undertake as part of their studies. The course SENG 475 (which is crosslisted as the graduate-level course ECE 596C) is intended to address this problem.

The Course (SENG 475 and ECE 596C)

The course SENG 475 (which is crosslisted as the graduate-level course ECE 596C) studies advanced programming techniques for robust efficient computing in the context of the C++ programming language. The course affords students the opportunity to apply, in depth, the concepts learned over a number of courses in the context of a single programming language commonly used in industry (namely, C++). For a variety of programming concepts, the student will learn in detail how each of these concepts maps into particular features of the C++ programming language and how to use these features in an effective manner. Although SENG 475 carries the "SENG" designation, the course is open to any students in the Faculty with the necessary prerequisites.

In order to accommodate graduate students, SENG 475 is crosslisted as the graduate-level course ECE 596C (Selected Topics in Electrical and Computer Engineering).

If you would like an approximate idea of what subset of the material from the lecture-slide deck will be covered in the course, the videos of all of the lectures for the 2019-05 offering of the course can be found in the Video Lectures section. This also includes a list of the slides covered from the slide deck.


Testimonials from Past Students

In spite of SENG 475 being a very challenging course, many students have found taking the course to be a very positive experience and extremely beneficial to their career. Below are a few examples of unsolicited comments from students regarding the course.

  1. Email from student who took SENG 475 in 2019-05:
    Date: Fri, 1 Nov 2019 11:46:10 -0700
    From: Zachary Dirk [email address omitted for privacy reasons]
    To: Michael Adams [email address omitted for privacy reasons]
    Subject: Thanks for SENG475!
    
    Hi Dr. Adams,
    I just wanted to send a personal thank you letter for SENG 475. I took the
    course with you in my graduating semester this past summer, and this week I've
    received two very generous job offers for C++ programming positions. The
    material you covered in your course was extremely useful in my technical
    interviews, even for non C++ questions. It's not hyperbole to say that I would
    not have received these offers had I not taken your course. I know you put a lot
    of effort into SENG 475, and I just want to make sure you know that at least one
    student appreciated it a whole lot.
    
    Sincerely,
    
    Zach
    
  2. Email from student who took SENG 475 in 2019-05:
    Date: Thu, 31 Oct 2019 11:02:56 -0700
    From: Paul Molina-Plant [email address omitted for privacy reasons]
    To: Michael Adams [email address omitted for privacy reasons]
    Subject: A small thank you.
    
    Hi Dr. Adams,
    
    I want to thank you for being a great teacher. I can easily say that csc475 was
    the most influential course in my degree and has prepared me well for the
    future. I used C++ while interviewing for Amazon and ended up getting a great
    offer from them. 
    
    [other non-SENG475 comments deleted]
    
    Sincerely,
    Paul
    


When is the Course Offered?

SENG 475 (which is crosslisted as the graduate-level course ECE 596C) is typically offered in the Summer (May-August) term. The course is planned to be offerred in the Summer 2020 term. Please check this section periodically for updates in case this schedule might possibly change. For information about which courses are being offered by the ECE Department in the current year (such as SENG 475), please refer to the Courses section of the ECE Department web site. Incidentally, if SENG 475 (or ECE 596C) is not offered in a time frame that is feasible for you to take it, you might find the course ECE 486/586 to be of interest.


Prerequisite Knowledge and Requirements of the Course

Prerequisite Knowledge of C++

The course SENG 475 is taught using the programming language C++. It is important to understand, however, that this course does not attempt to teach rudimentary C++. It is assumed that the student already has a basic working knowledge of C++. In particular, it is assumed that the student is familiar with the following aspects of C++:

If you are lacking such knowledge, please read the section below titled "What To Do If You Are Lacking the Prerequisite Knowledge of C++". (I have been led to believe that CSC 116 uses C++ and recent offerings of that course cover much of this material, but I cannot make any guarantees about this as I did not teach that course myself.) If SENG 475 were to devote a significant amount of time to teaching rudimentary C++, no time would be left to cover advanced programming techniques, which is the true purpose of the course. This said, however, some limited time in the lectures and/or tutorials will be devoted to discussing some common problems/misunderstandings about the basics of the language (e.g., const correctness and temporary objects). These discussions will be done under the assumption that students already have basic familiarity with C++, however.

What To Do If You Are Lacking the Prerequisite Knowledge of C++

In order to accommodate students with strong programming skills but no prior knowledge of C++, detailed video lectures are available that cover the necessary prerequisite material. In particular, numerous video lectures related to C++ can be found at:

The material that is assumed as prior knowledge in the course is covered by the lectures in the following video-lecture categories: The material in the following video-lecture categories would also be helpful to know, since students are required to learn this material in the first week of classes for SENG 475 (by watching these video lectures): In order to avoid unnecessary stress, it is strongly recommended that the student learn this material in advance of the term in which they plan to take the course instead of cramming in the first week of the term (which is likely not possible to do).

Since it is impossible to learn C++ without writing code, you are strongly encouraged to write, build, and test code as part of the learning process. If you need a software development environment for learning C++ prior to taking the course, several possibilities exist (listed in decreasing order of desirability):

  1. Using virtual machine disk images that contain the Software Development Environment (SDE) for the course. See the section Accessing the SDE via Virtual Machine Disk Images for more details.
  2. Using the Software Development Environment (SDE) on the machines in the lab used by the course. If close enough to the term in which the course is taught, the software may be available on the lab machines (even though the course has not yet started). See the section Accessing the SDE on the Lab Machines for more details.
  3. Using various departmental/faculty computer labs. Most Linux systems in the ECE Department (and likely the CS Department as well) tend to have the GCC C++ compiler installed (which is accessible via the g++ command).


Registering for the Course

SENG 475 is expected to have relatively high enrollment, as the course is quite popular with students. Since the instructor runs the (computer-based) tutorial himself in addition to his regular teaching load, it is only feasible for the course to have a single instance of the tutorial (i.e., the tutorial must be scheduled at the same time and location for all students in the course). This limits the enrollment of the course to the capacity of the lab in which the tutorial is held (which is about 45). For this reason, it is recommended that students register as soon as possible for the course in order to avoid the possibility of being placed on a long waitlist. If a student is waitlisted for the course, there is always some chance that the student will able to register. Of course, the chances are much better if the student is near the start of the waitlist, rather than the end. Students who are waitlisted often ask if they will be able to register later. Unfortunately, it is impossible to answer such a question. Due to the fast pace of the course, however, it is probably not advisable to register too much after the start of the term, even if possible to do so.


Accessing Course Materials

Some of the materials associated with this web site may be stored in a private (i.e., secure/protected) area. Two levels of security are imposed on this area:

  1. First, this area is password protected. Note that this username and password are not the ones for your Netlink account.
  2. Second, this area is only accessible from machines on the university campus network.
Typically, links to password protected parts of the web site are marked by a padlock. Password Protected

In order to access protected course materials, you will need to know the appropriate username and password to use for the web server. If you would like to access the private area from outside the university campus network, this can be accomplished by using the UVic VPN. The username and password can be found in a post in the Announcements section of the UVic Coursespaces page for this course. See the section UVic Coursespaces for more information.


Software Development Environment (SDE) for the Course

A highly-customized software development environment (SDE) has been setup for this course by the instructor. The SDE includes very recent (usually the most recent) versions of software such as:

It is critically important that all students use the SDE and not the system-installed versions of various software, as the non-SDE versions are too outdated (or have other compatibility issues) and will not function correctly for the purposes of the course. The SDE will be used for the grading all programming assignments in the course. So, it is absolutely critical that student code works correctly in this environment.


Accessing the SDE on the Lab Machines (Fully Supported)

Lab and Lab Machines. The SDE is only available on the machines in the computer lab used for the course, namely, the ECE Undergraduate Linux Lab in ELW B238. Since it is possible to remotely login to the machines in the lab via SSH, it is still possible to use the SDE without physically being present in the lab. The machines in the lab can be accessed by remotely logging in (via SSH) to the generic hostname ugls.ece.uvic.ca. Specific lab machines can also be accessed via the hostnames ugls1.ece.uvic.ca, ugls2.ece.uvic.ca, and so on (up to something like ugls46.ece.uvic.ca). Is it strongly recommended, however, that the generic hostname ugls.ece.uvic.ca be used in order to take advantage of potential load balancing (i.e., ugls.ece.uvic.ca will get mapped to the specific machine that is currently least loaded).

Initializing the SDE. To access the SDE (on one of the lab machines), you should run the following command in your shell:

This command will start a new subshell that is correctly configured to use the SDE. Only this new subshell will be configured in this way, however.

Do not try to use the SDE on machines in the ECE Department other than the machines in the lab for the course, as this will not work properly. Although you will be able to access the sde_shell script on most ECE Department machines since the directory /home/frodo/public/ugls_lab is accessible on most ECE Department machines, the software installed under /home/frodo/public/ugls_lab will only work on the machines in the lab. Extremely bizarre failure modes are very likely to be encountered if the SDE is used on machines outside the lab for the course. Such failure modes include, amongst many others:

In order to use the SDE on a machine outside the lab, you would need to install the SDE yourself (from scratch) on that machine. Since installing the SDE is a very time-consuming and tedious process, it is not recommended that students attempt to do this.

Common Problems With the SDE

The most common problems with the SDE are as follows:

  1. Attempting to use the SDE on a machine with a configuration different from the ones for which the SDE was built (i.e., attempting to use the SDE on machines outside the lab for the course). The SDE was built on the lab machines and therefore can only be guaranteed to work correctly on the lab machines. It is almost guaranteed that the SDE will not work if used on machines outside the lab for the course. For information about the lab and the hostnames of the machines in this lab, see the information above.
  2. Failing to initialize the SDE. The SDE is not enabled by default. If you do not initialize it, you will not be using it. For instructions on how to properly initialize the SDE, see the information above.


Accessing the SDE With Virtual Machine (VM) Software (Very Strongly Recommended)

Although the most-recent version of the full SDE is only available on the lab machines, some other options for accessing most of the SDE functionality are also available. Of these options, the only one that is recommended for a typical student is the one based on virtualization, as described below.

A (type-2) hypervisor is a software application that allows one operating system (called the guest operating system) to be run as an application program on another possibly different operating system (called the host operating system). Some popular (type-2) hypervisors include:

VM disk images are available that contain an installation of a relatively recent version of the SDE without the SENG475 Assignments package (i.e., the software package that contains the assignment definitions for the course). If you have a hypervisor on your computer, you may find these disk images to be helpful. Please note, however, that these disk images do not include the SENG 475 Assignments package. Consequently, programs like assignment_precheck are not functional in these disk images. For this reason, these disk images cannot be used as a complete substitute for the lab machines. That is, assignment_precheck must be run on a machine in the lab.

The VM disk images can be found at:


Installing the SDE from Scratch (Not Officially Supported and Not Recommended)

If a student would like to build and install the SDE on their own computer (from source code), the SDE is available from its official Git repository, hosted by GitHub. The home page for the SDE on GitHub can be found at:

The Git repository has the URL: Installation instructions for the SDE can be found in the file README.md in the top-level directory of the repository.

The instructor does not officially support the build and installation of the SDE from source code by students. So, if a student encounters problems when attempting to build and install (or use) the SDE, the instructor cannot provide assistance. The SDE only supports Unix-based systems. It should have a reasonable chance of working with Linux distributions that are fairly complete and stay current with recent software versions. For example, it is known to work with recent versions of Fedora and CentOS. It will probably not work for Mac OS X (due to Apple using older versions of some software in OS X and not including other software at all). Note that installing the SDE will likely take several hours, since building software like GCC and Clang (and downloading TeX Live) is very time consuming.


Instructor

Michael Adams
E-Mail: mdadams (append "@ece.uvic.ca" for the complete address)
Office: EOW 311

For more sordid details about the instructor look here.


Office Hours

Due to COVID-19 restrictions, the instructor's office hours will be held in an online meeting room (using either Zoom or Blackboard Collaborate). These office hours will be held during some subset of the lecture and/or tutorial time slots. More detailed information in this regard will be provided as soon as it is available.


Tutorial/Marker Teaching Assistants (TAs)

The marker TAs and their email addresses are as follows:


Course Outline

The course outline is available via the following link:


UVic Coursespaces

The primary source of information for the course is the web site that is currently being viewed, not Coursespaces. Information such as handouts and submission deadlines are all available from this web site. Coursespaces is only used in a very limited capacity for the course. In particular, Coursespaces is used only for the following:

A direct link to the Coursepaces page for the course is as follows:


Tutorials

General Comments About Tutorials

The tutorial is run by the instructor, not a teaching assistant. Since the instructor runs the tutorial himself in addition to his regular teaching workload, it is not feasible to have more than one instance of the tutorial. Tutorial attendance is mandatory. An explanation of why this is so is given below. Due to the COVID-19 pandemic, the tutorials in the course are virtual (i.e., held online). The tutorial material may be (either partly or fully) delivered via prerecorded videos. The particular approach to be used still remains to be determined. If it turns out that prerecorded videos are used, then the watching of the videos would be mandatory, rather than attendance of any virtual tutorial.

The precise manner in which the tutorials are to be used depends on factors that are impossible to predict in advance of the start of the course. Such factors include the specific needs of the students taking the course as well as the need to address any unexpected issues that arise during the teaching of the course. Although the precise manner in which tutorials will be used cannot be specified in advance of the start of the course, some possible uses can be identified. In particular, the tutorials may be used for a number of purposes, including (but not limited to):

  1. presentations by the instructor to fill (unanticipated) gaps in student knowledge relevant to the course
  2. presentations by the instructor to further clarify more difficult topics in the course
  3. in-lab office hours for the instructor
  4. software (or other) demonstrations by the instructor
  5. time for students to work on programming assignments or exercises
  6. student interviews regarding code submitted for programming assignments (to guard against plagiarism)

Scheduling Conflicts with the Tutorial

If a student is considering taking the course, but has a conflict with the tutorial, they should contact the instructor for guidance in advance of the start of the course. When contacting the instructor, such a student should provide the following information:

In anticipation of conflicts with the last part of the tutorial timeslot, the instructor will try to prioritize more important content earlier in the timeslot. In some cases, however, the full timeslot will likely be needed, in which case a student who leaves the tutorial early would miss potentially important course content.


Course-Materials Bug-Bounty Program (CMBBP)

By participating in the Course-Materials Bug-Bounty Program (CMBBP), you can earn extra marks in the course. If you are interested in obtaining extra marks, then read the following document on the CMBBP:

The following document lists all bugs reported to date as part of the CMBBP:


Feedback on Course/Teaching

Feedback on the course and teaching is always most welcome! The instructor will never hold any of your comments against you, but please be constructive in your criticism.

Several options are available for providing feedback. You can provide feedback through:


Announcements

The information for online meetings (e.g., meeting IDs, meeting passwords, meeting invitation URLs, etc.) for the course can be found in the following document:

The GitHub Classroom invitation URLs for the various assignments in the course can be found in the following document:

The following important dates should be noted, which include submission deadlines for assignments and the project (proposal and software):


Required Texts/Materials

The required texts/materials for the course are listed on the course outline handout. All of these items are available from the University Bookstore.

I have been told that the UVic Bookstore will be doing both pay and pickup (with a kiosk window open in the breezeway) for online purchases from the booklist, and also, for the summer term, the Bookstore will be providing free shipping within Canada, if students want their books mailed to them.

The lecture slides are available in PDF format from:

Note that multiple versions of the lecture slides are available. So, be certain to obtain the correct version for the course.


Optional Texts/Materials

The optional textbook for this course is the following: It is critical to obtain the fourth edition as earlier editions do not have coverage of C++11 features.


Video Lectures

Video Lectures from 2019-05 Offering of SENG 475


When SENG 475 was taught in the 2019-05 term, the lectures were delivered in the traditional manner in a physical classroom with students present. Since the instructor thought it would be helpful to have this lecture material in video format for students to reference, he recorded all of the lectures using desktop capture (with audio) on his notebook. After editing the videos, they were posted to the instructor's channel on YouTube (i.e., https://www.youtube.com/iamcanadian1867). In the case of a few lectures, the videos had to be redone (i.e., recorded again) after the fact, due to technical glitches that caused the original lecture not to be recorded properly. The videos that were redone after the fact are the ones in which there is no interaction with students (such as student questions) during the video. The other videos include student questions from the lectures. Only tangential discussions, which were unlikely to be of interest to anyone in the future, were edited out.

Video-Lecture Information Package

As mentioned above, all of the lecture content from the 2019-05 offering of SENG 475 is available on YouTube. In order to help students more easily locate and navigate this content, an information package is provided that includes:

This information package is available in the form of the following Zip archive: A short video describing the contents of this package can be found at:

Extracting the Zip Archive. When extracting the above Zip archive, it is important to preserve the directory/file layout and naming used by the archive (i.e., do not rename the extracted directories/files or move them relative to one another). If the layout and naming are preserved, the hyperlinks in the slide deck that point to the external documents in the slides_supplemental directory should be able to be used to jump directly to those documents (assuming the use of a reasonable PDF viewer).

Remark on Lecture Slide Editions. Please note that the official edition of the lecture slides for the course (i.e., the edition identified on the course outline) is different from the 2019-09-01-SENG475 edition (used in the lecture videos) and contains a few corrections, additions, and other improvements. Therefore, the official version of the lecture slides should be used as the main reference in the course. The 2019-09-01-SENG475 edition is only provided in case it might be helpful to have when watching the videos.

Video-Lecture Catalog. For convenience, the catalog of the slides used in the course video lectures (which is included in the above information package) can also be accessed directly via the following links:

Supplemental Video Lectures (for Prerequisite Knowledge and Additional Reference Material)

The course instructor has developed a fairly comprehensive library of video lectures that cover various topics related to programming in C++. The supplemental lecture videos mainly cover material that is not intended to be part of the course proper. Students are not required to watch any of these supplemental videos, unless explicitly indicated by the instructor. In any case, students may find some of these video lectures to be helpful at various points in time. In particular, the video lectures are expected to be extremely helpful to students who have no (or very limited) prior experience with C++ and need to quickly get up to speed with this language prior to the start of the course.

The following handout is available for the supplemental video lectures:

Other Instructional Videos

Links to several other video lectures on YouTube are as follows:

  1. Course Video-Lecture Information Package
  2. Accessing the SDE on the Lab Machines
  3. Accessing the SDE Using Virtual Machine (VM) Software
  4. assignment_precheck
  5. Assertions and CMake Build Types
  6. Address Sanitizer (ASan)
  7. Undefined Behavior Sanitizer (UBSan)
  8. Lcov

Video Lectures

Due to the COVID-19 pandemic, the lectures for the current offering of the course are being delivered in video form. The videos of the lectures made during the 2019-05 offering will, for the most part, serve as the lectures for the course, with a few exceptions. These videos will also be supplemented by a number of other videos mentioned above (either directly or indirectly on handouts). The video lectures that will be used for the course are listed in the following document:


Assignments

Calculation of Grade for Assignment Component of Course Mark. As mentioned in the course outline, the assignments are not equally weighted in the calculation of the assignment component of the course mark. The specific manner in which assignment marks are combined and weighted in order to determine the assignment component of the course mark is described in detail in the following document:

Solutions to Programming Exercises. Since there is typically no one correct solution to the programming exercises, solutions to such exercises are not posted. As part of preparations for teaching the course, the instructor prepared his own solution to each of the programming exercises. If a student would like to know how the instructor handled some aspect of a programming exercise, the instructor would be more than willing to discuss his solutions with the student. The instructor, however, will not provide a copy of his code to the student.

Marking Issues. If you have any concerns about the marking of an assignment, please directly contact the TA who marked the assignment. Contact information for TAs and a list of which TAs marked which assignments can be found in the Tutorial/Marker Teaching Assistants section.

Marking Information. The following documents are available regarding assignment grading and solutions for non-programming exercises:

Handouts and Related Information. The following downloads are available for assignments:


Project (SENG 475 and ECE 596C)

The following handouts are available for the project:

Please read these handouts carefully at the start of the term in order to have a clear understanding as to what is required for the project component of the course.

Examples of Past Projects

In the past, only students in ECE 596C (not SENG 475) were required to complete a project. Therefore, no examples of past projects for SENG 475 are currently available. Since very few students take ECE 596C (i.e., most students take SENG 475), only a very small number of examples for ECE 596C are available.

Some links to the presentation videos from past student projects in ECE 596C are as follows:

  1. Hao Li, Implementing Dijkstra's Algorithm to Solve Single Source Shortest Path, ECE 596C, 2019. Presentation Video (on YouTube).
  2. Xiongmin Lin, Computer Simulation of Human and Beast with NCurses, ECE 596C, 2019. Presentation Video (on YouTube).
  3. Zhenmai Hu, Convex Hull, ECE 596C, 2018. Presentation Video (on YouTube).
Please note that some the projects listed above are better than others. The main reason for providing this list is simply to give students some idea of what types of projects have been undertaken in the past, as this might be helpful when trying to decide on a project for the course.


Miscellaneous Handouts and Documents

The following handouts were associated with the first lecture in the course: