Why Does My Professor Require So Much Documentation for Simple Functions?

0
3
Asked By CodeTraveler42 On

I just finished writing 80 lines of documentation for a function that's only 10 lines long! My professor typically focuses on preparing us for industry standards, which makes it confusing that she's insisting on such extensive documentation. Is this typical, or am I missing the point behind such rigorous documentation for something like a class header function?

1 Answer

Answered By DocuMatic99 On

It really depends on the function and what it's doing. Your professor might be trying to help you understand how documentation benefits code quality. In an actual job, clear documentation helps others, or even your future self, understand the logic behind the code without digging through it.

CuriousCoder88 -

Exactly! When you inherit someone else's code with no documentation, it can be a nightmare trying to enhance or fix it. It's better to over-communicate initially so others can follow along.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.