• 7uWqKj@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    5 months ago

    I’ve seen C++ code written by Microsoft and I’ve got to say, they aren’t the brightest candles on the cake either.

    • onlinepersona@programming.dev
      link
      fedilink
      English
      arrow-up
      3
      arrow-down
      2
      ·
      4 months ago

      I’ve seen C++ code holding up a Fortune 500 company with people actually sitting on the board of C++ and being part of the decision making process on what goes into C++. Even had an advanced course on it given by some of the people. Let me tell you, it doesn’t trickle down.

      You can add all the macros and idioms you like, there will always be somebody loading an entire table from SQL into memory and dereferencing the each row+column with a double for-loop to find the correct row, then hand parsing the resulting row into the “right” in-memory data structure. Once you hit a column with variable length storing binary data (don’t ask) and the length is in a column with that doesn’t make it into the Row object, there is fun to be had.

      My favorite is when you have a macro that hides what kind of pointer it is (shared, unique), but is only used when creating the variable, and someone uses a reinterpret_cast to solve some problem. Took a while to track that down. Bro, I fucking love the language.

      Best of all is when code only has to pass some regression testing and has no code review. Absolute genius.

      Anti Commercial-AI license