Topic outline

    • SCMP241 From Python to C++ (Jan 2023)

      C++ is a high level programming language that is extremely useful for scientific applications. The language has historically had a bad reputation, but modern C++ is much improved so that your code can be relatively short and elegant. In this workshop we will teach the basics of C++ for people who are familiar with the basics of programming, and we will especially compare and contrast C++ with Python (only the material covered in SCMP142 "Intro to Programming with Python" is required). Knowing multiple programming languages may be a useful skill: while Python is a wonderful programming language, execution speed is often a practical issue for pure Python applications. For applications where this is an issue, coding in C++ can significantly improve performance. As C++ can relatively easily be integrated in a Python project, it is also possible (and common) to code just the bottleneck in that language.

      Format: In-person, but also will be broadcast and recorded.

      Start date: 23 Jan. 2023
      End date: 27 Jan. 2023
      Scientific Computing Credits: 6
      Events:
      Python to C++ #1 - Monday, 23 January, 12:30 PM » 2:00 PM
      Python to C++ #3 - Friday, 27 January, 12:30 PM » 2:00 PM
    • Location: SciNet Teaching Room, 11th floor on the MaRS West tower, 661 University Ave., Suite 1140, Toronto, ON M5G 1M1
      Dates and times: Jan. 23, 25, & 27, from 12:30 to 14:00 EST

    • Workshop outline

      • Introduction
        • Workshop goals
        • History of C++
        • A few words about C
        • Is C++ the best language?
      • A quick comparison with Python
        • Similarities
        • Differences
          • Syntactic differences
          • Implementation
          • Type system
      • C++ theory
        • A β€œHello, World!” program
          • Setting up environment on the Teach cluster
          • Notes about the code
            • πŸ“– Extra information
            • About portability
        • Variables
          • Nature of variables in Python and C++
          • Scoping rules
        • Types
          • Type casting
        • const and constexpr
        • Functions
          • The main() function
          • Templates
            • πŸ“– Extra information
        • Standard containers
          • std::vector
          • Other containers
        • Loops
        • References (and pointers)
          • Passing by reference in Python 🐍
          • About pointers
      • C++ practice
        • Monotonicity
        • Luhn algorithm
      • More Standard Library
        • Word frequencies
          • Streams
        • Iris data set
          • Tips
      • Next steps
    • [Please sign up to view recordings]
    • Iris data set problem Assignment
      Due: Saturday, 11 February 2023, 12:00 AM
      Not available unless: You belong to Active participants