26

why does everyone always give me backtalk when i want to make my files smaller and more readable

"no you should put your scripts, style and template all in one file, theres no need to put it separate"

alright while we are at it, lets just write the entire project in 1 single file

Comments
  • 11
    If only there was a way to write all of those in 0 files
  • 15
    @asgs you could type everything in one Line in the command line and pipe it into the compiler
  • 1
    Because the average react/php/aspnet/servlet programmer can't cognate indirection
  • 4
    I've been trying to get my lead to understand that recently. He wants to cram everything into one file for all his projects. I just refactored a 3000 line shit show of a project for him because he asked me to do some maintenance on it and I couldn't look at the project without internally bleeding. It's just us two at the company now, I've been slowly introducing him to more oop practices, I hope he eventually gets what I'm putting down, he's in the end not a bad guy, just doesn't understand how not to build everything in one file.
  • 0
    I'll be honest, I think you *should* have one file for a component. Spreading it across multiple files doesn't really improve readability imo.
  • 0
    @rjedlin I think there's a time and place for both approaches of designing the applications, splitting up into tiny components and retaining the larger components.

    Like if I'm working on a piece of code where it requires me to json an object and then place it in a file, and the file management side had some complexities that dealt more with file stuff, like maybe I had to flush buffers after a write and had to manage streams and what not.

    It would be helpful to separate out the file management into its own file/class so that the overall functionality just basically says "json the object, then append that json string onto the file".

    At least this is how I try to split up some of my work and programs when I'm working on them.
Add Comment