Jump to content

Documenting code or not


Guest LoSboccacc

Recommended Posts

lol - great point there ::)

i usually try to keep my code as self-explanatory as i possibly can - then i still use comments to remind myself (and whomever dares read my stuff) of what i was thinking when i wrote a particular bit

i too dislike seeing people use comments INSTEAD of writing proper code.... that\'s the 'crutch' he was talking about :P

so yeah, much agreed - one should write code as if there were no such thing as comments - but then, promptly remind oneself that there IS, and use it to clarify ones ideas further, add notes and/or format things to a more readable state

can\'t go wrong with that :thumbup:

Link to comment
Share on other sites

I just do my best to make sure my variables are well named. I see the comments as a good way to convey intent. Its one thing to know what the code says, and another entirely to know why the code is doing what it does.

// Determines whether the user would like a slice of cake, using the boolean - UserWantsCake
If( UserWantsCake)
{
give(Cake);
}
else
{
Debug.Log('The Cake is a lie');
}

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...