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

    Many years ago I had to try to debug a memory manager written by a really talented software engineer, with an interesting take on naming things…

    • He referred to blocks of memory as “cookies”.

    • He had a temporary variable named “handy” because it was handy to have around.

    • He had a second temporary variable that referenced the first one that he called “son_of_handy”.

    • If corruption was detected in a block of memory then it would set the flag “shit_cookie_corrupt”.

    • If too many cookies were corrupt then the system would halt by calling the function “oh_shit_oh_shit_oh_shit”.

  • palordrolap@kbin.social
    link
    fedilink
    arrow-up
    1
    ·
    10 months ago

    U nd to rembr tht mny snr devs grw up prgrmng on old hrdwr tht ddn’t hv mch mmry & oftn th lang ony allwd shrt var nms anywy. Also thy wr th gen of txtspk fr smlr rsns.

    Yngr snr devs pckd up bd hbts frm tht gen.

    And here’s a sentence that’s not squashed to cleanse your palettes / give a sigh of relief because I figure if I need a break from typing like that, you need a break from reading it.

    Nmng thngs s hrd.

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

    Hey, sometimes we put a little effort into our acronyms. I published a component named UTI and it was too late to change it by the time management caught on.

  • Pxtl@lemmy.ca
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    10 months ago

    Also, can somebody explain this to sysadmins when it comes to naming computers?

    I mean programmers can have some weird naming conventions, but I’ve never met an adult professional programmer who named all his variables after planets or Harry Potter characters or just called everything stuff like ADMUTIL6 or PBLAB03T1 or PBPCD1602.

    • lauha@lemmy.one
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      10 months ago

      Pros use computer names like

      Server
      newerserver
      newnewerserver
      latestserver
      Newlatestserver

    • Luvon@beehaw.org
      link
      fedilink
      English
      arrow-up
      0
      ·
      10 months ago

      Character limits and a stupid badly used Hungarian notation to waste limited characters to tell use what the ide already knows.

      If you have a table, (that’s an array for sane programmers) name the variable as a plural and we will know it’s a table.

      Don’t name two variables the same stupid abbreviation with different Hungarian notation characters stuck to the front