Defensive programming, unit tests and documentation
Duration3h45 + preparationPresentation and objectifs
In software development, ensuring the quality, maintainability, and reusability of code is paramount. This course focuses on three critical practices: defensive programming, unit testing, and code documentation. Defensive programming involves writing code that anticipates and handles potential errors gracefully, minimizing bugs and system failures. Unit testing verifies that individual components function as expected, providing a safety net during development and future changes. Lastly, thorough documentation enhances code readability, making it easier for developers to understand, modify, and extend the program over time. Together, these practices form the foundation of robust, reliable, and long-lasting software.
Before the class
Technical requirements
To be able to start working on the activity, you should meet the following requirements:
- Please bring your own computer.
- Make sure to have a functional network connection.
Prior knowledge acquisition
To be able to start the practical activity efficiently, we will introduce some needed concepts at the beginning of the class. To save you some time, we will present you a few slides, that you can find hereafter:
These slides only cover the main elements of the course, and many more details are given in the associated articles. Thus, you should study the following articles at home after the session:
You can verify your understanding of these articles here:
During the class
Practical activity
The class is dedicated to a practical activity. When ready, click on the link below to start:
After the class
Complete the current session
Before the next session, you should:
- Review the contents of the articles above.
- Complete the non-optional parts of the practical activity.
Prepare the next session
Also, you should:
- Check the Before the class section of the next session, and make sure you do everything required to prepare it.