As far as I know there are these;

  • Camel case = coolFileName
  • Snake case = cool_file_name
  • Kebab case = cool-file-name
  • Pascal case = CoolFileName
  • Dot notation = cool.file.name
  • Flat case = coolfilename
  • Screaming case = COOLFILENAME

Personally I prefer the kebab/dot conventions simply because they allow for easy “navigation” with (ctrl+arrow keys) between each part. What are your preferences when it comes to this? Did I miss any schemes?

  • gigachad@sh.itjust.works
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    10 months ago

    It depends a bit on the use case. I try to follow naming conventions within specific environments like Python. When just sorting some documents together, I usually do a mix of Kebab and snake case, where I split semantic parts with underscores and connect words with dashes like

    2024-08-30_author_document-name_other-important-info.ext

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

      This is exactly what I do. It lends itself to something like ‘prefix_specific-info_version’ which is both sortable and easy to read.

    • N0x0n@lemmy.ml
      link
      fedilink
      arrow-up
      0
      ·
      edit-2
      10 months ago

      Yeahh that’s the best IMO ! But I get most of the time stuck with some testOFtest001 files/directory… cause I’m lazy…

      But I always ALWAYS regret it afterward… :/

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

    I use flat case most of the time, but I also try to stick to single word files so there is no case to get in the way.

    I think for documents I might share like a PDF I’d use Pascal case.

    In a classroom or teaching setting I will sometimes use Kebab case as I find it is the least confusing and makes it extra clear where the word division is. Similarly I avoid Dot notation since it’s confusing for folks coming from a Windows world.

    And I would avoid Screaming because that’s just too loud anywhere.

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

    Kebab. Not my favorite visually speaking but I had RSI issues for a while and I’m still very focused on limiting keystrokes (no shift key needed with kebab).

  • gerdesj@lemmy.ml
    link
    fedilink
    English
    arrow-up
    0
    ·
    10 months ago

    I like to use my enterprise number and a UUID (all in lower case, for legibility). Here’s an example:

    .1.3.6.1.4.1.33230.0d456e46-67e6-11ef-9c92-7b175b3ab1f1
    
    

    Now you might say that the UUID is already globally unique or at least pretty unlikely to turn up anywhere else, so why bother prefixing it with more stuff? To that I say: “I need to be absolutely or at least reasonably sure … OK nearly sure”.

    Anyway, you maintain a database of these things and then attach documentation and meaning to them. An editor could abstract and hide that away.

    I started this post as a joke. Not sure anymore. Why get your knickers in a twist with naming conventions for variables and constants. Programming is already a whopping layer of abstraction from what the logic gates are up to, another one wont hurt!

  • GissaMittJobb@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    10 months ago

    General purpose: Kebab case

    But really, follow the conventions of what you’re working on. For example, I’d use pascal case when working on a Java/Kotlin project, and snake case when working on a Python project.

  • jjjalljs@ttrpg.network
    link
    fedilink
    arrow-up
    0
    ·
    10 months ago

    Snake case, usually. Some perhaps unfounded fear that something will blow up on a dash in a file name kicking around. Or I’ll do a weird typo/premature enter and part of the file name will be treated like a -flag of some sort.

  • ian@feddit.uk
    link
    fedilink
    English
    arrow-up
    0
    ·
    10 months ago

    This question just shows how messed up, and broken much of IT is.

  • Fizz@lemmy.nz
    link
    fedilink
    arrow-up
    0
    ·
    10 months ago

    25% Camel case, 25% Pascal and 50% of the time flatcase. It drives me insane when I try and autocomplete a folder only to realise it was Downloads instead of downloads. I keep telling myself i will go through and make it all flatcase but I put it off because i tell myself i will rebuild my computer next week every week.

    • Amroth@feddit.it
      link
      fedilink
      arrow-up
      0
      ·
      10 months ago

      I do the flatcase in my machines too, but it stopped being such big a nuisance to me when I moved to ZSH - it can autocomplete case-insensitively.

      • Fizz@lemmy.nz
        link
        fedilink
        arrow-up
        0
        ·
        10 months ago

        Is zsh a terminal or a language like bash? I don’t get what it is from reading descriptions

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

          Zsh is a shell like bash that supports shell scripting like bash (though with some syntactical differences). It’s a bit more like ksh than bash, but anyone familiar with bash will have no problems with zsh.

          You can check out oh-my-zsh for an accessible preconfigured version of it (though I’d suggest installing via your package manager rather than the script on their website). I like the jreese theme.

    • imecth@fedia.io
      link
      fedilink
      arrow-up
      0
      ·
      10 months ago

      Never thought about making the home folders flatcase, thanks, takes all of 2 minutes btw.
      If anybody else wants to do it, remember to edit ~/.config/user-dirs.dirs with your new flatcase folders.