Do comments slow the website & is it okay to add alot?

Hey! I have a question about comments. (link)

1/ Imagine you wrote A LOT of comments into your document. HTML, CSS, JSC, or any other. Will those comments take up any space or power of its server? :slight_smile: Will it slow down the website, for example?

2/ Can you please consider why you would not put comments into your docs? I’m an organized person, so I wonder if it’s okay to add comments to the doc to make it accessible (to me).

They’re ignored and not executed. From the lesson: " we can write comments in our code that the computer will ignore as our program runs. These comments exist just for human readers."
Comments are meant to clarify or document code–whether as a reminder to yourself or for someone else who will be looking at the code. They shouldn’t be extensive or redundant. You can research, “best practices for writing comments in code”.

I tend to follow this from the book, “The Elements of Programming Style”, which I think is still relevant:

  • "Make sure comments and code agree.
  • Don’t just echo the code with comments – make every comment count.
  • Don’t comment bad code – rewrite it."

Hello! Thank you for your reply, that makes sense. :slight_smile:

1 Like

Hey @vtekprchal4848387299, if you are sure @lisalisaj’s reply solves your problem, make sure to tick the Solution checkbox on the bottom right of his comment.

Peace out! :slightly_smiling_face: