L3IF Programming
Lecture notes by François Schwarzentruber (Work in progress)
Acknowledgement
I want to thank Michele Pagani for his support, as well as Alice Brenon and François Pitois.
Why such a course?
- Because you may become:
- a researcher, and you need to program prototypes or participate to the development of research software
- a teacher, and you will teach programming too and develop tools for your courses
- Because you need to program in other courses.
- Because it is fun to program!
Content
This course covers the C programming language and Python .
Motivation: why studying C and Python?
Cool to study both
With C and Python we cover various aspects of programming:
C | Python |
---|---|
low-level | high-level |
memory handled by hand | memory handled automatically |
statically typed | dynamically typed |
weak types | strong types |
compiled language | compiled in byte-code, then interpreted |
tedious to install librairies | very easy to install librairies, via pip <3 |
Noticeably:
- Possible to do bindings C/Python
- Actually many Python librairies are written in C, C++ etc.
- They are both successful languages
- They are languages used at agrégation d'informatique
Why C?
- C is simple (KISS!)
- With C, you will understand how your computer works
- Important for your system and architecture courses
- C is still used for system development (but not so much!)
- The syntax of C is in many languages
- A way to understand Rust, C++... and actually programming in general (and Tensorflow is coded in C++)
Why Python?
- Python is really really really used everyhere (data science, machine learning, software development, backend, etc.)
- Python has good libraries
- Django: Tutorial
- Python is elegant
- Python steals good features from other languages (Haskell, object-programming languages)
- Python is used in education
- A way to understand OOP, Javascript, other script languages
- Python has a strong community
Good practice
- git
- tests
- bonnes structures
- commentaires (spécifications)
- good variable names, etc.
- encapsulation
- abstraction
Histoire
https://fr.wikipedia.org/wiki/Histoire_des_langages_de_programmation https://en.wikipedia.org/wiki/Timeline_of_programming_languages
Exercices
- Collect few software or libraries you use and look in which languages they have been developped
Aller plus loin
- Histoire du C : https://marc.mongenet.ch/Articles/C/