• psycho_driver@lemmy.world
    link
    fedilink
    arrow-up
    54
    ·
    1 year ago

    My favorite part is looking at my ancient code and thinking “Holy hell I don’t remember being that smart. What happened?”

    • kevincox@lemmy.ml
      link
      fedilink
      arrow-up
      31
      ·
      1 year ago

      Everyone knows that debugging is twice as hard as writing a program in the first place. So if you’re as clever as you can be when you write it, how will you ever debug it?

      Brian Kernighan - The Elements of Programming Style, 2nd edition, chapter 2

    • Punkie@lemmy.world
      link
      fedilink
      arrow-up
      5
      arrow-down
      1
      ·
      1 year ago

      This right here. Plus stuff like “this is the functions section” and “this is the main script” helps make shell scripts more readable because functions have to come first, and if you just want to get to the main point, you can skip the functions section.