When I began my first internship after graduating from engineering school, everyone kept saying how important documentation was for coding. I could...
For further actions, you may consider blocking this person and/or reporting abuse
I also heard how important documentation is, but after working professionally, I realized not many codebases are extensively documented because most companies prioritize speed. Teams seem to prefer to utilize types and comprehensive tests rather than spending time on writing long documentation which is hard to maintain as the codebase changes.
Yes indeed! Documentation is not always possible and even in a few cases not feasible as well. But in case of collaboration, if we have to onboard a new member or we have to work on the same feature, the documentation does increase the speed of the development. There are always trade-offs in selecting things we do in a project.
Agreed, even a little documentation is always better than no documentation
Within my teams, we've been a big fan of Architecture Decision Records (ADRs).
There is also good tooling for their creation / maintenance.
For us it severed two important purposes:
Maybe doesn't work for all teams, but I would encourage researching it.
Documentation is the failure to use good explanatory names. IMHO
Yes indeed. Good names do play a role in us understanding the code better. Requirement of documentation might not be required in every case as well. But when there is complex logic in the system, I believe that having documentation is more beneficial.
I only partly agree to this.
For me the crucial part of documentation is why it has been implemented in the way it was; if not obvious. That typically cannot be realized with proper names.
you implement the documentation and then you never update it
Code never lies. documentation always lie
There are other type of documentation that might not be related to coding directly but rather important, you might have:
As of coding documentation, you might have an HTTP API documentation, a doc. about a collection of events in a microsevices architecture or a collection of custom events in a micro front-end architecture.
Yes, indeed there is other documentation not relating to coding directly for a project which has an even bigger role. Even in coding itself, there might have been more points that I might have missed. Thank you for sharing the points.
Thank you so much 😁
Did i miss something? The function in your example returns a boolean which indicates if the given number is prime or not.
Instead of commenting the obvious, you forgot the important ones. E.g. preconditions like that n must be positive.
Your function will return true for any negative number which is not dividable by 2.
Is the flaw in your
primeNumber
function intentional?Actually no, Thank you for pointing it out. I had noticed it before but forgot to fix it.
In my country is not exist internship, stay employed or unemployed.