Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Dans Macabre
Apr 24, 2004


:legion:

Adbot
ADBOT LOVES YOU

Forums Terrorist
Dec 8, 2011

why do i get the feeling python only has significant whitespace because some nerdlord wanted his code to look neater

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Forums Terrorist posted:

why do i get the feeling python only has significant whitespace because some nerdlord wanted his code to look neater

nah it's because a bunch of people had to spend years dealing with other people's bad perl code and realized everyone's lives would be a lot better if code grunts programmed in a language that forced them to write code other people could read.

Bloody
Mar 3, 2013

then they made it awful and escalated the holy wars involving \t and

Johnny Cache Hit
Oct 17, 2011

USSMICHELLEBACHMAN posted:

nah it's because a bunch of people had to spend years dealing with other people's bad perl code and realized everyone's lives would be a lot better if code grunts programmed in a language that forced them to write code other people could read.

not to mention that a strictly enforced or a built-in style means sperglords cant sperg out about spergy poo poo

go is really good about this. just go fmt and your code is rewritten to matc the official code standards, and the other apes that mess with it cnt argue about K&R vs KNF braces and make you want to hate yourself

Bloody
Mar 3, 2013

hail  allman

Bloody
Mar 3, 2013

Shaggar
Apr 26, 2006
all man style, hard tabs only

FamDav
Mar 29, 2008

Shaggar posted:

all man style, hard tabs only

plz dont post my favorite dubstep genre in this thread

Cold on a Cob
Feb 6, 2006

i've seen so much, i'm going blind
and i'm brain dead virtually

College Slice
i like tabs because if you like two space tabs or four space tabs or six space tabs or one space tabs it's only a text editor config away :)

Cold on a Cob
Feb 6, 2006

i've seen so much, i'm going blind
and i'm brain dead virtually

College Slice
spaces are ok i guess

mixed tabs with spaces is evil

MeruFM
Jul 27, 2010
i like tabs but all sperg guides use spaces

so unless it's my own project, i do spaces because i don't like confrontations with __

Doc Block
Apr 15, 2003
Fun Shoe
Do people seriously use spaces instead of actual tabs? Because :lol: if so.

Also, :lol: if you don't use an editor that hides this from you.

power botton
Nov 2, 2011

Doc Block posted:

Do people seriously use spaces instead of actual tabs? Because :lol: if so.

Also, :lol: if you don't use an editor that hides this from you.

this is the right thread for this post

Morkai
May 2, 2004

aaag babbys
i spent 90 minutes today chasing a weird bug only to realize that i left virtual off of a member declaration and EF just silently ignored its existence

it's me i'm the terrible programmer

power botton
Nov 2, 2011

don't use EF or ORMs tia.

god bless.

Doc Block
Apr 15, 2003
Fun Shoe
Took me 30 mins today to diagnose why my little microcontroller wouldn't go to sleep and stay there. Turns out it was because I forgot to turn off the timers, and they kept waking it back up.

But seriously, use tabs. Spaces = lame.

Morkai
May 2, 2004

aaag babbys

git clone trooper posted:

don't use EF or ORMs tia.

god bless.

thanks i'll be sure to push that out to the entire company i'm consulting with and their clients!

double sulk
Jul 2, 2010

use sublime text with the convert tabs to spaces setting. this isn't loving difficult people

Shaggar
Apr 26, 2006
if u use spaces ur a moron but eclipse and vs will both fix other peoples lovely code formatting for you.

Doc Block
Apr 15, 2003
Fun Shoe
shaggar was right.

tabs, not spaces, and an editor that will convert spaces into tabs is the best way to program.

power botton
Nov 2, 2011

Morkai posted:

thanks i'll be sure to push that out to the entire company i'm consulting with and their clients!

nice! improving the code for dozens or hundreds (or more!) people.

MeruFM
Jul 27, 2010

git clone trooper posted:

nice! improving the code for dozens or hundreds (or more!) people.

those who do not stand up have no hope of changing the world

power botton
Nov 2, 2011

If you can't do small changes like not using objectively bad technology, how will you ever impact anything meaningful?

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

git clone trooper posted:

If you can't do small changes like not using objectively bad technology, how will you ever impact anything meaningful?

you can't
you won't

Johnny Cache Hit
Oct 17, 2011

gucci void main posted:

use go fmt. this isn't loving difficult people

Johnny Cache Hit
Oct 17, 2011
for real tho lmbo if your editor does anythign but write 0x09 to your file if you press the 'tab' button on your keyboard

Johnny Cache Hit
Oct 17, 2011
scrub tier editors

JewKiller 3000
Nov 28, 2006

by Lowtax
lol if your editor doesn't make that configurable using 5 different options that overlap to cause "interesting" behavior

Johnny Cache Hit
Oct 17, 2011

JewKiller 3000 posted:

lol if your editor doesn't make that configurable using 5 different options that overlap to cause "interesting" behavior

i once worked with a guy that would constantly commit gigantic loving diffs that had almost nothing to do with what he was working on

turns out he c/ped some poo poo into his .vimrc that woudl poorly regex the entire file on every save to try to change soft tabs to hard tabs. but he also ahd some completely contradictory settings somewhere else in his vimrc that set vim to insert like 4 spaces on every tab. so his diffs ended up as some horrible mix of tabs and spaces and he would infect every file just by opening and closing them, he didnt even have a clue

well thats when i decided vim was worse than butt cancer hope u liked my story :tipshat:

Johnny Cache Hit
Oct 17, 2011
lol my editor is ~*~completely scriptable~*~ so these gigantic contradictory edge case fuckups are just a fact of life y'all gotta adjust to

Notorious b.s.d.
Jan 25, 2003

by Reene

Johnny Cache Hit posted:

i once worked with a guy that would constantly commit gigantic loving diffs that had almost nothing to do with what he was working on

turns out he c/ped some poo poo into his .vimrc that woudl poorly regex the entire file on every save to try to change soft tabs to hard tabs. but he also ahd some completely contradictory settings somewhere else in his vimrc that set vim to insert like 4 spaces on every tab. so his diffs ended up as some horrible mix of tabs and spaces and he would infect every file just by opening and closing them, he didnt even have a clue

well thats when i decided vim was worse than butt cancer hope u liked my story :tipshat:

i have worked with the same guy

vim is so bad

Notorious b.s.d.
Jan 25, 2003

by Reene

Johnny Cache Hit posted:

lol my editor is ~*~completely scriptable~*~ so these gigantic contradictory edge case fuckups are just a fact of life y'all gotta adjust to

vim is scriptable buy it's so hard to do that people gently caress it up

MononcQc
May 29, 2007

I wanted to write a commit hook that would add in whitespace dicks at the end of files so that people who don't pay attention or diff without whitespace end up not seeing all the poo poo being added. Never found the time or motivation to actually do it though.

PleasingFungus
Oct 10, 2012
idiot asshole bitch who should fuck off

Johnny Cache Hit posted:

i once worked with a guy that would constantly commit gigantic loving diffs that had almost nothing to do with what he was working on

turns out he c/ped some poo poo into his .vimrc that woudl poorly regex the entire file on every save to try to change soft tabs to hard tabs. but he also ahd some completely contradictory settings somewhere else in his vimrc that set vim to insert like 4 spaces on every tab. so his diffs ended up as some horrible mix of tabs and spaces and he would infect every file just by opening and closing them, he didnt even have a clue

well thats when i decided vim was worse than butt cancer hope u liked my story :tipshat:

the real horror story here is the guy who doesn't at least glance at his diffs before he commits

shameful

Quebec Bagnet
Apr 28, 2009

mess with the honk
you get the bonk
Lipstick Apathy

MononcQc posted:

whitespace dicks

mods, if you would, please

double sulk
Jul 2, 2010


go fmt is cool but unfortunately go has the ugliest syntax of just about any language ever designed so no level of formatting can truly help it

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
how come plang isn't a skill on linked in???

X-BUM-RAIDER-X
May 7, 2008
expanding your tabs into spaces owns because it means everyone reads the code precisely the same as you wrote it

using either doesn't rly matter at all tbh, just don't mix them. our company's entire code standard policy is literally the phrase "when in Rome"

Adbot
ADBOT LOVES YOU

Johnny Cache Hit
Oct 17, 2011

OBAMA BIN LIFTIN posted:

our company's entire code standard policy is literally the phrase "when in Rome"

... live as the romans did, in squalid mud huts surrounded by open air sewers

for real tho maybe you work with adult programmers because if the programmers here were told that each codebase would become a mess within seconds

but one of our past employees wouldnt even notice MononcQc's whitespace dongs so yeah

  • Locked thread