• 0 Posts
  • 534 Comments
Joined 2 years ago
cake
Cake day: June 30th, 2023

help-circle
  • That’s the worst when your cycle time is very long. You fix a bug in the code, start your test running again and come back to check the next day only to see the exact same bug again and might think that your fix didn’t work and something more esoteric is going on (“maybe it’s a compiler or hardware bug!” (It almost never is)).

    Then you add a bunch of debug prints to really get a good idea of what’s going on and rerun the test. Either you remembered to save and suddenly the mystery bug is gone because the fix is still in the code. Or maybe you forgot to save again and now it looks like it’s not even reaching any of the code you added the prints to.


  • Thing is, if it just guesses what you meant instead of sticking to the standard, you can end up with ambiguous meanings. Like what if you forgot a character that wasn’t a semicolon but inserting a semicolon would turn it into valid code?

    Like:

    x = y z++;

    Inserting a semicolon would turn that into set x to the value of y and then increment z. But maybe the line is missing a plus instead of a semicolon and the intent was to set x to y plus z and then increment z.

    It’s a pain but strict syntax helps avoid frustrating to debug bugs.

    Taking it a step even further, you can make your code more robust by treating warnings similarly to errors. Even though the general cases usually still work despite warnings, they are great for avoiding edge cases that can also be difficult to debug. At least if you take the time to understand what the warning is really about and don’t just google “how to get rid of warning x” and add some casts or something you don’t understand to make the message go away.


  • Short answer: yes.

    Long answer: Sea levels rise and fall with ice ages. There’s a ton of ice sitting on Greenland and Antarctica right now that wasn’t there 5 million years ago and sea levels (ocean) were 10 - 30m higher than they are today. And the Mediterranean fluctuated even more than that.

    But, that said, there has definitely been some significant uplift (probably between 1km to 1.5km) involved from Africa and Europe colliding.

    So the uplift dominates the sea level decline (outside of events like the one the article is about), but the exact position of the coastline is still dependent on the sea level.






  • Ah that’s interesting. If you can swap the devices from one pi to another, try powering it all up on machine A, then swap the devices to machine B and power that on. Might tell you if the issue is with on the pi side or with the devices.

    Is latency higher on the first boot than on subsequent ones? I’d be looking into race conditions if you’re seeing a bit of lag cascade out into bigger problems. Race conditions are the worst, especially when the race most often goes the right way and just occasionally goes the wrong way. Though you can force the wrong way by adding delays in your code, if you have an idea of where the race is happening.


  • Or, after weeks of debugging an issue the user has logs proving they are having weird performance issues despite having a strong GPU, it turns out their parents wouldn’t let them take that GPU out of the family PC so they rigged up a PCIe to USB to wireless transmitter that hooks up to a wireless to USB to serial port that exploits a signal leaking from serial port to PCIe bus bug on the family PC motherboard to act as if the GPU is on their own machine, which both impresses and horrifies you.

    And when you try to get approval to drop the issue as unsupported, your manager gives you shit and it takes another week to convince him that it isn’t a use case that you should support. And they only agreed in the end because a more senior technical person happened to overhear you pleading with your manager one day and only had to say, “that’s crazy!” for your manager to 180 immediately on the issue. But it’s still cited as a negative on your next performance review (“you spent weeks working on something we don’t even support!”).


  • Another angle to try is to set the date one day ahead and see if the bug shows up then. Might need to disconnect from network and set it in the BIOS for the test to work properly.

    I could be wrong, but I figure after being off for an hour, all capacitors should have discharged by then, so it’s probably not based on how long the hardware has been unpowered.

    Though one other angle I just thought of, if you have something that runs periodically, maybe the bug is related to that period being missed once or n times. Or it could be related to something that is meant to wake the computer to run some job and then go back to sleep but instead just sets it in a bad state.





  • Buddahriffic@lemmy.worldtoProgrammer Humor@lemmy.mlLearn to code
    link
    fedilink
    arrow-up
    28
    arrow-down
    1
    ·
    11 days ago

    Yeah, that’s something a shitty developer who is bad at debug would say.

    Bugs frustrate me more because I can often guess at why they are happening and how to fix them but can’t just apply the fix myself. Even more frustrating when there’s an update and I’ll think, “oooh maybe they finally fixed that annoying bug!” and then see it again shortly after installing the update.





  • Could have a system where a government site cryptographically signs a birth year plus random token provided by the site you want to use.

    Step 1: access site
    Step 2: site sends random token
    Step 3: user’s browser sends token plus user authentication information
    Step 4: gov site replies with a string containing birth year, token, and signature
    Step 5: send that string to the other site where it uses the government’s public key to verify the signature, showing the birth year is attested by the government

    No need to have any direct connection with the user’s identity and the site or been the gov and site.


  • I disagree that that warning is reasonably clear. Even the comment that included it has the line of thought, where the user, not knowing what terms git uses thinks that they just did an action that is going to change each of their files. It makes sense that they’d want to discard those changes. That user then goes on with some snark about not wanting to learn any more about what they are playing with and that other programs would do the same, but “discard changes” seems like it would have a clear meaning to someone who doesn’t know git.

    The warning says it isn’t undoable but also doesn’t clarify that the files themselves are the changes. Should probably have a special case for if someone hits discard changes on a brand new repository with no files ever checked in and hits discard on a large number of files instead of checking them in. Even a “(This deletes all of the local files!)” would make it clear enough to say what the warning is really about.