Coding Guidelines
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
-
- Posts: 387
- Joined: Mon Jun 09, 2008 6:08 pm
Re: Coding Guidelines
I must say that most of these guidelines are pretty good. I have seen on svn people remove { }from if statements that just had 1 line, but that is wrong they should be there, there are many more examples. Very nice initiate to post this
- jurchiks
- Posts: 6769
- Joined: Sat Sep 19, 2009 4:16 pm
- Location: Eastern Europe
Re: Coding Guidelines
well, since i have only c5 source atm, i checked that one and it's really tidy imo
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
- janiii
- L2j Veteran
- Posts: 4269
- Joined: Wed May 28, 2008 3:15 pm
- Location: Slovakia
Re: Coding Guidelines
the l2j code is really messy, i agree. but it is not that easy. if i change a code, i better do not format it too, because then mostly noone could see the real changes i made. probably only a full format of the code, without any fixes or changes should be done, but sometimes also the code format messes up the code. a proper format setting is needed.
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper ♀
I don't give private support - PM will be ignored!
forum flOOder dancing dEVILoper ♀
I don't give private support - PM will be ignored!
-
- Posts: 271
- Joined: Wed Mar 19, 2008 10:16 am
Re: Coding Guidelines
I don't know if it works under Java... But under C, we have the "indent" tool which helps doing massive reformat...
There are few people with SVN Write access, if they agree, they may suspend the changes at some points, have some massive reformatting of the code committed (automatically reformatted + if/for/while braces added) then start again doing changes, based on the new (cleaner) source.
There are few people with SVN Write access, if they agree, they may suspend the changes at some points, have some massive reformatting of the code committed (automatically reformatted + if/for/while braces added) then start again doing changes, based on the new (cleaner) source.
- janiii
- L2j Veteran
- Posts: 4269
- Joined: Wed May 28, 2008 3:15 pm
- Location: Slovakia
Re: Coding Guidelines
yep, i would agreeVapulabe wrote:I don't know if it works under Java... But under C, we have the "indent" tool which helps doing massive reformat...
There are few people with SVN Write access, if they agree, they may suspend the changes at some points, have some massive reformatting of the code committed (automatically reformatted + if/for/while braces added) then start again doing changes, based on the new (cleaner) source.


the most problems make arrays. we have own way to format them and every code format just f*cks that up

DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper ♀
I don't give private support - PM will be ignored!
forum flOOder dancing dEVILoper ♀
I don't give private support - PM will be ignored!
-
- Posts: 271
- Joined: Wed Mar 19, 2008 10:16 am
Re: Coding Guidelines
Well, code cleaning is done in huge projects like Linux... tell me why it shouldn't be possible with L2J ?
- janiii
- L2j Veteran
- Posts: 4269
- Joined: Wed May 28, 2008 3:15 pm
- Location: Slovakia
Re: Coding Guidelines
when comparing l2j to other projects.. what about sun java source code? check it.. really messy..Vapulabe wrote:Well, code cleaning is done in huge projects like Linux... tell me why it shouldn't be possible with L2J ?
but as i already wrote, i am for cleaning up the code (+1), because i still get mad when i see spaces and tabs mixed up, no spaces in if statements or assignments, etc..
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper ♀
I don't give private support - PM will be ignored!
forum flOOder dancing dEVILoper ♀
I don't give private support - PM will be ignored!