Keep in mind the org stuff makes that config file look much bigger than it really is.
Though, 186 does sound surprisingly low if this is truly just 186 lines applied to vanilla Emacs.
My bindings file is a little over 200 (one binding per line). custom-set-variables block is 170.
Total across a few files is around 3-4k. But some of that is config code, patches/modified versions of functions from other packages and simple wrappers. It accrues rather easily. Actual original code that does something non-trivial is probably below 1k.
Much depend on what you call "program", in "scripting" terms I've written very many, countless, most buggy limited wrapper but very useful time-savers, an example (witch was derived by many others similar, I can't remember them all, this is my version) http://ix.io/3Vbk like this I have around 20+ in use, some written years ago and left almost untouched, some evolved. In "config-as-programs" terms my Emacs config, witch is actually an elisp program is around 4800 lines, my NixOS config, witch is in Nix language, so another program, is a bit more than 1500 SLoC etc. If you means large WebApps, GUIs etc no, I've write some small GUIs and very few WebUIs for some relatives/friends but not for my own personal use...
We have an in-house configuration system that generates configurations for about ~14k heterogeneously configured applications (1-3x 3-20 line config file per app) and that system is has about 451k lines in it.
Of course not all lines are code. About 140k lines are flat file database of configurations, and the other ~300k lines is code/templates.
300k lines of code to manage 14k applications. lol.
------------------
Actually did a more thorough analysis cleaning out comments and what not. The database is more manageable ~86k lines and template generation code is around ~47k lines. There's a crap ton of whitespace and comments.
It's 10 lines here, 10 lines there. But they're not really 10 - in practice that's going to be 100 once you get past the most trivial use case and add good error handling. Then there are tests to make sure it works. Once you write all of those bits you need properly and start sharing it with your next web app and add some generalisation/config... you've created half a custom framework.
So, somewhat long lines, but not unreasonably huge.
For me, working on a nasty legacy codebase with 10-15k LOC classes - VS Code is slow enough with syntax highlighting that I pretty much need to use something else.
Not that much. Sorry if it sounded like a snide remark. I just thought the number was big and was trying to understand what those 80 modules of 10000 lines would be.
For comparison, Python 2.7.4 seems to have 400K lines of Python code.
Actually, it's just about 800MB of source code with 150MB of external dependencies. I never counted the lines of code until today but apparently just for the main language there are over 9 MLOC.
Of course, this doesn't actually matter as I don't touch most of the code and the "recently active" part seems to measure only about 275 KLOC. But when a bug arrives it might take me anywhere; even so, I don't think I've visited more than 35% of the codebase.
Some numbers: there are ~120kloc of Elisp in Emacs proper. I have nearly 500kloc of Elisp in my `.emacs.d`. Granted, some of it are reimplementations and wrappers around what is in the core, and some are plugins I downloaded, tried out and forgot to delete, but still, that's a huge amount of code. That's 136 man-years, according to sloccount:
Total Physical Source Lines of Code (SLOC) = 499,088
Development Effort Estimate, Person-Years (Person-Months) = 136.18 (1,634.17)
(Basic COCOMO model, Person-Months = 2.4 * (KSLOC**1.05))
Schedule Estimate, Years (Months) = 3.47 (41.59)
(Basic COCOMO model, Months = 2.5 * (person-months**0.38))
Estimated Average Number of Developers (Effort/Schedule) = 39.29
Total Estimated Cost to Develop = $ 18,396,178
(average salary = $56,286/year, overhead = 2.40).
SLOCCount, Copyright (C) 2001-2004 David A. Wheeler
A typical well-designed class will usually be a few hundred lines of code, tops. Often less than 100 lines.
9k classes * 100-300 == 900k-2.7m LOC
Not TOO crazy for the most complete standard library ever developed, for a language meant from the beginning to take over enterprise business computing.
How many LOC are in whatever meme language is hype this year? Hell, I feel like I see nearly that many lines of console output, when I run NPM to pull in dependencies, lol.
The size of a code file doesn’t matter. What matters is the amount of state the code in the file manipulates. For example, a 100k line code file with 500 pure functions not using any global state is fine. It is simple. However a 100k line code file with 500 functions that all manipulate 1000+ global variables is extremely complex and hard to maintain because of the undocumented global state invariants and hidden side effects.
Really interesting story, approximately how many lines of code were in that codebase?
It's hard for me to imagine someone grokking a 10M+ line codebase without external help, but I've never tried it. I do agree with the assertion that most codebases are not as _special_ as they like to think.
Though, 186 does sound surprisingly low if this is truly just 186 lines applied to vanilla Emacs.
My bindings file is a little over 200 (one binding per line). custom-set-variables block is 170. Total across a few files is around 3-4k. But some of that is config code, patches/modified versions of functions from other packages and simple wrappers. It accrues rather easily. Actual original code that does something non-trivial is probably below 1k.
reply