• dustyData@lemmy.world
    link
    fedilink
    English
    arrow-up
    38
    ·
    3 months ago

    As a professor said, most programming languages don’t care about readability and whitespace. But we care because humans need it to parse meaning. Thus, write code for people, not for the machine. Always assume that someone with no knowledge of the context will have to debug it, and be kind to them. Because that someone might be you in six months when you have completely forgotten how the code works.

    • rockerface@lemm.ee
      link
      fedilink
      English
      arrow-up
      5
      ·
      edit-2
      3 months ago

      Yep, if you’re writing code for a machine, just do it in binary to save compilation time (/s just in case). Also, you in six months will indeed be someone with no knowledge of the context. And every piece of code you think you write for one-time use is guaranteed to be reused every day for the next 5 years