Page 1 of 1

Coding Styles

Posted: Sat Apr 21, 2018 12:20 pm
by Dax Dupont
We don't have much of a coding style definition, especially when it comes to naming things.

I generally use whatever the current file is using but I would suggest implementing a coding style that makes variables and functions as ONE of these:
1. clown_has_aids
2. clownHasAids
3. ClownHasAids
Depending on which the maintainers want to adopt, it's just kind annoying to see SpinAnimation() and change_number_of_hands exist at the same time and for new code we can nip it in the bud.
This wouldn't be an overnight change.

Re: Coding Styles

Posted: Sat Apr 21, 2018 12:39 pm
by Saegrimr
Just wait until you get all 3 of the above ClownHasAids variations doing different things.

Re: Coding Styles

Posted: Sat Apr 21, 2018 12:56 pm
by Dax Dupont
Saegrimr wrote:Just wait until you get all 3 of the above ClownHasAids variations doing different things.
The idea is to pick one of those styles, not all three as is the current situation to prevent this and other annoyances.

Re: Coding Styles

Posted: Sat Apr 21, 2018 4:28 pm
by somerandomguy
Dax Dupont wrote:
Saegrimr wrote:Just wait until you get all 3 of the above ClownHasAids variations doing different things.
The idea is to pick one of those styles, not all three as is the current situation to prevent this and other annoyances.
--The joke->



Your head

Re: Coding Styles

Posted: Sat Apr 21, 2018 9:13 pm
by Cobby
Usually I just go with

procs: CapsPerWord

var: nocapsperword

I don't think it's worth the bikeshed and arguing about which style is superior to ever enforce though.

Re: Coding Styles

Posted: Sun Apr 22, 2018 1:35 am
by Selea
ClOwNhAsAiDs--var for loop iterator.

Re: Coding Styles

Posted: Sun Apr 22, 2018 9:49 pm
by XDTM
The most common i've seen is name_of_thing for both procs and vars.

Re: Coding Styles

Posted: Mon Apr 23, 2018 2:10 am
by Armhulen
>More than one worded vars

Hey man. Stop that.

Re: Coding Styles

Posted: Mon Apr 23, 2018 1:53 pm
by Dax Dupont
Armhulen wrote:>More than one worded vars

Hey man. Stop that.

Code: Select all

	var/you_die_in_the_game_you_die_for_real = FALSE

Re: Coding Styles

Posted: Mon May 07, 2018 3:26 am
by kevinz000
i normally do_things_like_this which tendsToAnnoyOthers andThenIForgotWhichStyle I'm_using_so_I RandomlySwitchTheThree becauseIAmJustThisWay
that being said i normally try_to_do_it_like_this if i don't forget.