top 99 comments

sorted by: hot top controversial new old
[–] 205 points 1 month ago (27 children)

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.

  • source
  • hideshow 27 child comments
  • [–] 60 points 1 month ago (16 children)

    A single developer with that many files? Those are clearly AI generated, so not their work anyways. 🤷‍♂️

  • source
  • parent
  • hideshow 16 child comments
  • [–] 27 points 1 month ago* (12 children)

    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.

  • source
  • parent
  • hideshow 12 child comments
  • [–] 5 points 1 month ago* (last edited 1 month ago) (11 children)

    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.

  • source
  • parent
  • hideshow 11 child comments
  • [–] 3 points 1 month ago (10 children)

    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.)

  • source
  • parent
  • hideshow 10 child comments
  • [–] 2 points 1 month ago* (6 children)

    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.

  • source
  • parent
  • hideshow 6 child comments
  • [–] 1 point 1 month ago* (last edited 1 month ago) (5 children)

    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.)

  • source
  • parent
  • hideshow 5 child comments
  • [–] 1 point 1 month ago* (4 children)

    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.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 2 points 1 month ago (3 children)

    You missed the italics/emphasas. "The biggest thing I've ever made on my own has HALF that many LINES of code. Let alone FILES." I wasn't claiming that was a lot of lines of code to have in a repo. I was claiming that was a normal amount (for a largest repo made by a single "avid" coder).

  • source
  • parent
  • hideshow 3 child comments
  • [–] -1 points 1 month ago* (2 children)

    You're literally claiming that to your 25k lines of code is a lot of code as you're comparing it to the other number. I'm sorry you can't see it. I haven't even made something with that many lines == that's a lot of lines.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 1 month ago (1 child)

    I'm claiming the 48,000-file project mentioned in the OP must have a "lot" (a major understatement) of lines, yes. Just as the hypothetical "you" who said "I haven't even had five single eggs today" in one of my previous posts was claiming that the five dozen eggs the other person had eaten that day was a "lot" of eggs to eat in a single day. But the hypothetical "you" wasn't claiming that the fewer than "five single eggs" "you" had eaten was an unreasonable amount to eat in a day. In the same way, I'm saying that 25,000 lines of code isn't a suspiciously large amount that might lead one to believe it was almost entirely vibe-coded slop.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 2 points 1 month ago (2 children)

    So I was actually curious, my main module which is the vast majority of my code is 80k lines of which 10k are imports.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 3 points 1 month ago (2 children)

    Probably depends on what you’re building with.

    I’ve seen c# projects with an insane number of files, all boilerplate. The one language where I can dig through thousands of files without finding where the app is actually coded

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 1 month ago (1 child)

    I'm developing for a fairly large open source project in C#. The language does not actively minimize boiler plate, sure. But what you describe sounds like a fault with the devs and not with the language.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 2 points 1 month ago*

    Could be. I’m a build engineer so need to know enough about every language to build it. Luckily I was able to drop that as “will not support” (we’re mostly a Java shop, with Python, nodejs, and a few less common choices)

  • source
  • parent
  • [–] 23 points 1 month ago (3 children)

    What in the world even needs 55k files

  • source
  • parent
  • hideshow 3 child comments
  • [–] 7 points 1 month ago (3 children)

    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.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 5 points 1 month ago (2 children)

    You should upload them all to github so they waste their resources scraping them as training data

  • source
  • parent
  • hideshow 2 child comments
  • [–] 3 points 1 month ago (1 child)

    Damn. That's a really good idea! They've been long deleted. I bet I can recreate this on purpose, though lol

  • source
  • parent
  • hideshow 1 child comment
  • [–] 2 points 1 month ago*

    Yeah and just automate your pipeline so it constantly uploads to github while it's running, and only keeps like the most recent 99 locally and deletes the rest as it goes. But make it look like an "agentic AI" is doing it so you can externalize your liability (like all the big tech companies do!

    You might get blocked pretty quickly, but if you catch them while the microsoft is sleeping then you might be able to succeed

  • source
  • parent
  • [–] 69 points 1 month ago (11 children)

    So a vibecoder lost their slop?

  • source
  • hideshow 11 child comments
  • [–] 16 points 1 month ago (10 children)

    A vibecoder who doesn’t use git

  • source
  • parent
  • hideshow 10 child comments
  • [–] 11 points 1 month ago (9 children)

    They did. But if you delete your local .git repository, that won't save you.

  • source
  • parent
  • hideshow 9 child comments
  • [–] 4 points 1 month ago (6 children)

    Just pull from your forge then.

  • source
  • parent
  • hideshow 6 child comments
  • [–] 5 points 1 month ago (5 children)

    Which system calls a remote a forge?

  • source
  • parent
  • hideshow 5 child comments
  • [–] 2 points 1 month ago (3 children)

    Sometimes the remote is a forge. You don't need to have a forge to have a remote, so my wording was unnecessary specific. Gitlab, Gitea, Forgejo, Sourcehut are forges.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 113 points 1 month ago (33 children)

    That's on you then. Restore from backup and accept having lost a day's work.

  • source
  • hideshow 33 child comments
  • [–] 17 points 1 month ago (3 children)

    I have no backup, and I must scream!

    That's the new normal.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 6 points 1 month 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

  • source
  • parent
  • [–] 47 points 1 month ago (28 children)

    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.

  • source
  • parent
  • hideshow 28 child comments
  • [–] 86 points 1 month ago (16 children)

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

  • source
  • parent
  • hideshow 16 child comments
  • [–] 61 points 1 month ago (2 children)

    Backups are for smart people. Not who we're dealing with here.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 6 points 1 month ago (4 children)

    Maybe I'm old fashioned, but I feel like programming tools shouldn't blow away your checked in changes, even if you haven't pushed yet. You do you, though.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 8 points 1 month ago* (3 children)

    A power surge or some other force majeure could though. Push your shit off site.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 2 points 1 month ago (3 children)

    I learned about thst that one day…

  • source
  • parent
  • hideshow 3 child comments
  • [–] 3 points 1 month ago* (2 children)

    I learned the hard way

    I was going to the high school of hard knocks when they offered me a scholarship to the college of hard knocks, I TOOK IT!

  • source
  • parent
  • hideshow 2 child comments
  • [–] 10 points 1 month ago (7 children)

    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.

  • source
  • parent
  • hideshow 7 child comments
  • [–] 2 points 1 month ago (2 children)

    Just for my sanity, do you have to power up usb drives every so often or they corrupt?

  • source
  • parent
  • hideshow 2 child comments
  • [–] 3 points 1 month ago* (last edited 1 month 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.

  • source
  • parent
  • [–] 1 point 1 month ago (1 child)

    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.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 6 points 1 month 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.

  • source
  • parent
  • [–] 4 points 1 month 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.

  • source
  • parent
  • [–] 36 points 1 month ago (11 children)

    Also a lesson in version control

  • source
  • hideshow 11 child comments
  • [–] 18 points 1 month ago (10 children)

    Right? I don't get this. Run your ai in sandbox, and don't give it git access. Worst case you can stash a change.

  • source
  • parent
  • hideshow 10 child comments
  • [–] 7 points 1 month ago (8 children)

    Run your ai in sandbox, and don’t give it git access.

    Enough break-in reports of AI these days ..... I would not rely on a sandbox. Air-gapped.

  • source
  • parent
  • hideshow 8 child comments
  • [–] 7 points 1 month ago (6 children)

    Wasn't that usually just improper sandboxing as well?

  • source
  • parent
  • hideshow 6 child comments
  • [–] 2 points 1 month ago (3 children)

    How much do you trust your own ability to properly sandbox?

  • source
  • parent
  • hideshow 3 child comments
  • [–] 3 points 1 month ago*

    I mean, all those "AI ESCAPED CONTAMENTED!!!" are prolly only for hype...IIRC OpenAI said they gained internet access but how would they do it if the machine has no internet access?? Did they use a computer with a motherboard that has a wifi antenna and the password on a text file?

  • source
  • parent
  • [–] 32 points 1 month ago (4 children)

    Don’t understand why anyone would give an agent control over anything.

  • source
  • hideshow 4 child comments
  • [–] 1 point 1 month ago*

    I had this question before, until I used IDE in agent mode (my company pushes us to use it).

    And the way those agents are designed is that when I ask it do do something it eventually will want to invoke some commands.

    Yes, it shows what the command will be, but it is doing it frequently and you either have option to accept, reject or accept all (stupid decision, but perhaps some get inpatient).

    Then Claude also sometimes creates a script and runs that. It still shows the file name, so I can still look it up from another terminal. It is annoying, but ok.

    But then I got to point where Claude asked me to run python that took the script from stdin, and there was no way for me to see what it was. Of course I noped out and rejected it, but I can see someone else might not realize that this invocation is dangerous. And I think if you use it every day and do nothin than vibe coding the "accept all" button might seem very appealing.

    This whole thing is going crazy, recently my company suggested that reviews are bottleneck and maybe we don't need to do reviews instead use unit and functional tests (also created by copilot, LOL).

    This is really shitty time for people that prided themselves in producing quality code.

  • source
  • parent
  • [–] 29 points 1 month ago (7 children)

    There are developers who still don’t use source control?

  • source
  • hideshow 7 child comments
  • [–] 1 point 1 month ago (2 children)
  • load more comments
    view more: next ›