A project with a single 11,000-line code file
austinhenley.com
A project with a single 11,000-line code file
1–10 of 346 posts
Re: A project with a single 11,000-line code file
#2Someone had a good idea to make a header.jsp template for common header stuff.
But it was hilarious. The file essentially became a giant if-else condition with a few hundred conditions like "if path == 'some_page'" followed by CSS and sometimes JavaScript for that page.
Absolutely horrendous.
Re: A project with a single 11,000-line code file
#3Re: A project with a single 11,000-line code file
#4Re: A project with a single 11,000-line code file
#5Re: A project with a single 11,000-line code file
#6Re: A project with a single 11,000-line code file
#7If this app was factored into 300 different files, it would still be an impossible mess. The redundant and buggy logic would just be in different files.
Re: A project with a single 11,000-line code file
#8When I was finally able to retire the project several years later, I first replaced the home page with this picture: http://2.bp.blogspot.com/-6OWKZqvvPh8/UjBJ6xPxwjI/AAAAAAAAOv...
Re: A project with a single 11,000-line code file
#9(The conditional in that if {} always evaluated to true).
Re: A project with a single 11,000-line code file
#10The number of lines in a file doesn't necessarily mean anything. SQLite is compiled as a single file: https://www.sqlite.org/amalgamation.html . It depends on the structure that is in that file. If this app was factored into 300 different files, it would still be an impossible mess. The redundant and buggy logic would just be in different files.