For most of college, I’ve kept it simple: I’d create a directory in my home folder for each project, then eventually move older or inactive ones into ~/programming/. When I change devices or hit file size limits, I’ll compress and send things to my NAS.

This setup has worked pretty well so far. But now that I’m graduating and my projects keep stacking up, I’m starting to wonder if there’s a more efficient system out there.

Curious—how do you all organize and store your projects? Any tips or methodologies that have made your lives easier over time?

The only person I’ve talked to about this is my mentor who’s been programming since the 60s (started on the IBM 1620 and Bendix G15) and he just mostly keeps projects in directories in his home directory and uses his godly regular expressions skills to find things that way. Makes me wonder if I’m overthinking it…

  • nous@programming.dev
    link
    fedilink
    English
    arrow-up
    5
    ·
    15 days ago

    When I change devices or hit file size limits, I’ll compress and send things to my NAS.

    Whaaatt!?!!? That sounds like you don’t use git? You should use git. It is a requirement for basically any job and there is no reason to not use it on every project. Then you can keep your projects on a server somewhere, on your NAS if you want else something like github/gitlab/bitbucket etc. That way it does not really matter about your local projects, only what is on the remote and with decent backups of that you don’t need to constantly archive things from your local machine.

    • crimsonpoodle@pawb.socialOP
      link
      fedilink
      arrow-up
      0
      ·
      14 days ago

      Yeah I think a local Git server would be good, will try our forgejo since people seem to like it— I’ve been using git for a lot of projects but not so much for large files and HW stuff since when using GitHub there are size limitations. Does seem like it would be freeing to be able to delete whatever I want from my workstation without worrying about losing stuff

      • deathmetal27@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        14 days ago

        Size limitations? In git?

        What is the average size of your source code files?

        Normally you’d never run out of space in git unless you’re committing large binary files.

  • moreeni
    link
    fedilink
    arrow-up
    2
    ·
    14 days ago

    I have a dedicated directory with subdirectories for each project and that’s it

  • faultypidgeon@programming.dev
    link
    fedilink
    arrow-up
    1
    ·
    14 days ago

    I push every project I work on right away to my gitea instance. If I expect not to work on something for some time I just delete the local copy.

    When I change devices or hit file size limits, I’ll compress and send things to my NAS.

    Well, that sounds inconvenient.

  • MXX53@programming.dev
    link
    fedilink
    arrow-up
    1
    ·
    13 days ago

    I have a folder for my projects on root and within those projects I have my GitHub repos all contained within their own directory named the same as the project.

    If I am learning something, I have a folder for the topic I am learning, and a logseq file with all of my notes. Then I have folders for my book references, one for video or audio references, and then a folder for my practice projects.

  • TimeSquirrel@kbin.melroy.org
    link
    fedilink
    arrow-up
    1
    ·
    14 days ago

    As an addition to your post, I’m also in the process of learning C/C++, and I’m curious also how others arrange their actual project files and include directories. Like, for example, if there’s a bunch of classes having to do with UI elements, do you just group them each under their own file all in their own directory? I’ve also seen projects where everything was just thrown into the top level directory, both headers and implementation files together in a giant pile of source files.

  • Matt@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    14 days ago

    Whatever Cargo generates for me. If I use workspaces, then I put the subprojects to the root of the directory.

  • Dragonish@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    0
    ·
    14 days ago

    Hosting my own git server on my NAS made my life easier and better due to the new freedoms it offers. Backups are centralized, and I have all the space i need to keep any interesting code safe. I am using forgjeo now and highly recommend it. You can also use other front ends (or none and just ssh/filesystem) but forgjeo gives me artifacts (ie docker registry), code search, LFS, and more. With my own git server, my local filesystem only has what I am working on recently (or as my workstation space allows). My home folder has a folder for each version control system (git, pijul, svn). Inside of these i have 2 sub folders: <domain>/<repo name>

    Some examples of different domains are: open, work, personal, dragonish. I do not separate what forge or remote service in the filesystem, this is a persona boundary.

    I use git remote names and branches in each repo to handle what software forge and any upstream/maintainers i need to work with. As an example my work repos only get pushed to my work server (ie, only 1 git remote named origin set to my work’s server), but my open ones will go to forgjeo and github (i setup 2 git remotes, origin and github. origin in this domain goes to my forgjeo). If i have a need i go into some more git branching strategy which I do find has helped me over my life, but I think I am overthinking this post now! keep it all simple enough for what your needs are.

  • vinnymac@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    15 days ago

    Similar question was recently asked here

    Generally what I’ve seen work well in my career and is consistent across thousands of devs I’ve worked with: ~/[whateverFolderNameYouWillRemember]/[organization]/[project]

    I recommend when it comes to finding things to just use a fuzzy finder, such as fzf.

    • fool@programming.dev
      link
      fedilink
      arrow-up
      1
      ·
      15 days ago

      Building on this, I recommend zoxide instead of only fzfing or regexping.

      For people who like to keep everything they ever create, like college students, you can use z 18.04/1 to get to a directory like ~/hw/random-school/fresh-1/analysis-18.04/pset1.

      Lets you nest without fear.

      (Also, about your question: I’ve personally used ~/git/<projname>/ and ~/git/<org>/<projname> at the same time – e.g. ~/git/aur/fuzzel-git)

  • qaz@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    14 days ago

    I used to be put everything in ~/Programming at the top level. I later started grouping projects by type (JVM, Web etc.) in subfolders because it was getting hard to find things. This was synced with Nextcloud. However, I then at some point passed 2 million files (200GB) in said folder and decided to search for a better solution.

    I ended up using a selfhosted Forgejo instance. It allows for easy code searching across all projects, tagging projects by topic and language, LFS, and has useful project management tools built-in.

    • UnRelatedBurner@sh.itjust.works
      link
      fedilink
      arrow-up
      0
      ·
      13 days ago

      I’ve seen a lot of talk about large file sizes. How can you realistically reach 200GB in text? That’s around 2*10^11 characters. Or do you guys store something else as well, like sqls of data or pictures/textures/models?

      • qaz@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        13 days ago

        It consisted of tensors weights, datasets (which can reach several gigabytes), images, 3d models, and roughly 250+ programming projects with binaries, git without LFS and also a lot build files.

        Nextcloud was able to sync it all, but syncing was getting so slow that I had to keep my new laptop running for almost an entire day to get all synced to it. It also wasn’t that great at excluding certain folders (like build cache folders or NPM package files), you would have to set up exclusions on each device separately. Another problem with Nextcloud sync was that it would sometimes duplicate projects after had been moved in a subfolder.