ICM – Computer Science Major – Course unit on Technological foundations of Computer Science and M1 Cyber Physical and Social Systems – Course unit on CPS2 engineering and development, Part 2: Technological foundations of software development

Institut Henri Fayol - MINES Saint-Étienne

Debug, log, test, profile, analyze your software

This session aims to familiarize you with the methods and tools for debugging, logging, testing, profiling, analyzing your software. In particular, we will cover tools for Java, Python, JavaScript.

Complement to the slides for the MCQ

The MCQ will contain:

TODOs (By 5/12)

submit your work for Courses 5-6 as LASTNAME.zip to https://ecampus.emse.fr/mod/assign/view.php?id=33636 (expiration date/time: 2025-12-06 01:00 )

Practice on the project of your choice:

  • 1/5 points - Set up static code analysis. Proof: link to configuration and explanation of how to install and run analysis

  • 1/5 points - Automate execution of static code analysis with pre-commit hooks. Proof: link to configuration and explanation of how to set up

  • 1/5 points - Do some relevant logging for each level. Proof: link to the commit you authored, or to the files on github.

  • 1/5 points - Implement unit testing for some relevant unit tests. Proof: link to the commit you authored, or to the files on github.

  • 1/5 points - Record a short video (3 min max) where you demonstrate your mastery of debugging in your favorite IDE.

Project scope:
  • The project MUST have a non-trivial codebase (more than just a "Hello, World" app)

  • You are free to choose the technology (e.g., C/C++, Java, Python, JavaScript, BrainFuck, whatever)

  • It MUST have dependencies to external libraries

  • It MAY be solving a need you have for another lecture (ex. TFSD, Web Programming, Data Interoperability, ProTech, Projet Indus, …​)

  • It MAY be the same existing open-source project as for the Lecture 3, that you fork and improve its build automation configuration (ex. migrate from Maven to Gradle and improve or add build tool usages)

  • You MUST host the project on GitHub or Gitlab. You MUST submit the link to the repository, it MUST be accessible to the professor. Note that your contribution is mostly assessed based on the commit messages and contents

  • You CANNOT work on the same project as another student (NOTE: if two students work on the same multi-component project such as for the Web Programming course, each student can work and leverage one of the modules)

The following code is NOT relevant logging
import logging
logger = logging.getLogger(__name__)
logging.basicConfig(filename='example.log', encoding='utf-8', level=logging.DEBUG)
logger.debug('This message should go to the log file')
logger.info('So should this')
logger.warning('And this, too')
logger.error('And non-ASCII stuff, too, like Øresund and Malmö')