• oleorun@real.lemmy.fan
    link
    fedilink
    English
    arrow-up
    138
    ·
    11 months ago

    Reminds me of a comment I once came across in a work application’s code: “This function took forever to write correctly. It was hard work. I didn’t document it. Figure it out.”

    Of course the variables were not defined properly and were named esoterically.

  • clearleaf@lemmy.world
    link
    fedilink
    arrow-up
    99
    ·
    edit-2
    11 months ago

    I don’t understand how devs can be too lazy to write documentation but somehow they’d rather explain the same shit in discord over and over and over and over and over and over

    • RoyaltyInTraining@lemmy.world
      link
      fedilink
      arrow-up
      50
      ·
      11 months ago

      The help command is one of the first things I work on in any project. Even if I’m never gonna share it, my future self will appreciate it.

      • kurwa@lemmy.world
        link
        fedilink
        arrow-up
        9
        ·
        11 months ago

        Even on simple scripts, it’s so help to remind yourself however the hell you made it work.

    • peopleproblems@lemmy.world
      link
      fedilink
      arrow-up
      9
      ·
      11 months ago

      I think it’s loneliness, honestly.

      That and corporate work environment tends to rewards those that can explain stuff vocally ad nauseum.

    • hperrin@lemmy.world
      link
      fedilink
      arrow-up
      7
      ·
      11 months ago

      As someone who writes fairly extensive documentation, I can assure you that it doesn’t matter. People will still ask questions in your Discord that are answered in your documentation.

      I’ve learned that you kind of have to strike a balance between being terse enough that people will read it and verbose enough that it’s actually helpful, but there is a minimum number of questions you will always get.

    • Treczoks@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      11 months ago

      At work, I am one of the few who actually documents. Not only with Doxygen, but I also write real documents regarding all kinds of topics.

      Guess what? “I know you have this documented somewhere, but could you just quickly explain again how this common task works?”

  • Navigate@partizle.com
    link
    fedilink
    English
    arrow-up
    83
    ·
    edit-2
    11 months ago

    I was recently trying trying to get help on a clipboard program someone had recommended me, clipq. What I found instead was a GitHub discussion where the dev said “I’m not sure what you mean by ‘man’ pages” in response to someone asking for them. I think I need to find an alternative

  • qupada@kbin.social
    link
    fedilink
    arrow-up
    46
    ·
    11 months ago

    But also

    mysterytool --help
    mysterytool: unrecognized option: '-'

    ok then…

    mysterytool -h
    mysterytool: unrecognized option: 'h'

  • Aceticon@lemmy.world
    link
    fedilink
    arrow-up
    33
    ·
    edit-2
    11 months ago

    Programmers generally detest to do documentation, so when the user help “UI” is all down to a programmer to define this is often what you get, especially if it’s a small tool.

    • pomodoro_longbreak@sh.itjust.works
      link
      fedilink
      arrow-up
      15
      ·
      11 months ago

      Yeah this is shitty, and if you’re a programmer reading this and you agree with it, be better. There is no excuse for under-documenting a CLI.

      Even when I’m developing, I write out my usage text first, like -o [json,csv,pretty] specify output format (default 'pretty') [NOT IMPLEMENTED] or the like.

    • Aceticon@lemmy.world
      link
      fedilink
      arrow-up
      6
      ·
      edit-2
      11 months ago

      Speaking for myself a long time ago when I was younger and handsomer but dumber ;) some people at a certain stage of their lives have trouble remembering that what’s obvious for oneself given the context one is in and the information one has, is not obvious for others.

      I like to think most of us grow out of it.

    • taladar@sh.itjust.works
      link
      fedilink
      arrow-up
      5
      ·
      11 months ago

      If you use something like Rust’s clap --help output is very easy to add, all you need is basically a single line comment for each option.

      • Aceticon@lemmy.world
        link
        fedilink
        arrow-up
        15
        ·
        edit-2
        11 months ago

        Oh, you sweet summer child, there is no level of ease for the average programmer that will make him or her want to document things… ;)

        On a more serious note, good documentation for parameters in any tool that’s not stupidly simple tends to be more than a one liner if one doesn’t assume that the user already knows a ton of context (for example, imagine explaining “chmod” parameters with just one liners)

        • taladar@sh.itjust.works
          link
          fedilink
          arrow-up
          2
          ·
          11 months ago

          You can write more than one line but one line is usually enough for each of the options in the --help output. Obviously that doesn’t explain everything and especially not background like “how do unix permissions work” in your example but the --help output is not the correct place for that kind of information anyway.

          • Aceticon@lemmy.world
            link
            fedilink
            arrow-up
            2
            ·
            edit-2
            11 months ago

            The point is that a programmer would first need to think about what needs to be explained or not to the average user and then explain it properly, none of which is considered as interesting as coding.

            It’s not by chance that even tools with actual one line of explanation for each parameter are general of the badly documented kind (I especially like the ones were the “help” for a command doesn’t say what the bloody command actually does).

            I mean, you even see this kind of meaningless “documentation” in API documentation for widelly used libraries were the documentations is generated from comments embedded in the code: “public void doStuff(int height)” => “Does stuff. Parameters - height: the input height”.

            I might have put it in a humouristic way but this quite a well-known and widespread phenomenon.

      • hikaru755@feddit.de
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        11 months ago

        Even I myself am not gonna remember how to use my tool a couple months down the line, unless it’s something I use very regularly.

        Edit: noticed I read the comment I’m replying to wrong, reworded to make more sense

  • kshade@lemmy.world
    link
    fedilink
    English
    arrow-up
    25
    ·
    edit-2
    11 months ago

    strings `which mysterytool` | less

    Give up your darn secrets before I start fumbling around with strace and get even more frustrated!

        • droans@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          11 months ago

          Do developers get hard-ons for using nonstandard flags?

          Use -h, --help. None of this “no hyphen” bullshit or using the plus sign or a different flag like --info

      • corsicanguppy@lemmy.ca
        link
        fedilink
        arrow-up
        2
        ·
        11 months ago

        -H is for “hell no just uninstall”

        Look, if they can’t stick to established convention and they’re not gnu (and thus magically excusably arrogant as fuck because #stallman), then you just know they’ll be somehow dragging in remote libraries or something equally as fuckwitted; so just remove it and live your life.

      • _dev_null@lemmy.zxcvn.xyz
        link
        fedilink
        arrow-up
        6
        ·
        11 months ago

        What if that returns just an alias?

        But really the best way would be first to try one’s distro manager to uninstall/purge the package. Unless it was just manually installed by the user.

        Oh, maybe that’s it! It only exists in ~/bin, and OP is having a psychotic break, is just now finding out about their split personality!