23

personalproject C++ codebase:
- Clean code,
- 1 class per file,
- naming conventions
- comments .
- No more than 10 files per folder

Work C++ codebase:
- 22 classes per file.
- Classname not the same as file name
- weird variable names CmdStng
- All files in one source folder.
- Source control from 20 years ago

Me every time I cannot find anything I wondering why it is in a different file on line 3574 inside another class with an unrelated filename

Comments
  • 9
    I like all points in personal project except 10 files per folder. File tree should be defined by proper abstraction and logic handling, not constraints like this.
  • 3
    @myss I completely agree with you and thought the exact same when reading.
    In practice my folders don't contain more than 10 files. So not as a rule but as a result of good organisation it will probably stand. Never ever focus on it though.
  • 4
    Could be worse. Had a project based on interns from roughy ten years.
    All them just copied 100loc blocks, surrounded by an if-wrapper and in the else-part they pasted stuff with three lines changed.
    Turned out to be most valuable piece of software in the department (200ish people)
    Ended up with basically three files C# code with each having 4000 loc, basically one single ton pattern each, all static.
    Fuck me.
  • 2
    @myss It was a rough estimation the files are ordered in their own category and as soon as there are to many files to read at a glance, I mostly separate them again.
  • 1
    @dder what's a loc block?

    Edit: probably lines of code
  • 0
    Same here! ;-) Don't forget redundant code!
Add Comment