• lobut@lemmy.ca
    link
    fedilink
    arrow-up
    137
    arrow-down
    1
    ·
    7 months ago

    I remember when I was working with .NET and I saw some web service code and I saw there was no try catches. They didn’t have a global catch in the asax either or anything. I just wrapped each call into a try catch and log.

    I got the same treatment where my manager wanted to know what happened with the increase in errors. I told him what I did. My manager got another developer to go through my commits regardless. I was a bit upset at the lack of trust.

    • MotoAsh@lemmy.world
      link
      fedilink
      arrow-up
      50
      arrow-down
      1
      ·
      7 months ago

      I mean, that ‘could’ be a straight up wrong thing to do if some of the calls were expecting errors to be able to escape. Yea, it’d be super weird and I don’t know if .NET would marshall them anywhere, but in some systems, that sort of, “obvious” fix could break shit. Sure, it’d be something doing something weird and kinda’ dumb, but … don’t we see “weird and dumb” all the time??

      • lobut@lemmy.ca
        link
        fedilink
        arrow-up
        40
        ·
        7 months ago

        oh yeah I just logged and rethrew, so it shouldn’t have had any behavior change, but I could have broken something I make mistakes all the time.

        The errors we were seeing in logs were like logic or application errors that we just didn’t see before. My changes really shouldn’t have caused.

        • ThePuy@feddit.nl
          link
          fedilink
          arrow-up
          18
          ·
          7 months ago

          I think that was the right approach, then again didn’t you have through a pull request or at least a code review? Knowing that would give raise to so many “errors” you should have had some sort of communication beforehand.

          I don’t blame you, more the workflow and ironically the manager

          • lobut@lemmy.ca
            link
            fedilink
            arrow-up
            12
            ·
            7 months ago

            Oh that was like years ago! Probably SVN, we on-boarded Git a little while after.

            No pull requests, you just manually merged back then. It’s definitely a workflow improvement we adopted later and we as a company and as an industry have gotten better.

            lol, the thing was just that my manager asked me what I did and I told him. Him getting another dev to “fact-check” me after is what bothered me a bit. I am usually the type of look into issues rather than brush them off and I am the first to confess to a screw up. Which is why I was irked.

  • hesusingthespiritbomb@lemmy.world
    link
    fedilink
    arrow-up
    87
    arrow-down
    11
    ·
    7 months ago

    Changing the error level in the build config without telling everyone and then making a hyperbolic passive aggressive comic when the senior admonishes you for doing so ?

    I’m gonna guess 1 YoE, second job out of college. Enough experience to know what they’re doing, but not enough to know when to do it.

    • ThePuy@feddit.nl
      link
      fedilink
      arrow-up
      14
      arrow-down
      1
      ·
      7 months ago

      Tbh the fact that they were even ABLE to push something like that without anyone noticing is a red flag for the work environment and workflow.

    • lukas@lemmy.haigner.me
      link
      fedilink
      arrow-up
      6
      arrow-down
      1
      ·
      edit-2
      7 months ago

      I worked on software that’s roughly as bug-free as a living bug. Intended behavior crashed the software. The master branch was broken, no way to compile the software without local changes. Devs hunted down suppressed exceptions to find out why everything crashes and burns on a daily basis. Unit tests are in the backlog, we’ll get around to it eventually.

      Code reviews are ask whoever is available to approve your changes without looking at the code. Most seniors abused suppressed exceptions to use the Java Streams API, no proper technical justification. So my first official task was to unsuppress all exceptions. This caught many seniors off-guard, but made crashes infinitely easier to diagnose.

      I would’ve done that even if it wasn’t my task. Shotgun debugging is hell. I don’t want to learn which component is most likely to fail silently due to removed suppressed exceptions. Do your job properly ffs. Don’t shoot others in the foot. Don’t shoot yourself in the foot. You have absolutely no reason to shoot people’s feet. Stop it.

  • phorq@lemmy.ml
    link
    fedilink
    arrow-up
    56
    ·
    7 months ago

    I would normally put an if-statement before that to verify if IGNORANCE still equals BLISS

  • db2@sopuli.xyz
    link
    fedilink
    arrow-up
    54
    arrow-down
    1
    ·
    7 months ago

    The second panel would be “No, I enabled error reporting. Those errors belong to just you.”

  • Digital Mark@lemmy.ml
    link
    fedilink
    English
    arrow-up
    27
    arrow-down
    1
    ·
    7 months ago

    “My project” doesn’t exist in any team. It’s everyone’s project. A manager needs to have a long conversation with Pink Pants.

    If you build your project at anything but highest error level, clang -Wall etc., you’re letting errors in, relying at best on coincidence to work the way you think it does.

    Commit it and don’t revert it!

  • Cysioland
    link
    fedilink
    arrow-up
    4
    ·
    7 months ago

    Isn’t it how most frameworks do it by default? As in, crashing on E_NOTICE?