8
avneesh
8y

Just use proper variable name and class architecture and header file and viola you don't need documentation.
In the worst case to understand class heirchy use the graphviz of doxygen and you are done.

Comments
  • 0
    I heartily disagree. That's probably good enough for a small project only you will ever work on that you work on more than twice a year. But for new people, there is no point forcing them to decipher code to understand the architecture of the project when they could just read a explaining it.
  • 0
    @kian let me tell u a real story. In my current company when I joined I was new. They gave me a code base of 400MB including builds. That had thousand of file and they didn't have any documentation. It took me 2 days to decipher the entire code by using visual studio debug mode(step into F10 F11 F12). Though it was difficult, I also ranted initially but when I thought imagine the time and resources if company have wasted for one new employee who could have not understood the code. It's enormous. Plus I got the experience of deciphering any code. Now throw me any code how big it may be. Don't need any documentation...
    Also if you are thinking its a small project then let me specify you there are contract employees from 3 different companies along with domestic employee working on the code base. All without documentation.
  • 0
    In my view, that's 2 days that could be spent more productively had there been documentation. It is a good skill to be able to understand code that other people have written but a more efficient solution would be to at least get a high level overview first. The amount of resources you need for basic docs for development is not a lot. You don't need to specify every function, but an explanation of how the system is architectured overall can save time - that could be 10-15 minutes of writing.

    Do you think there is something you gain from not having docs?
  • 0
    @kian that's why I said if you really need to visualize everything you just need to use the right names for function and use graph viz to see the class hierchy. That's sufficient enough according to me.. And self explanatory...
  • 0
    @avneesh But just like a recipe, reading the ingredients list (function/variable names) doesn't necessarily tell you how they're used or what part they have in the process
  • 0
    @kian Hahaha.. Okay man.. 😀😀
  • 1
    Read Uncle Bob's clean architecture. Your code should be descriptive enough to say what it does.
Add Comment