Page 1 of 2

Comment terminology

Posted: Sat Jun 13, 2009 4:32 pm
by Ollie Saunders
Haven't been here for ages. Hi everyone! I've got a terminology question:

When a piece of code is commented we say just that, it's "commented out".
But when it's not commented out, what is that?

Uncommented isn't quite the same. Active?
It's definitely not commented in.

Re: Comment terminology

Posted: Sat Jun 13, 2009 6:30 pm
by alex.barylski
Non-commented lines of code are commonly refered to as SLOC (source lines of code).

Comments and white space are not source code...

Re: Comment terminology

Posted: Sun Jun 14, 2009 10:43 am
by Weirdan
I'd say executable/non-executable lines. Unreachable code (usually referred to as dead code) is effectively commented as well

Re: Comment terminology

Posted: Sun Jun 14, 2009 1:26 pm
by Christopher
Ollie Saunders wrote:When a piece of code is commented we say just that, it's "commented out".
But when it's not commented out, what is that?
Uh ... maybe I am missing something, but isn't code that is not commented out called ... code.

Re: Comment terminology

Posted: Sun Jun 14, 2009 1:44 pm
by kaisellgren
arborint wrote:
Ollie Saunders wrote:When a piece of code is commented we say just that, it's "commented out".
But when it's not commented out, what is that?
Uh ... maybe I am missing something, but isn't code that is not commented out called ... code.
I think he thought that

Code: Select all

// $commented_code = true;
is code, too, but in a "commented out" form and that he is asking for the "non-commented out" term, which is not "code", because they both are code.

I'm not sure if I agree with such terms, but it seems that's what he meant.

Re: Comment terminology

Posted: Sun Jun 14, 2009 2:15 pm
by Ollie Saunders
I defined a new term to get around the problem.

Commented-out-code is now code-under-comment.
Comments removed that were formally commenting out code is now code-not-under-comment.

Re: Comment terminology

Posted: Sun Jun 14, 2009 2:30 pm
by kaisellgren
So, basically you are asking for a term that explains a block of arbitrary data which being uncommented is valid code?

Re: Comment terminology

Posted: Sun Jun 14, 2009 2:36 pm
by Ollie Saunders
That's not how I intended to be interpreted. At this stage I'm not asking anything and what I'm talking about is moving from

Code: Select all

//code();
to

Code: Select all

code();
I wanted names for both these things. But I've done it now so we're done here. Go back to your lives.

Re: Comment terminology

Posted: Sun Jun 14, 2009 2:50 pm
by kaisellgren
If you come up with a more formal definition of code-not-under-comment I'd like to know, too.

Re: Comment terminology

Posted: Sun Jun 14, 2009 3:03 pm
by Ollie Saunders
A friend of mine suggested "statemented in".

Re: Comment terminology

Posted: Sun Jun 14, 2009 6:54 pm
by alex.barylski

Re: Comment terminology

Posted: Mon Jun 15, 2009 12:48 am
by Christopher
Again I say, this is a comment (or commented out code):

Code: Select all

//code();
And this is just code:

Code: Select all

code();
There is a saying that there is no name for someone who does not collect stamps. ;)

Re: Comment terminology

Posted: Mon Jun 15, 2009 1:07 am
by omniuni
I may be off-base, but I believe "commented code" is simply a "comment" where non-commented code, is simply "code". That's what I use, anyway. Source Code, or Source Lines of Code are simply more specific ways of saying "Code" and "Commented Code" is just a specific way of saying "Content"... maybe even a specific way of saying "A comment of something that used to be or could be working code", but again, if it's not commented, and executes or is interpreted by a parser in any way, server side or client side, I believe, functionally, it is simply "Code".

:?

Re: Comment terminology

Posted: Mon Jun 15, 2009 8:02 am
by kaisellgren
Actually, I've been wondering that if I have this:

Code: Select all

$var = 'something'
is that code? Note, it does not work (; missing), but does that make it still code? If so, then I would definitely agree with
omniuni wrote:if it's not commented, and executes or is interpreted by a parser in any way, server side or client side, I believe, functionally, it is simply "Code".
Otherwise there could be a more precise term.

Re: Comment terminology

Posted: Mon Jun 15, 2009 8:46 am
by omniuni
Yeah, I'd still call it code. "Bad Code" or "Wrong Code" or "Erroneous Code" yes, but still, it's code because it will be parsed and then it will DO something. In this case throw an error. If you add the semicolon, it will reserve a bit of memory and store a value.