• switcheroo@lemmy.world
    link
    fedilink
    English
    arrow-up
    5
    ·
    1 hour ago

    I don’t care what happened, but I’m gonna take this opportunity to remind y’all to back up your shit. All those photos and writing and documents? Put em on a drive and put em in a fireproof container.

    Going to take my advice right now.

    • ErevanDB@lemmy.zip
      link
      fedilink
      English
      arrow-up
      1
      ·
      24 minutes ago

      Remember to make sure its on a format that will last, like M-Disc or Tape, and preferably have multiple copies in multiple locations!

  • AceFuzzLord@lemmy.zip
    link
    fedilink
    arrow-up
    25
    arrow-down
    1
    ·
    15 hours ago

    Instead of telling them to be careful, I vote we stop ever making articles about being careful and instead let these “developers” suffer the consequences of their own stupidity.

    • CarrotsHaveEars@lemmy.ml
      link
      fedilink
      arrow-up
      9
      ·
      12 hours ago

      Hey, mind your words! We were forced to use AI. There’s a fucking dashboard up there showing the correlation of token usage versus probability of getting fired next month! I fucking wish AI deletes all my files on the drive. That way, I can send out a complaint email to the IT department, and cc my manager and their managers, then refuse to work until they sort it out while getting paid as usual.

  • InFerNo@lemmy.ml
    link
    fedilink
    arrow-up
    9
    ·
    16 hours ago

    Great opportunity to test that backup restore procedure.

    They had a DRP, right?

  • toebert@piefed.social
    link
    fedilink
    English
    arrow-up
    182
    arrow-down
    1
    ·
    1 day ago

    Single person project with 55k files in it, not pushed to any remote.

    I’m gonna go ahead and assume nothing of value got lost here.

      • TootSweet@lemmy.worldM
        link
        fedilink
        English
        arrow-up
        22
        ·
        24 hours ago

        Right? I consider myself an avid coder on my time off and the biggest thing I’ve ever made on my own has half that many lines of code. Let alone files.

        • NotMyOldRedditName@lemmy.world
          link
          fedilink
          arrow-up
          4
          ·
          edit-2
          15 hours ago

          Its’s not that hard to get to that many lines once you consider imports might be the first 50-100 of a file. One of my UI files the imports are the first 180 lines almost all of them from the android sdk. At least in Android dev.

          Then with something like declarative UI frameworks, you might end up with something like 8 lines to show 1 thing of stylized text so it’s all formatted cleanly with localized text, let alone trying to position it anywhere.

          Like this example clickable text is 12 lines to function ignoring the actual imports for the UI element itself.

          Text(
            text = "Tap me!",  <--- add 2 extra lines for localizing it + importing it
            color = someTextColor,
            fontSize = 15.sp,
            modifier = Modifier
                .padding(16.dp)
                .clickable { println("Text clicked!") } <--- add 2 extra lines for localizing it + importing it
          )
          

          I have ~1000 localized strings in my app, so that’s 3000 lines right there just writing and importing them if they were only each used once.

          • TootSweet@lemmy.worldM
            link
            fedilink
            English
            arrow-up
            1
            ·
            3 hours ago

            Yeah, but the OP was about how many files there were in the project. And none of what you’ve mentioned here has any significant effect on how many files there would be in a project.

            Though I do think probably my style of coding probably results in fewer lines of imports than many coders. I tend to eschew dependencies fairly radically. “A little copying is better than a little dependency” and all that. And also, my language of choice is Go, which doesn’t allow importing individual things from a package the way, say, Java does. An import imports a package in Go. Just looking at that “biggest thing I’ve ever made”, the most imports I have in any one file in my entire codebase is 18.

            methodology
            for f in $(find . -iname '*.go') ; do grep '^ "' "${f}" | wc -l | tr -d '\n' ; echo ' ' "${f}" ; done | sort -n
            

            (Go syntax for imports generally adds a couple of lines in each file, so 18 imports would typically be 20 lines of code. And then there’s usually a blank line after that before other code starts. You know how it is.)

            And the total number of lines of just imports (including the two extra lines per import statement and blank line before other code starts) in my whole project is 1002 in a codebase that cloc calls 25693 lines and wc -l calls 28543 lines. So, like 3.37% to 3.351% of the codebase is imports. Oh, and the whole repo is 136 files.

            (Full disclosure, there’s a tiny bit of non-Go code in my project and I’m omitting all that in the above. A little HTML/JS/CSS here, a little GLSL there. And what I’m writing is a language, so I’ve got some code in my own language in the repo. Also, there’s no vendored code in my repo or anything, so every character of what I’m talking about above was at one point a keystroke on my keyboard.)

            • NotMyOldRedditName@lemmy.world
              link
              fedilink
              arrow-up
              2
              ·
              3 hours ago

              none of what you’ve mentioned here has any significant effect on how many files there would be in a project.

              That’s kind of moot since the person I replied to was talking about not even getting to half the LINES of code, hence my comment.

              • TootSweet@lemmy.worldM
                link
                fedilink
                English
                arrow-up
                1
                ·
                edit-2
                3 hours ago

                The person you replied to was me and the person who replied to you is also me (and I’m me… I think ;) ). But I think we’re talking past each other.

                My first post in this thread was making the point that 48,000 files in a single code repo is an outlandishly hugely ridiculous number of files and that is probably a good indication (so I was agreeing with the previous poster) that Claude wrote the vast majority of that code.

                As in “if the number of lines in my codebase is significantly less than that 48,000 number of files, how much more stark must be the difference between that 48,000 files the number of files in a repo built by a single normal-but-avid developer (like me)?” Like, if someone said “I ate 5 dozen eggs today” and you responded “holy shit, dude, I haven’t even had five single eggs today”.

                Nobody was talking about any particular number of lines being outlandishly large. Just the number of files in the repo in the OP being outlandishly large. And your post was about how the number of lines in a repo could be very large, which isn’t really relevant to anything I was saying.

                (Actually, it sounds like there were 55,000 files in the repo of which 48,000-ish were deleted. Either way. Huge number of files.)

                • NotMyOldRedditName@lemmy.world
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  2 hours ago

                  Right? I consider myself an avid coder on my time off and the biggest thing I’ve ever made on my own has half that many lines of code. Let alone files.

                  Dude wtf lol lol lol

                  the biggest thing I’ve ever made on my own has half that many lines of code.

                  You were making the comparison that even as a line count that was large. YOU.

    • 𝕸𝖔𝖘𝖘@infosec.pub
      link
      fedilink
      arrow-up
      5
      ·
      22 hours ago

      Those are rookie numbers…

      …when you create a for loop that writes to a unique (timestamped) file upon script completion, but accidentally forget to add an exit condition. I got nearly 100k files before I was able to force close the script.

    • CombatWombat@feddit.online
      link
      fedilink
      English
      arrow-up
      47
      arrow-down
      4
      ·
      1 day ago

      Funny story about those backups

      And because the damage extended to the .git project’s ‘objects,’ ‘refs’ and ‘logs’ folders, there was no way to recover the files and undo the catastrophe. The files were just gone in a puff of smoke.

      • criss_cross@lemmy.world
        link
        fedilink
        arrow-up
        82
        ·
        1 day ago

        No push to remote? If you’re working on something you care about you shouldn’t only have a local copy.

      • Jo Miran@lemmy.ml
        link
        fedilink
        arrow-up
        9
        ·
        1 day ago

        My backup scheme:

        Computer --> 3 different cloud drives and github.

        Also

        Computer --> Wyoming home NAS --> USB external drive (weekly), swapped out every year and the old one stored in a waterproof gunsafe in the basement.

        Wyoming home NAS --> Florida office NAS – > USB external drive (weekly)

        Wyoming home NAS --> Austin office NAS --> Tape (monthly) --> IronMountain for 7 years.

        If you are a single dev, all it takes is 14 USB sticks. 12 monthly backups and two for daily backups that you rotate weekly.

          • Jason2357@lemmy.ca
            link
            fedilink
            arrow-up
            2
            ·
            23 hours ago

            Theoretically, they need tl be re-written every few years at most. Read everything off, format and re-write. Checking for corruption would be adviasable when you do it.

          • Jo Miran@lemmy.ml
            link
            fedilink
            arrow-up
            3
            ·
            edit-2
            1 day ago

            If you mean USB sticks (thumb drives), I have a few 20 year old ones that I dust off from time to time when all I need is something small. Some have been in a drawer for years before I touched them again.

        • Wirlocke@lemmy.blahaj.zone
          link
          fedilink
          arrow-up
          1
          ·
          1 day ago

          My backup scheme is either Github or Google Drive, whatever I have uploaded in Discord DMs, and a snowballing pile of unorganized hoarded files, which One Day™ I will sort.

          • Jo Miran@lemmy.ml
            link
            fedilink
            arrow-up
            5
            ·
            1 day ago

            One thing you could do is buy the.largest external drive you can get on black friday sales. Then just copy everything in it. No sort. Just dump it all in there. Think of it like clearing the table unto a large garbage bag. Then unplug it, put it in the closet, and do it again whenever you remember.

            Even a mess like that is better than no backup at all.

        • redlemace@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          1 day ago

          Also

          Good thing you added that. I’m so old-school/paranoid that I must have ownership of and physical access to the backup media to be able to count them as a backup.

          • Jo Miran@lemmy.ml
            link
            fedilink
            arrow-up
            2
            ·
            1 day ago

            I’m about to kick off a full offline backup of my GOG library over the holidays because I need that physical backup.

      • redlemace@lemmy.world
        link
        fedilink
        arrow-up
        4
        ·
        1 day ago

        If you don’t include .git/ in your backup you simply have no backup.

        The .git folder is the heart of a Git repository. It is the hidden directory that Git uses to store all the information necessary for managing your project’s version control history. This folder is where Git keeps track of all the changes made to your files, allowing you to revert to previous versions, collaborate with others, and maintain a complete history of your project.

      • redlemace@lemmy.world
        link
        fedilink
        arrow-up
        7
        ·
        1 day ago

        That’s the new normal.

        Maybe for some but then i’m happy to be old-school. I can live with the fact not everyone can/wants to follow the 3-2-1 strategy but expect no sympathy if you have no backup’s at all

      • America@sh.itjust.works
        link
        fedilink
        arrow-up
        6
        ·
        1 day ago

        That’s ridiculous. Why wouldn’t you just set Claude to back everything up before it deletes everything? Checkmate, atheists