• 0 Posts
  • 114 Comments
Joined 3 years ago
cake
Cake day: September 2nd, 2023

help-circle

  • If it’s not open source or you are not compiling it:

    Why so much fear about the shell script but no fear from the executable?

    If it’s open source and you are compiling it:

    If you don’t fear the project because you (presumably) have read the source code and determined that it’s fine, why fear a shell script that is most certainly simpler, and you can read it like the rest of the code?









  • If you approve someone, you don’t need to explain yourself, you would just say “I agree with this guy”. There’s no substance to it.

    However, if you downvote, you are saying “this is wrong”. Which is much different. When you accuse someone of being wrong, you should explain yourself, otherwise you’re being a dick.

    It’s fine if someone already answered with what you were going to answer. You can just upvote that guy and move on.

    EDIT: I’m absolutely in awe that this comment specifically gathered so many downvotes. And this is a good example of what I was referring to. Lots of people downvoted, and 0 ppl said why.




  • Yes, privacy should be the default. However, there is a limit for what is practical.

    A VPN adds latency to your connection. It adds an additional failure point. If you don’t need it, why use it? Most people don’t need privacy at that level.

    Additionally VPNs are not free.

    For the ones that claim to be free, you have to remember that if you’re not paying, you are the product.

    What privacy do VPNs provide to the average user when not doing anything illegal? Absolutely zero. You might claim “but VPNs hide my traffic from my ISP!” And it is true, but in doing so you expose it to the VPN provider. In the end, unless you operate your own network, you will have to tell someone where you are going. Using a VPN is just kicking the can.

    Of course if your ISP is known for doing shady stuff and there is a VPN that you fully trust, it may be worth it.

    But I swear the VPN industry has wiped people’s minds with millions of ads so they’re not thinking anymore.


  • As a rust developer I feel obligated by religion to make this comment:

    Then you’d love rust! Rust only has “interfaces” (called traits) but doesn’t have inheritance. You just have traits that don’t inherit from anything and structs (that don’t inherit from other structs) that implement X amount of traits.

    So you can have the good things about OOP without the bad ones.

    And these traits allow you to make trait objects, which would be like regular objects in C# (with vtables for the methods). If 2 different structs implement the same trait, you can “downcast” them to a trait object and store them in the same array. Or pass it is an argument to a function that wants something that implements that trait but doesn’t care about the specific struct. You can of course cast it back later to the original struct.




  • I know this thread is old. But I disagree with you.

    I agree that depending on how you use a debugger, some race conditions might not happen.

    However, I don’t agree that debuggers are useless to fix race conditions.

    I have a great example that happened to me to prove my point:

    As I was using a debugger to fix a normal bug, another quite strange unknown bug happened. That other bug was indeed a race condition. I just never encountered it.

    The issue was basically:

    1. A request to initiate a session arrives
    2. That request takes so long that the endpoint decides to shut down the session
    3. A request to end the session arrives

    And so handling the session start and session end at the same time resulted in a bug. It was more complicated than this (we do use mutexes) but it was along those lines.

    We develop in a lab-like condition with fast networking and computers, so this issue cannot happen on its own. But due to the breakpoint I put in the session initiation function, I was able to observe it. But in a real world scenario it is something that may happen.

    Not only that, I could reproduce the “incredibly rare” race condition 100% of the time. I just needed to place a breakpoint in the correct place and wait for some amount of time.

    Could this be done without a debugger? Most of the time yes, just put a sleep call in there. Would I have found this issue without a debugger? Not at all.

    An even better example:

    Deadlocks.

    How do you fix a deadlock? You run the program under a debugger and make the deadlock happen. You then look at which threads are waiting at a lock call and there’s your answer. It’s as simple as that.

    How do you print-debug a deadlock? Put a log before and after each lock in the program and look at unpaired logs? Sounds like a terrible experience. Some programs have thousands of lock calls. And some do them at tens of times per second. Additionally, the time needed to print those logs changes the behaviour of the program itself and may make the deadlock harder to reproduce.