magic_lobster_party

  • 1 Post
  • 43 Comments
Joined 7 months ago
cake
Cake day: March 4th, 2024

help-circle


  • Robert Martin’s “Clean Code” is an incredibly useful book which helps write code that Fits In Your Head

    It has the exact opposite effect. It leads to code that doesn’t fit in your head.

    Because his style of coding leads to code where everything useful are 10 levels deep in nested method calls. If I want to understand how the code works and how my changes will affect the overall picture, I need to keep a dozen methods in my head and how all of these are connected to each other.

    And he’s mostly working with global states, so knowing where variables are assigned is just a huge pain.

    So many times I’ve looked into code like this where I finally find what I’m looking for, only to forget how I even reached this part of the code. So I need to backtrack to remember how I got there, but then I forget where that damn thing I was looking for is. And I go back and forth until I figure out a mental model of the code. It’s awful!

    Compare that with just having one big method. Everything is in front of me. I don’t need to keep that many things in my head at the same time, because everything I need is right there in front of my eyes.

    Sure, sometimes breaking out to separate methods can make it easier to communicate what the code does and the boundaries of each scope, but if it’s overdone it leads to code that’s impossible to work with.


  • It’s generally considered a fact that Linux, along with many other open-source software projects, are more efficient than their propriety closed-source counterparts

    This is not necessarily true. Linux had trouble with Nvidia Optimus, which is a GPU technology that seamlessly switches between power modes. Well, that is if it works properly, which it didn’t for Linux. I haven’t heard it in a while, so I assume it’s not a problem now anymore.

    But it was a big problem where Linux laptops drained batteries much faster because they were using the GPUs at max capacity at all times.

    What I’m saying is that the efficiency of Linux depends on access to hardware features, and that might depend on the vendors of the drivers.

    Also, like it or not, if there’s one thing I envy about Mac is its power efficiency. They usually last really long on one charge.








  • I mostly use VS Code for notes and configuration files. Sometimes Python scripts. I agree with you, it requires a lot of setup. It has replaced Vim for me either way.

    Most of my programming is done in IntelliJ, which works mostly out of the box. I’ve also used Visual Studio (not to be confused with VS Code).

    I can’t imagine working without a proper IDE for any serious programming anymore. Working without IDE is like self imposed handicap.








  • Recommendation is part of the service. If they know I like something, then it’s reasonable they recommend me something that’s similar. It’s like going to a restaurant and asking for recommendations.

    Advertising is when things are promoted outside the service. It’s like going to a restaurant and they tell me about Raid Shadow Legends. I don’t want that.

    I think recommendation should be linked to usage data like watch history on that particular service. Location and other external information shouldn’t be used. I don’t want my recommendations depend on which friends I have or recent activity on a different service.