That beats the 1000 lines inside a single if {} block that I once found. (The conditional in that if {} always evaluated to true).
Lol, reminds me of the meme: var a = true; if(a == true) then return true; else if(a == false) then return false; Or something like that.
A project with a single 11,000-line code file
51–60 of 346 posts
Re: A project with a single 11,000-line code file
#52So afraid to write bad, spaghetti code, I ended up writing no code at all. This thread made me realize that it's better to have a working profitable project with bad code, than a perfect unfinished project, with meticulously chosen design patterns. Afraid of being judged for bad code, I could not start until I had the right architecture. I'm glad I read this. This is developers therapy.
You sound like you should read this: [removed] apparently jwz decided not to be linked from here :/ there's an archive.org link below.
Re: A project with a single 11,000-line code file
#53But the moral of the story in the article is that unfortunately some things break much less easily than we'd like.
Re: A project with a single 11,000-line code file
#54Re: A project with a single 11,000-line code file
#55So very many editors just couldn't open it.
Some would use so much memory that the system would either freeze, or the OS would kill them.
Some would silently truncate at 65,535 lines.
Some would produce a load error.
Some would pop up with an error indicating the developer thought it was an unreachable state. e.g. "If you're seeing this error... Call me. And tell me how the fuck you broke it."
Others would manage to open it, but were completely unuseable. Where moving the cursor would take literal minutes.
There were exactly three editors I found at the time that worked (none of which were graphical editors). And they worked without any increased latency, letting you know that the developers just thought through what they were doing: vim, emacs, nano.
(A few details because people are probably curious - the vast majority of that single file project was taxation formulae. It was National Mutual's repository of all tax calculations for every jurisdiction that they worked in, internationally, for the entire several hundred years of the company. They just transcribed all their tax calculation records into COBOL.)
Re: A project with a single 11,000-line code file
#56All software projects should be a single, self-contained file.
Re: A project with a single 11,000-line code file
#57It really speaks to the state of software engineering when there are ample comments here defending this practice. This is virtually indefensible in my book, as it screams technical debt and strongly suggests that there are much deeper issues hiding in that codebase. Personally I would not be willing to work on it without first addressing those issues.
Re: A project with a single 11,000-line code file
#58Earlier quoted context omitted.
You sound like you should read this: [removed] apparently jwz decided not to be linked from here :/ there's an archive.org link below.
Heads up: jwz.org redirects Hacker News visitors (via "Referer") to an image of a slightly-hairy testicle sitting inside an egg cup. So maybe don't click the link at work.
Re: A project with a single 11,000-line code file
#59Better one good organized file than 100s of folders and subfolders and files and symlinks. I have worked on projects where even after 2 years I didn't grasp the folder structure and just used search to locate files.