Modularization and Testing of Experimental Code

Modularization and Testing of Experimental Code


This unit focuses on writing robust, maintainable experimental code through modularization and automated testing. You will learn to break down complex experimental scripts into reusable functions with clear purposes, add type hints to catch errors early, and organize your code in modules. The unit also introduces automated testing frameworks to verify that your code works correctly, which helps you catch bugs before you run experiments with participants. By the end, you’ll be able to create well-structured, self-documenting experimental applications that are easier to debug, test, and share with collaborators.

Tools