• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 21:59
CEST 03:59
KST 10:59
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
TL.net Map Contest #21: Voting5[ASL20] Ro4 Preview: Descent11Team TLMC #5: Winners Announced!3[ASL20] Ro8 Preview Pt2: Holding On9Maestros of the Game: Live Finals Preview (RO4)5
Community News
Weekly Cups (Oct 6-12): Four star herO65.0.15 Patch Balance Hotfix (2025-10-8)74Weekly Cups (Sept 29-Oct 5): MaxPax triples up3PartinG joins SteamerZone, returns to SC2 competition325.0.15 Balance Patch Notes (Live version)119
StarCraft 2
General
TL.net Map Contest #21: Voting 5.0.15 Patch Balance Hotfix (2025-10-8) The New Patch Killed Mech! Ladder Impersonation (only maybe) Weekly Cups (Oct 6-12): Four star herO
Tourneys
LiuLi Cup - September 2025 Tournaments Sparkling Tuna Cup - Weekly Open Tournament Master Swan Open (Global Bronze-Master 2) Tenacious Turtle Tussle WardiTV Mondays
Strategy
Custom Maps
External Content
Mutation # 495 Rest In Peace Mutation # 494 Unstable Environment Mutation # 493 Quick Killers Mutation # 492 Get Out More
Brood War
General
After 20 seasons we have a lot of great maps Pros React To: BarrackS + FlaSh Coaching vs SnOw Whose hotkey signature is this? BW caster Sayle BW General Discussion
Tourneys
[Megathread] Daily Proleagues [ASL20] Semifinal A [ASL20] Semifinal B [ASL20] Ro8 Day 4
Strategy
Current Meta BW - ajfirecracker Strategy & Training Siegecraft - a new perspective TvZ Theorycraft - Improving on State of the Art
Other Games
General Games
Stormgate/Frost Giant Megathread Nintendo Switch Thread ZeroSpace Megathread Dawn of War IV Path of Exile
Dota 2
Official 'what is Dota anymore' discussion LiquidDota to reintegrate into TL.net
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
SPIRED by.ASL Mafia {211640} TL Mafia Community Thread
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread Men's Fashion Thread Sex and weight loss
Fan Clubs
The herO Fan Club! The Happy Fan Club!
Media & Entertainment
[Manga] One Piece Anime Discussion Thread Movie Discussion!
Sports
2024 - 2026 Football Thread Formula 1 Discussion MLB/Baseball 2023 NBA General Discussion TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
SC2 Client Relocalization [Change SC2 Language] Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List Recent Gifted Posts
Blogs
Inbreeding: Why Do We Do It…
Peanutsc
From Tilt to Ragequit:The Ps…
TrAiDoS
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2056 users

Programmers - How many spaces do you indent?

Blogs > Xanbatou
Post a Reply
Normal
Xanbatou
Profile Blog Joined February 2010
United States805 Posts
Last Edited: 2011-08-30 19:01:45
August 30 2011 18:45 GMT
#1
Hello fellow Computer Scientists/Programmers!

I was curious about the indenting style most people use. I have used 4 spaces for a long time, because I like how clear it makes things. If lines start to get too long with 4 spaces, I feel like you have bigger concerns than your indentation width .

Recently I started programming in Erlang using code written by another developer as an example. I noticed he liked to code with 2 spaces, which I don't think is enough personally. How much do you guys indent?

Poll: How many spaces do you indent?

4 (50)
 
59%

2 (20)
 
24%

5 (5)
 
6%

3 (4)
 
5%

1 (3)
 
4%

8 (2)
 
2%

7 (1)
 
1%

6 (0)
 
0%

85 total votes

Your vote: How many spaces do you indent?

(Vote): 1
(Vote): 2
(Vote): 3
(Vote): 4
(Vote): 5
(Vote): 6
(Vote): 7
(Vote): 8



EDIT AND WARNING: I would hope most of you would know this, but do NOT use tabs unless you make sure that whatever editor you are using converts them into spaces first. Tabs are not good to use...

*
Grobyc
Profile Blog Joined June 2008
Canada18410 Posts
August 30 2011 18:49 GMT
#2
I don't know if you've seen this already or not, but this might be worth posting in here:
http://www.teamliquid.net/forum/viewmessage.php?topic_id=134491
If you watch Godzilla backwards it's about a benevolent lizard who helps rebuild a city and then moonwalks into the ocean.
ComaDose
Profile Blog Joined December 2009
Canada10357 Posts
August 30 2011 18:54 GMT
#3
I use tabs
Or 4.
BW pros training sc2 is like kiss making a dub step album.
huameng
Profile Blog Joined April 2007
United States1133 Posts
August 30 2011 18:56 GMT
#4
4 spaces is the standard I think. I highly recommend it.
skating
myzael
Profile Blog Joined November 2008
Poland605 Posts
August 30 2011 18:58 GMT
#5
I use 4. I started this way and now I don't even consider it. I you dislike someone's style of indentation why not configure your IDE to convert them on pull and reconvert on commit?
Frozenhelfire
Profile Joined May 2010
United States420 Posts
August 30 2011 18:58 GMT
#6
I thought everyone used the tab key. I use the tab key. In what case would not be using the tab key be appropriate and/or better?
polar bears are fluffy
Xanbatou
Profile Blog Joined February 2010
United States805 Posts
August 30 2011 19:00 GMT
#7
On August 31 2011 03:58 myzael wrote:
I use 4. I started this way and now I don't even consider it. I you dislike someone's style of indentation why not configure your IDE to convert them on pull and reconvert on commit?


Because it doesn't bother me that much and I'm not using an IDE. I'm on linux using gedit .
Talin
Profile Blog Joined September 2010
Montenegro10532 Posts
Last Edited: 2011-08-30 19:08:59
August 30 2011 19:07 GMT
#8
I use 4, it's N++'s default and it works best with Python imo. I do use tabs actually, never really had any problems with that (Notepad++ automatically tab-indents with Python).
EtherealDeath
Profile Blog Joined July 2007
United States8366 Posts
August 30 2011 19:13 GMT
#9
In most editors, I set tab to 4 spaces. In Notepad2 I use 2 spaces for web-oriented languages.
Torenhire
Profile Blog Joined April 2009
United States11681 Posts
Last Edited: 2011-08-30 19:15:04
August 30 2011 19:14 GMT
#10
if( spaces == 4 )
{
spaces = perfect;
}
else
{
programmer sucks
}
SirJolt: Well maybe if you weren't so big and stupid, it wouldn't have hit you.
MisterD
Profile Blog Joined June 2010
Germany1338 Posts
August 30 2011 19:28 GMT
#11
why would anybody not use tabs? as long as you use the same indentation character throught your code, why not use tabs? I actually set my IDE up to only use tabs, because i really dislike having 16 different text cursor positions in front of my code instead of just 4, which actually are at exactly the spots where i could want to move indented code to. Using multiple spaces instead of single tabs requires a lot more micro management when selecting passages by mouse or keyboard properly, why would anybody prefer that?
Gold isn't everything in life... you need wood, too!
Xanbatou
Profile Blog Joined February 2010
United States805 Posts
August 30 2011 19:34 GMT
#12
On August 31 2011 04:28 MisterD wrote:
why would anybody not use tabs? as long as you use the same indentation character throught your code, why not use tabs? I actually set my IDE up to only use tabs, because i really dislike having 16 different text cursor positions in front of my code instead of just 4, which actually are at exactly the spots where i could want to move indented code to. Using multiple spaces instead of single tabs requires a lot more micro management when selecting passages by mouse or keyboard properly, why would anybody prefer that?


People avoid using tabs because it doesn't look the same in every editor.
EtherealDeath
Profile Blog Joined July 2007
United States8366 Posts
August 30 2011 19:35 GMT
#13
On August 31 2011 04:28 MisterD wrote:
why would anybody not use tabs? as long as you use the same indentation character throught your code, why not use tabs? I actually set my IDE up to only use tabs, because i really dislike having 16 different text cursor positions in front of my code instead of just 4, which actually are at exactly the spots where i could want to move indented code to. Using multiple spaces instead of single tabs requires a lot more micro management when selecting passages by mouse or keyboard properly, why would anybody prefer that?


Because when viewed under different editors (you might not be the only one viewing the code) there may be different tab display settings in those editors, and you could end up with some horrendously misaligned stuff.
Cambium
Profile Blog Joined June 2004
United States16368 Posts
August 30 2011 19:36 GMT
#14
Depends on the screen of myself and whoever is reading the code.

On a 19", I use 2.

If I have a 24" wide-screen, I use 4.
When you want something, all the universe conspires in helping you to achieve it.
EtherealDeath
Profile Blog Joined July 2007
United States8366 Posts
August 30 2011 19:37 GMT
#15
Why did people ever use 8 back in the day anyways. Sounds horrible.
Osmoses
Profile Blog Joined October 2008
Sweden5302 Posts
August 30 2011 19:37 GMT
#16
I use tabs, and whenever my me and my co-workers go into the same files and muck around the result is always the end of virtue and the triumph of malignant chaos. Cba to fix.
Excuse me hun, but what is your name? Vivian? I woke up next to you naked and, uh, did we, um?
Talin
Profile Blog Joined September 2010
Montenegro10532 Posts
Last Edited: 2011-08-30 19:41:36
August 30 2011 19:40 GMT
#17
One would expect that people working together would make sure that problems with editor differences don't ever occur.

Seems a lot easier to do than pressing space space space space (at least!) every line. If I started doing that, it would kill me. -_-
MisterD
Profile Blog Joined June 2010
Germany1338 Posts
Last Edited: 2011-08-30 19:43:11
August 30 2011 19:41 GMT
#18
why would anything misalign if you use tabs? if you need to draw ascii arts into your code, make spaces from where the default indentation ends at these lines, obviously don't use tabs inside "drawings". But for normal indentation tabs are perfectly fine.

and seriously, are there still people who are incapable of setting up their tab displaying today? i mean, you don't have to use the windows editor for programming anymore, anyone who does and actually feels like he really has any reason to complain about that .. well, i wouldn't want someone like that touching my code anyways xD

i would value usage comfort higher than compatibility with people who cannot set up their editors properly. Sure, spaces are more compatible, but they are just a lot more inconvenient. And working around the incompatibility should no be a problem for anybody, so that surely does not outweigh the increased comfort when using tabs?

/edit:

On August 31 2011 04:40 Talin wrote:
One would expect that people working together would make sure that problems with editor differences don't ever occur.

Seems a lot easier to do than pressing space space space space (at least!) every line. If I started doing that, it would kill me. -_-


you actually don't type "space space space space", you type "tab" and your editor just writes down 4 spaces instead. But any editor that can do that is pretty much guaranteed to have tab display settings, so you might as well use tabs.
Gold isn't everything in life... you need wood, too!
Cambium
Profile Blog Joined June 2004
United States16368 Posts
August 30 2011 19:43 GMT
#19
Tabs don't work well because different people prefer different IDEs/editors and operating systems, so it's almost impossible to use tabs. Also, most diff tools don't work well with tabs from different OS.

Just because you use 4 spaces, it does not mean you have to press 'space' 4 times. Most IDEs offer you the option to use "soft tabs" which converts tabs to spaces automatically.
When you want something, all the universe conspires in helping you to achieve it.
EtherealDeath
Profile Blog Joined July 2007
United States8366 Posts
August 30 2011 19:46 GMT
#20
On August 31 2011 04:41 MisterD wrote:
why would anything misalign if you use tabs? if you need to draw ascii arts into your code, make spaces from where the default indentation ends at these lines, obviously don't use tabs inside "drawings". But for normal indentation tabs are perfectly fine.

and seriously, are there still people who are incapable of setting up their tab displaying today? i mean, you don't have to use the windows editor for programming anymore, anyone who does and actually feels like he really has any reason to complain about that .. well, i wouldn't want someone like that touching my code anyways xD

i would value usage comfort higher than compatibility with people who cannot set up their editors properly. Sure, spaces are more compatible, but they are just a lot more inconvenient. And working around the incompatibility should no be a problem for anybody, so that surely does not outweigh the increased comfort when using tabs?

/edit:

Show nested quote +
On August 31 2011 04:40 Talin wrote:
One would expect that people working together would make sure that problems with editor differences don't ever occur.

Seems a lot easier to do than pressing space space space space (at least!) every line. If I started doing that, it would kill me. -_-


you actually don't type "space space space space", you type "tab" and your editor just writes down 4 spaces instead. But any editor that can do that is pretty much guaranteed to have tab display settings, so you might as well use tabs.


In a sidenote, if I ever want to edit an html file through the web editor in cpanel, it looks horrendous whenever I tabbed instead of soft tabbed. Quite an eyesore.

But I usually just ftp that shit and use Notepad2, so it doesn't really matter very much in this case.
Logo
Profile Blog Joined April 2010
United States7542 Posts
Last Edited: 2011-08-30 19:51:20
August 30 2011 19:51 GMT
#21
But again tabs aren't the same # of spaces on each editor. Sure it's fine when when you're just indenting lines but it gets messy if you have something like:


if(variableA == 0 && variableB == variable A && variableC == 50 &&
variableC == 2031) {

Something where you want to indent an amount that looks good, but isn't necessarily 'standard'.

Also it has problems where if someone uses spaces on one line for indentation (by mistake or whatever) then it's going to throw the whole formatting off. It can also be just a general pain in the ass, for example if I'm looking at a file through source control I may just open it in notepad++ or the source control's GUI editor where the tabs aren't configured to be a good # of spaces.

Meanwhile spaces are pretty much always handled correctly and always work out well.
Logo
Talin
Profile Blog Joined September 2010
Montenegro10532 Posts
August 30 2011 19:54 GMT
#22
On August 31 2011 04:43 Cambium wrote:
Tabs don't work well because different people prefer different IDEs/editors and operating systems, so it's almost impossible to use tabs. Also, most diff tools don't work well with tabs from different OS.

Just because you use 4 spaces, it does not mean you have to press 'space' 4 times. Most IDEs offer you the option to use "soft tabs" which converts tabs to spaces automatically.


But then if you're deleting a "tab", you'd actually have to hold backspace for long enough to erase 4 spaces instead of one character, right? Still too annoying imo, and really, all that to solve a problem that you can solve just by talking to people (who are working with/on your code), or leaving some notes for people who come later on?
MisterD
Profile Blog Joined June 2010
Germany1338 Posts
August 30 2011 19:58 GMT
#23
On August 31 2011 04:43 Cambium wrote:
Tabs don't work well because different people prefer different IDEs/editors and operating systems, so it's almost impossible to use tabs. Also, most diff tools don't work well with tabs from different OS.

Just because you use 4 spaces, it does not mean you have to press 'space' 4 times. Most IDEs offer you the option to use "soft tabs" which converts tabs to spaces automatically.


what? different tabs from different OS's? are you serious? xD there is only one tab char (\x09 aka \t), just as there is only one space char (\x20). There's just three different kinds of line breaks. Unix uses LF or \n or \x0d, old macs used to use CR or \r or \x0a, and windows uses CRLF or \r\n or \x0a\x0d to do line breaks. but all tabs are equal. The only difference you can see in tabs is editor settings, which set the tab width to a multiple width of spaces, but it's still just the same kind of tabs.
Gold isn't everything in life... you need wood, too!
MisterD
Profile Blog Joined June 2010
Germany1338 Posts
August 30 2011 19:59 GMT
#24
On August 31 2011 04:54 Talin wrote:
Show nested quote +
On August 31 2011 04:43 Cambium wrote:
Tabs don't work well because different people prefer different IDEs/editors and operating systems, so it's almost impossible to use tabs. Also, most diff tools don't work well with tabs from different OS.

Just because you use 4 spaces, it does not mean you have to press 'space' 4 times. Most IDEs offer you the option to use "soft tabs" which converts tabs to spaces automatically.


But then if you're deleting a "tab", you'd actually have to hold backspace for long enough to erase 4 spaces instead of one character, right? Still too annoying imo, and really, all that to solve a problem that you can solve just by talking to people (who are working with/on your code), or leaving some notes for people who come later on?


instead of backspacing 4 spaces, on most IDEs you can just select the lines and shift+tab to move them "back" one indent-width (4 spaces)
Gold isn't everything in life... you need wood, too!
Bibdy
Profile Joined March 2010
United States3481 Posts
August 30 2011 20:07 GMT
#25
I know people that use none. I wish I could punch code.
LML
Profile Blog Joined March 2007
Germany1771 Posts
August 30 2011 20:08 GMT
#26
I use two, even though the standard for most editors seems to be 4, it's too much in my opinion to work with.
First thing to change!

@MisterD, what micro management? Mouse control, ezpz, keyboard control? Use ctrl+shift+arrow key. To remove it, just do as you said yourself, shift+tab.
LML
Cambium
Profile Blog Joined June 2004
United States16368 Posts
August 31 2011 00:19 GMT
#27
On August 31 2011 04:58 MisterD wrote:
Show nested quote +
On August 31 2011 04:43 Cambium wrote:
Tabs don't work well because different people prefer different IDEs/editors and operating systems, so it's almost impossible to use tabs. Also, most diff tools don't work well with tabs from different OS.

Just because you use 4 spaces, it does not mean you have to press 'space' 4 times. Most IDEs offer you the option to use "soft tabs" which converts tabs to spaces automatically.


what? different tabs from different OS's? are you serious? xD there is only one tab char (\x09 aka \t), just as there is only one space char (\x20). There's just three different kinds of line breaks. Unix uses LF or \n or \x0d, old macs used to use CR or \r or \x0a, and windows uses CRLF or \r\n or \x0a\x0d to do line breaks. but all tabs are equal. The only difference you can see in tabs is editor settings, which set the tab width to a multiple width of spaces, but it's still just the same kind of tabs.

Ah you are right. I was thinking about new line, which almost always precedes the tabs.
When you want something, all the universe conspires in helping you to achieve it.
Bortlett
Profile Joined October 2010
United States302 Posts
August 31 2011 00:32 GMT
#28
Using tabs or spaces doesn't really matter as long as everybody's using the same thing. It makes diffs super annoying when you see a bunch of whitespace changes.
Melchior
Profile Joined January 2011
United States112 Posts
Last Edited: 2011-08-31 01:12:54
August 31 2011 01:11 GMT
#29
I use two since it's just enough to easily tell that it's indented. When I see 4-space indents, I feel like "whoaaaa calm down there!" Plus sometimes my terminal is only 80 characters wide and won't resize.

Another style convention I'm curious about is bracket usage, i.e.

int main(void)
{
return 0;
}

vs

int main(void) {
return 0;
}

I personally prefer the first, although it probably doesn't add too much in terms of clarity.

EDIT: Er. Apparently the editor doesn't like leading spaces? The return statements above should be indented... <-- newb
Myrmidon
Profile Blog Joined December 2004
United States9452 Posts
August 31 2011 01:47 GMT
#30
I use two spaces indent and put the open bracket at the end of the same line rather than a new line.

But since I'm an EE you should probably look at all of my programming practices and do the opposite.
Torenhire
Profile Blog Joined April 2009
United States11681 Posts
August 31 2011 04:39 GMT
#31
On August 31 2011 10:11 Melchior wrote:
I use two since it's just enough to easily tell that it's indented. When I see 4-space indents, I feel like "whoaaaa calm down there!" Plus sometimes my terminal is only 80 characters wide and won't resize.

Another style convention I'm curious about is bracket usage, i.e.

int main(void)
{
return 0;
}

vs

int main(void) {
return 0;
}

I personally prefer the first, although it probably doesn't add too much in terms of clarity.

EDIT: Er. Apparently the editor doesn't like leading spaces? The return statements above should be indented... <-- newb


If you quote my earlier post that has indentations like that, it'll show you the tags.

<code> fajskfjaskflg </code> will keep formatting proper. Obviously you use [] instead of <>
SirJolt: Well maybe if you weren't so big and stupid, it wouldn't have hit you.
avilo
Profile Blog Joined November 2007
United States4100 Posts
August 31 2011 09:03 GMT
#32
On August 31 2011 03:56 huameng wrote:
4 spaces is the standard I think. I highly recommend it.


yah, i'm pretty sure 4 is, because i always remember getting annoyed when everyone was tabbed and i would have to obsessive compulsively move everything back 1 space lmao.
Sup
EscPlan9
Profile Blog Joined December 2006
United States2777 Posts
August 31 2011 12:18 GMT
#33
I know we programmers love coding our own way and get annoyed by seeing other programmers coding style. But I had no idea the "proper amount of spaces" was a big deal. I don't know what you guys are using that doesn't convert tabs to spaces, but I have not run into issues with using Tab and Shift+Tab.
Undefeated TL Tecmo Super Bowl League Champion
EtherealDeath
Profile Blog Joined July 2007
United States8366 Posts
August 31 2011 13:46 GMT
#34
On August 31 2011 21:18 EscPlan9 wrote:
I know we programmers love coding our own way and get annoyed by seeing other programmers coding style. But I had no idea the "proper amount of spaces" was a big deal. I don't know what you guys are using that doesn't convert tabs to spaces, but I have not run into issues with using Tab and Shift+Tab.


I think the question is more what is your softabbing setting rather than if you do it or just use non space converting tabs.
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
Last Edited: 2011-08-31 14:41:50
August 31 2011 14:36 GMT
#35
Depends on the language, but usually i use tabs and configure vim to use different tab sizes for different file types.

HTML: 2
PHP:
2/4/8 depending on the project i'm working on as my coworkers use wildly varying styles - from 2 spaces to some spaces, then tabs, then spaces, then start of the line or other crazy mixtures of tabs and spaces.

Perl: 4
C/C++/C#/Java: 8
Bash/Windows shell scripts: 2
SQL: Depends on the query, usually 4

Basically i go by whatever looks the most easy to read for the language and editor in question.
I don't see a reason to use spaces instead of tabs as tabs allow everyone to use the indentation he likes. It only gets crazy if spaces and tabs are mixed, but thats a fault of the programmers, not of the tabs themselves.

Basically, if you use tabs, you avoid all arguments about which indentation to use... problem solved.

On August 31 2011 04:37 EtherealDeath wrote:
Why did people ever use 8 back in the day anyways. Sounds horrible.


With small fonts, 4 character indent is too small and can easily be missed if you are not careful when reading the code, 8 gives a clearly noticeable indent and makes it easier to quickly read code.
For bigger fonts, 4 is no problem, but with a fontsize 8 or 9 px it's just too small.
OpticalShot
Profile Blog Joined October 2009
Canada6330 Posts
August 31 2011 14:40 GMT
#36
I don't really code anything serious nowadays (most I ever do at work is Excel VBA) but I've used 4 for most of the stuff.
[TLMS] REBOOT
rabidch
Profile Joined January 2010
United States20289 Posts
August 31 2011 14:54 GMT
#37
4 but i usually do functional stuff these days so it doesnt really show up that much.
LiquidDota StaffOnly a true king can play the King.
Enderbantoo
Profile Blog Joined December 2009
United States465 Posts
August 31 2011 17:55 GMT
#38
On August 31 2011 04:14 Torenhire wrote:
if( spaces == 4 )
{
spaces = perfect;
}
else
{
programmer sucks
}




i still cant believe no one commented on how he's setting an int to perfect.
At the biggest upset of all of bw, Shanghai SPL finals 2011
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
August 31 2011 17:59 GMT
#39
On September 01 2011 02:55 Enderbantoo wrote:
Show nested quote +
On August 31 2011 04:14 Torenhire wrote:
if( spaces == 4 )
{
spaces = perfect;
}
else
{
programmer sucks
}




i still cant believe no one commented on how he's setting an int to perfect.


Don't forget that he forgot the line terminator in the else (though some languages allow you to skip it).
"perfect" might be a variable containing 4, ich which case that would be:

if (spaces == 4)
{
spaces = 4;
}
else
{
programmer sucks;
// is it c++? why create a variable sucks of type programmer in a scope
// where you don't do anything with. Constructor abuse?
}
Okiesmokie
Profile Joined May 2010
Canada379 Posts
October 03 2011 14:31 GMT
#40
On August 31 2011 04:14 Torenhire wrote:
if( spaces == 4 )
{
spaces = perfect;
}
else
{
programmer sucks
}



1>ClCompile:
1> main.c
1>.\main.c(15): error C2146: syntax error : missing ';' before identifier 'sucks'
1>.\main.c(16): error C2143: syntax error : missing ';' before '}'
1>
1>Build FAILED.




if(spaces == 2 && style == "like this") {
code = "perfect";
} else {
vomit();
}
Indrium
Profile Joined November 2010
United States2236 Posts
Last Edited: 2011-10-03 17:17:38
October 03 2011 17:17 GMT
#41
On August 31 2011 05:07 Bibdy wrote:
I know people that use none. I wish I could punch code.


That sounds awful! I don't think I could do that. I wouldn't be able to read it, let alone anyone else.

Oh and 4. It just makes the most sense to me.
Normal
Please log in or register to reply.
Live Events Refresh
Replay Cast
23:00
PiGosaur Cup #53
Liquipedia
OSC
23:00
OSC Masters Cup #150 Qual #1
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
RuFF_SC2 101
Ketroc 34
StarCraft: Brood War
Larva 1727
Leta 628
Sharp 40
Dota 2
monkeys_forever585
LuMiX1
League of Legends
JimRising 562
Counter-Strike
fl0m1597
PGG 71
Stewie2K0
Super Smash Bros
hungrybox460
Other Games
summit1g6812
shahzam610
Day[9].tv546
C9.Mang0292
ViBE238
Skadoodle185
Maynarde143
fpsfer 2
WinterStarcraft1
Organizations
Other Games
gamesdonequick1105
BasetradeTV138
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 17 non-featured ]
StarCraft 2
• Hupsaiya 50
• Kozan
• sooper7s
• AfreecaTV YouTube
• Migwel
• intothetv
• LaughNgamezSOOP
• IndyKCrew
StarCraft: Brood War
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• WagamamaTV743
• Ler52
League of Legends
• Stunt221
• HappyZerGling158
Other Games
• Scarra595
• Day9tv546
Upcoming Events
The PondCast
8h 1m
OSC
10h 1m
Wardi Open
1d 9h
CranKy Ducklings
2 days
Safe House 2
2 days
Sparkling Tuna Cup
3 days
Safe House 2
3 days
Tenacious Turtle Tussle
6 days
Liquipedia Results

Completed

CSL 2025 AUTUMN (S18)
WardiTV TLMC #15
HCC Europe

Ongoing

BSL 21 Points
ASL Season 20
C-Race Season 1
IPSL Winter 2025-26
EC S1
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025

Upcoming

SC4ALL: Brood War
BSL Season 21
BSL 21 Team A
RSL Offline Finals
RSL Revival: Season 3
Stellar Fest
SC4ALL: StarCraft II
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.