• 0 Posts
  • 68 Comments
Joined 7 months ago
cake
Cake day: December 23rd, 2023

help-circle







  • Even though I like intermediate variables myself, I’ve been told the same thing when co-authoring code.

    What these anecdotes suggest is that this is subjective, and I think it can be overdone. I don’t think objective general rules can be established from the article, even though I think it’s good advice.

    In my examples, I was overdoing it and causing too many indirections, creating leaky abstractions (leaky because, in my context, the abstraction was not tightly self-contained and understanding the “implementation” of the abstraction was necessary to understand what the line of code that was using it was doing).

    I don’t think it’s a black-and-white matter. Your reviewer might not necessarily have been a moron, or might have lacked the self-awareness to realize they were imposing their own preferences onto you. But there’s a slight chance that you legitimately confused them with your indirections. Hard to say without context.











  • NPM is definitely saner for that use case because it works out of the box. Pip is not because it is based on shakier foundations. With NPM, you don’t get to a point where you rely on things to work correctly, and they suddenly don’t and you have trouble understanding why. And it does not force me to look at its nuts and bolts to allow me to work with it.

    I can afford big node_modules directories, even if it’s not optimal. It’s still small compared to the cruft I’ve accumulated on other projects I’ve worked on with other technologies. Remember the order of priority of things: make it work >> make it efficient. Software engineering is about delivering software, it’s not an art. It doesn’t have to be pretty everywhere.

    I will concede that NPM is not perfect. Despite its flaws, I love how Conan solves the issue we’re talking about.



  • Pip is definitely not saner. The way installs are centralized has bitten me in the ass multiple times, when I wanted to have two different versions of Conan installed on a single machine.

    And I know there are workarounds like virtualenvs, but they’re complex hacks. Stockholm syndrome yadda yadda yadda.

    If it was sane, downloads would be centralized (no point in downloading the same package over and over again) but installs would be project-local (symlinks? There are multiple ways to do this, cf Conan)

    Sure, NPM is wasteful with storage space but I’ll take inefficient over brittle any day.