Coding style

If something doesn't fit in any other forum then post it here.
Forum rules
READ NOW: L2j Forums Rules of Conduct
User avatar
theone
Posts: 1384
Joined: Tue Aug 12, 2008 2:28 am
Location: Quebec, Canada

Re: suggestion: coding style

Post by theone »

Zoey76 wrote:This topic could get sticked, but you need to keep first post for code suggestion only and clean and the other posts for opinion/talk about this topic. :wink:
That's a great idea :)
Subject should be changed to "Coding style" instead of "Suggestion: coding style" however. And it should be put in:
Server Development / User Contributions
Server Development / Custom server mods

Just a suggestion :) You guys do what you want, I'm only trying to help
Image
User avatar
UnAfraid
L2j Veteran
L2j Veteran
Posts: 4199
Joined: Mon Jul 23, 2007 4:25 pm
Location: Bulgaria
Contact:

Re: suggestion: coding style

Post by UnAfraid »

I like the topic stinky on :!:
It must be read by everyone i think i was complaining about coding style in almost every contribution untill the author started contributing with clean and understandable code
Image
User avatar
Bloodshed
L2j Veteran
L2j Veteran
Posts: 816
Joined: Mon Jun 23, 2008 9:54 am
Location: Dorf Town

Re: Coding style

Post by Bloodshed »

Enforcing a hierarchy for contributions should be present to enforce this.

While developers down the ladder test (and learn from) the code. A developer up the ladder should glance over the code before it gets committed to enforce the requirements.
If it doesn't meet the criteria, it should get refactored (optional: with help from the checking dev).
taking a break;
User avatar
Zoey76
L2j Inner Circle
L2j Inner Circle
Posts: 7005
Joined: Tue Aug 11, 2009 3:36 am

Re: Coding style

Post by Zoey76 »

Bloodshed wrote:Enforcing a hierarchy for contributions should be present to enforce this.

While developers down the ladder test (and learn from) the code. A developer up the ladder should glance over the code before it gets committed to enforce the requirements.
If it doesn't meet the criteria, it should get refactored (optional: with help from the checking dev).
We do this with Adv. Users, and Initiates. :lol:
Powered by Eclipse 4.30 ๐ŸŒŒ | Eclipse Temurin 21 โ˜• | MariaDB 11.3.2 ๐Ÿ—ƒ๏ธ | L2J Server 2.6.3.0 - High Five ๐Ÿš€

๐Ÿ”— Join our Discord! ๐ŸŽฎ๐Ÿ’ฌ
powerful0guardian
Posts: 63
Joined: Tue Jun 26, 2012 11:16 am

Re: Coding style

Post by powerful0guardian »

I have a question about code style formatter... I see on changelog L2J Devs formatting source files 10 by 10 or one by one.. My question is: would not be easier to format the whole sources and add a settings in eclipse (save actions) auto format file when you save it? I am speaking about Java sources now, ofc.

PS: I would disable formatter on javadocs and comments. (just my opinion)

PS2: + could be setted up save action as organize import and cleanup too.
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: Coding style

Post by jurchiks »

Already suggested both full format and "format on save", they don't like the idea. Apparently some of the devs are against a single formatting style and that's why they don't do it.
Total BS if you ask me, considering that those who are against don't even work on the public SVN (or at least rarely do).
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.
powerful0guardian
Posts: 63
Joined: Tue Jun 26, 2012 11:16 am

Re: Coding style

Post by powerful0guardian »

jurchiks wrote:Already suggested both full format and "format on save", they don't like the idea. Apparently some of the devs are against a single formatting style and that's why they don't do it.
Total BS if you ask me, considering that those who are against don't even work on the public SVN (or at least rarely do).
make poll for that too in that case... and who don't work on public SVN, his opinion is not important.
User avatar
Zoey76
L2j Inner Circle
L2j Inner Circle
Posts: 7005
Joined: Tue Aug 11, 2009 3:36 am

Re: Coding style

Post by Zoey76 »

I'm against full format in one change-set, do you think I rarely work on SVN?

Anyway, it's being done for each file every time a major rework is done, or when a developer feels like it.
Powered by Eclipse 4.30 ๐ŸŒŒ | Eclipse Temurin 21 โ˜• | MariaDB 11.3.2 ๐Ÿ—ƒ๏ธ | L2J Server 2.6.3.0 - High Five ๐Ÿš€

๐Ÿ”— Join our Discord! ๐ŸŽฎ๐Ÿ’ฌ
powerful0guardian
Posts: 63
Joined: Tue Jun 26, 2012 11:16 am

Re: Coding style

Post by powerful0guardian »

well, than if you are against formatting in one big changeset, than I can prefer to spend an afternoon for it and format the whole source file by file and changeset by changeset :P :D (anyway jurisicks said only the inactive members are against formatting, so I was speaking about them)
User avatar
Aikimaniac
L2j Inner Circle
L2j Inner Circle
Posts: 3048
Joined: Sun Aug 07, 2005 11:42 pm
Location: Slovakia

Re: Coding style

Post by Aikimaniac »

powerful0guardian wrote:well, than if you are against formatting in one big changeset, than I can prefer to spend an afternoon for it and format the whole source file by file and changeset by changeset :P :D (anyway jurisicks said only the inactive members are against formatting, so I was speaking about them)
not sure where from you have the bold marked crap that somebody inactive is against formating..all that involves SVN and code formating is up to active core devs in lead by Zoey...
Image
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: Coding style

Post by jurchiks »

Not always the files touched by a commit are formatted. If that were the case, most of them would be formatted by now, but it's not.
As you said, "every time a major rework is done, or when a developer feels like it" - so not enforcing style at all. You could at least do that, after all, you ask that of all user contributions, but devs are cool?

At the very least, you could format/cleanup the files/packages that haven't been touched for a longer period of time.

P.S. I didn't say "only the inactive devs", I said "some of the devs" and "those who don't work on the public SVN or rarely do", like Nik, for example.
And again, Aikimaniac, you only show up to argue.
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.
User avatar
Aikimaniac
L2j Inner Circle
L2j Inner Circle
Posts: 3048
Joined: Sun Aug 07, 2005 11:42 pm
Location: Slovakia

Re: Coding style

Post by Aikimaniac »

Argue? Maybe you like to argue..i dont.. When there is reason to step up to correct those who write bullshit i step up...spreading lies about devs is for me relevant matter to step up and comment it.. As you may figured i ignore flames and do not argue on forums as well for very long time (cant say the same about you)...
Image
powerful0guardian
Posts: 63
Joined: Tue Jun 26, 2012 11:16 am

Re: Coding style

Post by powerful0guardian »

ah, than okey, sorry I missunderstand something while reading :P

All in one, I wanted to say: would be far easier to do all in one, at one time instead of file by file.. :P (my joke also wanted to proved how it looks like)

PS: No offense, ofc I love Zoey and I don't have problems with her :)
User avatar
UnAfraid
L2j Veteran
L2j Veteran
Posts: 4199
Joined: Mon Jul 23, 2007 4:25 pm
Location: Bulgaria
Contact:

Re: Coding style

Post by UnAfraid »

powerful0guardian wrote:PS: No offense, ofc I love Zoey and I don't have problems with her :)
her - him
Image
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: Coding style

Post by jurchiks »

Image
but srsly, old post?
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.
Post Reply