6 Surprising insights from the 2020 Python survey to make you a better dev

Table of contents
Text Link
February 25, 2021
|
Engineering Culture

6 Surprising insights from the 2020 Python survey to make you a better dev

Go from zero to one hundred deploys a day.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

6 Surprising insights from the 2020 Python survey to make you a better dev

February 25, 2021
|
11:14
No items found.

The first result is the use Python. 28% of developers use it for web applications, and that's the most frequent usage. Only 28%. Many languages are focused on a particular use case or a particular type of application, but Python is a Swiss army knife of programming languages. Now what's in it for you? If you're just using Python for web development or just for data science or just for command line tools, I encourage you to try to expand your horizons, try to build a web application for your team. Try to build a command line tool.

For example, a couple teams ago, we had to do a lot of things in my team and so I built CLI tool that allowed you to plug in different commands for different type of operations. The basic principle on our team was if you've done it more than twice, automate it in Python. There's a great book that covers this sort of thing. It's called "automate the boring parts", give you even more ideas on how use can use Python to automate more of your life.

The second insight was for the web developers out there. 46% of web developers use Flask and 43% of them use Django. Now, of course, those are going to overlap because you might use both, but the next highest use framework was 14%, and that was FastAPI. That was fascinating to me because you always... When you talk about web frameworks, you see all these different ones and it's hard to know which to choose for a new application. If you're anything like me and you like to pick the boring technologies, the technologies that are used by the majority of people that have the best support, the best stack overflow questions and answers, then you are going to want to use according to the survey, Flask or Django. If you're new to web development and want to get into that field, those are the two web frameworks that you learn.

However, if you've been doing it for a while and you already have Flask or Django down pat, consider trying FastAPI. This web framework pretty much came out of nowhere. Last year it wasn't even on the survey and all of a sudden 14% of people are using it. This web framework is great for any type of high performance application where you want to leverage async IO or asynchronous technologies in order to deliver code and operations faster. Again, it doesn't work for everything, but it's really good for dealing with lots of little IO operations and making the best use of your hardware. Give FastAPI a try.

The third insight I found in the survey was quite interesting for me and very surprising. If you look at the nationalities of people who write Python, apparently only 16% are from the United States. Now this is good news on several ways. One, as a developer, you have a ton of different job opportunities, no matter where you live. You don't have to go to Silicon valley to get that great job, there are people using Python all over the globe. But if you are in experienced person or perhaps a manager, you're looking to hire people who know Python and the good news in this report is that you can get people anywhere. In fact, I can attest to this. In Sleuth, some of our best developers are from Slovenia, a country that I didn't know for being software development, but the people that we found there are super high quality, great to work with, really smart and have really helped Sleuth go to that next level as far as productivity. You have that preconception that you have to be in Silicon valley to be a programmer. Python shows that's not true. You can be anywhere and everywhere.

Now, maybe you're new to Python development. I've been programming for 25 plus years commercially, but I've only been doing Python for the last five or six or so. I know what it's like to not only be someone who knows everything about something, but also be now the new guy who barely knows what they're doing. One of the things you can struggle with as a developer is the imposter syndrome. That feeling of not sure if you're qualified for what you're doing. Particularly as you get out of a junior developer into a senior or an architect role, it's easy to start questioning your own abilities.

However, there's good news for you from the survey as well. Their survey showed that most developers are young and new to Python. In fact, over 50% of developers are under the age of 30 and 75% of Python developers have only been using it for five or fewer years. If you're new to Python, you're not alone. There is a bunch of us. The other good thing about Python is it has a nice, simple syntax. This was also shown in the survey. What that does is it makes it really easy for people to use Python and to show what they're doing to other people. If you're a senior developer out there, maybe you've been using Python for 10 plus years, consider not getting too crazy because remembering that most of your developers are going to be pretty new.

Take advantage of Python. Python as a really simple syntax, easy to use, write simple, clean code that anyone can pick up because of course, there's Brian Kerrigan's law of debugging, which is if you write the code as smart as you possibly can, and it takes twice as much intelligence or effort to debug something, you are by definition not smart enough to debug your own code. Keep it simple.

There's another little piece of good news for new developers out there. If you are new to Python, you're actually more likely to use some of its advanced features. For example, type hunting is more often to be used by a new Python developer than an experienced one who's been working 10 or 11 years or more. This can be a very powerful tool combined with an IDE or integrated development environment, such as VS code or pie charm, where you can make it so that you catch a lot of these kind of problems as you're developing code and not find out that you broke something when it hits production.

The fifth insight isn't perhaps the most surprising, but it's a little bit surprising that we're still talking about it, which is who's using Python 2 and who is using Python 3. According to the survey results 94% of developers are using Python 3, leaving a mere 6% for Python 2. Now for a new developer, what that tells you is you should be using Python 3. It's always going to be talked about because there's always going to be people using Python 2. It makes total sense. For example, I used to work at Atlasian, and Atlasian, their main product is JIRA. JIRA is built on a web framework circa 2003. I think it completely stopped development in 2004, called WebWork one. Yet still, that is the core of JIRA. When you're a large application and you build it on a certain technology, it's going to be very hard if not impossible to switch.

If you're a Google or someone who has built hundreds of thousands, millions of lines of code on Python 2, yeah, you're probably going to be stuck with Python 2 without a Herculean effort such as the one Dropbox went through to move the Python 3. For a new developer out there, or a junior developer wanting to get more serious, if you are working somewhere that is using Python 2, try using Python 3. Maybe your main application is in Python 2. That's fine. Try to use Python 3 on that automation engine that you wrote or that CLI program or that automated deployment system that you have. Use Python 3 wherever you can, because that's the one you're going to find in the marketplace.

The final insight from this survey that I pulled away with is the importance of working as a team and yet how few people actually do it. 48% of Python developers work by themselves. Not in a team, not with anyone else, just doing their own thing or side projects. I found that fascinating in two ways. One, it shows that it's very easy to get involved in Python. You don't need to be part of a big dev team in order to be trained on how to use that technology. But it's also sad from another way, because in order to progress in your Python development career, you need to find ways to get exposed to more people and more styles of coding. If you're lucky enough to work at a large company, this means joining a team and learning from them. How they do code structures, how they solve certain types of problems, how they use their tools, what tools they use, what keyboard shortcuts they use. If you're by yourself, what you can do is search out for side projects.

Most of the innovations that I've been able to provide to a company have actually been the results of side projects, things that I did on my own time just for fun. Maybe that was a recipe database for my wife. Maybe that was automating a game that I like playing, but I don't want to do all the tedious parts of it. I'm just going to write a script that does it for me. Whatever the case may be, I recommend that you look into finding a way to get a side project. In fact, that's actually pretty common. Only 17% of developers use a single project with Python. Usually they're working on multiples, so take advantage of that. There is such a plethora of open source libraries, tools, and applications that you can get involved with.

How do you get involved with it? How it works for me is I start using it. Once I start using it, I find things that I don't really like about it. Instead of just complaining on some forum, try to create a pull request that implements the fix that you want to make, or the new feature that you want. Once you start doing that enough, eventually they'll give you access to it as a core developer because they're tired of merging your poll request. Take advantage of this open source world that we have, the tools that we have, to expose yourself to more ways to write Python, to make you better, more productive, and have a lot more fun doing it.

Those are six insights I found really interesting in this survey, and I think it might be useful for you as a Python developer as well. If you want to learn more about continuous deployment, check out this video. If you want to learn more about automated testing using Python, speaking of an interesting use of Python, see this video. Of course, click on the subscribe button if you'd like to see more of this type of content covering Python or just general DevOps and continuous delivery type topics. Hope this has been interesting for you as it has been for me. Happy deploying.

Go from zero to one hundred deploys a day.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.