• Omgpwnies@lemmy.world
    link
    fedilink
    English
    arrow-up
    11
    ·
    11 个月前

    Break it up into functions with names that describe what it does, then the script becomes basically a sequence of function calls and is easier to read and troubleshoot.

    • 1984@lemmy.today
      link
      fedilink
      arrow-up
      8
      ·
      edit-2
      11 个月前

      Yeah I dont know why people dont do this. Then an overall description of the script at the top is enough and anyone can just look at function names to see what is going on.

    • jkercher@programming.dev
      link
      fedilink
      English
      arrow-up
      2
      ·
      11 个月前

      I’m on your side dude. Comments rot. Some are useless. Don’t even get me started on doxygen comments.