How to learn python and become a backend developer

Sebastian Opałczyński
7 min readJan 22, 2017
Level Up! Together.

I am often asked with question like this: How can I become a python developer? or I want to be a backend developer - could you give me some hints? Well, I think that I can :) So lets start. Please - if you are really interested click on all links that appears in text below.

Backend

First I need to make some clarification here — lets say that backend developer is responsible for creating and maintaining the API (Application programming interface) for the clients — web and mobile ones. I know that this definition is probably too narrow in some cases — but need a point to start.

Backend Dev Responsibilities

From my perspective there are two main areas for backend dev to handle.

  • First is — DB (DataBase) models and schema as usually API is an interface for the database — simple CRUD (Create-Read-Update-Delete) in most cases do not require any business logic — it just allows to CREATE objects in the DB and also allows to GET them.
  • The second is — to write actual code which will be the API. So basically here backend dev is responsible for code itself, but also for the things like designing API (the clients developers hates when this part sucks), handle business logic properly and things related to reliability. Here you can find a really great article about designing the API.

There’s also a third point here — which is not so important at the beginning — but a new backend dev wannabe — should have this in mind.

  • The tools. Git (or any other version control system) — irreplaceable when working with team. Mastering git also requires time — but this can be done during actual development and working with the team. Also as a backend dev you should have in mind things like: CI and CD (very useful at some level), testing, code checking tools — for python it will be at least pep8. Here also even the decisions about which OS to use can appear.

Ok, try to decouple a little bit each point now — and start with writing code bullet.

Mastering the code

If you are a total noob — and have any experience with python you can fell a little bit overwhelmed with the paragraphs above. I will try to write this one in much more clear way.

Where to start?

Well, if you are a noob — you need to get some base understanding how python works and what syntax looks like — and I can’t propose here nothing more as reading some book about python. Personally for start I would suggest the Mark Lutz book here: Learning Python. It is a really great compendium about python.

NOTE: python 2.7+ or python 3.5+

Start learning python with 3.5+ version as the support for the 2.7+ will be dropped soon.

After reading a book — you can dig into python official documentation which i believe is great: Python 3 docs. You can find a tutorial there — Python 3 tutorial, which I believe you should read — maybe not all of the topics but at least the most important ones — or the ones that you find important.

What next?

Ok, you have now the knowledge about python — to be a backend dev you need to master some framework. There are plenty of them in the python world: Tornado, Twisted, Django, Flask and many others not mentioned. I would suggest to start with django or flask. The tornado and twisted are too complicated for the newbie — and rather used for tasks much more demanding than REST API.

I will focus on django.

The are many great resources that can be found in the web about django, first: Django official documentation — and guess what, you can find there a tutorial: Django tutorial — which I strongly encourage to finish.

The initial idea which stand behind Django was to create framework for creating web application (with web clients) — but now it is really powerful framework which can be used for much more complicated tasks — eg. integration with celery (do not bother with this now) or creating REST API — just use (like really use — DRF is a complete tool for creating REST API — do not reinvent wheel from the scratch — learn this): Django REST framework.

Why Django?

First — the framework it self will allow you to structure your code — as from my experience I know that people have problem with that at the beginning. Second is that Django framework has so many built-ins (sometimes people says that this is a defect, because to write simple application you use a very powerul framework — it is just like trying to kill a fly with M1 Abrams — but do not bother with that now) that you can jump really quickly into real problem solving.

Mastering the DB

Your first project in Django probably will use sqlite3. That’s OK. No need to setup up the database engine as sqlite3 is simple file-like database and probably (not sure if this is valid on windows family) all OSes supports it from the beginning.

After playing around you should be able to set up the mysql or postgresql database. I think that you should focus on one of the engines mentioned above. There are many others — but this two are open source and are widely used in the tech industry. The nice part is that — Django ORM (Object relational mapping) hides from you the details of the differences between DB engines implementations — the only part that need to be changed is the connections settings — so you can experiment with it.

Also learn how this ORM works — at the end your user model is only a row in the database engine table, so you should be familiar with SQL-like terms: join, left join, righ join, distinct, … This is not necessary at the beginning, even later no mastery is required but you should really have some insight of how DB engine works and understand how queries are executed.

Start using GIT as soon as possible — create an account on github and learn how the git flow works — this is a standard in many tech companies. Commit even for yourself — when you are the only one who manages the code. You will tank me later.

Try to setup a CI and CD flow after few month of learning — CI stands for continuous integration and CD for continuous delivery — you can rad more about this on wiki: integration, delivery. This is very important from backend developer perspective — basically when you set up this once — you will be never again forced to make manual deployments. The problem is that this is another big chunk of knowledge to learn — and you really shouldn’t bother with it at the beginning. I will only drop a link here for the CI tool: circleci — you can integrate this with your github projects someday :)

Start using Linux or some other *nix like system. I strongly believe that backend development is much more easier on *nix like systems, this is mainly because most of the applications are deployed on this system in production systems — so basically working on *nix like system will give you much more insight of how systems works. If you really do not want to switch from windows — use VM (Virtual Machine) to make a development — you can easily integrate it with IDEs (for example PyCharm).

Psychological aspects of learning how to code

I feel also that I need to warn you. Learning how to code — especially on the backend side where the code itself is only small part of the application — is really hard. You should know what to expect — and this subject was mentioned in few articles available in the web: Why learning code is so damn hard. In this article you will know what is the the desert of despair — I believe this is the biggest issue to overcome — to force yourself to learn when you think you are not making any progress or if you are thinking that it has no more sense. Everything else is just — read, understand, write code, repeat process.

Blogs

You can always read blogs! This is a great thing to improve your coding skills — and do not reduce this to only python-like blogs. The IT problems are usually the same across programming languages — only the tool is different. So my blog list:

Future reading

There is a hope that you will learn how to code and overcome all issues related to the process. And you will be want to know — what to read more :) Well, here is the list:

To master all the things menitoned above you need 5–6 years — so it is pretty long time, my proposal here is that you should have few months of very intensive training and then try to get a job on junior position — later you can learn things doing your tasks in new company.

Oh, and btw. if you are not familiar with English — please learn it too — this will helps you a lot — because of the fact that usually the best resources are written in that language.

Hope that this information will help you to become a great backend developer. Happy coding!

Originally published at showpy.tech on January 22, 2017.

--

--

Sebastian Opałczyński

Software engineer, technology enthusiast, common sense lover, serial co-founder, and a father of three.