It's really not hard to comment your code, but I feel as though OP has used a bad example as the majority of C coders know (should know) what that statement means
Name:
Anonymous2010-06-15 11:55
thats an array of gays
Name:
Anonymous2010-06-15 12:29
In Java this statement would be ten times larger, execute ten times slower and waste precious ten times ram. This compact piece of code would generate just several opcodes.
You don't like it because you haven't learned pointers, casts and C declaration structure deeply enough.
Unsurprisingly, most people whining that code doesn't have enough comments are just trying to shift the blame for their own incompetence. Thanks for the demonstration, >>1.
Name:
Anonymous2010-06-15 16:41
Properly written code is self-documenting.
OP is a faggot, who doesn't belong here if he can't figure out that declaration.
Name:
Anonymous2010-06-15 16:57
I always follow the rule of document ``why'', not ``what''. If you can't tell what it does by looking at it, re-write it to be clearer.
Obviously things are different for platform/library code, where users don't necessarily want or need to read the code. In that case it's still not verbosely describing ``what'', but summarizing. Even then, well written APIs should be fairly obvious.
Name:
Anonymous2010-06-15 17:23
I thought you documentation nazis might like some documentation so here you have some documentation. That enough documentation for you?
Please do not think about anal intercourse while reading this documentation. Thank you.
addEventListener
Registers an event listener, depending on the useCapture parameter, on the capture phase of the DOM event flow or its target and bubbling phases.
Parameters
type of type DOMString
Specifies the Event.type associated with the event for which the user is registering.
listener of type EventListener
The listener parameter takes an object implemented by the user which implements the EventListener interface and contains the method to be called when the event occurs.
useCapture of type boolean
If true, useCapture indicates that the user wishes to add the event listener for the capture phase and target only, i.e. this event listener will not be triggered during the bubbling phase. If false, the event listener must only be triggered during the target and bubbling phases.
No Return Value No Exceptions
Name:
Anonymous2010-06-15 17:53
expert programmers like to make things as terse as possible, so that it can only be appreciated by other expert programmers
>>16
It's one of those lies-to-children that only make sense when applied to beginners, which is the context in which the Abelson used it. Sadly, some people miss the point and want to apply it to everyone. Knuth is one of these idiots, and so is >>1.
Name:
Anonymous2010-06-15 22:24
It's a declaration for the function imafaggot which returns an array of pointers to strings. Or you could think of it as a 2D array of strings.
Name:
Anonymous2010-06-16 1:11
>>15
comment enough so that the next guy to maintain your code doesn't want to break in your house with an axe and chop your head off.
>>25
I have some experience in this field, and I can tell you: it's a moot point. My code is inevitably of much higher quality than that of anyone around me, so nobody ever has cause for complaint even if I don't comment at all.
This is not a valid declaration according to the defacto C standard.
The symbol is way too identifiable (it describes what it is [I] and what it does [fag stuff]) and therefore meaningful. Every good 1337 C programmer knows that you must keep your symbols short and only meaningful to the programmer up to 5 minutes after they decide on it.
If you want to be a 1337 n00b you could go with an initialism:
char (*(*iaf)[])();
But that is still kinda script kiddy because there is a chance, no matter how slight, someone might infer the intended meaning. But it is good enough to fake your way past an expert C code reviewer.
Also, this is 3 times slower than just giving it 1 letter as any excellent C programmer knows. The shorter it is, the more efficient it is.
char (*(*i)[])();
That is the best C declaration anyone can hope for.
ya it makes it easier for me to steal code and pass it off as my own since I dont know how to write code from scratch.
Name:
Anonymous2010-06-20 19:37
...but, but perhaps, I DON'T WANT OTHERS TO READ MY GODDAMN GOD!
If you ever worked in a place while the incompetent idiots run the place and your incompetent coworkers rely on you for every GOD DAMN STATEMENT and despite this you are still PAID THE SAME and RESPONSIBILITY falls on YOU AND ONLY YOU than perhaps you will understand.