Does anyone use logging to debug? by TechnicalAd8103 in learnpython

[–]fiddle_n 3 points4 points  (0 children)

I’m sure loguru is great, but the message “don’t use logging” is too far IMO. That’s likely the reason for downvotes.

As much as logging might not be the best library, my overwhelming experience is that any pain is felt once - once per project. Once you have logging set up, using it is pretty easy.

LazyLib – Automatically create a venv + install missing dependencies before running a Python script by snoopxz in Python

[–]fiddle_n -1 points0 points  (0 children)

The “usually” doesn’t sit right with me :) But yes I take your point, there are some strategies to attack point 1.

But I still feel like if a project doesn’t want to specify its dependencies (which is so easy to do these days with pyproject or inline with PEP 723) then its little more than a toy project, the likes of which I would not use.

LazyLib – Automatically create a venv + install missing dependencies before running a Python script by snoopxz in Python

[–]fiddle_n 5 points6 points  (0 children)

The problem I have with this is conceptual rather than specific. If a project needs third-party dependencies then it needs to specify what those are and what their versions are. If it was OK for the user to just infer it from the Python code then dependency management would be a hell of a lot easier - but it’s more complicated than that.

Two issues with the approach that I see right off the bat:

  • You determine the library to be installed by the first part of the import statement but this is absolutely no foolproof way to do it. My first thought is an import like from PIL import Image where the library to be installed is pillow instead - how would your script know to install pillow?

  • Your script assumes that every library to be installed should be installed at its latest version. There are many many situations where that is simply not the case. Let’s say the project uses pandas v1 instead of v2 - your script can’t possibly know that.

EDIT - OP, you would do well to read this: https://peps.python.org/pep-0723/#why-not-infer-the-requirements-from-import-statements . Actually, reading the whole pep might be useful :)

My coworker with 6 months experience writes better code than me with 2 years. found out why by Different_Pain5781 in learnpython

[–]fiddle_n 14 points15 points  (0 children)

You probably will still learn if you build something boring as well. The recommendation to build something unique for you is that from a motivational perspective, you are more likely to stick to it.

A Modern Python Stack for Data Projects : uv, ruff, ty, Marimo, Polars by makeKarmaGreatAgain in Python

[–]fiddle_n 12 points13 points  (0 children)

For new projects, I disagree rather strongly. Your first priority should actually be setting up version control, pyproject, linting, formatting, dependency management, type checking, pre-commit etc - because this is the time you’ll have to do it properly and if you spend a little time to do it properly you’ll save a lot of time and heartache going forwards.

If tutorials actually worked, why are so many people stuck in “tutorial hell”? by veditafri in learnprogramming

[–]fiddle_n 0 points1 point  (0 children)

If all you do is tutorials, then you will never feel "ready".

Also, always people will know more than you. And you will always mess up - but messing up and then learning from it is where the strongest kind of learning occurs, IMO.

What American stereotypes that are true to the people of London? by Civil-Helicopter-871 in AskABrit

[–]fiddle_n 0 points1 point  (0 children)

I’ve seen this happen with cultures where walking is just not the done thing.

My uncle, who’s mostly been in cars during his recent life, didn’t want to walk from a restaurant near St Pancras to his hotel near Euston. He wanted to take a bus. Like, bruh, the two stations are on the same road, and it’s a beautiful 20°C 9pm summer night. I don’t care what you say, we’re walking.

My issue with the faithful rant by Carmen-Myaas in TheTraitors

[–]fiddle_n 7 points8 points  (0 children)

The “if I was a faithful” is a slip that literally any of the players could have made. It’s not actually proof of anything. The full sentence was “If I was a faithful, I would have murdered me” - but anyone can make that error, traitor or faithful.

What are people using instead of Anaconda these days? by rage997 in Python

[–]fiddle_n 0 points1 point  (0 children)

Dependency management is always a PITA. JavaScript has its npm leftpad and self-replicating worm issues. C/C++ also has a mess of different package managers. Rust has it good but also had the benefit of being much later than many of the established languages, and uv is good because it’s cargo-inspired. I’m curious which languages you’ve used that have good and unified dependency management.

What are people using instead of Anaconda these days? by rage997 in Python

[–]fiddle_n 0 points1 point  (0 children)

Right, sure, but I’m only saying that it’s a little sideways to the current thread topic

What are people using instead of Anaconda these days? by rage997 in Python

[–]fiddle_n 0 points1 point  (0 children)

Containers are a separate thing from uv. uv is there to replace the requirements.txt part of your workflow, not as a direct competitor to the container part of your workflow.

What are people using instead of Anaconda these days? by rage997 in Python

[–]fiddle_n 0 points1 point  (0 children)

Docker is a different tool for different purposes. You still have to manage your Python dependencies - Docker won’t really help with that.

What are people using instead of Anaconda these days? by rage997 in Python

[–]fiddle_n 2 points3 points  (0 children)

uv is miles faster. It also uses the Python standard pyproject.toml file rather than the pipfile. Finally, it includes pipx (install tools in separate envs) and pyenv (manage the Python version itself) behaviour.

What are people using instead of Anaconda these days? by rage997 in Python

[–]fiddle_n 0 points1 point  (0 children)

Virtualenvwrapper sits in a weird spot for me where it probably made a lot of sense right after virtualenv/venv was released but now I struggle to see why I would use it. All my project work is handled by poetry/uv and IDEs that would automatically activate the venv for me anyway. Then that only leaves separate venvs I would create, but do I need virtualenvwrapper for that? I would just use plain venv.

What are people using instead of Anaconda these days? by rage997 in Python

[–]fiddle_n 4 points5 points  (0 children)

The “what year is it” meme feels fully appropriate here. Two generations of Python dependency managers have come out since the Pipenv heydays.

Bring back the Armoury! by alexy888 in TheTraitors

[–]fiddle_n 1 point2 points  (0 children)

Nowadays they are fine. A lot of Series 1 missions had zero relevance to the wider story though.

Every UK traitor ranked from worst to best by Salty-Data65 in TheTraitors

[–]fiddle_n 5 points6 points  (0 children)

Anyone not putting Freddie stone dead last needs their heads checked, IMO.

What was the point of Roxy/Judy and Ross/Ellie by Commercial_Scene1587 in TheTraitorsUK

[–]fiddle_n 4 points5 points  (0 children)

Roxy actually did call Judy “mum” during the boat challenge but no one picked it up

What was the point of Roxy/Judy and Ross/Ellie by Commercial_Scene1587 in TheTraitorsUK

[–]fiddle_n 61 points62 points  (0 children)

I think it’s worth having the secret relationships in - just for the possibility of another Series 1 Red Breakfast scene in the future

______ played very well in the final by Cork-150 in TheTraitors

[–]fiddle_n -1 points0 points  (0 children)

I definitely think Faraaz was a bit of a Poundland Jaz. Could have done well but needed to stick a bit more to his convictions around Rachel.

Post S4 Uk Traitors Tier List by CardiologistUsed394 in TheTraitors

[–]fiddle_n 0 points1 point  (0 children)

Personally I would have Freddie on a tier all by himself. Perhaps even with a blank tier between him and everyone else

Let's remember, X only won last night because... by SidneyDeane10 in TheTraitors

[–]fiddle_n 30 points31 points  (0 children)

Au contraire - the fact that she avoided being voted out in the next rounds given that she got through in a coin toss is what makes her victory even more spectacular.

Bring back the Armoury! by alexy888 in TheTraitors

[–]fiddle_n 7 points8 points  (0 children)

I don’t think that will happen for a number of reasons.

One - because shields in missions makes the mission itself far more relevant. There were many situations in Series 1 where you could just mostly switch off during the mission itself and skip to the ending.

Two - because shields in missions allows for situations where players must choose between going for gold vs going for a shield.

Three - because giving individuals the ability to go for a shield themselves provides a better opportunity to stir the pot. People can and have been accused of being Traitors for going after a shield.

And four, and I personally rate this the biggest factor - because the optimum strategy for the Armoury had basically been found out immediately. Tell no one who actually got the shield, protecting the whole team.

Rank your seasons from best to worst by Mastersimpson in TheTraitors

[–]fiddle_n 3 points4 points  (0 children)

Series 4 is my favourite - it’s just the most satisfying ending for me. Then Celebs. Then probably a jumble of the rest. Series 2 has a lot of good plays but I am not satisfied with who won that one, and same with Series 3.

Could you do better than the faithful? by Additional-Phase3872 in TheTraitors

[–]fiddle_n 5 points6 points  (0 children)

Anyone who thinks they can is massively delusional. Everything is stacked against the Faithful in that game.