Programming
Presentation & objectives
Welcome to the part of the course on programming!
The main objective of the programming block is to consolidate (or make you discover) your ability to write Python programs to solve problems. In parallel, we will insist of good programming methods, so that the programs you write are reuseable and trustable.
We will thus insist on documentation, unit testing and decomposition in function. At the end of the semester, we will give you a short introduction on object-oriented programming, that is the next step to structure a program efficiently.
Also, we will accompany you through your discovery of artificial intelligence for programming. To this end, we will make you use AI tools such as GitHub Copilot, and will end the semester with a broad introduction to artificial intelligence.
Schedule
-
Session 1 – Basics of programming.
Writing, executing and debugging code following good programming practices.
-
Session 2 – Functions & libraries.
Factorizing code and resusability (defining and using librairies).
-
Session 3 – Defensive programming, unit tests & documentation.
Use and conceive unit tests, learn about defensive programming to avoid bugs, and learn to properly document a code.
-
Session 4 – Introduction to object-oriented programming.
Classes, objects, properties, methods, inheritance.
-
Session 5 – Artificial intelligence.
Discover AI tools, and how you can code your own models.
How is a session organized?
Sessions will start with a quick presentation of key concepts by your teacher, with slides. These slides will only contain a summary of the notions you have to learn. Later, you will have to study a few articles to complement this presentation.
After this short introduction, you will have to work on exercises that put in practice the concepts of the session. In all practical activities, we ask that you start by disabling AI coding tools, so that you understand the fundamental concepts in the exercises. Later, you can do the exercises again with such tools activated to optimize your code.
Once the class is over, you have to make sure that you complete all non-optional exercises, and that you understand all concepts briefly introduced by the teacher, using the detailed articles. We provide you a few self-assessment quizzes to help you check your understanding. Do not hesitate to interact on the Discord platform!
Evaluation
At the beginning of the first class of session 3, we will start with a 45mn evaluated exercise. You will have to download the subject on Moodle, and then to upload a solution on the same page in the allowed time.
You will be evaluated according to the following criteria:
- The correctness of your code.
- The adequation of your code with the Python PEP8 norm (think of PyLint).
- The documentation of your functions, notably with type hints (think of MyPy).
Programming will also be evaluated during the final exam.