• 0 Posts
  • 26 Comments
Joined 2 months ago
cake
Cake day: June 12th, 2025

help-circle
  • Yes, the WD Red line used to be for NAS use, but suddenly they started including SMR drives in their WD Red lineup, people got pissed because SMR isn’t a good fit for RAID setups which NASes usually are.

    WD continued the practice, but introduced the WD Red Pro line. So now regular WD Reds could be either CMR or SMR, but WD Red Pro are guaranteed to be CMR.

    In my opinion it’s still misleading to even brand the regular WD Red line as suitable for NAS use, but at least now you can specifically pick a drive that fits your needs.







  • These are great points, but there is something more that phones have going for them.

    All modern phones are full-disk encrypted by default, and can be remote wiped. I think this is only the case for Mac laptops, but not for Linux and Windows.

    So if your phone is stolen, it’s not really a risk of the thief having your password manager and your 2FA at the same time, but rather can they get in to your phone and then password manager and 2FA before you can trigger the remote wipe.

    Unless the attacker is sophisticated enough to mirror the whole disk and attack it offline.



  • Ubuntu works just fine. But Canonical has an iffy track record.

    Some years ago they bundled an Amazon app with the plain install. For a while it also integrated with the system search by default. So if you searched for a file on your machine, then your search query would also be sent directly to Amazon. You could opt-out but it was enabled by default. Later it was changed to be an opt-in, and I believe it’s entirely removed today.

    Besides that they often push technologies that isn’t really fostering the community. When Wayland was slowly gaining traction, Canonical suddenly announced and aggressively pushed Mir, instead of collaborating on Wayland, the preferred making their own alternative.

    These days they are pushing their Snaps pretty hard. So back in the day if you apt-get install firefoxyou would get a regular native Firefox install. Today if you do the same it will instead install a Snap of Firefox. Snaps are also a bit funny… Flatpak was gaining traction, and suddenly Canonical decides to build their own alternative instead of contributing to Flatpak.

    So all in all, Canonical is making some dodgy business partnerships. The add a good bit of bloat in their regular install, and they constantly build their own (inferior) alternatives to all sorts of stuff.

    I’m all for having alternatives and choices, but in Canonical’s case, they generally don’t give you much choice, they just force you to use their alternative. This of course leads to fragmentation, which is unfortunate.





  • I have been on Arch , and I’m now running NixOS as my daily driver… IMO NixOS is less of a hassle to set up, and nearly maintenance free compared to Arch… Twice a year when the channel updates there’s a bit of stuff, but every change I need to make is usually explained in the output of my nixos-rebuild… If something suddenly breaks in an update, I just boot into my previous generation, roll back my flake.lock and wait a few days for a fix to be available…




  • Unittest in Python, enjoy! If you pass it with a function like the one in OPs picture, you have earned it.

    import unittest
    import random
    
    class TestOddEven(unittest.TestCase):
        def test_is_odd(self):
            for _ in range(100):
                num = random.randint(-2**63, 2**63 - 1)
    
                odd_num = num | 1
                even_num = num >> 1 << 1
    
                self.assertTrue(is_odd(odd_num))
                self.assertFalse(is_odd(even_num))
    
        def test_is_even(self):
            for _ in range(100):
                num = random.randint(-2**63, 2**63 - 1)
    
                odd_num = num | 1
                even_num = num >> 1 << 1
    
                self.assertTrue(is_even(even_num))
                self.assertFalse(is_even(odd_num))
    
    if __name__ == '__main__':
        unittest.main()
    

  • I have an education in compsci, and I have worked in software engineering and platform engineering for 8 years now… And I only know of one programming language that makes use of “=/=” which is Erlang. Every other language or scientific papers I know of make use different operators.

    Prolog comes close with “==”, and Haskell too with “/=”, but every other language has either used “!=”, “~=” or “<>”. The papers I have read that go for a more pseudo-code or mathematical notation has always used “≠”.


  • To some extent the SQL syntax also kind of makes sense… It’s a combination of both “greater than” and “smaller than” operators, which is kind of a different way of saying something is not equal.

    The “!=” comes from most programming languages using the “!” character for negation. Negating something is usually read and pronounced “not”. So it literally reads “not equal” if you are reading the symbols.