Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
TeachMeCode5175334dIt’s good that you are, it really helps to ramp up new people who join the team. As long as it doesn’t give away too many implementation details which can change frequently
-
Lensflare17468334dIt depends. When I don’t know in advance how the structure will look like, then I don’t add any comments because they will need to be rewritten completely after that part of the code is done.
If it’s trivial or if I already have a good idea of what it will look like, I write the documentation right at the beginning.
The most important thing is to not write useless documentation if the code is sufficient and to write self documenting code instead. Explicit documentation should be rare. -
porksausages170334dit's objectively a bad choice, but very very normal. 100% of the places i've ever worked at deliberately do this while simultaneously lamenting that there's no documentation for any of their code. what can you do, people are stupid.
-
Demolishun35044334d@Lensflare
"Explicit documentation should be rare."
// increment me
me++;
// increment me harder
me += 10; -
CodingTripledad173333dBasically what @jestdotty and @lensflare said. If it's small, you can start right away and then document when you know where you're going to. If it's bigger, at least draw a basic design to know how stuff will interact.
What you should always do and I really mean always: if you're using some crazy logic, you should always (repeat: always) and instantly document what you're doing cause even your future me will have trouble sometimes. Document it as if you had to explain it to an idiot or you will hate yourself if you ever have to work on it again. Plus: others will hate you even more :p -
devdiddydog1486333dAim for agile development. You can't document shit before you've gone through some iterations, and documentation is usually outdated the second you save it.
Let your code speak for itself, aided by some overview documentation that shows concepts and a birdseye view of what you're building. -
lotd7775333dWell yes, especially when time is off the essence due to deadlines.
Deliver first & ask questions.
Also do designs & docs later. -
workabit155332dGood devs document their code on the go, this is why i use sublime text and not the shitty VScode.
But, yes, sadly people document AFTER writing code which is counter productive and time consuming. AND ONLY IF THEY DO IT AT ALL !
Related Rants
Is it normal for developers to have to code first to design and not document what they did until they are completely done? I usually write basic docs before starting and progress it throughout the development process.
question
developer
dev
documentation
development