• 33 Posts
  • 1.7K Comments
Joined 5 years ago
cake
Cake day: May 31st, 2020

help-circle

  • That’s kind of why I never feel great about buying video games. The price is pretty much entirely arbitrary.
    Like yeah, they did an investment, it is fair that they recuperate that. But the actual price they need to ask of each customer entirely depends on how many customers there are.

    And so, they will always start out asking more than what they expect to need to ask of each customer, which just feels like I’m paying too much.
    But even when they do put it on sale, there’s likely going to be sales in the future where they sell it for even less. It’s not like they need to empty out a warehouse or such, where they put up uniquely low prices. So, even when I could get a game on a sale, I’ll feel like I could also just wait longer…



  • She did the math (with some assumptions), but basically 0.25 mL of lemon juice will turn 500 mL of alkaline water into neutral water:

    This is in the video at 13:16.

    The reason is that pH is a logarithmic scale. Alkaline water has a pH of about 8, which means it has a tenth of the hydrogen ions compared to neutral water at pH 7.
    Lemon juice has a pH value of 2, which is 1,000,000 times more hydrogen ions than there are in pH 8. So, you just need a little bit of lemon juice to increase the hydrogen ions in alkaline water tenfold, which makes it neutral.




  • Many years ago, I was working together with a girl my age for about 3 months and I had decided pretty early on that I didn’t want to impress her, but that I would use the time to work on smalltalk and such. It was a factory job with lots of boring tasks, so there were lots of opportunities to entertain each other.

    After 2½ months, I felt like I was doing better than I’ve ever done in my life. Then she hit me with the sentence: “I don’t think any girl would want to go out with you, because you don’t talk enough.”

    So, basically worst case: That’s genuinely what she thought.
    ‘Best’ case: She was trying to hurt me, but well, she still knew which wound to poke into, so I guess, I wasn’t doing that great either way.


  • I’m towards the hyperphantasic side of the spectrum and I’ve also noticed that it influences quite a lot of things.
    Perhaps the biggest factor is that I don’t have the same drive to visit places or people. I could travel to a castle to look at it, or I could do so in my mind. I could meet back up with an old friend, but as I think of them, my desire to see them again is satiated. This does mean I’m terrible at maintaining friendships and socializing in general.





  • I agree in general, that a crash is much better than silently failing, but well, to give you some of the nuance I’ve already mostly figured out:

    • In a script or CLI, you may never need to move beyond just crashing.
    • In a GUI application or app, a crash may be good (so long as unsaved data can be recovered), but you likely need to collect additional information for what the program was doing when the crash happened.
    • In a backend service, a crash can be problematic when it isn’t actually necessary, since it can be abused for Denial-of-Service attacks. Still infinitely better than failing silently, but yeah, you gotta invest into logging, monitoring and alerting, so you don’t need to crash to make it visible.
    • In a library, you generally don’t want to trigger a crash, unless an irrecoverable error happens, because you don’t know where it’ll be used.

  • Currently implementing error handling for a library I’m building and the process is basically to just throw all of the information I can find into there. It makes the error handling code quite verbose, but there’s no easy way for me to know whether the underlying errors expose that information already, so this is actually easier to deal with. 🫠



  • However there are things when the Ai is helpful, especially for writing tests in a restrictive language such as Rust.

    For generating the boilerplate surrounding it, sure.
    But the contents of the tests are your specification. They’re the one part of the code, where you should be thinking what needs to happen and they should be readable.

    A colleague at work generated unit tests and it’s the stupidest code I’ve seen in a long while, with all imports repeated in each test case, as well as tons of random assertions also repeated in each test case, like some shotgun-approach to regression testing.
    It makes it impossible to know which parts of the asserted behaviour are actually intended and which parts just got caught in the crossfire.






  • Ephera@lemmy.mlOPtoLinux@lemmy.mlUnderappreciated `top`
    link
    fedilink
    English
    arrow-up
    16
    ·
    7 days ago

    Yeah, I especially don’t understand it here, because it’s a graphical tool. You don’t have to keep backwards compatibility.

    Even if you’re worried about people depending on the format that’s being piped, you could keep only the piped format stable. We have the technology.


  • Ephera@lemmy.mlOPtoLinux@lemmy.mlUnderappreciated `top`
    link
    fedilink
    English
    arrow-up
    14
    ·
    7 days ago

    Yeah, I would often just grab htop because I had no idea how to read the CPU usage out of top.
    For example, for me it says:

    %Cpu(s):  0,4 us,  0,4 sy,  0,0 ni, 98,8 id,  0,0 wa,  0,3 hi,  0,0 si,  0,0 st
    

    Now that I look at it, I can guess that us and sy are supposed to be user and system time. And I guess id is supposed to be idle.
    I have no guess what the other numbers might be, though. And well, I would often like to see the CPU usage per core.
    Now I know that I can just press 1t and get effectively the same view as in htop.

    I might learn top’s filtering workflow, too. But so far, I always killed processes with ps -ef | grep <process-name> and then kill <pid>, which isn’t particularly more cumbersome, so will see…