Learn something new every day.
- I am a senior software engineer working in industry, teaching and writing on software design, SOLID principles, DDD and TDD.
Location
Buenos Aires
Education
Computer Science Degree at Universidad de Buenos Aires
Tech Lead/Team Lead. Senior WebDev.
Intermediate Grade on Computer Systems-
High Grade on Web Application Development-
MBA (+Marketing+HHRR).
Studied a bit of law, economics and design
Location
Spain
Education
Higher Level Education Certificate on Web Application Development
I also find tests necessary but tests and doc cover two different things.
Documentation is to provide ease to use for developers while tests "explain" behaviour. You also can add documentation inside your tests and point to the issue or whatever.
On the other hand, there are ways (linter, CR) to ensure both that people add doc plus that they update the doc along changes in functions/methods.
If we're talking about a different kind of documentation (wiki) then yes, this -almost- never ends well.
Learn something new every day.
- I am a senior software engineer working in industry, teaching and writing on software design, SOLID principles, DDD and TDD.
Location
Buenos Aires
Education
Computer Science Degree at Universidad de Buenos Aires
In My code reviews, I usually remove Doc documentation since they bring no value and are in danger of obsolence. No documentation is better than useless documentation
Tech Lead/Team Lead. Senior WebDev.
Intermediate Grade on Computer Systems-
High Grade on Web Application Development-
MBA (+Marketing+HHRR).
Studied a bit of law, economics and design
Location
Spain
Education
Higher Level Education Certificate on Web Application Development
Learn something new every day.
- I am a senior software engineer working in industry, teaching and writing on software design, SOLID principles, DDD and TDD.
Location
Buenos Aires
Education
Computer Science Degree at Universidad de Buenos Aires
ussually I just don't remove it. I write a self documenting test instead.
Then I remove th comment before it gets obsolete
Maintenance is granted as long as you have automated tests.
You can add a bunch of documentation and yet bring zero maintenance value since developers don't read documentation. But if they break a test, they will have inmediate feedback
Tech Lead/Team Lead. Senior WebDev.
Intermediate Grade on Computer Systems-
High Grade on Web Application Development-
MBA (+Marketing+HHRR).
Studied a bit of law, economics and design
Location
Spain
Education
Higher Level Education Certificate on Web Application Development
Well, it depends on the environment/language till certain point but as I already said, documentation can be enforced through lints or any other tool and you'll get feedback for sure. check this as example.
On the other side, tests should not don't apply to every single function you have. Tests are meant to ensure behaviour (public interface) while documentation in functions is meant to add information to the implementation details.
That's the reason I said both are not exclusive neither they are replaceable between each other.
No Documentation is worse IMO, but I do think there some stale examples in the wild that are so egregious, it would be better if people didn’t stumble upon those docs.
Stale docs are annoying but if the documentation has a contributor workflow, then they can be quickly updated. No docs require more work to correct.
Smiling person, father of two, Husband, Senior Developer/Architect (in that exact order, it's important)
Experience in development since 2004
Linux user and advocate since 2001
Have a documentation with 2 articles about the same thing. And each of them make you think a part of it is right, but your have to go deep dive the code. To understand it's even worst that you think.
If the differences between the documentation and reality are minor, stale documentation may still help. But that’s often not the case, so then it’s misleading and you’re maybe better of with no documentation at all.
Where possible, I prefer Living Documentation directly connected to automated tests, or generated from production code.
In my opinion, having no documentation is much worse than having outdated documentation. It is possible to extract a point from the old document, but without the document it will be very difficult. However, sometimes old documents are also misleading. Especially if they are not updated. But it is better than having no documents.
Smiling person, father of two, Husband, Senior Developer/Architect (in that exact order, it's important)
Experience in development since 2004
Linux user and advocate since 2001
Welcome to our profile. We are a video game marketing agency. We provide professional SEO and marketing services for the gaming industry. Please visit our website.
I am an OpenEdge (aka Progress) developer that loves clean code and good looking applications that are easy to use. My main pet project is the Progress DataDigger
Documantation is always obsolete
Write good tests instead
Documentation lie, Tests can't lie
Documentation is dead, tests are alive
I also find tests necessary but tests and doc cover two different things.
Documentation is to provide ease to use for developers while tests "explain" behaviour. You also can add documentation inside your tests and point to the issue or whatever.
On the other hand, there are ways (linter, CR) to ensure both that people add doc plus that they update the doc along changes in functions/methods.
If we're talking about a different kind of documentation (wiki) then yes, this -almost- never ends well.
In My code reviews, I usually remove Doc documentation since they bring no value and are in danger of obsolence. No documentation is better than useless documentation
see
Code Smell 05 - Comment Abusers
Maxi Contieri ・ Oct 24 '20 ・ 2 min read
and
Code Smell 146 - Getter Comments
Maxi Contieri ・ Jul 2 ・ 2 min read
So instead enforcing the documentation and keeping it up to date you prefer to remove it... What can go wrong.
It may not bring "value" but it speeds up future developments and maintenance for sure 🤷🏻♀️
ussually I just don't remove it. I write a self documenting test instead.
Then I remove th comment before it gets obsolete
Maintenance is granted as long as you have automated tests.
You can add a bunch of documentation and yet bring zero maintenance value since developers don't read documentation. But if they break a test, they will have inmediate feedback
Well, it depends on the environment/language till certain point but as I already said, documentation can be enforced through lints or any other tool and you'll get feedback for sure.
check this as example.
On the other side, tests
should notdon't apply to every single function you have. Tests are meant to ensure behaviour (public interface) while documentation in functions is meant to add information to the implementation details.That's the reason I said both are not exclusive neither they are replaceable between each other.
No Documentation is worse IMO, but I do think there some stale examples in the wild that are so egregious, it would be better if people didn’t stumble upon those docs.
Stale docs are annoying but if the documentation has a contributor workflow, then they can be quickly updated. No docs require more work to correct.
Have a documentation with 2 articles about the same thing. And each of them make you think a part of it is right, but your have to go deep dive the code. To understand it's even worst that you think.
Here I'm talking by experience.
If the differences between the documentation and reality are minor, stale documentation may still help. But that’s often not the case, so then it’s misleading and you’re maybe better of with no documentation at all.
Where possible, I prefer Living Documentation directly connected to automated tests, or generated from production code.
Depends on what kind of stale.
Stale as in missing information, incomplete, but accurate for what little it does describe? Great! --- I want more but I'll take what is there.
Stale as in wrong? Nobody wants that!
In my opinion, having no documentation is much worse than having outdated documentation. It is possible to extract a point from the old document, but without the document it will be very difficult. However, sometimes old documents are also misleading. Especially if they are not updated. But it is better than having no documents.
stale documentation because it gives wrong expectations
No documentation. With stale documentation i have at least clues where to look.
I depend on what is the documenation about.
If it's about code, then I prefer to have nothing, but also the time needed to understand the code, code is almost always self explanatory.
But then, if you have nothing and what were looking for is about either:
Think about a service that make external calls to a black box. Or a client that calls an old APIs you have. Having a contact name is priceless.
In such cases, I always prefer to have a walking dead documentation than nothing, because the code cannot help me.
Both
I don't know what's worse. Ideally, the site is up-to-date in all respects.
Show don't tell
Working examples are always better than explanation. If you're too lazy to write a test case, example code can act as a smoke test too.
Defensively, with no docs, at least you know exactly what you have
Worse is when my tummy hurts
I'll go with stale documentation. If you try to understand from zero its still better than understand it wrong.