Coding Styles
- Dax Dupont
- In-Game Admin
- Joined: Sun Apr 20, 2014 9:07 pm
- Byond Username: DaxYeen
- Github Username: DaxDupont
- Location: Belgium
Coding Styles
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.
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.
Last edited by Dax Dupont on Sat Apr 21, 2018 12:57 pm, edited 1 time in total.
- Saegrimr
- Joined: Thu Jul 24, 2014 4:39 pm
- Byond Username: Saegrimr
Re: Coding Styles
Just wait until you get all 3 of the above ClownHasAids variations doing different things.
tedward1337 wrote:Sae is like the racist grandad who everyone laughs at for being racist, but deep down we all know he's right.
- Dax Dupont
- In-Game Admin
- Joined: Sun Apr 20, 2014 9:07 pm
- Byond Username: DaxYeen
- Github Username: DaxDupont
- Location: Belgium
Re: Coding Styles
The idea is to pick one of those styles, not all three as is the current situation to prevent this and other annoyances.Saegrimr wrote:Just wait until you get all 3 of the above ClownHasAids variations doing different things.
-
- Joined: Sun Nov 05, 2017 7:41 pm
- Byond Username: Astatineguy12
Re: Coding Styles
--The joke->Dax Dupont wrote:The idea is to pick one of those styles, not all three as is the current situation to prevent this and other annoyances.Saegrimr wrote:Just wait until you get all 3 of the above ClownHasAids variations doing different things.
Your head
- Cobby
- Code Maintainer
- Joined: Sat Apr 19, 2014 7:19 pm
- Byond Username: ExcessiveUseOfCobby
- Github Username: ExcessiveUseOfCobblestone
Re: Coding Styles
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.
procs: CapsPerWord
var: nocapsperword
I don't think it's worth the bikeshed and arguing about which style is superior to ever enforce though.
Voted best trap in /tg/ 2014-current
-
- Joined: Sat Nov 11, 2017 11:11 am
- Byond Username: Serpentarium
- XDTM
- Github User
- Joined: Fri Mar 04, 2016 8:38 pm
- Byond Username: XDTM
- Github Username: XDTM
- Location: XDTM
Re: Coding Styles
The most common i've seen is name_of_thing for both procs and vars.
a.k.a. Duke Hayka
Coder of golems, virology, hallucinations, traumas, nanites, and a bunch of miscellaneous stuff.
Coder of golems, virology, hallucinations, traumas, nanites, and a bunch of miscellaneous stuff.
- Armhulen
- Global Moderator
- Joined: Thu Apr 28, 2016 4:30 pm
- Byond Username: Armhulenn
- Github Username: bazelart
- Location: The Grand Tournament
Re: Coding Styles
>More than one worded vars
Hey man. Stop that.
Hey man. Stop that.
- Dax Dupont
- In-Game Admin
- Joined: Sun Apr 20, 2014 9:07 pm
- Byond Username: DaxYeen
- Github Username: DaxDupont
- Location: Belgium
Re: Coding Styles
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
- kevinz000
- Joined: Fri Nov 14, 2014 8:41 am
- Byond Username: Kevinz000
- Github Username: kevinz000
- Location: Dorm Room 3
Re: Coding Styles
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.
that being said i normally try_to_do_it_like_this if i don't forget.
Local catgirl scratching post - Shezza


Usually seen as Skylar Lineman/Mekhi Anderson.
Commissions way too much art...
https://tgstation13.org/phpBB/viewtopic ... 7&p=239075 - IN GAME ADMINISTRATOR


Usually seen as Skylar Lineman/Mekhi Anderson.
Commissions way too much art...
https://tgstation13.org/phpBB/viewtopic ... 7&p=239075 - IN GAME ADMINISTRATOR
NSFW:
Who is online
Users browsing this forum: No registered users