Python Best Practices

Python Best Practices

Course Level: Intermediate (6 hours)

So you can write code? Great. But can you write code which is easy to read, simple to maintain, and reproducible? Under the pressure of deadlines even the best of us can fall victim to bad-practices. In this course we motivate the importance of good-practices, and show how we can make best practices second nature by incorporating them into our normal workflow.

Download course details

Book: Python Best Practices

Start Date:
Price:
Venue Details:
Time:
Duration:

No Events Currently Scheduled

Sorry, there are no upcoming events for this course, but please get in touch if you would like to be kept informed when events are scheduled in the future.

Course Details

Outline

  • Meaningful Names: User-friendly naming conventions for your functions, scripts, variables and data, with information about why names are important.
  • Modular Code: Fundamentals of modularising code in terms of creating user-friendly reusable functions.
  • Code Style: Code styling for consistency and the use of code formatters and linters for help with styling.
  • Reproducible Workflows: Focusing on making workflows more reproducible using file organisation, documentation, version control and a creating package.
  • Working Collaboratively: Techniques for coding collaboratively like code reviews or pair programming and tips on how to work effectively in a group.

Learning outcomes

Session 1:

By the end of session 1, participants will…

  • understand why user-friendly names are helpful and be able to name new and existing objects appropriately.
  • be able to modularise code and know that writing specified functions that do one thing effectively is best practice.
  • know why consistency is important in the styling of their code and know how to use code formatters and linters to help.

Session 2:

By the end of session 2, participants will…

  • understand why reproducible workflows are helpful and be able to implement strategies to make their own work more reproducible, such as creating your own Python package.
  • know about the benefits of code reviews and pair programming for working collaboratively and have an idea of how to work effectively with a group.

This course does not include:

Prior knowledge

This course assumes basic knowledge of Python. You should be comfortable writing simple Python functions. Attending the Introduction to Programming with Python course will provide sufficient background.

Materials Preview

Attendee Feedback

  • “The presenter really did an excellent job on explaining the content in the course and I believe that the actual content is very useful to know. I will definitely be using it”
  • “It was well structured, the materials were clear and professionally produced, good enough to be followed on their own”