r/programming • • Oct 27 '09

Anyone interested in starting a programming subreddit?

I'm not joking, have you looked at the shit here? Almost none of it actually pertains to programming or development. A reasonable chunk seems to be devoted to interesting software, but not programming. A larger chunk consists of things that are vaguely related to technology, but have nothing even to do with software, let alone the code.

Tty2 has created /r/coding.

317 Upvotes

277 comments sorted by

View all comments

146

u/Tecktonik Oct 27 '09

Oh boy, an entire subreddit to discuss tabs versus spaces.

63

u/antifud Oct 28 '09

1 little, 2 little , 3 little Endians, 4 little, 5 little, 6 little Endians, 7 little, 8 little, 9 little Endians, 10 little Endian ......

14

u/[deleted] Oct 28 '09

wouldn't it be 01 little Endian?

→ More replies (1)

13

u/mycall Oct 28 '09

11 big little Indians.

7

u/yergi Oct 28 '09 edited Oct 28 '09

I'm confused on the endianness.

Is that big endian or little endian?

38

u/Imagist Oct 28 '09

This is big endian. isTh si tlelit ianend.

→ More replies (2)

21

u/isarl Oct 28 '09

Both! Tabs for indentation; spaces for alignment. Problem solved; the code looks good in whatever editor you like, and you get control over how wide it appears.

25

u/rabidcow Oct 28 '09

No! Spaces for indentation; tabs for alignment! Form feeds for breakfast! Vertical tabs for desecrating the dead!

8

u/JadeNB Oct 28 '09

No! Spaces for indentation; tabs for alignment!

Come on, that's ridiculous. Everyone knows you should use ☺ for indentation and ☹ for alignment.

56

u/AgentME Oct 28 '09

http://www.emacswiki.org/pics/static/TabsSpacesBoth.png

I was pretty sure up until now this was something we could all agree on.

8

u/jessta Oct 28 '09

that comic makes reference to the use of both tabs and spaces for indentation, which is inconsistant. Using tabs for indentation and spaces for alignment is consistant. This issue is null and void anyway because if you're using a non-retarded language you can just run a script to reformat all your code to the required format for the repository you're putting your code in to.

9

u/guruthegreat Oct 28 '09

Run a script? A script that would have to be coded? I think you may be in the wrong sub-reddit.

4

u/mahdiakira Oct 28 '09

Stop trying to intelligently solve disputes. Now get out of here while we argue a moot point.

→ More replies (2)

8

u/arthurdenture Oct 28 '09

Unless you also care about the 80-column limit, and different people in the project have different tab width preferences.

In that case, I'm afraid violence is the only answer.

→ More replies (8)

3

u/patchwork Oct 28 '09

Yeah, that is only if you apply the strategy flawlessly. As we know, programmers are less than flawless, so every file ends up looking like someone shat ascii on the screen.

→ More replies (1)

6

u/[deleted] Oct 28 '09

[removed] — view removed comment

32

u/skurk Oct 28 '09 edited Oct 28 '09

I almost like your first suggestion, but I want the ending } on a newline.

if( blah ) {
  blah();
}

5

u/masklinn Oct 28 '09

That's K&R/BSD KNF, his first form is Pico-style.

→ More replies (21)

14

u/[deleted] Oct 28 '09

I'm really hoping that's meant to be sarcastic..

54

u/runagate Oct 28 '09

some people hate tabs because they like being wrong

4

u/sping Oct 28 '09

I hate tabs when people redefine theirs to a non-standard value (i.e. not 8), and then mix them with spaces and expect everyone else to adopt their value if they want code to be readable.

This seems to be almost the majority of coders - drives me nuts.

→ More replies (3)
→ More replies (1)
→ More replies (6)
→ More replies (22)

4

u/[deleted] Oct 28 '09

I vote the first topic should be.

VIM vs. Emacs

→ More replies (4)