by orf · 3y ago · 0 comments
The rust code is pretty simple, and plain, and doesn’t need any of these tricks
It’s very readable to me (not a data scientist, but I’m decent at Python), YMMV.
If there’s a CLI tool written in Python, ideally install it with pipx.
Use Poetry for every project.
Unfortunately these aren’t inherently obvious until you have a raging tire fire, and even then, you have to know the source of it and that better options exist.
But hey, at least it isn’t Node.
Why? Node's packaging story is about a million times better than Python's. You literally just listed some of the issues with Python, none of which apply to Node.
> use venvs liberally
Not necessary with Node (you could argue it always uses venvs but that's transparent from a user point of view).
> to let as few things as possible interact with system Python.
Not an issue.
> If there’s a CLI tool written in Python, ideally install it with pipx.
Node has one way to install things and it isn't the way that nobody has heard of (I honestly had not heard of pipx until now and I'm forced to write Python some of the time for my job).
> Use Poetry for every project.
You don't have to magically know which project management tool out of dozens to use with Node. Just use the overwhelmingly popular one (NPM).
You missed a few more by the way. How about knowing to use `--config-settings editable_mode=compat` in order to use editable installs with static tooling? Oh and remember that that is deprecated with no alternative! And it silently doesn't work in `requirements.txt`! Yeay.
Then there's `pip`'s fun "wheel error! this probably isn't a wheel error" message. Very user friendly.
Oh and don't forget the whole `pip3`/`python3 -m pip` debacle. Did I say `python3`? I meant `python3` except on Windows.
Node is a million miles ahead of Python in terms of packaging usability.
Most recently it defaults to asking for a keyring, even when just downloading? I believe that's marked WONTFIX. Even with that hacked around, and I thought the point was to reduce the number of hacks required, tensorflow seems to almost universally fail in absolutely any configuration I've tried.
Don't even begin to try integrating your own packages, c++ template errors are tame by comparison. I've also never seen a poetry error fit in less than 500 lines of nested exceptions.
I want to like this tool but... boy, Docker doesn't give me this crap.
Poetry is tightly optimised for what they consider the 'correct' way of developing 'normal' python apps. Wander off that path and poetry becomes worse and worse.
I still have hopes that Julia and Ruby competition makes it change.
I don’t think most people need this level of accuracy, but it is something to consider.
Database queries are even worse, because not only do you need representative data at a similar scale (or you’ve scaled both hardware and working set accurately), but you have to hope that the table/column stats in prod and test are kept at a similar level of accuracy, which is more art than science.
Did the query regress because of the change, or because writes to an unrelated table have increased load and the analysis daemon is now struggling? Did it regress in test because someone else pushed a change to a rarely-used query, causing buffer churn when CI ran your job? Etc.
No they're not complying to your CI/CD best standards - tell me with a straight face they're learnable in less than a month with a budget of $0 above your existing capital. Yes they're adding real value to the economy. That's "computing for everyone", and one of those tools works for that scenario.