Best practices in software engineering


Well done for getting this far!

In this course we've covered some important elements of professional software development:

  • Documentation
    • What should be documented
    • How to make your documentation accessible as HTML
  • Licensing
  • Testing
    • How to test your code
    • Why to test your code
    • Parametrising your tests
    • Checking for expected errors
    • Providing test data in fixtures

I consider these three topics to be essential for effective software development along with version control through a tool such as Git.

You don't need to have tested very single corner of your code and you don't need to have perfect docstrings for your functions but just having something is better than having nothing. These techniques are not about being perfect but simply about being better.

Things to read up on or attend courses about next would likely be:

  • Version control using Git
    • including collaborative development with a platform like GitHub or GitLab using Pull Requests
  • Automated testing, also referred to as continuous integration or continuous testing
  • Code quality checks (such as pycodestyle, Pylint and MyPy in Python)
  • Packaging your software for easy distribution (e.g. using PyPI for Python)

For information on some of these topics, a good source is The Hitchhiker's Guide to Python, particularly the section on Writing Great Python Code.


This course was written by Matt Williams. All text is published under a Creative Commons Attribution 4.0 International License with all code snippets licensed as MIT.

The source for the material can be found on GitLab where fixes are welcome.