• @Hazzia@discuss.tchncs.de
    link
    fedilink
    01 year ago

    Can’t remember which is which but if it’s organized in a top-down way (broad category first) that’s just easier to look at and find stuff in the file system. I don’t want to have to actually read and mentally process the names of every single file to figure out if it’s the one I need. Sure, the “human readable” names are fine and good when you don’t have hundreds of them you’re trying to look through, but big projects I find are way easier to parse with the category naming.

    • @ooterness@lemmy.world
      link
      fedilink
      English
      01 year ago

      US Army logistics catalogs are organized this way. “Cookies, oatmeal” instead of “Oatmeal cookies” because it’s a lot easier to find what you need an a giant alphabetical list.

    • BlanketsWithSmallpox
      link
      fedilink
      English
      01 year ago

      How any large organization gets away with not using YYYY-MM-DD format is beyond me.

      Taking over some of my previous directors files is like chaos.

      How anybody publishing entire internet memos without a date being on the first page is beyond me. Like wtf am I reading a PDF from 15 years ago or last month?

  • @sparkle@lemm.ee
    link
    fedilink
    Cymraeg
    0
    edit-2
    1 year ago

    in general, adjectives and verbs after nouns because it’s more organized/easier to search/filter. as god intended.

  • @rekabis@lemmy.ca
    link
    fedilink
    01 year ago

    There is a reason why little endian is preferred in virtually 100% of cases: sorting. Mentally or lexicographically, having the most important piece of information first will allow the correct item be found the fastest, or allow it to be discounted/ignored the quickest.

    • @Static_Rocket@lemmy.world
      link
      fedilink
      English
      01 year ago

      But also, sorting big endian automatically groups elements associated with common functions making search, completions, and snippets easier (if you use them). I’m torn

    • @33550336@lemmy.world
      link
      fedilink
      01 year ago

      I was going to write something like this. You actually wrote about semantic order, but syntactically it is as much important e.g. it is easier to sort dates such as 2024-05-27 than 27.05.2024 in chronological order.

    • @deadbeef79000@lemmy.nz
      link
      fedilink
      01 year ago

      That’s actually filtering not sorting.

      Tha being said, it’s more valuable (to me) to be able to find all my things for a topic quickly rather than type.

      Foo_dialog

      Foo_action

      Foo_map

      Bar_dialog

      Bar_action

      Bar_map

      Is superior IMHO.

      • redfellow
        link
        fedilink
        01 year ago

        I put all those in different files

        compont/functions/foo.ext etc.

      • @rekabis@lemmy.ca
        link
        fedilink
        01 year ago

        If you are looking for Bar, it is highly likely that you are already looking specifically for a particular functionality - say, the action - for Bar. As such, it is irrelevant which method you use, both will get you to the function you need.

        Conversely, while it is likely you will want to look up all items that implement a particular functionality, it is much less likely you are going to ever need a complete listing of all functionality that an item employs; you will be targeting only one functionality for that item and will have that one functionality as the primary and concrete focus. Ergo, functionality comes first, followed by what item has that functionality.

        • @deadbeef79000@lemmy.nz
          link
          fedilink
          0
          edit-2
          1 year ago

          We probably have slightly different work processes.

          I’m more likely to be making “foo” functionally complete and then making “bar” complete than I am to be making all my dialogs functional then all my tabs/whatever.

          This comes from TDD where I’m making a test pass for “foo”, once done, I’ll do the same for “bar”.

          Though it’s even more likely these are different files entirely, rendering the arguments moot.

    • Your team needs to have a coding standards meeting where you can describe the pros and cons of each approach. You guys shouldn’t be wasting time during PR reviews on the same argument. When that happens to me, it just feels like such a waste of time.

        • @locuester@lemmy.zip
          link
          fedilink
          English
          01 year ago

          Agreed. This type of fun is good for the team. Trying to stamp it out, when it impacts very little, is just a buzzkill to the team.

      • @evatronic@lemm.ee
        link
        fedilink
        English
        01 year ago

        Preachin to the choir, friend. I’d get worked up about it but I’m paid the same regardless of how upset I get.

  • @jarfil@beehaw.org
    link
    fedilink
    0
    edit-2
    1 year ago

    Both:

    dialog_error = Dialog_plain.create_modal(error_text)
    

    Variable and class names go from more general to more particular, functions begin with a verb.

    Global functions are either “main”, or start with one of “debug”, “todo”, or “shit”.

  • @roon@lemmy.ml
    link
    fedilink
    English
    01 year ago

    Powershell has a lint warning for functions that don’t follow Verb-Noun format, and verbs here are a list of approved verbs lol

    • @nexussapphire@lemm.ee
      link
      fedilink
      English
      01 year ago

      Been learning to program and I’m refusing to use an lsp for the time being. I’m bad about using abbreviated names when I have to type over and over again(no auto complete). I’m at least using descriptive names for functions I use less than four times.