Posted
by
CmdrTaco
on Tuesday February 22, 2011 @05:00PM
from the dumb-dumb-stupid-face dept.

beret found a nifty little pie chart breaking down
profanity in code comments broken down by language. He used Carlin's Seven Words, and C++ came out on top while PHP users are either wholesome or perfect.

Then you're doing it wrong -- at the point you can no longer grok what's going on, you've used too much of the feature (for your current level of ability to work with it).

And this holds for the language itself, which is what is usually leveled against. Until you understand what the compiler is doing behind the scenes, don't use it. It doesn't just translate your high-level code, it also can generate a lot of code for you. You have to know what your tools do. Even if the basic way you use them look a lot like how you use other, simpler tools.

Most people skilled in a language (yes, even perl) can figure out what a piece of code actually does given enough time to look through it. The comments are to tell us what the code is *supposed* to do and *why*, so when we need to debug it we know what you were thinking when you wrote it and what you were trying to accomplish. When you're trying to figure out why a piece of code doesn't do what it's supposed to do, it's very helpful to know what it was supposed to do first.

The original comment still stands - most PHP "programmers" I know couldn't tell the difference between source control and birth control.

What kind of stupid argument is that? Sure, a lot of people who claim to write PHP code don't know what source control is. But, again, these are commit messages. What percentage of people writing commit messages do you think know what source control is?

This is an indictment of the language, not the programmers, since well-commented php is drastically slower (like.5% tomg!) than stripped down and nearly obfuscated code. That fraction really adds up when you have all those unnecessarily dynamic web pages to generate.

Now if someone were to do a comparison on the ratio of active code, to code that is commented out but not removed because the author doesn't use version control... In that category PHP would freaking rule!