3 ms·
There is a wide gap between "known to juniors/mid level/low senior programmers" and "interesting enough to post on hacker news," which often surprises people.
by pgwhalen 2y ago
There is a wide gap between "known to juniors/mid level/low senior programmers" and "interesting enough to post on hacker news," which often surprises people. People can be productive for a long time having no knowledge of concepts that HN readers deem essential.
- throwaway894345 2y agoIn most of the Python shops I’ve worked in, people have no idea how async actually works (and why they shouldn’t make sync I/O calls in their endpoints) or even the basics of performance (how Python allocates memory, how to dodge the GIL without eating a bunch of pickling costs, etc). Never mind stuff like import path rules, metaclasses, packaging, etc. It often feels like the median Python (or JavaScript for that matter) user has a very different mindset than Rust, Go, C, etc programmers (in my experience, Python programmers also are much less likely to have used other languages extensively).
- physicsguy 2y agoThis has been my experience too, I came from a HPC scientific background and ended up doing Django after leaving academia (for an engineering company, so still pretty maths-y). When I was hiring I really had to reset expectations to some degree about whether people had the capacity to learn this stuff rather than know it already.
- DontchaKnowit 2y agoI think a lot of the times python is used almost exclusively for dead simple batch tasks where this level of detail is just not remotely needed.
- throwaway894345 2y agoSure, but I've never worked somewhere that employed people to write "dead simple batch tasks". If you're writing async endpoints, it feels reasonable to assume that people know how an event loop works (or at least not to make sync calls in an async function).
- DontchaKnowit 2y agoReally? I feel like 90% of my programming career has been churning out dead simple code. Just business logic
- throwaway894345 2y agoPersonally I think an API endpoint is "dead simple" but if your API endpoint is async, you still need to know not to call sync functions in it. The fact that such a large share of Python developers don't understand this concerns me.
- pgwhalen 2y ago> It often feels like the median Python (or JavaScript for that matter) user has a very different mindset than Rust, Go, C, etc programmers (in my experience, Python programmers also are much less likely to have used other languages extensively). Totally agree. One example of "python-brain" that I see a lot at my employer is using pandas dataframes as the only data structure, beyond _maybe_ the occasional list or dict. Any entity with multiple attributes is represented as more columns in a dataframe, rather than via objects.
- manifoldgeo 2y agoI think this may have less to do with "python-brain" and more with "data-science brain". If a person is well-versed in data science concepts and has been trained to use Pandas DataFrames and Series for everything, that's what they'll lean on. After all, it's some kind of in-memory object that can hold many values and has a way to label them with column labels and indices. Chances are somewhat good that these people weren't computer science majors to begin with. For example, math or biology majors who have moved away from R to Python might know a great deal about data but not much about compsci. For people who use Python in a DevOps context, they'll likely be exposed to more OOP concepts and lean more heavily on classes.
- throwaway894345 2y agoYeah, I've seen a lot of people write absurd dataframe monstrocities that ended up being slower than the naive Python loop-over-a-list solution never mind 10X the code. But I've also seen plenty of non-data-science examples.