• Speiser0@feddit.org
      link
      fedilink
      arrow-up
      20
      ·
      1 day ago

      Typical boring useless shit code. Using bad variable names, and in the end you just say “look, I can count to 10”.

      Before sorting: 8 6 1 10 5 9 3 2 4 7 Does it have a meaning? I don’t think so.

      • ChaoticNeutralCzech@feddit.org
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        13 hours ago

        So much “nerd” paraphernalia is BS… This one is ridiculous (one doesn’t get to “be a programmer” by sorting and collecting 10 personality traits as if they’re goals or achievements) but at least it shows varied syntax in the C language: the number of unique keywords is very high.

        To show you’re a nerd, don’t go with obvious “look, this is what I am” but use dogwhistles (Conway’s Game of Life or fractals can look like knitting patterns) or to be obvious, some things you personally like or made. Badge with your distro’s logo or mascot, code you actually wrote or its output, wearable blinkenlights project… Just be more focused on your interests than yourself.

      • Jayjader@jlai.lu
        link
        fedilink
        arrow-up
        6
        ·
        1 day ago

        Yeah, go big or go home with this kind of stuff. Give me some Linux kernel source code, maybe even some well-known RFC!

      • ChaoticNeutralCzech@feddit.org
        link
        fedilink
        English
        arrow-up
        7
        ·
        edit-2
        1 day ago

        You are correct, that is simplified. The whole line is

        int personality = sizeof(goals) / sizeof(goals[0]);
        

        To get the length of an array in C, it’s necessary to divide its memory footprint by the size of a single element!

        BTW you can see what appears to be ASCII in the background of that image. You can decode it if you’re bored.