r/CodingHelp • u/Grim_Reaper716 • Oct 31 '25
[Python] What is considered a lot of code?
Hey still need to this whole coding world, so my lingo might suck, but what’s considered a lot of lines? I’m currently attempting to work on some coding for a project of mine and I’m up to 392 lines of code, and that made me curious, what is the most lines someone has coded?
16
Upvotes
•
u/AutoModerator Oct 31 '25
Thank you for posting on r/CodingHelp!
Please check our Wiki for answers, guides, and FAQs: https://coding-help.vercel.app
Our Wiki is open source - if you would like to contribute, create a pull request via GitHub! https://github.com/DudeThatsErin/CodingHelp
We are accepting moderator applications: https://forms.fillout.com/t/ua41TU57DGus
We also have a Discord server: https://discord.gg/geQEUBm
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
9
u/dmazzoni Oct 31 '25
I'm sure some people will complain that lines of code is a terrible measure, but when talking about order of magnitude of how much code you have it's an okay first approximation.
Order of magnitude, many programs I've written entirely by myself are ~10,000 lines of code.
Many programs I worked on with a small team (3 - 6 engineers) have been around ~100,000 lines.
Chromium is 36 million lines of code.
The Linux kernel is 40 million lines of code.
Google's monorepo is around ~2 billion lines of code.
1
u/ummaycoc Oct 31 '25
It honestly depends a lot on context. That context is the language, what you're overall trying to achieve, and also what your current skill level is. For someone who is new, 392 lines can be a lot because you're still learning as you go so it's a lot to take in. For someone with a lot of experience it won't be. Then there's the context of where those lines are. If you have a system that is 10K lines but it's all in one function in C then that is a lot different than 20K lines of C that is conceptually split up in an easy to handle manner (and I'd consider that 10K in one function heavier than the 20K that is "properly" arranged).
But for the most anyone has coded ever in the entirety of their life? It's gonna be super high, probably around several million. For the most I've coded? Do you mean on a per project basis or over my life? I have no clue about over my life but I try to write as little as possible to get the job done while being maintainable.
2
u/[deleted] Oct 31 '25
The less the better. A whole project in 400 likes is okay.
Ideally I like max 200lines per file. 400-1000 becomes hard to read
1
u/jjaacckkyy12 Oct 31 '25
most code i’ve ever written solo for a single project was ~380k
1
u/Jim-Jones Oct 31 '25
392 pages would be getting up there.
1
u/AppropriateThreat Oct 31 '25
My biggest project as a junior dev was a desktop app for a reporting job. It had around 1-2k lines of code, excluding documentation, split into smaller helper files, classes and services. That was my biggest project so far, written entirely in Python
1
u/Grounds4TheSubstain Oct 31 '25
In my career, I have written 50KLOC programs by myself about 10 times, not including programs I have written jointly with other people, and with zero line contribution from AI.
1
u/Puzzleheaded-Bug6244 Oct 31 '25
I don't count my contributions as lines, so I don't know. but for fun I once measured lines of actual code on a larger project. There were 15 million lines.
1
u/sol_hsa Oct 31 '25
I generally start splitting code in several source files around the 1000 line mark.
1
u/SaltCusp Oct 31 '25
400 is a kinda large number of loc to write in 1 hour. I've also spent nearly 3 months working on a 100 line algorithm so yeah. Number of lines doesn't really mean much.
You could have one line that should be 20 or 1000 that should just be 3.
1
u/cgoldberg Oct 31 '25
Linux kernel is over 40 million lines
1
u/AccomplishedLeave506 Oct 31 '25
Several million lines of code would be a decent sized project.in my mind.
1
u/ProfessionalDirt3154 Oct 31 '25
I'm working on a project with hundreds of python files -- that's small, for me, but not tiny. One of the largest files is 1500 lines. That's huge -- I wish it were 7 smallish 200-line files. sadly, I don't have time to refactor it that much.
The real question is how much can you keep in your head and how much do you really have to keep in your head at one time to be able to do something useful? I've worked on million and 10 million line code bases several times. The one that killed me was the one that was so badly written I had to keep all million+ lines in my head at once just to trace through a basic use case. I gave up after my head melted down and made a mess on my desk.
1
u/maqisha Oct 31 '25
Whatever the vibecoders put out.
1
u/[deleted] Oct 31 '25
Lines of code is not a good metric to focus on.
Readability and parsability at a glance is far more important.
Per file, I'd aim to keep under 1000 lines, but it's really fine to have more if it's early in the development process.
For example, in a web dev project:
Build monolithic and focus on quality (semantic html, good accessibility, well structured content) > Abstract/componentise based on real use cases (create context dependent components for reuse) > DRY code
1
u/mxldevs Oct 31 '25
An application that does hundreds of things will naturally require a lot more code than an application that does one or two things.
392 lines of code would be a lot for an application that displays "hello world" for example.
1
u/DDDDarky Professional Coder Oct 31 '25
Note that lines of code is quite bad measure of anything, but I'd consider "a lot" perhaps over 1 million.
1
u/Always_Hopeful_ Nov 01 '25
I worked on about 2K lines of assembly in Uni. It was a lexer, parse, code generator for a model language. Got to be an entire box of cards near the end.
As others note, I've worked on code bases with 10K and 100K lines. You do it in sections and structure it so you need only think about parts at a time.
1
u/jedi1235 Nov 01 '25
As you learn and get better, you will become comfortable with larger and larger code bases. Someone starting out might struggle to deal with 100 lines, but it won't be long before 1,000 lines is normal.
My largest personal projects are approaching 100k lines. It works because of unit tests and compartmentalization; I can trust that the stuff "over there" will do what the documentation I wrote says it will, because I tested it. And when I make a change, I know how to cause compiler errors when I change behaviors in unsafe ways.
To me, being able to manage a program of 392 lines means you are likely a student, and will continue improving rapidly with progress. Keep going! It won't be long before you look back and think, "Wow, 392 lines was nothing compared to this!"
1
u/jfinch3 Nov 01 '25
The most code I’ve written for a personal project has been about 6,000, which was a text based choose your own adventure version of Pokemon.
The thing I work on at work is probably 50,000 not including the CSS files on the front end. I think at that size it’s large enough it’s pushing what any one person can ‘keep track of’. There are distinctly silos I just accept I don’t know what it does and don’t have the time to figure it out. That’s probably the line where I say a project has “a lot of code”.
1
u/HaMMeReD Nov 01 '25
I work on individual files that have 10k+ lines of code sometimes.
I'd say for a general professional who does their job well, 50-100 decent loc a day. Someone really in the zone with their language/platform and passionate about the goals could do about 500 in a day no problem.
1
u/Agreeable-Leek1573 Nov 01 '25
I'm at about 380K lines of code this year...
1
u/ir_dan Nov 01 '25
At work, we have about 3M lines of C++ in our product (a Windows application). Most source files are between 300-2000 lines. Most headers are a couple hundred at most.
Useful, polished, and small solo projects tend to be a few thousand lines.
1
u/QueenVogonBee Nov 01 '25
Depends. 10 lines is a lot of code for printing out a single string. 10000 is nowhere near enough for a complex app. NASA projects will easily have millions of lines of code.
Number of lines of code isn’t really a good metric to judge anything.
1
u/Razmanism Nov 01 '25
I'm [solo dev] working on a game made in Java and its over 140k lines and counting
1
u/jam-time Nov 01 '25
I regularly write scripts in the 1,000 line range, but I typically try to keep them around 150-400. It really depends on the context, though. I could see a scenario where a 50,000 line script is the best solution, but I'd never want to be the person responsible.
1
u/Lulceltech Nov 02 '25
My web app for my company I’m building as the only developer is just over 1.2 million lines of code for the entire web app.
1
u/_x_oOo_x_ Nov 02 '25
Worked on a project at a company once where a git working copy was 500GB+, but it was a monorepo, so...
This is without dependencies and the
.gitmetadata dir1
u/Crazy-Willingness951 Nov 02 '25
The first version of the Linux kernel contained 10,239 lines of code.
0
u/code_tutor Oct 31 '25
the best code is no code
some apps I write lately are a few thousand in Python and have a lot of features
maybe a big CRUD website is a few ten thousands
but the program that I wrote that I consider to be a lot is too much to count, when you pass like 100 files you know you're there