• Jankatarch@lemmy.world
      link
      fedilink
      arrow-up
      10
      ·
      10 months ago

      It doesn’t work the first time but you copy paste from the docs example instead of typing the example and it works now

      • Probius@sopuli.xyz
        link
        fedilink
        English
        arrow-up
        5
        ·
        10 months ago

        I’ve had times where I was going through my code and the docs code step by step to see where they logically differed and found that I was doing all the same things, but my code didn’t work and copy-pasting their code did. Make it make sense!

        • raspberriesareyummy@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          10 months ago

          Been there, found undefined behavior where there should not be any. Imagine a function that takes a bool param with the following code, but neither branch gets executed:

          if (b)
             doStuffForTrue();
          if (!b)
             doStuffForFalse();
          

          In a function that is passed an uninitialized bool parameter, in gcc compiler, both branches can get executed even when b is const. Reason: uninitialized bool in gcc can have values of a random integer, and while if(b) {} else ({} is guaranteed to execute only one branch, bool evaluations of a bool value take a “shortcut” that only has defined behavior with an initialized bool.

          Same code with an uninitialized integer works as expected, btw.

        • luciferofastora@feddit.org
          link
          fedilink
          arrow-up
          2
          ·
          10 months ago

          I had something similar to that with Power BI DAX where the same “intuitive” structure (a table definition) had different syntax for two similar purposes.

          The inline table constructor for a single column table is {value, value, ...}, with the column just named “value”. The constructor for a multi-column table is {(value, value, ...), (value, value, ...), ...}, and the columns are named “value1”, “value2” and so on.

          The function DATATABLE allows both specifying the column names and types for the data. The syntax for the data argument is {{value, value, ...}, ...}.

          If you can spot the difference, you will have figured out why simply transplanting my constructor into a DATATABLE didn’t work, but copying an example and replacing the values one by one did. It took me way too long.

          Maybe you just missed some nuance your brain skipped over?

  • NeatNit@discuss.tchncs.de
    link
    fedilink
    arrow-up
    22
    ·
    10 months ago

    The funniest thing to me is that any good manual would just say “DO NOT USE SOCKS AND FLIP FLOPS SIMULTANEOUSLY”

  • JasonDJ@lemmy.zip
    link
    fedilink
    arrow-up
    13
    ·
    10 months ago

    Then you look back at your notes a couple years later and you’re like “I still don’t understand wtf I did it that way”.

  • Croquette@sh.itjust.works
    link
    fedilink
    arrow-up
    12
    ·
    10 months ago

    The documentation is usually dog shit.

    The corporate culture does not allow appropriate time for the documentation as it is considered something that cost money without a quantifiable gain.

    It permeates in the FOSS space as well since writing good documentation is a skill and it is not fostered in corporations. So devs start great projects with terrible documentation.

    • raspberriesareyummy@lemmy.world
      link
      fedilink
      arrow-up
      5
      ·
      10 months ago

      One way to contribute to FOSS is to improve bad documentation. You are correct, of course, and lazy devs write bad code if they do not cultivate good documentation - imho.

    • ChogChog@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      10 months ago

      Does anyone know of any good resources on writing good documentation? It’s a thing I’m weirdly passionate about and absolutely want to get better at for my own sanity and for others as well if I can contribute.

      But it seems like it’s a very under discussed subject…

      Veronica Explains has a really good video talking about how much of a dead skill it is now from the standards it used to be.

    • Agent641@lemmy.world
      link
      fedilink
      arrow-up
      4
      ·
      10 months ago

      Reconfabulate the tridepodictaphone by nabulizing the fromgulan with kreevus. If stufingus brawes, then hyfangle the natriuminutaur.

      Basic 17th year psycoders can do this.

  • Brkdncr@lemmy.world
    link
    fedilink
    arrow-up
    9
    ·
    edit-2
    10 months ago

    It amazes me to see people do everything except 1) rtfm or 2) contact the support line that’s already paid for.

    Edit: apparently my coworkers are in this thread.

  • Goretantath@lemmy.world
    link
    fedilink
    arrow-up
    4
    ·
    10 months ago

    I mean, thats how i learned to use a computer, was moms so the manual was gone by the time i used it anyway.

  • Owl@mander.xyz
    link
    fedilink
    arrow-up
    3
    ·
    10 months ago

    Joke’s on you, the docs don’t exist or are so outdated that they don’t even compile

  • Dew@feddit.nl
    link
    fedilink
    arrow-up
    3
    ·
    10 months ago

    I enjoy it more to figure out on my own. Kinda like disassembling stuff to see how it works and then put it back together. Reading the manual is like copying answers

    • marlowe221@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      10 months ago

      Beat me to it.

      What’s the meme for when the documentation is two years out of date?

      Or when the documentation IS up to date… but the last 4 versions of the docs are still online and look exactly like the new version with no obvious sign of which version they are? (Looking at you, Microsoft)

  • Safeguard@beehaw.org
    link
    fedilink
    arrow-up
    1
    ·
    10 months ago

    And thereby learning more about what the program can do then the original dev even knew it could.

    This is a weird picture of that important process though.