• Zink@programming.dev
    link
    fedilink
    arrow-up
    2
    ·
    7 days ago

    This one always spoke to me. But I work on embedded systems so I get to fiddle with physical equipment to really make sure the code works.

  • fubarx@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    8 days ago

    My first tech job out of college, I was told to go talk to “Dave,” the guru old-timey programmer and learn the lay of the land. He turned out to be this crotchety old guy, with low tolerance for idiots, but a soft spot for someone who actually paid attention.

    A few months in, I was told to go fix a feature in the company’s main product which was sold to power utilities. This was a MASSIVE code base, with a mix of C, C++, assembler, and a bit of Fortran thrown in. I spent a week poring through all the code trying to figure things out. Then I hit a mystery workflow that didn’t make sense.

    I walk over to Dave’s office and ask a specific question. Now, mind you, he had worked on this years ago, and had long moved on to new products. He leans back in his chair, stares at the ceiling, then without looking at the screen once tells me to go look at such and such file for such and such variable, and a list of functions that were related. I go back to my desk and damn if it wasn’t EXACTLY as he described.

    Now, I’m probably as old as he was then. I don’t remember what I wrote an hour ago. No matter what I build, I’ll always be in awe of Dave and what he could keep in his head.

    • Nithanim@programming.dev
      link
      fedilink
      arrow-up
      1
      ·
      7 days ago

      Most code I forget too. For a lot of stuff I might vaguely remember when looking at it but some I would deny ever even having seen even when I wrote it (that happened). However, there are some rare parts I could probably still navigate from my previous company and there are some in my current. Really depends on the connection you have to the code.

    • Lemminary@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      8 days ago

      Alt theory: The guy you replaced failed miserably. Dave poked around but decided it wasn’t worth his time fixing. Instead, decided to look badass for the cameras and died a legend.

  • some_guy@lemmy.sdf.org
    link
    fedilink
    arrow-up
    1
    ·
    8 days ago

    This made me chortle. I remember when I first joined a dev team asking someone how many of something their section should be able to store:

    I don’t know, I’d have to look at the code.

    It was an eye opening moment. Very few people can keep everything in their head. I’ve met a couple. They were rockstars who were truly exceptional.

    • livingcoder@programming.dev
      link
      fedilink
      arrow-up
      1
      ·
      8 days ago

      For me it all depends on how often a project changes. If it’s constantly in flux, I don’t bother remembering any of it because I might not be the last one who touched it. The more you try to remember everything, the more wrong you become due to the successive work of your coworkers.

  • Ephera@lemmy.ml
    link
    fedilink
    English
    arrow-up
    1
    ·
    8 days ago

    Which is why making code readable is so very important. Our juniors and students will think we’re ridiculous, when we spend a long time cleaning up some code or choosing the least misunderstandable name for a type. But you fuck that up and then others, as well as your future self, will be wasting many more minutes misunderstanding what your code does.

    • rockerface 🇺🇦@lemm.ee
      link
      fedilink
      arrow-up
      1
      ·
      8 days ago

      I treat my future self a few months from now as a separate person who does not remember anything about why or what the specific code fragments do. And I’m grateful to my past self for doing the same.

      Plus, you never know when you need to actually delegate supporting a particular piece of a solution to another person.

      • homoludens@feddit.org
        link
        fedilink
        arrow-up
        1
        ·
        8 days ago

        Write your code as if the next person that works with it is a violent psychopath who knows where you live.