You’ve been doing small scripts for a while and you’ve started getting bigger and bigger projects. But you're getting the fear, the dreaded imposter syndrome. Now to be fair we all get it and we all have to start somewhere. So here are a few tips to get you from somebody who does Python to a Python developer.
Over the next weeks, I will be adding articles that cover each of these sections in depth with project layout examples and some example code.
Update: I’ve written an article about python development in teams, and more detailed best practices.
Coding Python in a team… of one or more
If you’re a beginner or even if you’ve been doing it for years it’s easy to get lazy and just get by, on doing what you…
Use a source control service
This should be a developer's Zeroth law, the one that comes before everything else. Your code is the output of your labour and as such you need to keep it safe. At the very minimum, source control like Git is a very sophisticated way to back up your code. But if you’re new to source control and the idea of branches, tags, merging and all that makes you break out into a cold sweat don’t worry. Most of the features in source control are designed around working in a team, so to begin with you won’t have to touch it. To start off, use an online git provider like GitLab, Bitbucket or GitHub and start small, with just checking in as you go. This will give you a way to roll back changes and see a history of what you did and when. If you’re doing blocks of work and then releasing you can move on to tags.
Once you start working in a team, this is where branches become very useful. By default, the code you check in will go onto the master branch. As you move onto splitting up work amongst different team members this is where a technique like feature branches will fit in. You should quickly get to a stage where no work is lost and you can track all the changes to your code.