A while back I was developing a workflow scheduler. However the run duration kept coming back negative. The runs kept finishing like 15 seconds before they started. Eventually I figured out why; the company had configured a policy to use their custom NTP server, but it was 16.7 seconds off. So my Windows laptop’s time was in the future, but the WSL VM (which ran the program) used another NTP server and was correct. In the end I just added a bodge that made the program request the time from an external server on startup to calculate an offset.

  • palordrolap@fedia.io
    link
    fedilink
    arrow-up
    1
    ·
    6 minutes ago

    That I have a wetware problem.

    When I’m debugging, I usually forget the nature of a bug when it is fixed. The more trivial it is, the quicker I seem to forget.

    Something does trickle down to my unconscious because I would recognise getting the same error message over and over and that doesn’t seem to happen often, but I could not tell you a single bug in the last thing I wrote, even though I know there were plenty of them.

    What really makes this weird is that I sometimes become very upset - we’re talking wailing and gnashing of teeth here - when I can’t find a bug, and you’d think I’d remember those, yet once I do finally track it down and get over feeling angry and stupid, the nature of the bug still disappears from conscious memory.

    Now, maybe I am learning lessons because of the infrequent recurrence of the same mistakes, but I’d like to be able to think about them later, and I can’t do that.

  • 18107@aussie.zone
    link
    fedilink
    English
    arrow-up
    4
    ·
    36 minutes ago

    I was learning a new language, and decided to start with hello world. Only 7 words. I think I counted 14 bug fixes by the time I got it working.

    I learnt (again) that I shouldn’t program while tired, and really shouldn’t learn a new language whole tired.

  • sunbeam60@feddit.uk
    link
    fedilink
    arrow-up
    6
    ·
    1 hour ago

    Two variables named somethingl and somethingI that had three grown developers scratching their head why the wrong variable was getting updated. This was back in the day when intellisense and colouring was way less advanced.

    An actual compiler bug that wrote into the wrong register, went all the way down to assembler to realise the issue. This was on the early Xbox 360 (PowerPC) compiler.

  • zxqwas@lemmy.world
    link
    fedilink
    arrow-up
    5
    ·
    1 hour ago

    Used a niche language for specialised hardware that ignores the case values in switch statements.

    Switch x { (x=0 executes this code) Case 123: (x=1 executes this code) Case 321: (x=2 executes this code) … }

    Also Java 7 timer object locks up when windows changes the system clock backwards during DST.

  • lime!@feddit.nu
    link
    fedilink
    arrow-up
    26
    ·
    3 hours ago

    i was just a user, but i debugged a weird issue where one of those blue light reduction programs would start flickering and inverting day and night time during june.

    turns out the dev had made the assumption that the sun always rises before it sets, and i was far enough north that the sun would start setting after midnight.

  • hawgietonight@lemmy.world
    link
    fedilink
    arrow-up
    12
    ·
    2 hours ago

    I’ve been a dev for years and had my fair share of sillyness… can’t recall which was the most silly, but one very recent one was trying to debug a weird error. So I opened the VS solution did a search for the string that spat out the error. Found it in a catch clause and stabbed that function with breakpoints, and went off to test.

    Hours later (too many to confess) after trying everything, I found out why I couldn’t get it to stop on the breakpoint. I had opened the wrong project, for the wrong app :O

    It was an unlucky coincidence that it had the same literal error trace in code!

  • Fargeol@lemmy.world
    link
    fedilink
    arrow-up
    11
    ·
    2 hours ago

    I found an issue in a software used by government employees.
    A request would fail if the server and the client had different years in their system time which could happen if they were located in different time zones.
    After a few calculations I asked: “Hey, what are the chances a government employee would do this important task between 6pm and midnight on December 31st?”
    We decided not to prioritize the issue.

  • Turret3857@infosec.pub
    link
    fedilink
    English
    arrow-up
    19
    ·
    edit-2
    3 hours ago

    i was trying to figure out why ssh wasnt working only to realize I was using the wrong username. That took about 2 hours of time to realize as I was bashing my head at the wall while looking at the pubkey signature being the same on both machines.