• jaybone@lemmy.world
        link
        fedilink
        arrow-up
        5
        ·
        10 days ago

        Sometimes I think after i retire, I should teach. In the hopes that i could inspire people to write good code, instead of a lot of the garbage i see in the industry. This comment makes me sad.

        • MystikIncarnate@lemmy.ca
          link
          fedilink
          English
          arrow-up
          2
          ·
          10 days ago

          I just want to be clear, this was like highschool cs classes. I took things a bit more seriously in college.

          I never wrote messy code or illogical code, or any code that didn’t work. We were learning C++ in those days and if you know anything about C++, you can basically cram an entire program into a single line. You can also do some shorthand stuff for calculations and updates to variables… So while the class was instructed to use whitespace and comments and update variables like “var = var + #” I would do var += #… I wouldn’t comment it, mainly out of hubris.

          I was pretty good at it but I was lazy as all hell with it.