Open ghost opened 13 years ago
Comment types, Javadoc style or our own?
I think for small project, normal comments (non-javadoc) will be fine, but anything larger than a few dozen or so lines, it probably wouldn't hurt to use javadoc.
Edit: Whoops, I totally closed the issue there for a second. Still getting used to github. :D
Ok here's what I've got
Javascript: http://javascript.crockford.com/code.html (Thanks phyrex1an), 4 spaces indent, spaces inside of parentheses like this while ( true ) doSomething( a, b, c, d ) HTML: lower case tags, double quotes for attributes, 4 spaces indent.
Just a suggestion...
yeah, that sounds fine with me. What about filename restrictions? Something like [filename][author][version]?
Oh, and a indent between every nest of a tag. Like this:
<body>
<p>I'm a text!<p>
</body>
This would make eveything so much easier to read.
Indeed. Indentation is very important, as it improves readability. Edit: Damn it, I closed it again. Sorry guys. :/
Something like [filename][author][version]?
I say no to that. Having the version in the filename makes sense if you want to use a specific version of something, but otherwise it just makes the URLs non-persistent (which is bad). And in an open source project where anyone can edit anyone's code, 'author' makes little to no sense.
spaces inside of parentheses like this while ( true ) doSomething( a, b, c, d )
Where did you get that from? Can't find it in the conventions you linked, and it's actually the only one I am against. Crockford's conventions seem good to me.
It's a personnal preference, I guess. It makes reading a big block easier.
You know, sometimes you get like ))) this makes it hard to read sometimes... doSomething(getSomething(18 * (1-20))); doSomething( getSomething( 18 * ( 1 - 20 ) ) );
Just looks better, imo.
I like to do that too.
Also, we should probably not have author names, no.
EDIT: Goddammit.
Adding sensible spacing (for example doSomething(getSomething(18 * (1 - 20) ));
) might make code easier to read in some cases, but adding spaces inside all parenthesis is like adding none at all in my opinion (except for that it makes the code look stupid).
We need to standardize what way we'll be formatting our code before we continue any further. That way, we don't come across issues with unreadable code.
What needs to be defined:
And anything else you guys can thing of.