• AeronMelon@lemmy.world
    link
    fedilink
    arrow-up
    19
    ·
    5 hours ago

    Electrical engineer: “what was that other guy thinking?”

    Software engineer: “What was I thinking?” (It’s code from last night)

    • rumba@lemmy.zip
      link
      fedilink
      English
      arrow-up
      5
      ·
      5 hours ago

      We went out for drinks one night after work. Upon stumbling back to the office, I remembered I had forgotten that I signed up to make a tool page to mange some data ingest. It was due first AM. I was three sheets to the wind. Fired up LAMP stack, took the samples and made an ingest function. Wired up a textbox, tested it and went home.

      Next AM, I turned it in, there was a minor bug. No problem, I’ll just find the issue and they’ll be good to go.

      cracked the scripts open…

      I could read it. I could see what a lot of it did. I could NOT figure out what some of it was there for. I spent 30m trying to figure out what I was doing. it was only a couple hundred lines. It wasn’t even a copy/paste job. Eventually I ran out of time and just leaned into phpdump, and breakpoints to find the exact error. One function hit a bonefied php bug that caused the debug to go silent. large swaths of the code were unreachable due to essentially a couple of typos. The only reason it worked as well as it did was because their sample data was as simple as imaginable. I put on some Nine Inch Nails and just remade it in about 30 minutes (10m before it was absolutely needed)

    • zqwzzle@lemmy.ca
      link
      fedilink
      English
      arrow-up
      2
      ·
      4 hours ago

      What was I thinking?-after every interruption that could have been an email