35
Comments
  • 9
    that is indeed the worst advice I ever heard of ...
  • 3
    @gitpush can confirm
  • 8
    Just out of curiosity, when should you document your code then? If you have good code I don't see the need for documentation.
  • 3
    @simeg Documentation is good when done properly as it allows you to see at a glance what the function does without reading it.
  • 3
    @simeg Just imagine if you started using React but there was no documentation. It is after all written by good coders, right? Nobody would like to go through your code to understand how to use a function.
  • 1
    @floatright
    Something like head nail hit on.
    It depends on how a language/framework code style is set in said project

    @nblackburn
    Most of the time, the only comment I give to a function is it's dependency once I have to explain a function it's getting to big. This is my rule of thumb.
  • 1
    This is bad advice, don't listen to this guy.
  • 1
    @DarekGreenly I thought that was the point of wk66?
  • 1
    @nblackburn oooooh. Sorry, I'm kinda new here. Didn't know about those weekly stuff 🙇
  • 0
    @nblackburn Documentation easily becomes duplicated information that will eventually differ from the truth (the code) because someone will change the code but forget to change the documentation. That's why I don't think documentation by default is good, it's dangerous. By this I mean documentation in the code.

    @floatright The kind of documentation you are referring to will always be useful, of course. It's a framework we're talking about, not a function.
  • 1
    @simeg Any kind of documentation can fall out of sync, in any event it's down the developer to make sure what ever type they provide is current.
  • 1
    best approach: write code the way that it doesn't need documentation. then write documentation 😁
  • 0
Add Comment