Python Developers Survey 2019 Results
jetbrains.com
jetbrains.com
< 1 year: 29%
1-2 years: 20%
3-5 years: 20%
6-10 years: 14%
11+ years: 17%
--
That means almost half of the respondents have 2 years or less professional experience with python. Not sure how that influences all the other results.
Doubling time shorter for python developers could be explained to be a result of python getting more popular (so even though programming gets more popular as a job, python grows even faster within developer community).
That is certainly true until ~2010, but I wonder if it still holds today. At some point it's got to taper off due to the global population being finite. Anyone got some data on this?
There's been a huge jump in code camp grads. Gigantic. And unfortunately the vast majority are not great. We give them coding assignments first, otherwise there's just too many to even sort through. I would say over half are unable to complete the (very simple) coding assignment. Build 3 API endpoints in any language that can do a couple different sorts and limits of a static set of data in CSV.
Because I typically hire for more senior roles I get candidates with 5 years of experience at the minimum.
Roughly 4 out of 5 candidates do not know answer to ANY of these questions:
- What is virtual memory?
- Can you pass data to another process by passing a pointer to the data? (tricky, but generally processes have separate address spaces unless you put extra effort to have part of the space mapped to same address, using shared memory, mmap, etc.)
- Can you explain what is a breakpoint? (an instruction injected by debugging program that stops execution and causing an interrupt that causes OS to call debugger)
- Can a process allocate more memory than is physically available on the host?
- Is inserting random integers into a huge sorted array faster or slower than inserting into singly linked list (absent any indexes)? (Inserting to array list will require huge data copy but linear search over linked list is so much slower it will cause linked list to be slower than array every time).
- Please, write a program to group an input list of words into lists of anagrams.
Etc.
Oddly enough I first tried Python because of the "buzz" that it was getting on HN.
This may mean that low level language skills become rare though. Besides memory management, Java is kindred of C. Many years ago schools started students in Perl and PHP, eventually giving way to Java. Now they're back on dynamic languages. Will the pendulum swing back the other way when schools realize that graduates are missing many skills needed to work with lower level statically typed languages? I guess time will tell..
Agreed, but that's the beauty of Flask you can just pass around the request context.
Ideally request would be passed to view callables and would not be global. That is completely incompatible change so we will never see that I guess :(
I have interviewed plenty of flask and Django Devs, and usually, the Django Devs reply to some of my questions is usually "that's how Django does it"
That is a poor, poor answer.
Look at exploreflask.com for a great example on how to structure production grade flask applications. Read the flask docs, the later sections deal with the create_app factory function and how to use it. It is really good in that sense.
good UX != pretty colors
Now obviously this survey is going to be somewhat self selected among devs that like to keep up to date and try new things, but 65% having used it in some capacity is pretty comparable to Typescript: https://2019.stateofjs.com/javascript-flavors/typescript/
It's clearly skewed toward devs on the bleeding edge.
I definitely wouldn't say that half of popular libraries in general didn't support python 3 at all back then, but for some use cases that may have been true tho.
I don't know where you took your number from, but I don't think that's the case anymore.
Also, a lot of once-popular libraries were succeeded by now-popular libraries that run with Python 3.
I’m adding them to code I’m refactoring and it definitely helps there. Instead of a random named variable I can now get completions for the thing I’m working on and dependencies are a lot easier to see and use.
When you add types to Python code it tends to destroy the elegance and readability of it, which is Python's main advantage over other languages.
If you're paying the overhead of adding type information already, you might as well use a language like Haskell that makes it first class and unlocks a ton of power and elegance (and convenient tooling.)
Python has a sweet spot but IMO explicit typing draws it away from that. Python is a very complicated and sophisticated semantics that acts like a simple and easy semantics. It's a delicate balance.
Given node.js is known to be much faster while still offering the dev speed of a scripting language. I love python for algorithms and DevOps scripts but feel afraid of using for web as it might end up with huge cost for hosting (higher CPU power)
CPU power is cheap and developers are not.
I don't think anyone is picking Python for it's type system. It's still a second class citizen at best.
Look at https://insights.stackoverflow.com/survey/2019#technology-_-... Python is not on the list of most dreaded languages, but Javascript is.
One can already use stuff like FastAPI [1] and Django is supposed to be getting async/await support later this year [2].
So that should make Python more competitive when compared to node.
I suspect the response rate there is actually skewed high by the large chunk of students.
Regarding the CPU use and hosting cost, it's probably not an issue for most websites. Usually you end up database bottlenecked much sooner, and that doesn't kick in until you're on >100s of millions of rows.
> Given node.js is known to be much faster while still offering the dev speed of a scripting language.
Is this so? I consider python as a language and ecosphere far above javascript and nodejs. And how well can nodejs be optimized with non-js-code?
But regarding the numbers, likely it's because a python-shop wouldn't use nodejs and introduce an additional liability. Everyone usually chooses their prefered language and environment for a task as long as there is no significant advantage in using something different.
But if I started today I would probably try to find some framework to do everything in JS/TS.
The real question is why someone like me should pitch JavaScript to my Django/Flask shop instead of technology with clearer competitive advantages: Elixir/Rust/whatever.
If I want better CPU usage I can get halfway there it with FastAPI and other Python frameworks.
Rather, it's the programming models put in place by the initial framework choices and architectural decisions that will make the biggest difference. Prototyping a web app in Python isn't fast because Python as a language makes it fast. It's fast when you use Django to effectively wire a database model directly to a set of CRUD endpoints in less than a dozen lines of code, complete with validation. The same can be said about Ruby + Rails.
Node could, in theory, provide a similar capability, but the platform was popularized after large sections of the developer community seemed to demonize frameworks like Django and Rails. So, whether for this reason or another, Node doesn't really have anything quite like Django or Rails, and thus would likely not match the dev speed of those frameworks, all else being equal. Python is _fast enough_, and early stage companies rightfully tend to not worry about CPU usage or hosting costs, because they don't have the scale for it to matter.
------
With all that being said: pick an early tech stack that helps you optimize for iteration speed, not necessarily raw dev speed (although they often overlap). Importantly, you typically want to build a system that minimizes the cost of being wrong in a reasonable time frame. If that's Python? Awesome. If that's Node? Also awesome. If that's Java? Awesome. Pick what you/your team know best and can architect in a sane way to help you find the balance between time to market and ability to experiment.
1. fast development (both Python and node)
2. boring platform where it's usually OK to leave smth unupgraded for >5 yrs (Python wins here hands down)
3. cheap devs (good Node.js devs have a lot of option to "jump around" between front and back and frameworks so higher room for leverage ...with Python you can hire cheapest newly grads since it's now taught in most unis)
...on top of this:
- performance in terms of "requests served per CPU power" does NOT matter for most apps (and when it does caching saves most situations) - and if it does, modern Python can deliver now (async is mature)
- using same stack as ML and datasci comes as a bonus - you can have backend-full-stack-devs jumping between data pipelines, APIs/web, ML models, data analysis code etc. who can stay separate from frontend-full-stack-devs doing web frontends + mobile hybrid etc.
It would be great if we could also standardize on a static high performance language common to all (eg. usable for special-performance-sensitive-code either standalone services or Python-modules or node-modules) ...this area's a mess, too much overlap, duplicated work, and too hard for devs to jump from one ecosystem to another (Rust and C++ as lib/extension langs... Java/Kotlin or Go or C#/F# for standalone services... now Swift an option too...).
is Django or Flask async yet?
Short answer: no, bc FastAPI makes no assumption about your ORM (bring whatever, use none... your responsibility, your choice - I use sqlalchemy core + databases module for async support, no ORM, but but full use of Pydantic for enforcing schemas, just "divorced" from persistence layer, maybe you don't even need any), or your anything else.
I actively dislike DjangoREST and tbh Django too... but I admit that in combination they can save A TON of time when prototyping something.
If you code Python, at least take some time to read more modern code: see responder (not my favorite but cool), fastapi, starlette, asyncio http examples etc... Or see older examples (as old as Django) like web.py.
While it get a big boost from the ML trend and these days has mostly finished displacing Perl in the "Non-bash operational scripting" department, there's still plenty of projects and users that have been happily or otherwise using it all that time.