24,628 karma · joined Oct 21, 2019 (7y ago) · 5,512 submissions
https://www.bitecode.dev/
Email: contact at bitecode.dev
comment 3y ago · link · parent
Because it's a sure sign that you have not had to help a team of geographers in a school or quants in banks or small kids.
Your method will only work for a very small subset of python users, and you don't have met enough of them to even know what error they encounter.
It's ok, you are a skilled dev, you offer skilled devs advices.
But no, pyenv has too many ways to fail for the average python users. Espacially since the "py" command on windows and suffixed python on mac and linux works fine to deal with multiple versions.
If would be too long to debate each point so I won't. But I don't make those claims out of the will to be right or contradict people.
I worked with python since 2.4, in dozens in countries. In africa. In asia. In the silicon valley.
It gave me a huge sample to study.
comment 3y ago · link · parent
You may end up with an incomplete python without proper tkinter, ssl or zip support. Sometimes it will look like it works, only to fail later down the line when you use some part of openssl that requests don't exercice often or when you install numpy/scipy wheels. Not to mention someone will do "make install" instead of "altinstall" and break their machine with a 3 letters mistake since apt or rpm python will get erased.
If you wonder how to setup a python venv, you should not compile anything (so no oyenv neiter). In the same way that if you wonder what oil to put in your car, you should not attempt to fix your breaks.
The fact you suggested it underlines my point that you are too experienced with the stack to give advices that would be useful for most confused devs in python. A C# dev that starts python just wants, and needs, one reliable happy path.
In fact, it's part of the problem. Paradox of choice, with too many solutions that won't fit the average user context.
Funnily, now that I get close to 20 years of python, I find myself going back to the beginner stuff.
comment 3y ago · link · parent
There is not a lot of things I'm very adament about.
Yet when it comes to python env setup, I have a strong opinion on the matter, built from seing hundreds of people failing at it in a thousand ways.
Looking for the best solution will not work.
You have to go to the minimal one that does the job, which have the least possible ways to fail. And still work in 5 years.
Most people like you, giving advices on HN, know too much about it to realize you solve lots of problems without even thinking when you perform your workflow.
But the average python user don't have this knowledge. They just want to get things done and have something that works.
I am very confident in these claims, although a HN comment is not the best format to demonstrate it.
I should write an article on it honestly at this point because so many devs are suffering for this.
A new team has been put in place to work on packaging officially in python. But the fruits will take years to mature.
comment 3y ago · link · parent
- stick to regular python installers from python.org if you can. Don't use homebrew, pyenv, conda, the windows store, asdf, etc. They have subtle and least subtle variations that will bite you.
- always use "-m" when you run a python tool, even in venv. This will let you be explicit about which python you use. On windows, use the "py" command to create the venv. No need for pyenv.
- if you are in linux, research how to install python seriously. If the command is simple, you probably got it wrong. E.g: Ubuntu has 3 packages to install, not one. People giving you a one true way are lying to you. Pyenv is a trap.
- learn to use basic venv and pip. Never do something outside of a venv, even for small scripts. You can have one big venv for all your small scripts. Don't even install black outside of a venv. You can get very far with just that. Forget about pipx.
- if you want to have better tooling, use pip-tools. Not pipenv. Not poetry. Not flint. Not pdm. Not anything else. They will fail you. Pip-tools is just good enough and just reliable enough. Embrace manual venv handling. It's not a big deal. Automated tools will betray you.
- learn to be comfortable with the PATH and the PYTHONPATH. No matter what you do, something may need tinkering.
- tox is indeed the best tool to test several envs, but people that need it are rare. Don't bother for now.
- if you want to build a package, use hatch. But you probably don't.
- if you have to use conda, don't use pip or venv at all. Don't use piptool, poetry or anything. Stay on pure conda land. It sucks, but the alternative of mixing them is worse.
comment 3y ago · link · parent
Since most telemetry are optout and don't bother about giving users access to their data, they can't legally do it.
That's my point really: useful telemetry is really, really invasive. So just ask consent, and accept most users will tell you no.
If you chose what's convenient instead, you will not only have a mixed bag of data, but also you have decide to basically force yourself on people, in an age where a part of your userbase is getting upset over things like using the wrong pronoun on them.
I tell yes to Firefox and VLC to report on my usage. It tell no to Google and Microsoft. They want their cake and it it: behave badly, and then have we trust them.
comment 3y ago · link · parent
I can't believe how much BS we have to hear about consensual sex these days to the point people are suggesting contract before making love, and yet the virtual signalers in the valley can't still see the problem with forcing people to be spied upon even when told to piss off.
Maybe too many new web framework turn over also burnt out their common sense?
comment 3y ago · link · parent
But knowing that only 1% of users use this feature is not enough to make that decision:
- maybe 1% of your users only use it, but they are the ones that pay the most money
- or it's the most prolific users so it generates half of your content
- or it's a niche feature used by power users, but those users are the ones bringing other users, introducing you to companies and doing free support
- or it needs to be used by only 1% of the users by design, and it's enough to be useful (E.G: bug report form)
- or your report it wrong, it's one percent of all accounts, but 10% of actually active users
etc.
Most telemetry will not tell you that of course.
comment 3y ago · link · parent
The first one is French dubbed in russian. If you speak russian, I would recommend it as it as the slides clearly in view.
However, the second one, in English doesn't show most of the slides, and they are really necessary to get the full picture. However, it's a playlist, and there are better ones in there.
If you don't mind, I will update my comment to include one of them.
comment 3y ago · link · parent
https://www.youtube.com/watch?v=KtQBPhKSWu0&list=PLMDQXkItOZ...
The punchlines are wonderful. E.G: "The first law of thermodynamics will always win over political promises".
Highly recommended.
2237.
The “I can't believe it can sort” algorithm(arxiv.org ↗)
2 points · by BiteCode_dev · 3y ago · discuss
comment 3y ago · link · parent
Attack the corporations, but focus your efforts.
Attacks are currently used to get many emotional responses and make people will engaged, but they don't make any body act or learn.
This is a waste.
Choose one topic, like "Apple use slave labors" or "Google spy on everyone", and keep at it for a few years.
The rest is just distraction and energy diffusion.
comment 3y ago · link · parent
Of course, you probably should not have a global state that some clean up function with a side effect deals with in the first place, but it's the c linux kernel so I assume there is something I don't know.
comment 3y ago · link · parent
You do have to learn an additional API, but as a programmer, that's something I have to do every day anyway.
comment 3y ago · link · parent
Even with custom query, using escape hatch bring a lot to the table because you benefit from the ORM core handling system for configuration, serialization, pooling, etc.
Not to mention some core (like sqla core) in fact include a functional query language that is capable of representing low level sql in any form. In which case you benefit even more, and you can do your report perfectly.
comment 3y ago · link · parent
It's not about you. It's about others. And a lot of it about what things appear, not what they are.
That's not shocking to an autist. That's factual.
We don't mind factual, we mind intent.
Just like I don't mind what you state, I do mind the virtue signaling it attempts.
comment 3y ago · link · parent
Because just be yourself works well in Disney movies, but IRL, we have social norms and many reward/punishment systems depending on how much and often you deviate from them.
So you have to find a balance between being genuine and fitting in. Everybody does, but for some of us, it's more costly. Usually, the balance is achieved by having different groups in which you can adjust the cursor differently, like work, friends and family, if you are lucky.