Every dictionary I can find gives one definition of “comprise” as a synonym for compose or constitute. For example:
Although it has been in use since the late 18th century, sense 3 [synonym for compose, constitute] is still attacked as wrong. Why it has been singled out is not clear, but until comparatively recent times it was found chiefly in scientific or technical writing rather than belles lettres. Our current evidence shows a slight shift in usage: sense 3 is somewhat more frequent in recent literary use than the earlier senses. You should be aware, however, that if you use sense 3 you may be subject to criticism for doing so, and you may want to choose a safer synonym such as compose or make up.
My intention was not so much to claim that one meaning is unambiguously correct and one is wrong — after all, an initially “wrong” meaning can become “right” through usage. (For what it’s worth, http://public.wsu.edu/~brians/errors/comprised.html contradicts your claim of a consensus while acknowledging the controversy.) The point, rather, is that many people use the word without being aware that there’s any kind of controversy, or that there are multiple meanings.
Similarly, if you find some code on the Internet, paste it into your program, and it works (in the sense that it doesn’t crash or break, and seems to do what you wanted), but you have absolutely no idea why it works or what it means, that’s still cargo cult programming.
I do see how what I wrote may convey the impression that I was expressing an authoritative position on the matter, though.
There’s a difference between the two domains in that most people learn most of their vocabulary through context, at least in their native language (or so I imagine). Sure, one can still use a word incorrectly or use it correctly but without knowing what it means. But I guess I’m not sure why it’s useful to think of these errors in this way. If I want to reduce my use of “cargo-cult language,” I can’t just notice when I’m copying and pasting code and then stop doing that.
I think there may be less of a difference between the two domains than you think. Copying and pasting entire blocks of code is one way that cargo cult programming happens, but it’s not the only way. Consider the following example from C:
void main() is (or was, at least) a fairly common construction. It compiles, it executes. Many, many people learned it from their comp sci textbooks or teachers as such a basic part of How To Write C Programs™ that they don’t even think of it as something that they copied from somewhere. But they have no idea why it could be bad, because it’s something they do without understanding why. This is classic cargo cult programming.
But you’re quite right that it’s not trivial to just stop making errors of this sort. I do think it’s one of those things where just being aware of it helps. I don’t have any concrete advice beyond “think more closely about the things you say and write”, but that’s neither original nor specific to this case.
Yes, C99 specifies that main() should be of type int, and most modern compilers will flag void main() as an error. This wasn’t always the case, and some compilers may still let you get away with it.
Every dictionary I can find gives one definition of “comprise” as a synonym for compose or constitute. For example:
(http://www.merriam-webster.com/dictionary/comprise)
My intention was not so much to claim that one meaning is unambiguously correct and one is wrong — after all, an initially “wrong” meaning can become “right” through usage. (For what it’s worth, http://public.wsu.edu/~brians/errors/comprised.html contradicts your claim of a consensus while acknowledging the controversy.) The point, rather, is that many people use the word without being aware that there’s any kind of controversy, or that there are multiple meanings.
Similarly, if you find some code on the Internet, paste it into your program, and it works (in the sense that it doesn’t crash or break, and seems to do what you wanted), but you have absolutely no idea why it works or what it means, that’s still cargo cult programming.
I do see how what I wrote may convey the impression that I was expressing an authoritative position on the matter, though.
There’s a difference between the two domains in that most people learn most of their vocabulary through context, at least in their native language (or so I imagine). Sure, one can still use a word incorrectly or use it correctly but without knowing what it means. But I guess I’m not sure why it’s useful to think of these errors in this way. If I want to reduce my use of “cargo-cult language,” I can’t just notice when I’m copying and pasting code and then stop doing that.
I think there may be less of a difference between the two domains than you think. Copying and pasting entire blocks of code is one way that cargo cult programming happens, but it’s not the only way. Consider the following example from C:
void main() is (or was, at least) a fairly common construction. It compiles, it executes. Many, many people learned it from their comp sci textbooks or teachers as such a basic part of How To Write C Programs™ that they don’t even think of it as something that they copied from somewhere. But they have no idea why it could be bad, because it’s something they do without understanding why. This is classic cargo cult programming.
But you’re quite right that it’s not trivial to just stop making errors of this sort. I do think it’s one of those things where just being aware of it helps. I don’t have any concrete advice beyond “think more closely about the things you say and write”, but that’s neither original nor specific to this case.
I once had a compiler that threw up an error at “void main()” and forced me to use “int main()” instead...
Yes, C99 specifies that main() should be of type int, and most modern compilers will flag void main() as an error. This wasn’t always the case, and some compilers may still let you get away with it.