21

One guy left the company and left me nodeJS project to maintain. It has a file with just a few lines short of 1700 lines of code.

Comments
  • 3
    Wow. *blinks* Wow. They should've read Node.js Best Practices.

    inb4 "node js suxx!!!!!!11111111oneoneone"
  • 6
    We have several php files between 2000, and 4,000 lines :)
  • 6
    @sleek I have 1 class that's 10k lines long... keep up.
  • 2
    First file I worked on at my first job was a Google Maps integration with over 1500 lines of vue. Had to chug very many aspirins that day
  • 1
    A module class in our poject had 6000+ lines of JS. Plus another several thousands in helper classes.. And there isn't much that could be done about it, all of the logic simply required most of the data in the class..
  • 1
    I'm dealing with a jsp file with ~2500 LOC. You have my condolences.
  • 1
    I have several unity projects with one scene instead of one unity project with several scenes
  • 1
    Happy mantaining, here's your glass of coffee
  • 1
    I'm sad to say we have a few files like that, in varying languages.
  • 1
    Question for people, why do you split classes each in its own file?

    I usually group related classes in the same files (if it gets too big, I split it).

    I know in PHP there's autoload and stuff... but what about other languages?
  • 2
    @Quirinus
    makes it easier to manage,
    Everything to do with foo{} is in the foo.class
  • 2
    @C0D4 i guess. To me it's just a hassle having that many files. Thanks for the reply.
  • 3
    @Quirinus the more the merrier.
    If you break you're code apart enough and use namespaces then the file management becomes important, or just having autoloaders finding the class as they look for a file with the same name, unless you have a map somewhere for routing.

    for php you could have a single file that goes on forever with class after class, but most languages aren't as relaxed like php is, so getting into a more structured routine is going to be better long term if you start working with other languages.
  • 1
    Comparing the lines of bad classes seems to be like comparing dicksizes...
    Sooooo here is mine: Delphi class with 13k lines of one product disposition planning algorithm
Add Comment