6 ms·
Yet another case of Python developers getting a basic utility which any other language had available for years and being amazed at something which is an industr
by throwaway2137 3y ago
Yet another case of Python developers getting a basic utility which any other language had available for years and being amazed at something which is an industry standard literally anywhere else. Linter taking multiple seconds is not a problem which occurs in any other popular language.
It really boggles my mind why is this lang so popular. Once you write something a little more involved than an utility script or jupyter notebook you start dealing with stupid problems like
- venv
- no standard package manager, dependency resolution taking forever
- multiprocessing
- untyped libraries (looking at you boto)
- `which python`
- wsgi
- CLI debugging
et cetera.
I'm currently working daily with Python, and compared to the .NET world I'm coming from, it's MINDBLOWING how many things are annoying here. In my previous job I was able to spend several years working on a C# app barely ever needing to touch the terminal, everything came with batteries included, tooling / autocompletion / package management / performance / time spent on dealing with little issues was REALLY good in comparison.
Reason I moved is that it's hard to find a job in C# which isn't soul sucking stuff like banking / maintainance / insurance, so I'm dealing with it as the project is interesting at least.
- int_19h 3y agoYou don't have to use CLI debugging unless you want to. All popular Python IDEs have integrated debuggers with all the usual features one might expect - not as advanced as modern Java or C# debuggers, true, but definitely light years ahead of debug prints. It's true that many users avoid them, though, but that's more of a cultural issue, and seems to be more common among DS/ML folk.
- Tossrock 3y agoRoblox is a big C# shop that's pretty fun - platform tech in the gaming space. And hiring!
- robswc 3y ago>It really boggles my mind why is this lang so popular a lot of problems can be solved well with python. The frameworks are also priceless. What is an alternative to Django, for example? Nearly every backend service I create is with python, unless it needs speed or rock-solid reliability. For that I use Go. Dynamic UI/UX I use nextjs with python backend.
- smt88 3y ago.NET is a phenomenal alternative to Django with excellent tooling, ecosystem, and performance. I think the only irreplaceable part of the Python ecosystem at the moment is the math/stats/NN stuff. I wouldn't hire a data scientist who refused to learn Python, but I would hire a web dev who refused to learn it.
- ibejoeb 3y ago> .NET is a phenomenal alternative to Django Presumably you're referring to ASP.NET, but if not, I'd love to know what you're working with. They're not really all that comparable. If I want to make something very quickly and need it to be trustworthy, I'll use Django, especially with the admin site. That said, these days I'd much rather work in the .NET ecosystem.
- smt88 3y ago> Presumably you're referring to ASP.NET Sure, but .NET includes ASP.NET. > If I want to make something very quickly The difference in setup time between a modern .NET 7 web application and Django is basically nothing. You can have a boilerplate project in a few seconds, and the Hello World for the API side is 4 lines: var builder = WebApplication.CreateBuilder(args); var app = builder.Build();\ app.MapGet("/", () => "Hello World!"); app.Run(); > and need it to be trustworthy I don't understand what this means. Security? .NET is very likely more secure out of the box because it's supported by a far larger company and is used by so many large organizations. Lack of runtime errors? You're going to have more in Python because it doesn't have a compiler with strict rules.
- Phelinofist 3y agoComing from Java I have the same thought. Other languages seem infantile in comparison.
- booleandilemma 3y agoOnce you write something a little more involved than an utility script I only use Python specifically for utility scripts for this reason.
- ehsankia 3y agoMaybe tooling for other languages are faster because the dev has to spend a lot more time specifying a lot more things / are a lot more verbose. The reason tooling on Python is slow is exactly why people love it, because it's lightweight, easy to quickly whip up a script. Take a one line hello world vs having to create an entire project and 10 lines in C#. Not having to type annotate every tiny thing is also great. You can type only what brings you value and leave the rest to be inferred. It really is the best of all worlds.
- smt88 3y agoChoosing a language based on initial setup or Hello World is valuing the wrong things. You set up an application once, write each line a few times, read it dozens of times, and run it millions of times. The most costly part of that process is reading/rewriting because developer time is expensive. Language choice should be optimized to make it easy to read other people's code and to prevent mistakes from getting into production. Python is not near the top of the pack in those dimensions.
- ehsankia 3y ago> Language choice should be optimized to make it easy to read other people's code and to prevent mistakes from getting into production. Python is not near the top of the pack in those dimensions. I think most people would definitely disagree with you on the first point. As far as languages go, Python is probably one of the most readable ones out there. It's often even compared to pseudocode because well written Python reads like it. The latter is a valid point, but assumes all code you ever write is made for production. That's just plainly false. Python is great for tooling, automation, prototyping and many other smaller scale non-production usage. That's where the low-barrier of entry really shines.
- chinaman425 3y ago> It's often even compared to pseudocode because well written Python reads like it. This is absolute rubbish. Go and find me a piece of application code which isn’t procedural math/data manipulation, give it to someone completely new to it and see how easily they (don’t) comprehend it.
- serial_dev 3y agoSame, the tooling makes a big difference when it comes to languages. I'm a Dart developer by day, Rust enthusiast by night, both are relatively modern languages and the tooling just feels right (of course nothing is perfect): the analyzer, linter, testing, dependency management, lsp, formatter are all just there. I never want to go back to 20-30 year old languages where, for all these tools, there are 10 different subpar solutions with three decades of baggage, history, and context (though, of course, congrats on the 1000x speed up). Python, JavaScript, Java, C++, are all in this category, and honestly, even community favorites like TypeScript and Kotlin have similar warts.
- za3faran 3y agoJava is in the same category as C# from the previous post. Mature off the shelf libraries, with a great ecosystem and great integration.
- mixmastamyk 3y ago> Linter taking multiple seconds is not a problem which occurs in any other popular language. It doesn't happen in Python either. So that's good. > barely ever needing to touch the terminal Not really a good sign, point-click developers are not usually the strongest. That said I like things to work easily and don't have many quarrels with Python. Certainly fewer than most other languages. Sounds like you're not very familiar with it and got used to C#. I don't have a problem with anything you list.
- throwaway2137 3y ago> Not really a good sign, point-click developers are not usually the strongest. In principle I agree, but my point is - it was possible to be fully productive being just a point-click developer. > It doesn't happen in Python either. So that's good. pyright + black + isort hook in the project I'm working on takes 1-5 seconds on an M1 mac on save. We're moving to ruff for this reason. Never saw this anywhere else. > I don't have a problem with anything you list. To give better examples: - poetry takes ~900 seconds to resolve dependencies during update/lock - I had to use multiprocessing where in any other language I would use threads because GIL, inter-process communication is needlessly complex - I can't dot+tab+enter autocomplete while using boto or many other libraries - due to weak typing discoverability suffers and I need to have documentation always open in another window to do anything. This is not a problem in strongly typed languages. - wsgi - concept of running separate interpreters for each incoming request is a bit wasteful - I never had any problem with broken / incompatibile environment like I had on python. I just install recent version of .net / rust / node (to a lesser extent) and things generally tend to work. Here I have to worry about specific subversions and conflicts in PATH with another envs and OS-packaged python. Avoidable, but noobs are certain to hit this at some point. - I didn't talk about general speed as it's beating a dead horse, but Python basically nullifies the last 20 years of hardware improvements > Sounds like you're not very familiar with it and got used to C#. I also used Rust and Go and was super happy with the experience for similar reasons.
- mixmastamyk 3y agoI mentioned elsewhere but might as well here again. These tools should only be run on the files that changed, not every single one in the repo. I run my tools with the script equivalent of: git status | grep \.py | tools And it should exit in a split second. We have a pretty large codebase, though not gigantic.
- was_a_dev 3y ago> It really boggles my mind why is this lang so popular. You are thinking like a software engineer, understandably If you looks at STEM research fields Python is a solid tool for the fact it is a utlility/scripting tool. All the issues you listed rarely occur in this instance. Most of the Python I write has a very limited lifetime. Typically shorted than the development time There are indeed better Python alternatives, but very few use them in comparison
- benjaminwootton 3y agoI agree on the venv, 'which python', and packages and I would add Python V2/V3. I work on a few Macbooks and have to occasionally return to Python. It's constant firefighting on environments.
- bluewalt 3y agoMaybe People should take a closer look to dev containers: https://containers.dev/ https://containers.dev/
- globular-toast 3y agoI think the main problem for you is that Python is heavily rooted in Unix and, more specifically, GNU/Linux and free software. Also, it has history. Python has been in use since the early 90s. C# is a Java knockoff that appeared almost a decade later. The intersection of people who enjoy both C# and Python is very small. I too have worked a soul-sucking job in finance and use of languages like Java and C# was a big part of what I didn't like. It seems there are two ways to react to the "I don't get it" situation: 1. Other people must be wrong in the head to like this, 2. I don't have the knowledge and/or experience to understand why other people like this. In life I find it's generally better to give the benefit of the doubt and take the second path. But you may still conclude it's the first after all. All I can say is I'm grateful there are others who are wrong in the head like me and prefer Python for whatever reason.
- meatjuice 3y agoUsing something like [poetry](https://python-poetry.org https://python-poetry.org) would make your workflow much better. With this tool, you don’t need to care about venv and `which python`.