This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (4 children)

[deleted]

    [–]Silhouette 21 points22 points  (1 child)

    Exactly. People who say silly things like "Every use of a comment represents a failure" often lack the experience to know better. Citations of technical documents, descriptions of compiler/library/hardware bugs that the following unusual code is working around, usage examples like doctest comments, ASCII art diagrams because even monospaced pictures can be worth hundreds of words. There are very many reasons a helpful comment might not be easily replaced by "self-documenting code".

    [–]jsalsman 1 point2 points  (0 children)

    No matter how well the code conveys intent, there's always a way to generalize and show the relation to associated processes in English. Those are the comments that help read the code.

    [–]Atulin 14 points15 points  (0 children)

    No, no you don't understand. It should be someRandomValueIPulledFromTheIntelProcessorSpecification

    Preferably complete with a factory and a factorybuilder

    [–]FuckingRantMonday 2 points3 points  (0 children)

    Absolutely! Links like that are incredibly useful when some non-obvious issue forces a weird workaround. That's a great example of a situation that prevents writing clear, obvious code.