Improving code with automatic tools

Enforcing code quality in a fast growing team with well known and inhouse tools

Mike Korneev

Best Practice Clean Code Code Analysis Management Type-Hinting

See in schedule

Delivering high-quality code in a fast-growing team may be quite a challenging task. Of course, we are running our code through series of tests but meanwhile, we want our code to be readable, supportable, and standardized.

Our main product at BestDoctor is a Django monolith over 250 000 loc with a couple of micro-services around it. We are a fast-growing start-up with a team of over 30 developers doubling every year.
We've set up lots of automated checks to help our developers to write good code and work with complicated cases with many potential errors in them. At the end of the day, our automation helps us work on business logic and not the syntaxis during our code reviews.

In my talk, I will present our code checking system on both the developer side with pre-commit-hooks and the service side using CI-pipelines.

I will show you how we combined flake8 + extensions, mypy, blake, sort, and gitleaks to make the product more supportable. Our team has developed nine flake8 extensions like:

https://github.com/best-doctor/flake8-adjustable-complexity
https://github.com/best-doctor/flake8-functions
https://github.com/best-doctor/flake8-expression-complexity

We are also writing custom code validators to work with edge cases that lead to bad code, I will share examples of these validations and talk about problems we are avoiding.

I will wrap up by sharing my understanding of team communication culture. Once established, the right culture helps us to welcome new members of the team and provide them with the right working environment. So I will also talk about people and not only the code.

Type: Talk (30 mins); Python level: Intermediate; Domain level: Intermediate


Mike Korneev

Best Doctor

- Team Lead of the Architecture Team at BestDoctor company, a fast-growing health insurance startup.
- I use python as my main programming language since 2009.
- Co-founder of Moscow Python Community with over 8 000 members, 10 meet-ups, and 1 big conference a year.
- In 2016 I've started my own python courses in Russia and since then I've taught python to more than 1500 students.