(written by lawrence krubner, however indented passages are often quotes). You can contact lawrence at: lawrence@krubner.com, or follow me on Twitter.

I’ve never written a file with 11,000 lines of code, but I have often built Clojure projects like this, with everything in one file. I think I might have once had a file with 4,000 lines of code. Maybe 5,000? A complete system might be 5 apps, working together, each made of one large file. It does help with some things. Especially if I try to on-board another programmer, if they don’t know Clojure very well, using one file means they don’t ever get tripped up by name spaces, instead, they just open one file, and then they can load it into the REPL and start working. I would not recommend this style for every project, but it does offer a kind of simplicity for the projects I work on.

But it is always fun to read about some crazy project like this:

Now, I had never used VBScript before (and haven’t since then), but many variables appeared to be unused. The names were indecipherable. Synonyms were littered throughout.

Something I found hilarious is that a variable might be used on lines 200-210 and then again on line 8544. No where else.

Much of the logic appeared redundant. Probably copy and pasted at some point then later diverged. Like, how many times does the user need to be authenticated in one code file? Once I dared to clean this up and reuse the authentication response, but it broke everything. I never figured out why. To this day I sometimes lie in bed wondering what could have caused this.

There was no version control. The only context about code changes was in the bug tracker and in the code comments, though I learned the hard way to not trust those.

There was no test environment. If I made a change, I had to test it in “production”. All of the program’s state was based on the user’s privileges so we would impersonate whoever reported the bug such that we could see what they saw.

There were no unit tests. If I made a change that caused some other “feature” to break, there was essentially a 0% chance I would know about it until a week later when Jeff in marketing would report a bug.

Post external references

  1. 1
    https://austinhenley.com/blog/11000lines.html
Source