CSE 701: Foundations of Modern Scientific Programming
McMaster University, Fall 2023
Course Logo

Table of contents

Course overview ^

CSE 701 is intended to give the students a good understanding of computing, solid programming skills in C and C++, experience with debugging, optimization, algorithm design, and numerical calculations, and the ability to produce high-quality and well-organized scientific software, both on their own and in collaboration with others. Please see the table of contents of the lecture notes for a detailed outline of the course.

This is an advanced graduate-level course, and is not intended to be a first introduction to programming. Therefore, students must possess basic prior knowledge of some programming language (any language will do) in order to take this course.

Course syllabus ^

The course website also doubles as the course syllabus. If you need the syllabus in PDF format, simply click here to print it and choose "Save to PDF".

About the professor ^

The professor for this course is Dr. Barak Shoshany (ħe/ħim). I did my BSc in mathematics and physics at Tel Aviv University in Israel and my MSc and PhD at Perimeter Institute for Theoretical Physics in Waterloo, Ontario. I then taught at the University of Toronto for a short time. I joined Brock University as Assistant Professor in September 2020, and I also regularly teach scientific computing at McMaster University.

I am a theoretical, mathematical, and computational physicist. My research focuses on the nature of time and causality in general relativity and quantum mechanics, as well as symbolic and high-performance scientific computing. I'm always happy to talk about my research, and theoretical physics in general, so please feel free to ask me about it, both in and out of class!

I also love teaching. I developed 9 full-term undergraduate and graduate courses from scratch since 2020, including 4 physics courses, 3 astronomy courses, 1 scientific computing course, and 1 mathematics course. My devotion to teaching won me the Brock University Faculty of Mathematics & Science Award for Excellence in Teaching in 2023.

When I'm not teaching or doing research, I love composing music, playing video games, board games, and tabletop role-playing games, and reading or watching science fiction and fantasy. Please see my personal website for details on my research, teaching, talks, media interviews, music compositions, and more.

I will hold my office hours immediately after every lecture; I will not physically be at the university at any other time. You are strongly encouraged to attend the office hours if you want to talk about anything related to the course.

The best way to ask questions about the material outside of class and office hours is to post them on Microsoft Teams so that other students can also see the question and add their own answers. I will answer any question posted on Teams as soon as I can.

For personal matters, please do not hesitate to email me directly at bshoshany@brocku.ca. If you need to meet outside of class and office hours, please let me know and we can schedule a video chat on Teams.

Schedule and logistics ^

The course will take place during the Fall 2023 term, from September 5 to December 6, 2023. There will be one 3-hour lecture every week:

There will be no lectures during the mid-term recess, October 9-15, 2023. We will have 12 weeks of 1 lecture each, for a total of 12 lectures and 36 hours.

Students should bring their laptops to class, in order to run code examples during the lectures by copying and pasting from the lecture notes. However, this is not mandatory, as some students may prefer to focus on listening to the lecture itself and run the code examples on their own time later.

Please make sure to bring your laptops to the first lecture, as we will be installing the software required to take the course (IDE and compiler), and I would like to make sure every student is able to install the software successfully during the lecture.

Lecture notes ^

There is no textbook for this course. The official course lecture notes, written by the professor, contain everything you need to know. They are available to view directly on this website in HTML format.

View the lecture notes
(HTML format)
Last updated: November 11, 2023

I originally wrote these notes while teaching this course in 2020, and they were updated and expanded in 2021 and 2022. I will continue to update them as needed this year as well. The lectures in this course will follow the notes very closely. If you choose to download the notes for offline use, please make sure to always have the most up-to-date version.

IDE, compiler, and linters ^

Throughout the course, we will exclusively use the latest 64-bit versions of:

They are cross-platform and work on Windows, Linux, and macOS on all common CPU architectures. Instructions for installing and using them can be found in the lecture notes, and will also be given in the lectures. (Instructions for installing Clang will be added to the lecture notes soon.)

To ensure maximum compatibility with the code written by the professor, students are asked to always use the recommended IDE and compilers, and ensure that they are always updated to the latest versions. Please note that the professor cannot provide technical support to students who do not use the recommended IDE and compilers.

In addition, it is highly recommended to use static code checkers, also known as "linters", to check for common programming mistakes in your code. The two tools I recommend the most are:

  • Clang-tidy, which is bundled with the official C/C++ extension. To enable it, search for C_Cpp.codeAnalysis.clangTidy.enabled in the settings.
  • Cppcheck, which is bundled with the cpp-check-lint extension. However, make sure to disable the cpplint tool, which is also bundled with the same extension, by disabling the setting cpp-check-lint.cpplint.--enable. The reason is that cpplint is used to check that your code satisfies the Google style guide, which is not useful unless you work for Google.

Exams, final project, and grading ^

There will be 2 exams during the term. Each exam will test the students' understanding of the material learned up to the exam date. The exams will be scheduled for a time that works for all of the students; we will schedule them together during the lectures.

The exams will be given in person, at a room which will be booked once the exams are scheduled. I will be present in the exam room for the duration of the exam in case clarification is needed for any of the exam questions.

The exams may contain some conceptual questions, and may also ask you to analyze or write short pieces of code, up to and including complete programs. All answers, including code, must be written with a pen or pencil on the exam forms; you will not be able to write the code on a computer.

The only allowed material during the exams is my lecture notes, in printed form. The notes can be printed directly from this website. To save paper, please print the notes double-sided, with 2 (or even 4) pages per sheet, with the smallest possible margins, and only the specific chapters that are relevant to the exam (a list will be provided). You are not allowed to write anything on the printed notes or modify them in any way before or after printing, but you can use a highlighter.

Computers, phones, tablets, smart watches, and other digital devices cannot be used during the exam. Any students found using a digital device of any kind or modified notes during the exam will be charged with academic dishonesty.

Once the timer starts, you will have exactly 1 hour to solve the exam. If you are late to the exam, you will not get any extra time, so please make sure to be at the exam room at least 15 minutes before the beginning of the exam.

In addition, there will be a final project at the end of the term. The final project will require you to write a complete C++ program according to requirements set by the professor. The nature of the program will be discussed toward the end of the term.

Each exam will be worth a third of the final grade, and the final project will be worth another third. After the average is calculated, it will be rounded to the nearest integer, with .5 rounded up. A final grade of 70% or more is required to pass the course.

If you miss an exam, please email me within 7 days of the exam. Your email should explain why you missed the exam and include any necessary proof, such as a doctor's note. If your proof is acceptable, we will schedule a day and time for you to take the exam. Of course, you will be forbidden from asking other students about the contents of the exam, which will lead to an academic dishonesty charge.

Practice exams ^

During the term, I will post practice exams here. Please solve these exams as practice for the real exam, and to get an idea of how the exam will look like.

How to succeed in the exams ^

To succeed in the exams, please make sure to:

  • Attend all the lectures and actively participate in them. If something is unclear, ask for a clarification. If a topic inspires you to ask a followup question, ask it. If I ask the class (or you personally) a question, do your best to answer it. In my experience, the students who participate the most in class are also the students who get the highest grades in the exams!
  • Thoroughly read and understand my lecture notes in order to revise and get a better understanding of what I said in the lectures. This is especially important if you missed a lecture. Also, please note that anything in the lecture notes can appear in the exam, even if I did not cover it directly in the lectures, unless explicitly stated otherwise.
  • You cannot learn to code just by attending the lectures or reading the lecture notes! Writing your own code, experimenting with each new concept we learned, and spending time writing full programs to solve concrete real-world problems (e.g. related to your research) is absolutely crucial for your success in the course.
  • Solve the practice exams that are posted on this website. They are meant not only to help you practice for the exams, but also to test your general knowledge and understanding of the material.
  • Make use of your greatest resource in this course: the professor. If you don't interact with me in any way, then you might as well just read a textbook or watch lectures on YouTube. I am available to you during the lectures, during my office hours, on Teams, and by email. Don't be shy to ask for help if you need it - that's what I'm here for!

Final project ^

The project description and guidelines can be found at this link.

Intellectual property notice ^

Any and all course materials created by the instructor in this course, including but not limited to notes, slides, homework problems, homework solutions, exams, exam solutions, and photo, audio, and/or video recordings, are the intellectual property of the instructor.

Any student who, without the instructor's express consent, publicly posts or sells the instructor's work, or takes a photo, audio, and/or video recording of the instructor's lectures, will be charged with misconduct under Brock University's Academic Integrity Policy and/or Code of Conduct, and may also face adverse legal consequences for infringement of intellectual property rights.

© 2024 Barak Shoshany