Style guide?

Post Reply
User avatar
TeoTwawki
Developer
Posts: 527
Joined: Mon Jul 15, 2013 9:50 pm

Style guide?

Post by TeoTwawki » Tue Oct 29, 2013 3:42 am

I see a lot of mixed styles among the projects source files. I think it'd really be helpful to have a few standards defined so our submissions will look more in line with what you expect. As a rather minor example I see a lot of mixed spacing, 2 or 5 spaces instead of 4, not just mixing tabs and spaces which I can live with.
Hi, I run The Demiurge server.


Image
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
PLS USE [ code ] CODE TAGS [ /code ] WHEN POSTING CODE
DO NOT PRIVATE MESSAGE ME ABOUT BUGS

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: Style guide?

Post by kjLotus » Tue Oct 29, 2013 5:51 pm

me too, but it never really happened: i just follow what file i'm in (as they're usually the same)



generally, i do tabs (or 4 spaces), braces on separate lines, space between if and bracket

User avatar
atom0s
Developer
Posts: 537
Joined: Thu Oct 25, 2012 9:52 am

Re: Style guide?

Post by atom0s » Fri Nov 01, 2013 9:20 pm

Tab keys should be removed from keyboards, or all systems should standardize to replacing tabs to 4 spaces. Tabs are the devils work.

User avatar
TeoTwawki
Developer
Posts: 527
Joined: Mon Jul 15, 2013 9:50 pm

Re: Style guide?

Post by TeoTwawki » Sat Nov 02, 2013 12:50 am

atom0s wrote:Tabs are the devils work.
I feel the same way about any interface that requires I touch the mouse. As soon as I have to remove a hand from the keys and reach for the rodent, my workflow is disrupted. And then there is my cat...Mice were delivered to earth directly from hell itself with the sole purpose of entertaining my cat who enjoys watching my reaction to a swatted pc peripheral.

As for tabs, I tend to use tabs then batch convert them all to 4 spaces, got used to that from modifying python works where somebody didn't know how to use a spacebar or the basic replace most editors have.
Hi, I run The Demiurge server.


Image
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
PLS USE [ code ] CODE TAGS [ /code ] WHEN POSTING CODE
DO NOT PRIVATE MESSAGE ME ABOUT BUGS

User avatar
atom0s
Developer
Posts: 537
Joined: Thu Oct 25, 2012 9:52 am

Re: Style guide?

Post by atom0s » Sun Nov 10, 2013 12:33 pm

Yeah any new editor I get or when I reinstall /reformat the first thing I do is disable tabs and make them spaces. Cannot stand them at all.

Post Reply