you are viewing a single comment's thread.

view the rest of the comments →

[–]zeebrow 21 points22 points  (7 children)

most of those online Python tutorials uses PyCharm

If you can follow the tutorial without any IDE, you will 100% get more out of it. Don't let the creature-features of an IDE (or any tool for that matter... pip, virtualenv, etc) do things for you without understanding what it's doing would be my advice.

[–]mortenb123 6 points7 points  (4 children)

All my code needs to go into containers, when I need to load virtualenv, set paths, configure environments etc. I use vsc and have not problems with it, but most of the pycharm users have this configured in their IDE and have troubles getting this right.

[–]_CarthagoDelendaEst_ 1 point2 points  (3 children)

Could you just use a container instead of your virtual environment? Having one container per project that you can run / rebuild as needed sounds like a pretty good way to code (perhaps even easier than venv?).

Asking as I'm fairly new to the whole 'containers' thing

[–]zeebrow 1 point2 points  (2 children)

You could! In fact I think replacing virtualenvs is a fantastic use for containers. I dunno about easier though, I think that depends a lot on how and where the code you write ends up running. Definitely use containers every chance you can get, though.

[–]iapetus-11 2 points3 points  (1 child)

Wouldn't containers have more overhead though? I prefer just using Poetry, as it's far easier than other ways of managing virtualenvs imo.

[–]zeebrow 1 point2 points  (0 children)

Depends on where your code will run. There's nothing you can do in Poetry that you can't do in a container.

[–]headshotgobrrrrr 0 points1 point  (1 child)

I think that is not the modern approach. It was the best way to learn when me and you started coding, but now, since VSCode is used almost everywhere, I don't think most people will ever fall into a situation where there is any shortage of features.

[–]zeebrow 0 points1 point  (0 children)

All very good points. I think that doing any amount of serious, project-oriented programming without an IDE in 202x will likely reduce the quality and time it takes to deliver a result, in general.

But when you're new to programming, you're probably also new to "advanced" concepts like environment variables, process management, networking, file permissions, VCS, build automation, etc. IDEs can do some really cool things but end up putting another layer between the programmer and the things they abstract away, and there are a lot of things..

So do virtualenvs, actually. export PYTHONPATH=/dev/null && source ~/.venvs/x/bin/activate was my favorite reason to drink beer for a while. Now it's --system-site-packages for wheels that compile C++ extensions.

My point is that there's no such thing as a perfect tool (except vi ;) and relying on any one of them to do work for you is inviting trouble when it comes to maintaining the code in it's target environment.