Slashdot Mirror


Stack Overflow 2015 Developer Survey Reveals Coder Stats

SternisheFan points out the results from 26,086 developers who answered Stack Overflow's annual survey. It includes demographic data, technology preferences, occupational information, and more. Some examples: The U.S. had the most respondents, followed by India and the UK, while small countries and several Nordic ones had the most developers per capita. The average age of developers in the U.S. and UK was over 30, while it was 25 in India and 26.6 in Russia. 92.1% of developers identified as male. Almost half of respondents did not receive a degree in computer science.

The most-used technologies included JavaScript, SQL, Java, C#, and PHP. The most loved technologies were Swift, C++11, and Rust, while the most dreaded were Salesforce, Visual Basic, and Wordpress. 20.5% of respondents run Linux more than other OSes, and 21.5% rely on Mac OS X. Vim is almost 4 times more popular than Emacs, and both are used significantly less than NotePad++ and Sublime Text.

45% of respondents prefer tabs, while 33.6% prefer spaces, though the relationship flips at higher experience levels. On average, developers who work remotely earn more than developers who don't. Product managers reported the lowest levels of job satisfaction and the highest levels of caffeinated beverages consumed per day.

428 comments

  1. Stack Overflow? by smittyoneeach · · Score: 1

    Stack overflow?
    Well, there you go.
    A smoother chin's
    The way to go.
    Burma Shave

    --
    Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    1. Re:Stack Overflow? by BarbaraHudson · · Score: 3, Informative

      I read the stats
      It's in plain view
      If you're over 50
      No job for YOU!
      Burma Shave

      --
      "Transparent" is a shit show that trades on every stereotype going. A man in drag is NOT a transsexual.
    2. Re:Stack Overflow? by Deep+Esophagus · · Score: 1

      The Burma Shave thing was funny, but the stats were really scary. I turn 52 next week!

    3. Re:Stack Overflow? by PopeRatzo · · Score: 0, Troll

      The Burma Shave thing was funny, but the stats were really scary. I turn 52 next week!

      Well, as long as you have a penis, the statistics say you're still considerably better off than if you don't.

      --
      You are welcome on my lawn.
    4. Re:Stack Overflow? by smittyoneeach · · Score: 1

      Business idea: bunch of old fart programmers get together, found own company, laugh at young punks.

      --
      Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    5. Re:Stack Overflow? by smittyoneeach · · Score: 2

      I have this weird condition where I don't feel the slightest bit of shame over history I didn't cause or natural accidents over which I'd no control, e.g. my heritage.

      --
      Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    6. Re:Stack Overflow? by PopeRatzo · · Score: 2, Interesting

      I have this weird condition where I don't feel the slightest bit of shame over history I didn't cause

      Do you understand that patriotism is nothing more than a condition of having pride over history you didn't cause? You of all people profess to have an abundance of that.

      It's interesting which history you choose to celebrate and which you choose to ignore, considering you had no part in either. Further, you also seem inordinately fond of your white European-American heritage, and concerned about it's preservation, considering that's also something over which you had no control, e.g. your heritage.

      As a thoughtful person, don't you find that interesting?

      --
      You are welcome on my lawn.
    7. Re:Stack Overflow? by Anonymous Coward · · Score: 0

      Wow. If he is a thoughtful person, you certainly just gave him some thinking to do.

    8. Re:Stack Overflow? by Anonymous Coward · · Score: 1

      Does there exist a topic you don't spray your pussy blood all over?

    9. Re:Stack Overflow? by judoguy · · Score: 1

      I'm 61 and billing around 160k a year. 30 years in the IT trade helps. I'm constantly offered "opportunities" by the head hunters. Most aren't appropriate to my skill set, but there seems to be a lot of jobs in the Minneapolis area.

      --
      Peace is easy to achieve, just surrender. Liberty is much harder get/keep.
    10. Re:Stack Overflow? by BarbaraHudson · · Score: 1

      Business idea: bunch of old fart programmers get together, found own company, laugh at young punks.

      Great idea, but how to go about it?

      --
      "Transparent" is a shit show that trades on every stereotype going. A man in drag is NOT a transsexual.
    11. Re:Stack Overflow? by Anonymous Coward · · Score: 0

      Why don't you start posting to jezebel.com instead? You might find someone who gives a shit about your incessant bullshit and we won't have to hear it. It's a win for all involved.

    12. Re:Stack Overflow? by BarbaraHudson · · Score: 1

      Anecdotes aren't proof. The stats, on the other hand, don't lie.

      --
      "Transparent" is a shit show that trades on every stereotype going. A man in drag is NOT a transsexual.
    13. Re:Stack Overflow? by Anonymous Coward · · Score: 0

      Business idea: bunch of old fart programmers get together, found own company, laugh at young punks.

      That sounds good, but who would do the work?

    14. Re:Stack Overflow? by smittyoneeach · · Score: 1

      1. Business plan
      2. Startup capital
      3. ???
      4. Profit!!!

      --
      Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    15. Re:Stack Overflow? by smittyoneeach · · Score: 0

      My patriotism is an acknowledgement that, in an exceptional moment of human history, a government was founded based upon the ideal that the government works for the people, not vice-versa.
      Acknowledged, it was imperfect, and the Constitution was single data point along a growth curve. That the Constitution was not a destination is insufficient to go all Commie and scuttle the thing. 1. It's a rounder wheel, but I hope that others adopt it.
      2. I've played my part to support and defend it, and draw honor from that service.
      3. I don't think you argue in good faith, and thus label your every utterance "crap" until proven otherwise.

      --
      Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    16. Re:Stack Overflow? by Hognoxious · · Score: 1

      The old farts, just the same as it is now.

      The youngsters spend all day twatting each others' facegrams.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    17. Re:Stack Overflow? by St.Creed · · Score: 2

      If you are a consultant and have some other consulting friends, and a good plan, you can just start out with founding a small consulting firm and then hiring a few other people as work picks up (assuming you're good at what you do). After a while you can spend more and more time on either product development, management or other activities, as you see fit.

      This is the pattern I've seen for many small firms I work with. There's no reason it can't work for others.

      --
      Therefore, by the (faulty) logic you're using, you're just a cow with a keyboard - osu-neko (2604)
    18. Re:Stack Overflow? by Simon+Brooke · · Score: 1

      I turn 60 this year. And your problem is?

      Either you're good at your job (and if you've been doing it for twenty-five+ years you almost certainly are), or you're not. If you're good and experienced, you won't have any troubled getting an interesting job at a high salary. In my present employment, I was specifically recruited to mentor (and teach software engineering discipline to) a group of good but inexperienced junior developers.

      When I was starting out in this game, thirty years ago, the person who fulfilled the role I now have in the team I was then working in was Chris Burton, who, as an apprentice, worked on the build of the Manchester Mark One, and who (after his retirement) led the rebuild of it. He was one of the best software people I've ever worked with, and he was already in his sixties when I met him.

      --
      I'm old enough to remember when discussions on Slashdot were well informed.
    19. Re:Stack Overflow? by gbjbaanb · · Score: 1

      or... over 40s don't aimlessly surf the ends of stackoverflow to find the survey, or can be bothered to fill it out such trivia. Probably too busy doing things!

      I know I do use SO but this is the first time I realised they even had a survey!

    20. Re:Stack Overflow? by Dr_Barnowl · · Score: 3, Insightful

      You can't continue to have that patriotism in view of the observable facts - your government is by the few, for the few, and the people be damned. I agree that it's great that a government was founded with these ideals - but as laid out in the constitution, the time would seem to have come to throw what you have away and replace it with a government for the people again.

      True patriotism would be revolution.

    21. Re:Stack Overflow? by geoskd · · Score: 1

      The stats, on the other hand, don't lie.

      They don't? Maybe you are reading the results wrong? Could it be that the poll group were self selecting? Maybe their users tend to be on the younger side, as older folks don’t tend to like those types of sites as much.

      The stats can mean anything you want them to mean if you haven’t normalized the data.

      --
      I wish I had a good sig, but all the good ones are copyrighted
    22. Re:Stack Overflow? by PopeRatzo · · Score: 2

      Does there exist a topic you don't spray your pussy blood all over?

      How could anyone wonder why women wouldn't want to work in tech?

      There is the nerdbro in full.

      --
      You are welcome on my lawn.
    23. Re:Stack Overflow? by BarbaraHudson · · Score: 1

      Not really viable. At a certain point, you want to devote your energies to scratching your own itch, not wasting your time solving other people's problems over and over again.

      --
      "Transparent" is a shit show that trades on every stereotype going. A man in drag is NOT a transsexual.
    24. Re:Stack Overflow? by BarbaraHudson · · Score: 1

      That sounds like a good argument on the surface, but it fails to look at the context. Technologies change, languages change, language implementations have their own quirks, and if you're not doing something different once in a while, you're in a rut. The turbo pascal or basic or dbase coder 30 years ago has either moved on to something else or is obsolete.

      If they've "moved on", chances are that they've done so multiple times, so there's no reason to believe they wouldn't be on stack overflow any less than anyone else.

      --
      "Transparent" is a shit show that trades on every stereotype going. A man in drag is NOT a transsexual.
    25. Re:Stack Overflow? by Anonymous Coward · · Score: 0

      Our problem? Our problem? I'll tell you our problem. You are 60 and we don't know where to send the flowers. We don't know WHERE TO SEND THE FLOWERS! Or should we make a donation instead? We DON'T KNOW!

    26. Re:Stack Overflow? by BarbaraHudson · · Score: 1

      The stats are entirely consistent with the real world, where most programmers are "up or out" by 40.

      --
      "Transparent" is a shit show that trades on every stereotype going. A man in drag is NOT a transsexual.
    27. Re:Stack Overflow? by Anonymous Coward · · Score: 0

      If you think you're old, you'll act old.

      (not an original quote)
      BTW I'm in my mid fifties, had one bout of unemployment (8 months) 10 years ago. Working FT since, software development, low 6 figures.

    28. Re:Stack Overflow? by angel'o'sphere · · Score: 1

      Anecdotes are proof.
      Same as stats.

      He is old, he has a job so he has proved there are jobs for olds. Get a damn clue.

      The whole idea that IT workers or developers have no job when old is completely retarded.

      If you can not get a job in the USA, come to Europe, we need developers badly and the more experience you have the easier you get a job.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    29. Re:Stack Overflow? by smittyoneeach · · Score: 1

      You can't continue to have that patriotism in view of the observable facts - your government is by the few, for the few, and the people be damned.

      You're telling me what to think? Who are you--the government?
      Sure, revolution at the ballot box: I'm a big fan.

      --
      Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    30. Re:Stack Overflow? by BarbaraHudson · · Score: 1

      The problem isn't how you think - it's how you're perceived. And unfortunately, the trend is - over 40? You're too expensive / too old - bye-bye.

      --
      "Transparent" is a shit show that trades on every stereotype going. A man in drag is NOT a transsexual.
    31. Re: Stack Overflow? by pruss · · Score: 1

      Patriotism is not about pride, or at least need not be. You can love your brother without thinking he's the greatest person in the world, or even greater than average. The same is true for one's country.

    32. Re: Stack Overflow? by PopeRatzo · · Score: 1

      So, you're saying that smitty_one_each isn't proud of being American? That he's not proud of his heritage?

      Because pride and shame are precise antonyms. If he's not going to feel shame about that which he did not cause, how can he feel pride about that which he did not cause?

      Sounds like he's trying to have the cake he's already eaten, if you understand the reference.

      --
      You are welcome on my lawn.
    33. Re:Stack Overflow? by Gavagai80 · · Score: 1

      You think that the USA government was founded on the ideal of full participation for everyone, when only white male land owners could vote? Political power is drastically less concentrated in the elite now than it was then, not that now is good.

      --
      This space intentionally left blank
    34. Re:Stack Overflow? by BarbaraHudson · · Score: 1

      Most programmers are either moved up to management or gone by 40. The people here on slashdot are a self-selected group that is mostly still in the business, so those anecdotes are NOT evidence of the overall market. To the contrary, they mask the real problem in a fog of denial.

      Stats show that after 50, you can expect a 20% pay cut every time you change jobs. You'll be the last hired, the first fired, and spend longer looking for a new gig.

      For every exception to this, there are also people in their 40s who are now finding out that they're now "too old."

      The stats show that programmers in their 50s are the exception, not the rule.

      --
      "Transparent" is a shit show that trades on every stereotype going. A man in drag is NOT a transsexual.
    35. Re:Stack Overflow? by ranton · · Score: 1

      Anecdotes aren't proof. The stats, on the other hand, don't lie.

      Stats don't lie, but conclusions based on stats sure do.

      All new fields are going to have their ranks skewed towards young practitioners regardless of any age discrimination. People tend to choose careers at a young age and switching careers drastically is fairly rare. Since the computer programming field didn't start to explode in size until the 90's, it is obvious why there are few people (proportionally) over the age of 40 in this profession.

      Take a look at the average age of developers in various countries. The United States was arguably the country where the software developer profession really took off, and it is also the country with the highest average developer age. The average age of developers in other countries will continue to rise, just as it is rising in the US, as this becomes a more established profession.

      --
      -- All that is necessary for the triumph of evil is that good men do nothing. -- Edmund Burke
    36. Re:Stack Overflow? by BarbaraHudson · · Score: 1

      Still doesn't explain why most people quit the field by 40.

      --
      "Transparent" is a shit show that trades on every stereotype going. A man in drag is NOT a transsexual.
    37. Re:Stack Overflow? by Anonymous Coward · · Score: 0

      All new fields are going to have their ranks skewed towards young practitioners regardless of any age discrimination.

      A field that doesn't lead to management is called "dead end job." Even the line workers at McDonalds, if they're any good, get moved up to management. Why? Because there comes a time when any competent professional can be more useful helping younger people learn their jobs. Where he understands the flow of work within a team well enough that he can spot the bottlenecks. If you refuse to grow like that, then maybe you shouldn't be surprised when prospective employers lump you in with the people who just never "get it." This means the competent people are continually being promoted out of actually doing the job, leaving the young and incompetent.

    38. Re:Stack Overflow? by ranton · · Score: 1

      Still doesn't explain why most people quit the field by 40.

      I have yet to see any studies showing a mass exodus from the field by age 40. They usually use similar stats as this article which merely show the majority of developers are under 40 (which is irrelevant for the reasons I mentioned in my original post).

      A large number of developers do move into management by the age of 40, but that is true of almost all fields. I would be willing to bet their aren't many 45 year old financial analysts; they are probably VP of Whatever by then. While some people stay as senior developers their whole careers, plenty of others move into Director of Software Development, Application Architect, Entrepreneur, etc. careers by the age of 40. It doesn't mean they have left the field just because they don't consider themselves software developers anymore.

      --
      -- All that is necessary for the triumph of evil is that good men do nothing. -- Edmund Burke
    39. Re:Stack Overflow? by ranton · · Score: 1

      A field that doesn't lead to management is called "dead end job."

      Project/Product Manager, Manager of Software Development, Director of Software Development, VP of Software Development / System Architecture, Application Architect, CTO, etc.

      All of these are essentially management level jobs that software developers usually find themselves in by the age of 40 if they continue to progress in their career. Plenty decide to stay as a senior level developer until retirement, but their careers usually plateau if they make that decision. Same as the McDonald's worker from your example who will also have his career stall if he stays as a shift supervisor.

      --
      -- All that is necessary for the triumph of evil is that good men do nothing. -- Edmund Burke
    40. Re:Stack Overflow? by gbjbaanb · · Score: 1

      I didn't mean "not use stackoverflow" but "don't surf it as a hobby".

      I happen to have quite a big rep on there, but my 2 work colleagues here who are older than I am both use SO without having a user account on there. (yes, they agree they should have one if only to show their appreciation in upvotes). And besides, it wasn't as heavily advertised as I never noticed it (though I do spend most of my time on Programmers rather than SO).

      I think many older guys just aren't as likely to be filling in surveys on SO as opposed to using it.

    41. Re:Stack Overflow? by St.Creed · · Score: 1

      If you can see that poin coming, and plan ahead, you can start a company and move into a position where you can do whatever you want (scratch your itch), without having to go through external financing rounds or getting loans from the bank - the last thing has been fatal to a lot of startups recently, when the banks had to take back the loan due to new rules.

      --
      Therefore, by the (faulty) logic you're using, you're just a cow with a keyboard - osu-neko (2604)
    42. Re:Stack Overflow? by Anonymous Coward · · Score: 0

      Surveys are not really accurate stats. They are only an accurate reflection of those that chose to reply.

    43. Re:Stack Overflow? by Anonymous Coward · · Score: 0

      Higher chance of being imprisoned or a victim of violent crime is better off? Go ahead, I'll give you this one for free; go on about how harsher sentencing in the criminal justice system is somehow sexism against women.

    44. Re:Stack Overflow? by BarbaraHudson · · Score: 1

      I have yet to see any studies showing a mass exodus from the field by age 40.

      I've presented them in other discussions. Not my problem if you're too lazy to search for the actual data.

      While some people stay as senior developers their whole careers, plenty of others move into Director of Software Development, Application Architect, Entrepreneur, etc. careers by the age of 40. It doesn't mean they have left the field just because they don't consider themselves software developers anymore.

      There are fewer jobs the higher up you climb the ladder, so no, most will be out, not up.

      --
      "Transparent" is a shit show that trades on every stereotype going. A man in drag is NOT a transsexual.
    45. Re:Stack Overflow? by BarbaraHudson · · Score: 1

      The same comments about older guys don't apply to younger guys too?

      --
      "Transparent" is a shit show that trades on every stereotype going. A man in drag is NOT a transsexual.
    46. Re:Stack Overflow? by BarbaraHudson · · Score: 1

      Sure, if you want a huge cut in pay. Why not just get a job that has better security and pays more than doing the start-up thing?

      --
      "Transparent" is a shit show that trades on every stereotype going. A man in drag is NOT a transsexual.
    47. Re:Stack Overflow? by BarbaraHudson · · Score: 1

      Except that this survey pretty much mirrors what researchers have found, as well as the conventional wisdom.

      --
      "Transparent" is a shit show that trades on every stereotype going. A man in drag is NOT a transsexual.
    48. Re:Stack Overflow? by angel'o'sphere · · Score: 1

      The stats in the USA, yes.

      The rest of the world is quite different. I'm reaching 50 now and I get about 10 job offers/requests if I'm available per month: by doing nothing except being on a few recruiting sites.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    49. Re: Stack Overflow? by Anonymous Coward · · Score: 0

      At the time the mindset was still feudal. The idea was nobles oblige - the house holder represented the needs of the household. As times became more selfish the idea of households voting became untenable, hence the Civil War.

      I many ways the slave of 250 years ago was better off than many who are free today. I am not saying that slavery is good - it is abominable! So are many conditions today in the US. You are free to starve, free to be homeless. Free to be ignored, free to be exploited. It seems today you have virtual slavery. You get to vote a different face in, but still don't get representation - that is why most of you don't vote even though you have the right!

    50. Re: Stack Overflow? by Anonymous Coward · · Score: 0

      The percentage of land holders at the time of the Constitution was more than the 1% that actually have a say today.
      When was the last time Congress voted for copyright to be reduced (or even left alone) so that Mickey Mouse would become the people's property? Nope, don't expect it to happen either. Your vote won't change that.

    51. Re:Stack Overflow? by PopeRatzo · · Score: 1

      Political power is drastically less concentrated in the elite now than it was then, not that now is good.

      That is demonstrably not true. Before any candidate is presented to the public for a vote, there is a money primary, where the very wealthy decide who will and will not be allowed to run for office. In some districts, the money primary extends all the way down to the level of city council and even local school boards.

      Why do you think you have these parades of candidates running the Sheldon Adelson and the Koch brothers, kissing their rings and praying for their patronage?

      There has not been a candidate for national office who was not first vetted by the wealthy for more than 60 years The last presidential candidate who did not have wealthy patrons was Harry S Truman, who only got there through the death of FDR and a fight within the Democratic Party.

      There has never been a time in US history when political power was more concentrated in the elite. Never.

      --
      You are welcome on my lawn.
    52. Re:Stack Overflow? by Anonymous Coward · · Score: 0

      your government is by the few, for the few

      It has to be that way. The very nature of coercive authority is the few dominating the many.

    53. Re:Stack Overflow? by BarbaraHudson · · Score: 1

      If you're not happy with the way government works, then run for office at some level. It might be futile, it might be a waste of time, but at least you'll be able to have some sort of platform from which to make suggestions to improve things.

      You might even get elected ...

      --
      "Transparent" is a shit show that trades on every stereotype going. A man in drag is NOT a transsexual.
    54. Re:Stack Overflow? by rjstanford · · Score: 1

      If you have a lot of expertise in a particular vertical or solving a particular class of problem well, and build up a track record in related projects, you may well find yourself getting well-paid to scratch that particular itch, and solve it well, bringing you the first major customer as well (unless you're truly the only person to ever have it, that is).

      --
      You're special forces then? That's great! I just love your olympics!
    55. Re:Stack Overflow? by BarbaraHudson · · Score: 1

      The problem with that is after decades of tech BS, my attitude is f*ck the potential customers. They don't know what they want in the first place, they keep changing their minds, they don't listen to advice until it's too late, have a very selective memory, then try to unload the cost and responsibility onto you for their mistakes. Same thing with bosses.

      That's one of the reasons that, after a period of decompression, people are actually happy to get out of the rat race, which helps explain the huge drop-off after 50. I love coding. but I'll never go back to it for anyone else - neither a boss nor a customer - there are just far too many asshats.

      --
      "Transparent" is a shit show that trades on every stereotype going. A man in drag is NOT a transsexual.
    56. Re:Stack Overflow? by lsatenstein · · Score: 1

      You can't continue to have that patriotism in view of the observable facts - your government is by the few, for the few, and the people be damned. I agree that it's great that a government was founded with these ideals - but as laid out in the constitution, the time would seem to have come to throw what you have away and replace it with a government for the people again.

      True patriotism would be revolution.

      I second your statement

      --
      Leslie Satenstein Montreal Quebec Canada
    57. Re:Stack Overflow? by Stubbyfingers · · Score: 1

      Yeah, Simon--if you're permanently screwed into a position, you're fine at 50 or 60. But if your job gets proverbially "blown out from under you", you're proverbially "permanently screwed".

      The good news, there are "Temp agencies". They're fine, if you don't mind working for half pay and driving twice as far.

    58. Re:Stack Overflow? by Anonymous Coward · · Score: 0

      I read the stats
      It's in plain view
      If you're over 50
      No job for YOU!
      Cos Srikant got your job
      He say coding he can do

    59. Re:Stack Overflow? by Anonymous Coward · · Score: 0

      I have this weird condition where I don't feel the slightest bit of shame over history I didn't cause

      Do you understand that patriotism is nothing more than a condition of having pride over history you didn't cause? You of all people profess to have an abundance of that.

      It's interesting which history you choose to celebrate and which you choose to ignore, considering you had no part in either. Further, you also seem inordinately fond of your white European-American heritage, and concerned about it's preservation, considering that's also something over which you had no control, e.g. your heritage.

      As a thoughtful person, don't you find that interesting?

      Stop your blathering shit. Your problem is that you have lived nowhere else and are simply parroting what your professors have told you.

      I am not American, but know it well.

      America has a lot to be patriotic about. Most other places in the world are shitholes. The US, has somehow managed to pull off something quite miraculous. Freedom for assholes (we say arseholes) like you to provide platitudes without any basis in fact.

      Take Europe. Or that darling of the left Sweden. It is a George Orwell nightmare (I lived there for a while) with the state effectively managing and bringing up the kids. The whole thing is social engineering on steroids. Anyway it is hardly bigger - population wise - than a large US city.

      Or what about Africa? Run mostly by dictators, and with appalling infrastructure, medical facilities and safety. And it was worse (not better as you've been brainwashed) before the whites arrived.

      Then there is South America that consistently wins records such as the most rapes and or murders and or kidnappings per country depending what year you choose.

      You want Asia. Well in most places there the environment is ghastly: crowded, unsanitary and despotic. Only the climate in much of Asia saves the situation. You don't freeze to death in a shanty.

      And I'll not even get into the Middle East. Even with your narrow view of the world, I am sure, you are aware of what is going on there.

      So yes there is much to be patriotic about in the US. Only idiots and pubertal kids trying to be too clever by half, can't see that. And are trying to bring it down.

    60. Re:Stack Overflow? by PopeRatzo · · Score: 1

      Your problem is that you have lived nowhere else and are simply parroting

      Three years in Eastern Europe. Five years in Italy. Been to five of the seven continents.

      So yes there is much to be patriotic about in the US.

      You must not know this Samuel Johnson quote:

      "Patriotism is the last refuge of a scoundrel"

      And no, Samuel Johnson was not a second basement for the '52 Braves.

      Only idiots make the kind of assumptions that you have.

      --
      You are welcome on my lawn.
    61. Re:Stack Overflow? by Anonymous Coward · · Score: 0

      yeah yeah - I tried to get VC funding for a truly great idea, but being a 50-something woman it was like talking to toddlers who couldn't see past their image of entrepreneurs being young-buck-hacker-masters-of-the-universe and me as a school marm.

      So...I did it anyway with 2 ancient (60 year old) partners and NO VC funding. We just sold our technology. Guess who is calling me NOW to see what I'm doing next....VCs. S*** em! Go forth old farts, go forth!

    62. Re:Stack Overflow? by rjstanford · · Score: 1

      If there weren't any problems, they wouldn't need to hire you...

      --
      You're special forces then? That's great! I just love your olympics!
    63. Re:Stack Overflow? by BarbaraHudson · · Score: 1

      Let them solve their own process and management problems first. As far as I'm concerned, unless someone slaps a 7-figure sum on the table, it's no longer worth the ag. And even then I probably wouldn't accept, because a few decades of bad processes and asshat management have turned what used to be a pleasure into a real pain.

      Far far better to do anything else.

      --
      "Transparent" is a shit show that trades on every stereotype going. A man in drag is NOT a transsexual.
  2. As it should be by Anonymous Coward · · Score: 1

    Vim is almost 4 times more popular than Emacs

    :wq

    1. Re:As it should be by johnsnails · · Score: 1

      Shift zz

    2. Re: As it should be by Anonymous Coward · · Score: 0

      I've always been a "shift zz" person myself, too.

    3. Re:As it should be by Anonymous Coward · · Score: 0

      :wq

      :x

    4. Re:As it should be by Bigbutt · · Score: 1

      This is where I am as well.

      [John]

      --
      Shit better not happen!
  3. Tabs vs Spaces by Afty0r · · Score: 3, Interesting

    As a fairly experienced and slightly wrinkly and grey developer, can anyone tell me why spaces over tabs?

    Tabs allow the developer to customise their IDE to display the amount of indentation they desire... and use fewer bytes... spaces seem to have no benefits whatsoever in my book.

    1. Re: Tabs vs Spaces by Anonymous Coward · · Score: 2, Interesting

      Are you kidding? If you edit code on unix tabs are a nightmare.

    2. Re:Tabs vs Spaces by Anonymous Coward · · Score: 4, Interesting

      As a fairly experienced and slightly wrinkly and grey developer, can anyone tell me why spaces over tabs?

      Tabs allow the developer to customise their IDE to display the amount of indentation they desire... and use fewer bytes... spaces seem to have no benefits whatsoever in my book.

      Different editors display tabs differently.

      Some editors replace tabs with N spaces.

      Mix the two, and indentation gets all fucked up.

      You work for me, you will use spaces.

    3. Re: Tabs vs Spaces by Anonymous Coward · · Score: 0

      Damn right. Tab character must die!

    4. Re:Tabs vs Spaces by Kohath · · Score: 4, Informative

      Spaces are 1 space. Tabs are a random number of spaces.

    5. Re:Tabs vs Spaces by AuMatar · · Score: 3, Informative

      Tabs were more likely to cause problems in the old days, when editors did things that were ridiculous like expand them to 8 spaces. Nowdays with everything configurable, it isn't much of an issue. The reason why the older more experienced people prefer spaces is that they learned to dislike tabs in the bad old days. In 10 years that argument will be dead with tabs winning.

      --
      I still have more fans than freaks. WTF is wrong with you people?
    6. Re:Tabs vs Spaces by Anonymous Coward · · Score: 2, Insightful

      well i don't work for you, and i know how to configure editors to keep tabs as tabs. so i guess i win on two counts.

    7. Re: Tabs vs Spaces by Anonymous Coward · · Score: 0

      So if everybody configures their tabs differently the result is ONE BIG MESS.

    8. Re:Tabs vs Spaces by alvinrod · · Score: 1

      Honestly any IDE worth a damn should convert a tab into a configured number of spaces. A space is a space regardless of what's being used to display or edit the code. If everyone is using the same IDE, it probably doesn't matter, but if you've had to deal with a mixed environment, it winds up creating all manner of unnecessary headaches. A tab is open to interpretation and if mixed with spaces could end up looking heinous on some other IDE. We have so much storage space now that no one is going to squabble over a few bytes of extra space taken up by a source code file. If you're dealing with some kind of system where it needs the source code and space is limited, it's likely that you'll pre-processes the code to strip out white space anyways.

      If you work alone, it's not a problem, but get enough people together and inane differences in coding style can rapidly devolve into petty wars of passive aggression. No need to let differences in choice of IDE/editor add fuel to the fire.

    9. Re:Tabs vs Spaces by crgrace · · Score: 2

      If you use Python tabs can still cause you a lot of grief. In 2015.

    10. Re:Tabs vs Spaces by twistedsymphony · · Score: 1

      I used to feel exactly the way you do, but I've read a few arguments that changed my mind and led me to switch to spaces (typically whatever IDE I'm using is setup such that when I push the tab key it inserts spaces instead so there was really no significant change to how I do things). I don't recall the exact articles that changed my mind but a good break down of why you might choose one over the other can be found here.

    11. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      Succinctly put!

    12. Re: Tabs vs Spaces by monkeyzoo · · Score: 1

      Are you kidding? If you edit code on unix tabs are a nightmare.

      Yup.

      Be careful inferring causation from correlation in the last paragraph:

      45% of respondents prefer tabs, while 33.6% prefer spaces, though the relationship flips at higher experience levels. On average, developers who work remotely earn more than developers who don't. Product managers reported the lowest levels of job satisfaction and the highest levels of caffeinated beverages consumed per day.

      There are alternate plausible explanations for all those things other than the one that might first appear.

    13. Re:Tabs vs Spaces by dmbasso · · Score: 1

      In 10 years that argument will be dead with tabs winning.

      Perhaps. But right now, not in the bad old days, I do a "git diff my_file_with_tabs_different_than_8_spaces.c" and get a wonderfully beautiful output [/sarcasm].

      Yes, I love CLI, now get off my lawn.

      --
      `echo $[0x853204FA81]|tr 0-9 ionbsdeaml`@gmail.com
    14. Re: Tabs vs Spaces by monkeyzoo · · Score: 2

      i think you missed the point.
      you can customize the *display* of tabs.

    15. Re:Tabs vs Spaces by Alien1024 · · Score: 1

      I've relearned to dislike them, thanks to Python.

    16. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      well i don't work for you, and i know how to configure editors to keep tabs as tabs. so i guess i win on two counts.

      Good for you.

      I'm sure all your coworkers love your imposition of YOUR individual standards on them.

      And I seriously doubt an internet asshole like yourself has the balls to be insubordinate to the person signing your paycheck.

      Hiring you might be worth it just for the inevitable frog-march out the door you get from security when you get fired.

    17. Re: Tabs vs Spaces by Anonymous Coward · · Score: 0

      Do you understand how meaningless 'keeping tabs as tabs' is?

    18. Re:Tabs vs Spaces by BarbaraHudson · · Score: 1, Interesting

      Spaces are 1 space. Tabs are a random number of spaces.

      Get an old typewriter. Unless you've manually set the tabstops to something custom (eg. for making tables or columns), tabstops are every 8 spaces.

      --
      "Transparent" is a shit show that trades on every stereotype going. A man in drag is NOT a transsexual.
    19. Re:Tabs vs Spaces by Jeremi · · Score: 5, Funny

      As a fairly experienced and slightly wrinkly and grey developer, can anyone tell me why spaces over tabs?

      Because in every project that uses tabs,
      The code is inevitably
              littered with
              the occasional
        line that does not line up with the others
              for no apparent reason.
              and you will spend part of every day
              either changing your editor's tab settings
              to match the tab settings of the code's author
              or editing the code to "fix" the problem
              (which will of course "break" it for the
              next person whose tab settings don't match yours)

      If you avoid tabs and use only spaces, OTOH, the code formatting will look correct on any editor with any tab setting.

      --


      I don't care if it's 90,000 hectares. That lake was not my doing.
    20. Re:Tabs vs Spaces by AuMatar · · Score: 2

      Yet another reason not to use Python. Guido made a major fuck up there- if he was going to use whitespace as syntax, he should have made the type and amount part of the language spec. Not doing so has wasted more developer time than any other language issue I've ever seen.

      --
      I still have more fans than freaks. WTF is wrong with you people?
    21. Re:Tabs vs Spaces by Jeremi · · Score: 1

      (Replying to myself before someone else does...)

      This problem is technically avoidable if every code author is careful to always use tabs only for each line's initial indentation, and never use a tab after a space (or after any other non-tab character on a line), and never use spaces as the initial indent characters.

      However, in practice this doesn't happen reliably, presumably because the inevitable mistakes are invisible to the code's author (since it all looks correct in *his* IDE)

      --


      I don't care if it's 90,000 hectares. That lake was not my doing.
    22. Re:Tabs vs Spaces by Kohath · · Score: 1

      Spaces are one space. There's no "unless they aren't that many spaces this time" situation because they're always 1 space.

      When I want to backspace over something that's indented with tabs, there's no way to know how many times I will have to hit backspace. Are there 4 spaces and a tab so I have to hit backspace 5 times? Or just a tab, so I have to hit it once?

      Also, why would anyone still have a typewriter?

    23. Re: Tabs vs Spaces by swillden · · Score: 2

      i think you missed the point. you can customize the *display* of tabs.

      Which only matters if all indentation, including alignment, is done with tabs. The moment you throw in a few spaces to line something up on a non-tab boundary (say, to align a second line of arguments with the first argument), then you have a mess, unless your tab width is set to exactly the value that whoever touched the code before you set it to.

      In addition, terminal windows still display tabs as eight characters and likely will forever... and even if your terminal allows you to configure tab size to something other than eight, it'll just break the formatted output of other tools that assume that tabs are properly-sized.

      Experienced developers prefer tabs not because they got used to them in "the bad old days". We had configurable editors 20 years ago too, you know... in fact all programmer's editors could configure tab size 20 years ago, and we had young punks like you arguing exactly the same thing. Actually, to tell the truth, I was very much a "tabs not spaces" punk in the 90s. Back then we also had benchmarks to show that using tabs rather than spaces resulted in faster compile times, measurably so, at least on sufficiently-large codebases. WordPerfect's style guide insisted on tabs for this reason.

      But... configurable editors don't solve the problem. And today, of course, tabs vs spaces is utterly irrelevant to compile times. Plus we now have Python to contend with.

      You, too, will one day get so frustrated when dealing with impossible-to-read code due to tabs, possibly with formatting that assumes multiple different tab sizes within a single file, that you'll be enlightened and learn to love spaces.

      Hopefully when that day comes you'll have a good, configurable programmer's editor that can not only automatically manage indentation with spaces, but even highlight or automatically replace leading tabs with spaces. I recommend EMACS, which thoroughly handled these issues 30+ years ago.

      Now get off my lawn! Tabs are NOT welcome here.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    24. Re:Tabs vs Spaces by fisted · · Score: 1

      It's PEBCAK, actually.
      Tabs for indentation are a good thing, because people have different tastes wrt. indentation width (I use tabstop 8 and reading stuff indented with 4 or even 2 spaces is a PITA).
      The problem is, people are doing it wrong, and insert tabs after non-tab characters. And will use tabs for line-continuation indentation, which leads to a messy look when viewed at something else than the tabstop the original author used. And then it ends in tears.

      Wrong:
      <TAB>int foo =<TAB>42;

      Wrong:
      <TAB><TAB>foobar(so, many, arguments, here,
      <TAB><TAB><TAB><TAB>the, line, must,
      <TAB><TAB><TAB><TAB>be, continued);

      Correct (period represents space):
      <TAB><TAB>foobar(so, many, arguments, here,
      <TAB><TAB>....the, line, must,
      <TAB><TAB>....be, continued);

      Doing it as shown in the last example, adjusting the tabstop will provide a convenient way to adjust the indentation to personal preference without causing a mess.

    25. Re:Tabs vs Spaces by AuMatar · · Score: 2

      You have to hit it once. That deletes the entire tab. Unless you have your editor set to do something weird, like turn tabs into spaces.

      --
      I still have more fans than freaks. WTF is wrong with you people?
    26. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      It's about playing nicely with other developers. You may have your environment set up exactly the way you like it, but you just don't get to control everyone else's. And newbie developers - without wishing to generalise - tend not to appreciate the value of maintainability as much as more experienced ones do.

      Spaces are more portable than tabs.

    27. Re:Tabs vs Spaces by ehynes · · Score: 1

      You code using a typewriter? Old school FTW!

    28. Re:Tabs vs Spaces by msobkow · · Score: 2

      Myself, I've learned to dislike Python rather than the tabs.

      --
      I do not fail; I succeed at finding out what does not work.
    29. Re:Tabs vs Spaces by RabidReindeer · · Score: 5, Insightful

      As a fairly experienced and slightly wrinkly and grey developer, can anyone tell me why spaces over tabs?

      Tabs allow the developer to customise their IDE to display the amount of indentation they desire... and use fewer bytes... spaces seem to have no benefits whatsoever in my book.

      Once upon a time, tabs were wonderful. Because disks held 80 kilobytes and ANYTHING that could put more code/data on a disk was wonderful, as long as you had the RAM/CPU to deal with it.

      Those days are long gone, however.

      The nominal expansion of tabs is to advance to the next column which is a multiple of 8. That's presupposing "absolute" horizontal tabs, as opposed to the less-common relative horizontal tab (RHT).

      But 8 columns is a really awkward amount to indent things, especially if you're dealing with letter-sized printouts at 10 characters per inch. A much more pleasant value is usually to tab in increments of 3 or 4 columns.

      And, as others have pointed out, the 8-character convention is really just a convention. There's always someone who sets their hardware tabs or tab displays differently.

      And then there's Python, which gets its magic from careful indentation. Meaning that a listing that looks fine on-screen or on paper may bewilderingly not run. Because although the alignment of the characters on successive lines may match up, the actual number of spacing characters on those lines might not. And conversely, the alignment can get scrambled just because someone picked a different tab expansion value.

      And that is why it's the experienced people who are least fond of tab characters. Once burnt...

    30. Re: Tabs vs Spaces by jrumney · · Score: 1

      The moment you throw in a few spaces to line something up on a non-tab boundary (say, to align a second line of arguments with the first argument), then you have a mess

      It is trivial to avoid this problem by configuring tab-width to 1. Yet again,newbie configuration wins over decades of experience.

    31. Re:Tabs vs Spaces by Your.Master · · Score: 3, Insightful

      Spaces are unquestionably useful in some cases. Tabs need to justify their existence.

      I can virtually guarantee if you were inventing the first character set today, with no backward-compatibility constraints and no knowledge of the real world's history of keyboarding, you would not include a tab key. It's a relic of the typewriter era, and it's redundant. You *would* probably have a "change the currently focussed element" key, but I suspect it would be related to the arrow keys and would be positional rather than linear. Word processors would have a different affordance for "indent bulleted list".

      Disk space for source code tabs vs. spaces is irrelevant.

      To me, the tab character causes problems and the only real problem it solves (different tastes for how much width to indent) are better solved by an IDE which is already solving the same problem in so many other contexts, like syntax highlighting in different colours etc.. An IDE could easily say that a line that starts with a string of X consecutive spaces should be represented as Y consecutive spaces. Y may even be a fraction, or a function if you choose to have tab mean "align to previous", but 2, 4, and 8 fixed-width spaces are pretty common. Personally I like 3, but at my workplace the standard is 4 and that's just fine.

    32. Re:Tabs vs Spaces by alexhs · · Score: 2, Insightful

      I guess that there are multiple reasons.

      The most common one is ignorance: most people don't know how tabs are supposed to be used as indentation and indentation ONLY, and how to set up an editor appropriately (and the shell, by the way) (see the other responses to your comment for proof).

      The second is lazyness / non-confrontational behaviour: If you settle on tabs, you will have to educate all users about the correct usage, and have to bear with people that just insist on using tabs differently (see point 1). If you settle on space usage, that's about it.

      The third reason is that some editors are stupid, because the implementation doesn't know that tabs are supposed to be used as indentation and indentation ONLY, and will (for example) insist on aligning multi-line arguments to a function just after the parenthesis using a liberal amount of tabs.

      And then there are some language requirements that like to mess things up, like Makefile requiring tabs and other scripting languages pursuing a vendetta against tabs (like Python).

      That being said, I will gladly educate people about tab usage, their ignorance is no excuse for using inferior solutions.

      --
      I have discovered a truly marvelous proof of killer sig, which this margin is too narrow to contain.
    33. Re: Tabs vs Spaces by corychristison · · Score: 3, Informative

      I prefer tabs.

      I don't understand the debate here. Use what you like. If you're editing someone else's code, then convert it to your preference or suck it up.

      The editor I use will detect tabs or spaces in the file, and automatically convert it to the preference I set it to in the settings.

      Why is this so hard? Why don't all editors do this?

    34. Re: Tabs vs Spaces by Ichijo · · Score: 1

      The moment you throw in a few spaces to line something up on a non-tab boundary (say, to align a second line of arguments with the first argument), then you have a mess...

      Not if both lines have the same number of tabs, and no tab ever follows a non-tab character on the same line.

      --
      Any sufficiently unpopular but cohesive argument is indistinguishable from trolling.
    35. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      Succinctly put!

      Fixed succinctly putc...

    36. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      autism alert! someone is doing something you don't like! get mad & throw a fit! there goes this week's good boy points.

    37. Re:Tabs vs Spaces by boondaburrah · · Score: 1

      I have an old typewriter. Unless you set the tab stop the thing will fly to the end of the line! (or until you let go of the tab lever, whichever comes first)

    38. Re: Tabs vs Spaces by DigiShaman · · Score: 5, Funny

      Next time you interview someone, the first question out of your mouth should be "Tabs or spaces?!" This way, nobody's fucking time is wasted.

      --
      Life is not for the lazy.
    39. Re: Tabs vs Spaces by monkeyzoo · · Score: 1

      You responded to the wrong person. I explained the previous comment to the poor fellow who totally misunderstood it, but I did not express an opinion.

      I will do so now...

      i think you missed the point.
      you can customize the *display* of tabs.

      Which only matters if all indentation, including alignment, is done with tabs.

      Yes that is true.

      In addition, terminal windows still display tabs as eight characters

      Yes that is true.

      You, too, will one day get so frustrated when dealing with impossible-to-read code...

      I already have.

      I hate tabs (and I'm also very experienced). But I could imagine tolerating a project where at least only tabs were used consistently. People who work for me configure their editors to replace tabs with spaces.

    40. Re: Tabs vs Spaces by monkeyzoo · · Score: 1

      And now code structure indentation is one space? No thanks!

    41. Re:Tabs vs Spaces by timelorde · · Score: 1

      IBM Selectric. Nothing finer than that.

    42. Re: Tabs vs Spaces by TechyImmigrant · · Score: 1

      I use VIM and Notepad++, but if Notepad++ was on Linux, I'd be using it there too. Notepad++ got the usability/productivity thing right. It's interface for columular work makes VIM and Emacs look just sad.

      --
      I should use this sig to advertise my book ISBN-13 : 978-1501515132.
    43. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      5 informative for something that is completely wrong? Only on slashdot. Sigh.

    44. Re: Tabs vs Spaces by Anonymous Coward · · Score: 0

      I like to see code flow control easily while skimming code, not by squinting to spot 8 pixels of difference.

    45. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      I use python extensively at work. I agree that making whitespace part of the syntax is boneheaded, but it's one of those things that you get used to.

      My experience is that this only causes problems if you mix tabs and spaces. However, the issue of tabs vs spaces rarely comes up at work. It is one of those things that you and your team must agree on early in the planning stage and stick with it (a clue-bat helps to ensure compliance).

      What we tend to do is use 4 space indentation. Then, even if a stray tab makes it through, it is trivial to convert it into 4 spaces with a sed script.

      It's all down to enforcing coding discipline, really.

    46. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      Spaces are 1 space. Tabs are a random number of spaces.

      Spaces are for formatting. Tabs are for indentation. A properly formatted code should look great with tabs=2..N spaces, all depending on dev. preference.

      Enable visible whitespace in your editor and add commit hooks to git to find non-compliant whitespace.

      I prefer tabs=8 spaces as it then automatically limits indentation to about 3 levels. More indentation levels mean you probably need a new function/refactor anyway.

    47. Re:Tabs vs Spaces by aardvarkjoe · · Score: 1

      Unfortunately, my experience is that every single person who uses tabs does it wrong. If you're working on a project where half a dozen people are all using tabs, you're going to end up with six different types of broken formatting.

      --

      How can we continue to believe in a just universe and freedom to eat crackers if we have no ale?
    48. Re:Tabs vs Spaces by Kohath · · Score: 1

      Yay! A series of workarounds! Who doesn't love having to do a bunch of workarounds and configuration setup steps to edit code?

    49. Re:Tabs vs Spaces by ATMAvatar · · Score: 1

      When I want to backspace over something that's indented with tabs, there's no way to know how many times I will have to hit backspace. Are there 4 spaces and a tab so I have to hit backspace 5 times? Or just a tab, so I have to hit it once?

      I've simply gotten into the habit of showing white space characters in any editor I use, so I always know exactly what to expect.

      --
      "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety."
    50. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      Amateurs?

    51. Re:Tabs vs Spaces by Shados · · Score: 1

      Pretty much. And the issue is that tabs gone wrong is only visible once its viewed by someone with different settings, which will be uncommon in homogeneous teams ("Whats your tab setting?" "2 space width" "Ok, cool, ill use that too!")

      Then people brush it off in the code review or don't notice, and 6 weeks later its a mess.

    52. Re:Tabs vs Spaces by xdaimon · · Score: 3

      What is even easier is to use an editor who automatically writes a set of spaces when the tab key is hit. At this point say good bye to \t forever.

    53. Re:Tabs vs Spaces by Anonymous Coward · · Score: 1

      Do I need your 4, 8, whatever number of spaces to read your code? No. As long as it's indented correctly with tabs it achieves the same thing without forcing your preference on others. The fact that there are actual attempts to standardize spaces in some communities, like for example some php frameworks or some idiot manager like the one above in this thread, is ridiculous. I'll use tabs and if you don't like it and cant change the tabs=N spaces option in the configuration of an ide or text editor then I'm surprised you can code in the first place.

    54. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      Eventually you end up with a table of figures either hardcoded into the code, or as a configuration file.

      Things can get out of alignment with spaces, and everybody sees its wrong. But Tabs might look fine for one dev, but be completely misaligned for another. And because you might be sharing tables with anybody on the planet, you either enforce a tab convention worldwide, or go with spaces.

    55. Re: Tabs vs Spaces by Anonymous Coward · · Score: 2, Insightful

      You, too, will one day get so frustrated when dealing with impossible-to-read code due to tabs, possibly with formatting that assumes multiple different tab sizes within a single file, that you'll be enlightened and learn to love spaces.

      I've been coding way too long to care about indentation bullshit anymore. If a file does not have uniform indentation style, reindent it with a standard tool (*), and then commit the reindent-only change to local git. You can discard the reindent commit if you don't end up making any real changes to the file; otherwise, your patch goes on top of the freshly-indented file.

      * = Use your company's indentation guidelines if they exist; otherwise just use the style options that most-closely match the majority of the source tree. Also be aware that some coders in your company may need a refresher on how to tell a diff program how to ignore whitespace changes.

    56. Re:Tabs vs Spaces by beelsebob · · Score: 4, Insightful

      Because tabs are not enough to lay out code well (you always end up with a couple of spaces to align things correctly). Then once you introduce a mixture, you end up in a situation where a change in tab-width causes layout fuckup (i.e. you get fuck ups on a different user's system).

      Meanwhile, if you use spaces for everything, code remains well laid out everywhere. If you have even a half-decent editor, it will allow you to edit spaces as if they were tabs, so using spaces has exactly 0 drawback.

    57. Re:Tabs vs Spaces by phantomfive · · Score: 2

      Different programmers like different levels of indentation.

      All of them can be made happy if you use tabs to the point of indentation, and then after that use spaces to further indent.

      --
      "First they came for the slanderers and i said nothing."
    58. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      Yet another reason? You haven't mentioned the others.

      I'll make an assumption that you like brace-delimited languages (let's say C for the sake of argument) and throw this one out there:

      if (foo == 1) (followed by 300 spaces - real ones: 0x20) { bar = baz};
              bar = spam;

      So, in a non-wrapping editor, you see:

      if (foo == 1)
              bar = spam;

      Which is NOT what the compiler sees. That's the same basic issue as the Python significant whitespace argument.

      If Python gets the whitespace thing wrong, then compared to languages such as C, it gets a lot of other syntax-related common problems right: "and" and "or" instead of "&&" and "||" to avoid confusion/typos with "&" and "|"; not allowing assignment expressions ("if (foo = bar)").

      Both of those could be dismissed as "yet another reason not to use C" if you're not prepared to learn the language and work within its warts or configure your editor properly.

    59. Re: Tabs vs Spaces by beelsebob · · Score: 1

      Wait, you're suggesting that if I want to submit a one line patch to your code, I should convert it wholesale to spaces, and then submit the patch? That doesn't sound like a great way to do source control to me ;)

      Meanwhile, if we both just use spaces all along, neither of us sees any fucked up layout, and both of us can edit and work on the code without having to submit ridiculous patches that convert all the white space in the file to something else.

    60. Re:Tabs vs Spaces by Dynedain · · Score: 4, Insightful

      The nominal expansion of tabs is to advance to the next column which is a multiple of 8.

      Huh? Since when? On typwriters and early word-processors it was forced to 5 columns. And even most typewriters allowed you to move the tabstops to arbitrary places.

      On every editor I've seen in the last 5 years the tab display width is configurable. If you like 2 spaces, great, if you like 8, have at it. It doesn't affect the rest of your team.

      The only reason tab characters are a problem is because people mix and match tabs and spaces.

      Python's whitespacing is an evil that should be purged with fire.

      --
      I'm out of my mind right now, but feel free to leave a message.....
    61. Re: Tabs vs Spaces by psililisp · · Score: 2

      I'm honestly curious: is there a style guide that says to use tabs? The ones I've looked at all recommend spaces.

    62. Re:Tabs vs Spaces by Dynedain · · Score: 1

      If you avoid spaces and use only tabs, OTOH, the code formatting will look correct on any editor with any tab setting.

      --
      I'm out of my mind right now, but feel free to leave a message.....
    63. Re:Tabs vs Spaces by ILongForDarkness · · Score: 1

      Depends on the environment I suppose. At my work we all use VS (C# web services). Still our standard is spaces. Tabs in a uniform environment are a bit more flexible actually: you can set your IDE to have tabs = a different size indent. Some people like the stock ~5 char indent, some like 1-2, with a tab character they are free to chose. With a mandated 2 spaces or whatever everyone is forced to look at the code with the same indent even if it doesn't change what others see/the file itself if they were to use tabs with different indent preferences on the editor. If different people are using different editors or you insist on being able to see things the way you are used to even when looking over another devs shoulder then yeah spaces are the way to go.

    64. Re:Tabs vs Spaces by ILongForDarkness · · Score: 1

      Might be with your editor but this isn't a universal truth.

    65. Re:Tabs vs Spaces by Wrath0fb0b · · Score: 1

      No, they don't even allow customization of IDEs there's no way to get vertical alignment on continuations. For example, consider you want to align multiple parameters of a function that's split among multiple lines. Spaces don't work because you have to eat up an amount of horizontal space equal to the initial indentation by tabs. Tabs don't work because you also need to eat up horizontal space equal to the number of characters before the alignment. The only thing that preserves the proper formatting is a mix of tabs and spaces like:


      class Foo
      {
      \tvoid SendNow(ConnectionHandle handle,
      \t\x20\x20\x20 DataObject data,
      \t\x20\x20\x20 DataPolicy policy,
      \t\x20\x20\x20 Callback callback,
      \t\x20\x20\x20 CallbackContext context);
      };

      And that is worse than forcing everyone to chose one or the other.

    66. Re: Tabs vs Spaces by laffer1 · · Score: 4, Insightful

      Funny, I feel the exact opposite. The FreeBSD style(9) documentation suggests tabs because they can be customized to individual developers needs and they minimize weird diffs on the version control systems.

      I take language and platform into account. For HTML and JavaScript, I prefer spaces. For Java, Perl, C#, CSS, C, and C++ tabs. If there is a crazy IDE required, I often prefer spaces because many of them default to some level of spaces and I like the quick code cleanup command to work the same for the whole team.

      The real issue with that question is that it's impossible to answer. Even if you get a "spaces" person, try to get them to agree on the number of spaces. A coworker loves 2 spaces which is flat out wrong to me. Too hard to read. I've met people into 3 or 4 spaces. Then you get into where to put curly braces, etc.

      Whatever you choose, it should be a standard for code whether at an open source project or a company.

      I can't stand everyone using their own style. It's much worse than having to use a specific one.

    67. Re: Tabs vs Spaces by Anonymous Coward · · Score: 0

      Where's a rant from Linus when you need it...

    68. Re: Tabs vs Spaces by Anonymous Coward · · Score: 0

      They recommend spaces because of crap text editors. In a world where Word Perfect for DOS had ability to visualize spaces, it's kind of puzzling that many programming editors fail at this.

    69. Re:Tabs vs Spaces by BarbaraHudson · · Score: 1

      Manual Underwood. It will build up your finger muscles to the point that you can do push-ups on your finger-tips. And no RSI to boot :-)

      --
      "Transparent" is a shit show that trades on every stereotype going. A man in drag is NOT a transsexual.
    70. Re: Tabs vs Spaces by Anonymous Coward · · Score: 0

      Your argument against it is only true if your a terrible developer whom doesn't THINK.

    71. Re: Tabs vs Spaces by swillden · · Score: 1
      Sorry, I didn't pay close attention to the names on the various posts.

      People who work for me configure their editors to replace tabs with spaces.

      +1

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    72. Re: Tabs vs Spaces by swillden · · Score: 1

      The moment you throw in a few spaces to line something up on a non-tab boundary (say, to align a second line of arguments with the first argument), then you have a mess

      It is trivial to avoid this problem by configuring tab-width to 1. Yet again,newbie configuration wins over decades of experience.

      That only works if other editors of the code also used tab-width of 1, and hopefully used at least two tabs per indentation level. Which is, actually, a fantastic idea... and one best achieved by using spaces instead of tabs.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    73. Re: Tabs vs Spaces by swillden · · Score: 1

      I've been coding way too long to care about indentation bullshit anymore. If a file does not have uniform indentation style, reindent it with a standard tool (*), and then commit the reindent-only change to local git.

      Absolutely. Lately, clang-format has become one of my favorite tools ever.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    74. Re: Tabs vs Spaces by Flammon · · Score: 4, Insightful

      This debate only happened because some programmers stopped thinking about the indentation abstraction. You shouldn't be thinking in terms of spaces vs tabs. Instead you should be thinking in levels of indentation for blocks. Indentation is not some technique to make your code look pretty, it's there to show a clear separation of logic, loops, blocks etc. Code is art, just not Ascii art. One keystroke per indentation is the simplest and most efficient.

    75. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      " love your imposition of YOUR individual standards on them"

      No man, that's what SPACES do. Use tabs and everybody can set their own fucking tab stops however they want. Use spaces and everybody has to conform to what YOU are imposing.

    76. Re:Tabs vs Spaces by Kohath · · Score: 1

      Yes it is. Tabs are some number of spaces. If you backspace over them, you will have to hit backspace an unknown number of times. Maybe once because there's just a tab. Maybe 4 times because there are 3 spaces and a tab. Maybe tabs are set to 8 in your terminal and 4 in your editor.

      Meanwhile, a space is always 1 space. Always.

      If you use a bunch of careful setup and a few workarounds, you can get everything working with tabs so it's just as good as if there were spaces instead of tabs. Or you can just use spaces and not worry about any of that.

    77. Re:Tabs vs Spaces by Kohath · · Score: 1

      How do you know it's not 3 spaces plus a tab?

    78. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      The occasional line that doesn't line up (because someone hit spaces when they should have used a tab) is less hasslesome to deal with than the need to hit backspace three or four times because I accidentally hit tab one time too many.

    79. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      As a fairly experienced and slightly wrinkly and grey developer, can anyone tell me why spaces over tabs?

      Tabs allow the developer to customise their IDE to display the amount of indentation they desire... and use fewer bytes... spaces seem to have no benefits whatsoever in my book.

      I agree... but confusion can arise when sharing code with other people who have tabs set to a different indentation. Of course, sharing code back and forth will almost always mess with indentation, when some people use spaces and others use differing tab settings. Personally, I use tabs set to 3 spaces.

    80. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      Tabs can represent indentation, and for programming, this is incredibly convenient.

      Its seems older programmers (ha, I am 40) are just stuck in the past?

      Some of us like a small amount of indents, some like large, and with tabs, we get that with the same character. It's pure bliss working with other people's code that appreciate this as well.

    81. Re: Tabs vs Spaces by paskie · · Score: 1

      You do know about vim's visual block mode, right? Care to explain in what ways is Notepad++ superior to vim in this or other regards, or link somewhere?

      --
      It's not the fall that kills you. It's the sudden stop at the end. -Douglas Adams
    82. Re:Tabs vs Spaces by paskie · · Score: 1

      Really, you start with "Those days are long gone", then talk about "letter-sized printouts at 10 characters per inch"?

      To me, 8 is just perfect when viewing on a computer screen, it has the perfect balance of clarity and horizontal space management. But if someone thinks it's too much, that's fine - because I'm using tabs, so they can reconfigure. This is where all the anti-tab arguers shoot themselves in the foot. There are some good arguments against tabs that make the spaces vs. tabs choice non-obvious, but seems like noone on this thread has a clue about these.

      (Of course, in Python I just follow PEP and :set et, tw=4, sw=4. A whole-ecosystem convention trumps personal preferences, and Python especially (with its semantic indenting) has good reasons to abolish tabs.)

      --
      It's not the fall that kills you. It's the sudden stop at the end. -Douglas Adams
    83. Re: Tabs vs Spaces by flargleblarg · · Score: 1

      Which only matters if all indentation, including alignment, is done with tabs. The moment you throw in a few spaces to line something up on a non-tab boundary (say, to align a second line of arguments with the first argument), then you have a mess, unless your tab width is set to exactly the value that whoever touched the code before you set it to.

      What?? Nonsense. Using spaces to line something up on a non-tab boundary is exactly what avoids a mess, not creates it.

      To use tabs in code, with zero problems whatsoever, follow these simple rules:

      1. Use tabs only for indentation, never for alignment.
      2. Tabs may never appear anywhere in the source code except as a contiguous sequence of zero or more tabs at the beginning of a line.
      3. Use spaces for alignment, never for indentation.
      4. Spaces may follow tabs, but tabs may never follow spaces.

      All the lines in your module should match the following regex: /^\t*[^\t]*$/

      If you have a for (...) loop that splits across three lines, there should be n tabs leading up to the for, and then on each of the following two lines there should be n tabs followed by 5 spaces, for proper alignment.

    84. Re:Tabs vs Spaces by Shompol · · Score: 1
      When you work in an environment when you maintain code written by others in editors of their choosing the code indents always come out screwey. Whenever I open the next garbled mess of a source code, there is a two stroke command to reformat to the style of my choosing. The next person to open the file will see it exactly as I saved, regardless of editor. The only issue is that version control tools will think that I changed EVERYTHING.

      If everyone in your group uses the same editor, say MS Visual Studio, this is probably less of a problem.

    85. Re:Tabs vs Spaces by flargleblarg · · Score: 1

      Pretty much. And the issue is that tabs gone wrong is only visible once its viewed by someone with different settings.

      Not exactly true. You can pretty easily write a tool that scans a source module for problematic mixing of tabs and spaces. Just require that all changes pass that scan before they are allowed to be checked in.

    86. Re: Tabs vs Spaces by TechyImmigrant · · Score: 1

      I VNC into many different contexts when doing my job, including both linux, MacOS and windows. In vim I find the keystrokes to invoke block mode and some other functions change with the context. In Notepad++, you just hold the alt key and your mouse can select blocks or make a column cursor where you can type on multiple lines at the same time.

      The major problem with Notepad++ is that it doesn't run natively on Linux.

      If vim had a consistent interface across windows and different Linuxes, then it would be superior.

      --
      I should use this sig to advertise my book ISBN-13 : 978-1501515132.
    87. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      Different editors display tabs differently.

      Some editors replace tabs with N spaces.

      Mix the two, and indentation gets all fucked up.

      You work for me, you will use spaces.

      This problem is that unless you can prevent a situation where more than one person works at the code your indentation will always be fucked up if you use spaces.
      Someone replaces tabs with three spaces, someone with four and someone with eight.
      Once the replacement is done you pretty much need automatic code formatting to get it back.
      The only way to keep indentation consistent is to use tabs and to not replace them with spaces.

      Anyone who works for you will have to live with badly indented code, or preferably, switch to work for someone that actually wants to have code that can be maintained without a fully integrated IDE if necessary.

    88. Re: Tabs vs Spaces by paskie · · Score: 1

      Ok, that makes sense. I use vim only on Linux, so I wouldn't know. Ctrl-v in normal mode is what always does this for me in terminal vim, but I guess it might interfere with clipboard shortcuts on other platforms.

      (Then again, the argument sounds as that vim loses because vim has this different across platforms, while, Notepad++ wins because, well, it is not available on some platforms. In Linux desktop environments, alt+drag typically drags the window and is not passed to the application.)

      --
      It's not the fall that kills you. It's the sudden stop at the end. -Douglas Adams
    89. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      Easy, if it is an indentation tab is used, if it is something else it's space.
      Unless I am coding assembly, then it is tab unless it is in a comment.

    90. Re: Tabs vs Spaces by Anonymous Coward · · Score: 0

      Meanwhile, if we both just use spaces all along, neither of us sees any fucked up layout, and both of us can edit and work on the code without having to submit ridiculous patches that convert all the white space in the file to something else.

      And if we both uses tabs and don't use editors that does crap that trashes code revisioning then we can all set the indentation to whatever we like.

      Using spaces requires that everyone in the project is comfortable with using the same indentation level.
      If someone tries to enforce using space indentation, make sure that that person doesn't get to say how many spaces should be used, that is in my experience the best way to get them to accept tabs in their lives.

    91. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      So you've chosen a bad standard because making things more difficult forces you to use better style?

      Not convinced.

    92. Re: Tabs vs Spaces by AntiSol · · Score: 1

      You might try SciTE and/or Geany

    93. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      Your editor is buggy and for some reason replaces the tab character. (Character code 9 in ASCII.) with random characters.
      I recommend that you switch to a functional editor to work in a project with others and not mess up code revisioning.

    94. Re: Tabs vs Spaces by TechyImmigrant · · Score: 1

      I'll try them. They're new to me.

      --
      I should use this sig to advertise my book ISBN-13 : 978-1501515132.
    95. Re:Tabs vs Spaces by AntiSol · · Score: 1

      Same here. For me, It's gotten to the point that I look for the 'show whitespace' option even before setting tab width.

    96. Re: Tabs vs Spaces by Anonymous Coward · · Score: 0

      You solve absolutely nothing by using spaces instead of tabs.
      The programmer will still press tab and the editor will insert an arbitrary number of spaces depending on his settings.
      The main difference is that if either your code revisioning will be a clusterfuck of indentation changes every time a function gets updated or your code will be a horrible mess of different indentation levels.
      The only way around it is to enforce the same indentation level for all programmers, but if you manage to do that you won't have any problems with tabs either.
      If you on the other hand manages to get everyone to use tabs for indentation they don't need to use the same indentation level.

    97. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      Tabs are a random number of spaces.

      Wow, this is a strange new meaning for the word "random" with which I was previously unfamiliar! I'm guessing (hoping) you don't do cryptography?

      a space is always 1 space. Always.

      Not true, some IDEs "helpfully" delete back to the previous level of indentation when you press backspace, which may involve deleting more than one space.

      If you use a bunch of careful setup and a few workarounds,

      You mean "correct configuration".

      you can get everything working with tabs so it's just as good as if there were spaces instead of tabs.

      You mean "better than".
      spaces ignore the preferences of everybody else.
      a tab is more semantically correct than a bunch of spaces since you're doing indentation, which is what a tab is for.

      Or you can just use spaces and not worry about any of that.

      You mean "force your preferences on everybody else".

    98. Re: Tabs vs Spaces by Anonymous Coward · · Score: 0

      There's one little project that uses tabs in its style guide. It's called the Linux kernel. Heard of it?

    99. Re: Tabs vs Spaces by Anonymous Coward · · Score: 0

      I don't understand why older programmers skew towards spaces. Almost all the open source code from the 1980s and 1990s is tab indented. Linux, all the BSDs, and all older GNU software use tabs. Even the Python creator, Guido, originally used tabs for indentation.

      Up until about 15 years ago, the only programmers who seemed to use spaces were Windows programmers.

    100. Re:Tabs vs Spaces by spongman · · Score: 4, Informative

      tabs are an undefined constant number of spaces. not random.

    101. Re:Tabs vs Spaces by pspahn · · Score: 1

      You are simply not getting it. A space is always 1 space, you are correct about this, but why are you using spaces for indentation in the first place? Do you seriously hit space bar 12 or 16 times to indent a few columns? What do you do with deep HTML markup?

      Besides, why are you even worried about having to backspace over a "random" number of tabs? Isn't that what Shift+Home is for? Shift+Delete (some editors)?

      Are there any keys on your keyboard that you *do* use?

      --
      Someone flopped a steamer in the gene pool.
    102. Re:Tabs vs Spaces by Kohath · · Score: 1

      What if the code came from someone else? Then how do you know?

    103. Re:Tabs vs Spaces by Kohath · · Score: 1

      How does shift-delete know I want to go back 8 spaces when I'm at the 12th character in a line?

    104. Re:Tabs vs Spaces by locofungus · · Score: 2

      If you avoid spaces and use only tabs, OTOH, the code formatting will look correct on any editor with any tab setting.

      So how many tabs should you use here so that it lines up with the commands below?

      cat *.c
      cat -n *.c
      grep int *.c

      struct S {
      [tab]int [tab][tab][tab][tab] x;[tab][tab]/* x coord */
      [tab]int [tab][tab][tab][tab] y;[tab][tab]/* y coord */
      [tab]unsigned long long [tab] hash; [tab] /* hash of object stored at x,y */
      };

      --
      God said, "div D = rho, div B = 0, curl E = -@B/@t, curl H = J + @D/@t," and there was light.
    105. Re: Tabs vs Spaces by Anonymous Coward · · Score: 0

      And f*ing wrong, too. Anyone with experience will tell you that Python rocks over most other languages: dense and expressive syntax, high productivity, great standard library, great ecosystem aka pypi, perfect web frameworks e.g. django. Oh and about indention: that's both a quality factor and a time saver. Ever heard of or been in a the non productive wars about the correct indentions to use, curly brace on the starting line of its block? See, just not an issue with Python. Never seen a language that so consistently matches style among multiple devs from any proveniance. But I guess you need some experience to value such traits, so no offense, kido!

    106. Re: Tabs vs Spaces by Anonymous Coward · · Score: 0

      Actually, Python unlike most other languages will complain about incorrect indention of the second line of your example. Duh

    107. Re: Tabs vs Spaces by Anonymous Coward · · Score: 0

      Ever tried setting tab stops differently and seen what a mess it makes where only the leading tabs still line up? It doesn't work...

      Thought experiment, set tabs to 1 and think about how the output looks.

    108. Re:Tabs vs Spaces by Darinbob · · Score: 2

      Spaces are superior, simple enough. The main reason is that spaces are always spaces. For a given font (fixed with only, none of this variable width crap), spaces are always the same width. Tabs however may count for 2, 3, 4, 8, or some random number of characters. There is *NO* standard for what a tab is supposed to be. Devs with no sense of style will ignore any existing tab settings in the file they are editing and instead use their own, and it is relatively common to find source code that can not even bother to stick to the same tab settings throughout. But spaces always work.

      In a good IDE and edtior, a tab key will *always* indent the correct amount rather than inserting a single hard tab. An IDE that does not properly indent code is worthless. So there should never be any correlation between a tab key press and the number of spaces/tabs inserted into the code. If it doesn't work, then stop coding with notepad. Saving fewer bytes is irrelevant; it may have been useful when we were using teletypes, but that was back when people tried to comment their code as little as possible and use use 5 character function names.

      And besides, tabs often screw up languages that are indentation sentitive, like Occam, Python, etc.

      Note especially with the survey that with higher experience the devs preferred spaces are preferred over tabs while those with lesser experience preferred tabs over spaces. Experience is the voice in your head that says "ain't got enough time left being alive to waste it being stupid."

    109. Re: Tabs vs Spaces by hughbar · · Score: 1

      Yes, from a 64 year old who uses Geany each and every day. I hate Eclipse, Emacs and [except when in a hurry] Vim. Vim reminds me of when I started 'editing' programs on a Teletype 33, who would want that?

      --
      On y va, qui mal y pense!
    110. Re:Tabs vs Spaces by Darinbob · · Score: 2

      I find it hilarious that some programmers who use variables names like lpszNameOfFunctorFactoryBuilder will then turn around and use tabs to save a handful of bytes.

      If code is to be properly commented then should take far far more kilobytes than a few extra spaces.

      Even in the old days, people wasted characters though. Look at COBOL, wasting so much space on the IDENTIFICATION DIVISION and whatnot. I think the early Unix code stands out as being especially parsimonious about typing extra characters. Most things were somewhat in the middle between the extremes.

    111. Re: Tabs vs Spaces by lordlod · · Score: 2

      Which only matters if all indentation, including alignment, is done with tabs. The moment you throw in a few spaces to line something up on a non-tab boundary (say, to align a second line of arguments with the first argument), then you have a mess, unless your tab width is set to exactly the value that whoever touched the code before you set it to.

      And here is what you are doing wrong. Tabs are for indentation, spaces are for alignment.

      If you are increasing the nesting depth, use one tab.
      If you want to shift the start of a line over to align the arguments, use spaces.

      Tabs are not X-spaces. Tabs are an abstract indentation level which can be represented as a number of space characters.

    112. Re:Tabs vs Spaces by itzly · · Score: 1

      Tabs allow the developer to customise their IDE to display the amount of indentation they desire

      Most code only looks good with one particular tab setting, for example when lining up columns. This means that if you share your code with me, and I use a different tab setting, that it looks like crap, and I have to reformat the code. With spaces, it always looks the same. Also, when using diff/grep/more, you automatically get 8 column tabs.

      and use fewer bytes

      Really, who cares ?

    113. Re: Tabs vs Spaces by itzly · · Score: 1

      Just look at how their resume is formatted. If it's wrong, you don't even have to invite them.

    114. Re:Tabs vs Spaces by Darinbob · · Score: 3, Interesting

      It does actually affect the team. Everyone needs to use the exact same tab settings or else the code looks different. It's utterly painful to view some code where someone is tab-happy and assumes one tab stop is two characters and then uses deeply indented conditionals: your teammates should never be forced maximize the size of a window just to view your code. Especially if you change tabs settings within a single file (and I swear that idiots actually do this). Not all developers use the same editor, not all methods of viewing the code use the same tab settings either; paginators, printers, source code control, static analysis tools, and so forth, may all have different ideas about tabs than you used in your editor.

      Be nice to your teammates, because no one's personal style preferences are more important than getting along as a team and getting stuff done.

    115. Re: Tabs vs Spaces by Anonymous Coward · · Score: 0

      1) Get a source control system that doesn't get its panties in a twist if you change whitespaces.
      2) Don't code python.
      3) ???
      4) Profit.

    116. Re:Tabs vs Spaces by itzly · · Score: 1

      Huh? Since when? On typwriters and early word-processors it was forced to 5 columns. And even most typewriters allowed you to move the tabstops to arbitrary places.

      You don't use command line tools, I presume ?

    117. Re: Tabs vs Spaces by Darinbob · · Score: 1

      The problem is that you never get a chance to hire interns and junior devs this way. It often seems that the most junior team members who are the most adamant that their personal style is superior to all others, which very often includes a preference for tabs. But the junior people are important: without them there is no one to do the grunt work, and no one who can become experienced over time.

    118. Re:Tabs vs Spaces by Darinbob · · Score: 1

      The important word there is "random".

    119. Re:Tabs vs Spaces by itzly · · Score: 1

      All of them can be made happy if you use tabs to the point of indentation, and then after that use spaces to further indent.

      No. If you use tabs for indentation, and then spaces to line up comments after the code, it gets all screwed up when you change the tab settings.

    120. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      If you use spaces for indentation you have to make sure that everyone working on the project uses the same number of spaces for indentation or your code will be a complete mess, they also have to avoid using tabs.
      If you use tabs for indentation you only need to make sure that everyone uses tabs for indentation. For other formatting you use spaces.
      If you use tabs you don't need any other rule about indentation sizes, everyone can set their editor to whatever they like.
      Either way you have to make sure that everyone uses the same type, no mixing.

    121. Re: Tabs vs Spaces by Darinbob · · Score: 2

      If it is shared code, then ALWAYS suck it up. If you're in a team then ALWAYS abide by the team's coding standards even if you disagree with them.

      An editor should never automatically convert the spaces/tabs in a file without you telling it to do so, that is just broken behavior. If your job is to add one line to a 10,000 line file, you should not convert it all and then check it into source code control. That is anti social and passive aggressive behavior.

    122. Re: Tabs vs Spaces by itzly · · Score: 1

      One keystroke per indentation is the simplest and most efficient.

      Or zero, if you have auto indent. But a decent editor will allow these options, and still let you choose between tabs and spaces.

    123. Re:Tabs vs Spaces by Darinbob · · Score: 1

      But not everything is configured identically. There are many tools that will look at and display code other than your editor. You will share that code with many people hopefully. Trying to get everyone to agree on the same tab stop setting is futile. Thus you will get back a display from a static analysis tool that uses a different tab setting than your editor does and it will look ugly, or someone will email you a snippet of code and it will look ugly because it doesn't have the same tab settings. Those problems occur much less often when using spaces, because a space is always one space.

      Spaces takes zero effort on your part except to customize the editor one time and tell it to never use tabs. If you can spend the time changing the tab setting in your editor then you can spend the same amount of time configuring to not use tabs. If you can't see the differences between tabs and spaces in the code, then why not just always use spaces and solve all the problems.

    124. Re: Tabs vs Spaces by Anonymous Coward · · Score: 0

      This is the way to do it.

      In theory you could go the way with only using spaces for indentation, but that more or less requires a company wide requirement of using the same number of spaces for indentation and that editing always is done with an IDE, never with a plain text editor.

      By using tabs for indentation and spaces for other formatting you can use any editor, even code conveniently with plain text editors, while everyone happily can have their own tab-size to get an indentation that suits them without stepping on each others toes.

    125. Re:Tabs vs Spaces by Darinbob · · Score: 1

      Python did not invent that style by the way. And the indentation is not even a tiny problem if only we could convince all the junior and trainee programmers to stop using tabs. Even before Python was even imagined we had long learned that tabs are evil.

    126. Re:Tabs vs Spaces by Darinbob · · Score: 1

      The problem is technically avoidable if editors never inserted tabs in the first place! And it's not hard, most editors that allow changing tab settings also allow replacing tabs with spaces.

      Ie, just because you pressed the tab key does not mean that the editor is required to stick in a tab; this is analogous to pressing the control-A key and not having a control-A inserted into your code. In most editors "tab" means to indent the line, and that indentation can be done with spaces.

    127. Re:Tabs vs Spaces by goose-incarnated · · Score: 2

      As a fairly experienced and slightly wrinkly and grey developer, can anyone tell me why spaces over tabs?

      Tabs allow the developer to customise their IDE to display the amount of indentation they desire... and use fewer bytes... spaces seem to have no benefits whatsoever in my book.

      Because code that looks like this is more readable than code that looks like this. Sure you can spend extra effort to line up your code using tabs in a way that doesn't break on someone with a different tabstop, but why bother when spaces do it with no extra effort?

      --
      I'm a minority race. Save your vitriol for white people.
    128. Re: Tabs vs Spaces by goose-incarnated · · Score: 1

      Just look at how their resume is formatted. If it's wrong, you don't even have to invite them.

      Mine is PDF from LaTeX - so of course I use spaces because irrespective of how you think my resume should be formatted, it's gonna damn well look the same on all platforms, in all viewers and on all printouts... just like my code. Consistency beats customisability every time when reading code.

      --
      I'm a minority race. Save your vitriol for white people.
    129. Re:Tabs vs Spaces by alphabetsoup · · Score: 1

      Use elastic tabstops and get done with with. There is a plug-in for it in Visual Studio which I use.

    130. Re:Tabs vs Spaces by Afty0r · · Score: 1

      I had to address this:
      "If you avoid tabs and use only spaces, OTOH, the code formatting will look correct on any editor with any tab setting."

      Different people have different reading styles, there's rarely such a thing as "correct" (well, perhaps in a company with a single set of coding standards, but they're not the same everywhere). I love the fact that with tabs both I and the guy next to me who loves to indent everything about 87 lines can work on the same code-base and I can actually read it because each tab indents 2 characters on my screen and 6 on his... so it looks "correct" for both of us, using the same source code.

    131. Re:Tabs vs Spaces by Afty0r · · Score: 1

      Could you elaborate on this for me:
      "Because tabs are not enough to lay out code well (you always end up with a couple of spaces to align things correctly)."

      Each tab indents X spaces - it's just a multiplier. You talk about using a "mixture" causing problems, and I would agree - so why not stick with tabs which are more flexible, configurable etc?

      Using spaces requires additional keypresses, and also requires that the code display with the same indentation on my screen as it does on my co-workers. With tabs he can have the huge indentations that he loves, and I can have the small ones that I love, allowing us both to read and comprehend code more quickly.

    132. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      Different editors display tabs differently.

      Some editors replace tabs with N spaces.

      Mix the two, and indentation gets all fucked up.

      You work for me, you will use spaces.

      This problem is that unless you can prevent a situation where more than one person works at the code your indentation will always be fucked up if you use spaces.
      Someone replaces tabs with three spaces, someone with four and someone with eight.
      Once the replacement is done you pretty much need automatic code formatting to get it back.
      The only way to keep indentation consistent is to use tabs and to not replace them with spaces.

      Anyone who works for you will have to live with badly indented code, or preferably, switch to work for someone that actually wants to have code that can be maintained without a fully integrated IDE if necessary.

      Never heard of code standards, have you?

      Real developers have.

    133. Re: Tabs vs Spaces by goose-incarnated · · Score: 1

      Which only matters if all indentation, including alignment, is done with tabs. The moment you throw in a few spaces to line something up on a non-tab boundary (say, to align a second line of arguments with the first argument), then you have a mess, unless your tab width is set to exactly the value that whoever touched the code before you set it to.

      What?? Nonsense. Using spaces to line something up on a non-tab boundary is exactly what avoids a mess, not creates it.

      To use tabs in code, with zero problems whatsoever, follow these simple rules: 1. Use tabs only for indentation, never for alignment. 2. Tabs may never appear anywhere in the source code except as a contiguous sequence of zero or more tabs at the beginning of a line. 3. Use spaces for alignment, never for indentation. 4. Spaces may follow tabs, but tabs may never follow spaces.

      All the lines in your module should match the following regex: /^\t*[^\t]*$/

      If you have a for (...) loop that splits across three lines, there should be n tabs leading up to the for, and then on each of the following two lines there should be n tabs followed by 5 spaces, for proper alignment.

      So instead of simply using spaces, use these four rules, one of which is a regexp to get the effect of only using spaces when using tabs....

      In addition, your last example still breaks readability when tab-widths are not what you expect them to be. Spaces will maintain what you want the code to look like regardless of what settings someone else's editor has.

      --
      I'm a minority race. Save your vitriol for white people.
    134. Re:Tabs vs Spaces by serviscope_minor · · Score: 1

      Huh?

      Basically do this: tabs for the block level indent level. Spaces for everything else. So if you have an expression splot over lines you do:

      ^I^I^Imy_long_expression = stuff + more_stuff + blah
      ^I^I^I,,,,,,,,,,,,,,,,,,,,,+ faff + pony.

      where ^I is tab and , is space.

      Then anyone can re-set the tab size and everything still lines up perfectly.

      --
      SJW n. One who posts facts.
    135. Re:Tabs vs Spaces by goose-incarnated · · Score: 1

      Pretty much. And the issue is that tabs gone wrong is only visible once its viewed by someone with different settings.

      Not exactly true. You can pretty easily write a tool that scans a source module for problematic mixing of tabs and spaces. Just require that all changes pass that scan before they are allowed to be checked in.

      You can. I can. Most devs can. OTOH we can simply avoid the problem altogether and use spaces.

      --
      I'm a minority race. Save your vitriol for white people.
    136. Re:Tabs vs Spaces by goose-incarnated · · Score: 1

      I guess that there are multiple reasons.

      The most common one is ignorance: most people don't know how tabs are supposed to be used as indentation and indentation ONLY, and how to set up an editor appropriately (and the shell, by the way) (see the other responses to your comment for proof).

      The second is lazyness / non-confrontational behaviour: If you settle on tabs, you will have to educate all users about the correct usage, and have to bear with people that just insist on using tabs differently (see point 1). If you settle on space usage, that's about it.

      The third reason is that some editors are stupid, because the implementation doesn't know that tabs are supposed to be used as indentation and indentation ONLY, and will (for example) insist on aligning multi-line arguments to a function just after the parenthesis using a liberal amount of tabs.

      And then there are some language requirements that like to mess things up, like Makefile requiring tabs and other scripting languages pursuing a vendetta against tabs (like Python).

      That being said, I will gladly educate people about tab usage, their ignorance is no excuse for using inferior solutions.

      So, in spite of all the work required to make tabs "just work", and in spite of the fact that even after all the work to ensure that people use tabs correctly, and in spite of all the work going into writing the hooks into VC to enforce the tab rules you ask devs to use, you'll still rather... do all that work and use tabs with occasional accidentally broken formatting than simply use spaces with no accidentally broken formatting?

      Why? what does all this work buy you, considering that it still won't solve accidentally broken formatting?

      --
      I'm a minority race. Save your vitriol for white people.
    137. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      And that's why experienced developers use a editor which shows tabs.

      Using tabs is fine, as long as you have formatting guidelines for your codebase.

      We use tabs strictly at the start of the line. This is nice because every developer can choose the indent size he/she prefers.

      I never understood the 'tabs==8 spaces' rule. That might have been so on a typewriter, but computers are more flexible, you know?

      Inconsistent tab use is annoying, that's true, but so is inconsistent indenting in general (curly braces on their own line, cuddling 'else') so tabs are not different in that respect.

      When used properly, tabs can be very nice (says this somewhat wrinkly programmer)

    138. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      Tabs are for indicating the nesting level, spaces are for alignment. When you use them properly changing the tab size has no bearing on your custom alignment. Don't align between levels. Things on different levels are supposed to be different.

    139. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      No, that's exactly how it should be. Everything at the same level has the same amount of tabs. Spaces are for alignment, tabs are for nesting levels.

    140. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      Because tabs are not enough to lay out code well (you always end up with a couple of spaces to align things correctly).

      Bullshit. You never indent something 3.5 levels.

    141. Re:Tabs vs Spaces by Simon+Brooke · · Score: 1

      As an extremely experienced and decidedly wrinkly developer, I don't give a shit provided it's consistent. I tend to use tabs myself (yes, on UN*X), but if I'm modifying a file written by someone who preferred spaces, I'll use spaces.

      --
      I'm old enough to remember when discussions on Slashdot were well informed.
    142. Re: Tabs vs Spaces by AntiSol · · Score: 1

      I use vim quite a bit, but mostly when I'm in an ssh session. SciTE is among the first things I install on any new system, and Geany is a great little lightweight IDE (side note: it uses the SciTE engine, they're related).

      IMHO big, heavyweight IDEs like eclipse do have their place, but the after using something like Geany they feel glacial.

    143. Re:Tabs vs Spaces by gbjbaanb · · Score: 1

      tabs are tabs.

      You know how people say "use the right tool for the job", well tabs are designed for indentation. So use them, rather than bodge some artificial implementation using an arbitrary number of spaces.

    144. Re:Tabs vs Spaces by gbjbaanb · · Score: 1

      no, we learned that tabs are designed for indentation - that's their purpose. So you prefer to ignore the right tool and slap spaces in instead shows you simply want to brute-force a poor implementation instead of using the correct tool, tabs in this case.

      If Python had mandated tabs instead of general whitespace, nobody would be complaining and code would be nice.

    145. Re: Tabs vs Spaces by dargaud · · Score: 1

      Hey guys, we found the Python programmer !

      --
      Non-Linux Penguins ?
    146. Re:Tabs vs Spaces by RabidReindeer · · Score: 1

      Really, you start with "Those days are long gone", then talk about "letter-sized printouts at 10 characters per inch"?

      Well, actually, I still do a lot of my listing prints on letter-sized paper, although more often these days it's at 17.5 characters per inch.

      I also do a lot editing of files on non-GUI (server) machines and until recently, the text-mode consoles tended to run at 24x80 characters or some variant thereof.

      Plus even on GUI displays, I'll often want something like multiple small edit windows or a multi-paned console with character-mode text edit/display in it, so having the source text tab its way out to the next county isn't something I appreciate.

    147. Re: Tabs vs Spaces by kramulous · · Score: 1

      Somebody does't write computationally heavy code.

      I'm on the fence. I used to use tabs on the left but now use spaces. I'll adopt whatever standard the existing code uses.

      --
      .
    148. Re: Tabs vs Spaces by mirix · · Score: 1

      I love Geany. There's a windows port as well, if people aren't aware of it.

      --
      Sent from my PDP-11
    149. Re: Tabs vs Spaces by Anonymous Coward · · Score: 0

      Or you could use a source control system that allows you to ignore whitespace changes on diffs...

    150. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      It works, if everyone uses tabs for indentation. In the same way, space indentation only works if everyone uses spaces for indentation. (But different functions and even part of them may differ if different persons uses different number of spaces.)
      You should try to keep it to one character per indentation level. If it is tab or space doesn't really matter as long as everyone uses the same.

    151. Re:Tabs vs Spaces by serviscope_minor · · Score: 3, Insightful

      YOU'RE DOING IT WRONG!!!

      Seriously that's a guaranteed path to failure. If you stick to tabs only for indenting at the block level and spaces for any further alignment then it works perfectly. That way changing the tab stops only changes the block-level indent. Any further formatting is done with spaces.

      Tabs are logically block-level so they should only be used for block level. If you're aligning relative to text, you need spaces because that's not a block level thing.

      The rule is simple and if only everyone would find Jesus^W^Wlearn the rule then we would all achieve peace on earth^W^W^Whaving no commits which change all the whitespace.

      /me bangs the pulpit.

      PS: use vi.

      --
      SJW n. One who posts facts.
    152. Re: Tabs vs Spaces by swillden · · Score: 1

      Which only matters if all indentation, including alignment, is done with tabs. The moment you throw in a few spaces to line something up on a non-tab boundary (say, to align a second line of arguments with the first argument), then you have a mess, unless your tab width is set to exactly the value that whoever touched the code before you set it to.

      And here is what you are doing wrong. Tabs are for indentation, spaces are for alignment.

      Yes, I used that argument 20 years ago, too. It doesn't actually work. People mess it up way too often.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    153. Re: Tabs vs Spaces by swillden · · Score: 1

      goose-incarnated mostly covered why your suggestion is bad, but I'll add one more point, which I discovered after making your argument 20 years ago:

      It doesn't work. Mixing tabs and spaces correctly is complicated, so it inevitably gets messed up.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    154. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      No, I use a #2 pencil and greenbar coding forms, as god intended

      http://www.atkielski.com/PDF/data/fortran.pdf

    155. Re:Tabs vs Spaces by locofungus · · Score: 1

      YOU'RE DOING IT WRONG!!!

      Undoubtedly. By default I use spaces always. In my book, tabs are for tabulating. You set your tab stops. Input your data with tab separators and have it format correctly - a la latex.

      Ironically, were I to want to use a mixture of tabs and spaces, I'd use spaces for indent and tabs for alignment - for example a single tabstop at column 55 would make sense for comments along the RH side of the code.

      --
      God said, "div D = rho, div B = 0, curl E = -@B/@t, curl H = J + @D/@t," and there was light.
    156. Re:Tabs vs Spaces by locofungus · · Score: 1

      If you stick to tabs only for indenting at the block level and spaces for any further alignment then it works perfectly.

      [tab]for(int i = 0; i < 10; ++i) [...........]//Shouldn't have a magic 10
      [tab][tab]sumx2+=data[i]*data[i];[...........]//sum of squares.

      will only format "perfectly" when ts=5

      --
      God said, "div D = rho, div B = 0, curl E = -@B/@t, curl H = J + @D/@t," and there was light.
    157. Re:Tabs vs Spaces by pscottdv · · Score: 1

      This is how I used to do it. Then I discovered that the concept is just too difficult for some people and those people will sometimes be on my team and everything will go awry.

      So, we use spaces now.

      I think this experience may be the source of the "flip" mentioned in TFS.

      --

      this signature has been removed due to a DMCA takedown notice

    158. Re:Tabs vs Spaces by AmiMoJo · · Score: 1

      Linus actually likes 8 space tabs, on the grounds that if indentation starts to push code off the edge of the screen your code is wrong. Either lines are too long or you have too many levels of nesting and should split the code out into functions.

      Personally I prefer 4 spaces but he makes a reasonable point.

      --
      const int one = 65536; (Silvermoon, Texture.cs)
      SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
    159. Re:Tabs vs Spaces by AmiMoJo · · Score: 1

      To me, the tab character causes problems and the only real problem it solves (different tastes for how much width to indent) are better solved by an IDE which is already solving the same problem in so many other contexts, like syntax highlighting in different colours etc..

      It would make more sense to use the tab character as an alignment marker, and then let the IDE figure out what exactly it needs to align to. At the start of the line it would be indentation, in other areas it would make all variable names line up after declarations.

      --
      const int one = 65536; (Silvermoon, Texture.cs)
      SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
    160. Re:Tabs vs Spaces by AmiMoJo · · Score: 1

      Sir, it appears you are doing it wrong :-)

      Spaces are for separating stuff, not for layout or alignment. If you are hung up on things like multi-line conditions in if() statements lining up you need to get over that and just indent them ONCE with a tab. If necessary you can do it like this, which gets over the "initial open bracket" problem too:

      if (
          (condition 1) &&
          (condition 2) &&
          (condition 3)
      )

      Spaces are only to aid readability within a line, such as after a comma or between mathematical/logical operators. This rule is even simpler and suits everyone, even those who like to use a proportional font (yuck) or crazy stuff like that.

      If everyone could just stick to this I wouldn't have to keep reformatting their code.

      --
      const int one = 65536; (Silvermoon, Texture.cs)
      SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
    161. Re:Tabs vs Spaces by AmiMoJo · · Score: 1

      You should only use indentation to align multi-line arguments and stuff like that. If you are manually aligning them with spaces you are just wasting effort. Put them on a new (indented) line if you like. Spaces are for separating things to make them more readable, not for alignment or indentation. In fact, indentation is the only acceptable form of alignment.

      --
      const int one = 65536; (Silvermoon, Texture.cs)
      SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
    162. Re: Tabs vs Spaces by Dr_Barnowl · · Score: 1

      I had project leads do that, use code beautifiers that re-indented, split, and re-ordered methods in files that were widely forked...

      I'm a tabs person, because tabs give you more choice about how far a single level of indent is.

      Spaces are more the totalitarian "I think 4 spaces is the right indent" person's choice.

      But yes, suck it up and follow the convention on the project.

      If the project uses a particular IDE, use the default for that IDE (which for Java / Eclipse - is tabs. Clearly you should also munge all the line-endings to plain LF with your version control system....)

    163. Re:Tabs vs Spaces by Dr_Barnowl · · Score: 1

      Lining up comments after the code is a stupid bonehead thing to do, because per-line comments are a stupid bonehead thing to do.

      If you have to comment every line to explain it's purpose, spend that effort making the code clearer instead.

      Comments should be reserved for areas of special magic which are not immediately obvious and can't be refactored for whatever reason, and expanding on the contracts of public methods.

    164. Re:Tabs vs Spaces by RPI+Geek · · Score: 1

      so why not stick with tabs which are more flexible, configurable etc?

      Because indentation isn't just for code blocks. I can't stand method declarations with lots of parameters lumped together on one line with a single space between them; it's so much more readable to put one parameter per line. Calling these methods is a similar issue, it's unreadable when all the parameters are lumped together. Long expressions are another example.

      Now to get everything aligned, you need to use a mixture of tabs (to begin the next line at the correct indent level) and spaces (to left-align the item). It's certainly do-able, but it's a break in your concentration. Then two weeks later someone else fixes a bug in your code and changes the spacing to tabs-only for their portion of the code, and the very next day someone else ... you get the idea.

      Spaces remove this ambiguity, and it makes it easy for my less-meticulous co-developers to align things properly.

      --

      - "Nobody came out that night, not one was ever seen. But Old Man Stauf is waiting there, crazy sick and mean!"
    165. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      The solution is to separate content from presentation.
      Whatever IDE you use should let you customize how to present the code.
      Formatting should be different from developer to developer

    166. Re:Tabs vs Spaces by angel'o'sphere · · Score: 1

      If you are to dumb to configure your IDE, source code control and/or editor: no one will work for an idiot like you.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    167. Re:Tabs vs Spaces by angel'o'sphere · · Score: 1

      Actually on many old typewriters you also have half and quarter "spaces" ... or even less and the tab stops can more or less be set to arbitrary positions, how ever you only have limited set of those like 5 to 8.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    168. Re:Tabs vs Spaces by daveime · · Score: 1

      > Spaces are 1 space. Tabs are a random number of spaces

      Except in HTML, where any random number of spaces is 1 space. Worst decision ever.

    169. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      so using spaces has exactly 0 drawback.

      But they do have a drawback: they take a fixed amount of space. With tabs, I can have a tabstop=6 for code I'm unfamiliar with, and tabstop=3 for most viewing. Can't do that if someone decided to indent with spaces.

      (Anyway, I concur with serviscope_minor on the One True Indentation Style)

    170. Re: Tabs vs Spaces by Anonymous Coward · · Score: 0

      The real issue with that question is that it's impossible to answer. Even if you get a "spaces" person, try to get them to agree on the number of spaces. A coworker loves 2 spaces which is flat out wrong to me. Too hard to read. I've met people into 3 or 4 spaces.

      This study looked at 0, 2, 4, and 6 spaces, and concluded "From our results, we suggest that the optimal level of indentation is 2--4 spaces." Surely a study could be done to determine if there is any significant difference between 2, 3, and 4 spaces.

      I'm a tabs man myself largely because they allow developers to display the indentation at their preferred level. For that matter, the IDE should be able to display braces and spaces according to the user's preferences for viewing and editing, automatically converting to and from a canonical form for source control.

    171. Re:Tabs vs Spaces by angel'o'sphere · · Score: 1

      Actually, nearly every IDE is indenting for you automatically.

      If you have to delete tabs or spaces you are doing something seriously wrong.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    172. Re:Tabs vs Spaces by beelsebob · · Score: 1

      Each tab indents X spaces - it's just a multiplier. You talk about using a "mixture" causing problems, and I would agree - so why not stick with tabs which are more flexible, configurable etc?

      It's not "just" a multiplier. It's a different multiplier on different systems, and therefore results in a different layout on different people's systems.

      That's great if you stick only to tabs. However, in practice, you can't stick only to tabs, because fine layout control eventually requires you to use a couple of spaces.

      As soon as you're at that point, you're screwed because the layout gets really messed up as soon as the tab width changes.

    173. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      Don't forget that java alteast has a style guideline that says a tab is 4 spaces. So even if you used the tab character, you should still be using a setting of 4 as indentation.

    174. Re:Tabs vs Spaces by angel'o'sphere · · Score: 1

      Perhaps you should shoot your teacher then, if he is still alive.
      Because you learned wrong ;D

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    175. Re:Tabs vs Spaces by beelsebob · · Score: 2

      Alternatively, just configure your editor to insert spaces to the next tab stop when you push tab, and you're done.

      Having a mixture of tabs and spaces always leads to people fucking up the formatting, because it's impossible to see when they've made a mistake until it lands on someone else's machine.

    176. Re:Tabs vs Spaces by beelsebob · · Score: 1

      But why would you go to so much effort to always insert the right character, when you could just configure your editor to insert spaces to the next tab stop when you push tab, and be done?

    177. Re: Tabs vs Spaces by psililisp · · Score: 1

      I thought it was 8 characters per tab: https://www.kernel.org/doc/Documentation/CodingStyle . Maybe I'm just confused by the conversation and the discussion is about hitting the tab key (inserting spaces) or hitting the space bar a number of times to indent.

    178. Re: Tabs vs Spaces by pruss · · Score: 1

      Eight is what you get when you dump the file to a terminal (with type on Windows/dos and cat on *nix) or when you grep through a bunch of files, etc.

    179. Re: Tabs vs Spaces by ranton · · Score: 2

      45% of respondents prefer tabs, while 33.6% prefer spaces, though the relationship flips at higher experience levels. On average, developers who work remotely earn more than developers who don't. Product managers reported the lowest levels of job satisfaction and the highest levels of caffeinated beverages consumed per day.

      There are alternate plausible explanations for all those things other than the one that might first appear.

      I think the most obvious explanation is that older programmers are more likely to remember older and less capable tools which couldn't handle tabs well. Today I cannot imagine why someone would use a tool that cannot customize tabs for each user. Mixing tabs and spaces is still a problem, but unless you are using a 20 year old editor why would you still be using spaces?

      --
      -- All that is necessary for the triumph of evil is that good men do nothing. -- Edmund Burke
    180. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      At my work we all use VS

      Some people like the stock ~5 char indent

      VS uses a 4-space indent per tab by default.

      I personally use a bit different rule for tabs-vs-spaces. Tabs are for indenting, not for spacing. So use tabs for indenting, but once there's a non-tab character on the line, use spaces for positioning after that point (for example, if you want your variable names to line up on the same column).

      And, since I use VS, there's always Alt+E,V,T to "Tabify selected lines". If you don't like tabs, use Alt+E,V,B or learn to like tabs (your choice).

    181. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      I find it hilarious that some programmers who use variables names like lpszNameOfFunctorFactoryBuilder will then turn around and use tabs to save a handful of bytes.

      Tabs are no longer about saving bytes; they are about letting other developers see the code at their preferred amount of indentation. Tools that invariably expanded tabs to 8 spaces have mostly been fixed.

      The only real problem is people who insist on using a mixture of tabs and spaces under the assumption that a tab will always be expanded to their preferred width.

    182. Re:Tabs vs Spaces by jez9999 · · Score: 1

      Linus actually likes 8 space tabs, on the grounds that if indentation starts to push code off the edge of the screen your code is wrong.

      Good job I have a 5000px ultra-widescreen monitor. :-)

    183. Re:Tabs vs Spaces by jez9999 · · Score: 2

      So have a checkin hook that refuses to accept any checkins with lines that don't match /^([^\ ]\t*[^\t]*)|$/

    184. Re: Tabs vs Spaces by Anonymous Coward · · Score: 0

      If you have a for (...) loop that splits across three lines, there should be n tabs leading up to the for, and then on each of the following two lines there should be n tabs followed by 5 spaces, for proper alignment.

      I just use (n + 2) tabs on each of the following two lines, the same pattern as on every other "continuation" line, and don't worry about vertically aligning the exit and update expressions with the initializer.

    185. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      I used to maintain C from various authors. Their solution seemed to be: no tabs, no spaces (except where syntax demanded). Got so tired of looking at that crap that python's forced indenting is a godsend. I love it that you don't like it. The more pissed you sound, the bigger my smile.

    186. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      Spaces are 1 space. Tabs are a random number of spaces.

      Get an old typewriter. Unless you've manually set the tabstops to something custom (eg. for making tables or columns), tabstops are every 8 spaces.

      Yes I did look at a manual typewriter, it's a huge steel Royal that's been in continuous use (by my mother) since the late 1950s. She's got the tabs set to 6 spaces.

      Computers emulate this perfectly. Tabs are a random number of spaces, with a default setting of 8 characters, that every user changes to something they alone like.

    187. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      Meanwhile, if you use spaces for everything, code remains well laid out everywhere. If you have even a half-decent editor, it will allow you to edit spaces as if they were tabs, so using spaces has exactly 0 drawback.

      The drawback is that it prevents anyone from viewing code with a different amount of indentation, which is a detriment to code readability.

    188. Re: Tabs vs Spaces by MenThal · · Score: 1

      The Linux kernel is written in C. Without classes, namesakes, modules etc, indenting size of 8 ain't a big issue. Now, do that in Java and the actual working code ends up on the third monitor from your left.

    189. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      Yay! A series of workarounds! Who doesn't love having to do a bunch of workarounds and configuration setup steps to edit code?

      Has anyone told your your an idiot today? If not, let me be the first.

    190. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      It's really very simple. If everyone used tabs and didn't use shitty editors that stupidly REPLACE tabs with spaces then everyone could have the same code indented to their preference. Editors of any kind that replace tab characters with anything are the 99% of the problem. The other 1% being people too stupid to realize the value of tabs.

      You example of what to replace tabs with DESCRIBES tabs, except far more complicated to implement and more likely to break. It's mind boggling that you don't see the very behavior you want is what tabs are for.

    191. Re:Tabs vs Spaces by gbjbaanb · · Score: 1

      dammit, I'm self-taught!! :-)

    192. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      The problems that people associate with tabs are because people do dumb shit like you described. And have editors replace them with spaces, which is possibly even more idiotic. You can never guarantee an idiot didn't write whatever you're looking at, but that's not tabs fault.

    193. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      A tab is NOT an unknown number of spaces, It's a tab character. I'm not sure why you find that so hard to understand. It's a character that represents a tab. That tab can be expressed in any number of ways, based on the preference of the user.

      None of what you've said is relevant. A tab and 3 spaces is not a tab, is shitty indentation. A tab being 8 characters in a terminal and 4 in another editor IS THE POINT of tabs, not a "problem". Do you actually understand how a tab is stored? I really don't think so. Here's a pro tip: It's not as spaces.

      If used correctly there is absolutely no benefit to spaces over tabs. Not a single one. But there are benefits to tabs. People who use spaces like you are the CAUSE of all the tab problems. It's actually a pretty selfish way to code.

    194. Re: Tabs vs Spaces by myrdos2 · · Score: 1

      That's why I have the Tab key insert 4 spaces for me. That, plus an auto-indent that also uses spaces, lets me get the best of both worlds.

    195. Re: Tabs vs Spaces by Anonymous Coward · · Score: 0

      Notepad++ is a toy compared to vim and/or emacs. Try doing some of the vimgolf exercises in anything other than vim (or emacs) and see how it compares. http://vimgolf.com/

    196. Re:Tabs vs Spaces by dmaul99 · · Score: 1

      I know how to copy and paste in vim (yank/put), but I always use the mouse anyway. Do you know what happens when you paste something with tabs? Converted to spaces. Now it's all messed up.

      Also, when you prepend a # in front of lines to comment them out, it goes all over the place.

      I hate tabs.

    197. Re: Tabs vs Spaces by Anonymous Coward · · Score: 0

      Try geany on linux. It's pretty close to Notepad++ IMO.

    198. Re:Tabs vs Spaces by steelfood · · Score: 1

      I think I would keep the physical tab "key" itself but standardize editors to convert it into a certain amount of spaces. Kind of like how IBM standardized ctrl-X/C/V.

      Certainly, a good chunk of the ASCII codes below 32 wouldn't be around.

      --
      "If a nation expects to be ignorant and free in a state of civilization, it expects what never was and never will be."
    199. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      I wasn't aware that non-uniform whitespace actively broke so much code. Do you punch your own cards or does a secretary do it for you? Do you still program with dials and switches?

    200. Re: Tabs vs Spaces by TechyImmigrant · · Score: 1

      Yes. I don't have a problem with vim. I use it every day and after 25 years, it's wired into my head fairly well.

      But I would love greater consistency in the common actions across platforms. copy, paste, block select/delete/insert, insert mode indent etc. . Every now and then I go and meddle with the .vimrc and try to make them behave the same, but entropy creeps in over time.

      These days I write more code by writing python to generate the code than by writing directly in the domain specific languages I use. It's heavy lifting to get started, but cuts out a layer of typo debugging.
       

      --
      I should use this sig to advertise my book ISBN-13 : 978-1501515132.
    201. Re: Tabs vs Spaces by TechyImmigrant · · Score: 1

      I just typed geany into my work environment (big corp, shared linux compute server type environment) and it's there. I've never been more surprised. I usually have to mess around compiling this sort of thing.

       

      --
      I should use this sig to advertise my book ISBN-13 : 978-1501515132.
    202. Re:Tabs vs Spaces by phantomfive · · Score: 1

      Only use tabs to the point of indentation. Only to the point where code starts. After that use spaces. It will solve your problem. Really.

      --
      "First they came for the slanderers and i said nothing."
    203. Re: Tabs vs Spaces by TechyImmigrant · · Score: 1

      Ctrl for block select instead of alt, but not bad. I'll will continue messing with it.

      --
      I should use this sig to advertise my book ISBN-13 : 978-1501515132.
    204. Re:Tabs vs Spaces by spongman · · Score: 1

      axiom: there are two kinds of spaces used in programming: 1) block indentation, and 2) alignment (for long lines, variable initialization lists, etc...), and type 1 always appears to the left of type 2 on any given line.

      if you use the same character for both then you are unnecessarily contributing to the heat-death of the universe.

    205. Re: Tabs vs Spaces by Ulric · · Score: 1

      Are you kidding? If you edit code on unix tabs are a nightmare.

      I edit code on Unix all the time and have no problem with tabs.

    206. Re:Tabs vs Spaces by danlip · · Score: 1

      If people only used tabs it would be OK. But people use a mix of tabs and spaces, and it only displays right if you have your tab width set to the same value as the original developer. It's a nightmare. Use spaces only please. And bytes are cheap.

    207. Re: Tabs vs Spaces by Darinbob · · Score: 1

      No the "X spaces is always right" is the team's choice. The team decides what the indentation style should be, not the individual developer, and certainly not the tool.

    208. Re:Tabs vs Spaces by danlip · · Score: 1

      And then there's Python ...

      Indeed there is, but that is a good reason not to use python, and has nothing to do with whether tabs or spaces are better (also there are better reasons not to use python, I hate to harp on whitespace sensitivity because it's definitely not the worst thing about the language).

    209. Re:Tabs vs Spaces by Ulric · · Score: 1

      I can virtually guarantee if you were inventing the first character set today, with no backward-compatibility constraints and no knowledge of the real world's history of keyboarding, you would not include a tab key.

      An indentation level key. I think I would like that. Put it on the list. Scroll Lock on the other hand...

    210. Re:Tabs vs Spaces by Ulric · · Score: 1

      Because code that looks like this is more readable than code that looks like this.

      The examples violate the simple rule "tabs for indentation, spaces for alignment".

    211. Re:Tabs vs Spaces by ILongForDarkness · · Score: 1

      I'm pretty sure VS must be using a real tab character when you are using tabs not spaces. When I turn show white space on it shows tabs with the -> symbol and spaces with a dot: the editor knows when I added two spaces and when I added a tab (which may or may not be set to = 2 spaces). It also knows this when opening up a diff of someone elses files so it isn't that it is remembering keystroke history magically or anything. Anyways, at least for VS it isn't "magically doing multiple backspaces for me" it actually knows that the character pressed was a tab not a space in the first place.

      My suspicion is the earlier commentor is using an editor developed in the 70's and assuming that that is how all of them work.

    212. Re:Tabs vs Spaces by BarbaraHudson · · Score: 1

      Tabs are a random number of spaces, with a default setting of 8 characters

      So the default tab is 8 spaces. Not 4, 3, 2, or whatever. Thank you for confirming that.

      --
      "Transparent" is a shit show that trades on every stereotype going. A man in drag is NOT a transsexual.
    213. Re:Tabs vs Spaces by GuB-42 · · Score: 1

      Tabs are fine but unless you and your team have a lot of discipline, it can result in a huge mess. Spaces are much easier to manage.

      Common problems with tabs are :
      - Trying to align code with tabs (tabs are for indentation only !)
      good :
      [TAB]int.....a;
      [TAB]float...b;

      bad :
      [TAB]int[TAB]a;
      [TAB]float[TAB]b;

      - Copy-paste behavior may be inconsistent (for example terminals or browsers can convert tabs to spaces automatically)
      - You can insert an invisible space between two tabs, and this can mess up diffs

    214. Re: Tabs vs Spaces by flargleblarg · · Score: 1

      I actually use spaces-only in my own personal code — personally, I hate tabs... BUT — on larger projects where tabs are part of the team culture, the rules listed really do work wonderfully. Everybody can have their own tabstop setting and nobody gets messed up by indentation. I agree that spaces will maintain what you want the code to look like regardless of what settings someone else's editor has, but you can get the same effect by using tabs intelligently. And finally, the example I gave with the for loop actually doesn't break readability at all — it works for tabstop of any size.

    215. Re: Tabs vs Spaces by flargleblarg · · Score: 1

      It does work. I've done it in team environments. It works quite well, actually.

      That said, in my own personal code, I never use tabs.

    216. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      Without looking at the file, and you want to unindent something that is done with spaces, how many times do you have to hit the backspace? Well that depends on how many spaces the file is done with (or that section). With tabs, it's one. Always one backspace. If Joe down the hall likes to see 3 spaces per indent and we uses spaces, all he has to do is set his editor to do that, while Jack likes 4 and he set his editor to do that, but when it hits version control, it's a tab either way.

    217. Re: Tabs vs Spaces by Anonymous Coward · · Score: 0

      You might want to give Geany a try on *nix

    218. Re: Tabs vs Spaces by KingMotley · · Score: 1

      If their resume has stuff where it's not exactly lined up right, they are a spaces guy. If everything is lined up right, then they are a tabs (or columns, or tables) guy.

    219. Re: Tabs vs Spaces by KingMotley · · Score: 1

      Linus is irrelevant. He's over 40 and will never find a job.

    220. Re:Tabs vs Spaces by KingMotley · · Score: 1

      On typewriters and early word processors it was 8, and still is usually.

    221. Re:Tabs vs Spaces by KingMotley · · Score: 1

      Why are you using an editor that would replace tabs with spaces when it initially reads the file, yet doesn't convert the spaces back to tabs when it saves it? Sounds like a bad editor to me.

    222. Re:Tabs vs Spaces by KingMotley · · Score: 1

      Yet another person that doesn't understand the difference between random and "I don't understand".

    223. Re:Tabs vs Spaces by KingMotley · · Score: 1

      That door swings both ways. If you are supposed to be using spaces, how do you know that someone didn't put a tab in there?

    224. Re:Tabs vs Spaces by goose-incarnated · · Score: 1

      Because code that looks like this is more readable than code that looks like this.

      The examples violate the simple rule "tabs for indentation, spaces for alignment".

      You don't need a rule if you use spaces - that was kinda my point :-)

      --
      I'm a minority race. Save your vitriol for white people.
    225. Re: Tabs vs Spaces by TechyImmigrant · · Score: 1

      I've been doing that today. So far it's going ok.

      --
      I should use this sig to advertise my book ISBN-13 : 978-1501515132.
    226. Re:Tabs vs Spaces by Dynedain · · Score: 1

      Funny, the 1928 Underwood that I'm staring at has little pins that you move to wherever you want the tab stops to be, just like margins are fully configurable.

      --
      I'm out of my mind right now, but feel free to leave a message.....
    227. Re: Tabs vs Spaces by KingMotley · · Score: 1

      Yes, typewriters (and word processors) usually have adjustable tab stops. At some point (before I started using either -- pre 1970s), most considered every 8 characters as the standard. As the story goes, it was because it was easier for early word processors and electric type writers to use a number that was easy to handle in base-2, but I don't have a reference for you. It was what was taught to me in typing class in high school, and what the pcs of the time (IBM, Apple, Atari) used as well as all the major printers understood (hp, star, a few others). It's also the default for DOS (and windows), and the web. http://dev.w3.org/csswg/css-te...

    228. Re:Tabs vs Spaces by Dynedain · · Score: 1

      Why would you assume that from a reference to typewriters?

      I use command-line tools almost hourly.

      --
      I'm out of my mind right now, but feel free to leave a message.....
    229. Re:Tabs vs Spaces by RabidReindeer · · Score: 1

      The only time I set either my text editor OR my word processor to show non-printing characters is when I need to diagnose why spacing is off. Those little markers they use as visible tabs, paragraph markers, etc. are a distraction, otherwise.

      When used properly, indentation can be very nice. Tabs, however, are too much at the mercy of whoever set the tabstops. And even if you can get away with an iron-bound shop-wide tab standard, that wouldn't help when integrating with external sources or with the inevitable sloppyness when people hit the space bar and mix spaces and tabs willy-nilly.

      And considering the number of word-processed documents I've encountered over the years where people used brute-force spacing and newline characters in place of proper tabs and paragraph styling, I don't delude myself how well that would work.

    230. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      If you are too dumb to use the correct form of a word and spell check it, then I don't want an idiot like you working for me. See how this judgment thing works?

    231. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      You open it in MS Word and look for those goofy indent characters, DUH!

    232. Re: Tabs vs Spaces by Bent+Spoke · · Score: 1

      Geany is.

    233. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      > How do you know it's not 3 spaces plus a tab?

      My editor allows me to display whitespace characters. I don't always use that feature, but it's invaluable.

    234. Re:Tabs vs Spaces by Xest · · Score: 1

      Not my experience. Every time I've loaded a project done with spaces, it's inevitable that there is a space too many here, or a space too few there.

      I don't see how this is any different to a stray tab quite frankly.

    235. Re: Tabs vs Spaces by rjstanford · · Score: 1

      That's why tabs should be used for leading indentation only - if you want to arbitrarily line something up intraline, use spaces, that's what they're for.

      Better yet, don't do that - doing so introduces a really annoying problem in which anyone making a tweak either has to change all the other lines (showing a big confusing diff in source control) or leave something ragged (which defeats the entire purpose).

      With autocomplete in most rational editors working well, there's no reason to ever do "var x // current row position" when you can say "var currentRowPosition" and leave it at that instead of forcing people to go back and reference your previous comments.

      --
      You're special forces then? That's great! I just love your olympics!
    236. Re: Tabs vs Spaces by rjstanford · · Score: 1

      That's something that you can set in your terminal emulator - either in your settings if its a GUI one, or by using the tabs(1) command in your .profile if you want to keep it old school. Set it once and forget about it.

      --
      You're special forces then? That's great! I just love your olympics!
    237. Re:Tabs vs Spaces by rjstanford · · Score: 1

      You do realize that you can change the tab width in your terminal emulator, right? Hint: man 1 tabs

      --
      You're special forces then? That's great! I just love your olympics!
    238. Re: Tabs vs Spaces by swillden · · Score: 1

      It does work. I've done it in team environments. It works quite well, actually.

      Anything works if you're willing to put enough effort into it. But if your goal is to reduce the amount work of required to make the code readable to multiple developers with multiple tab widths, it doesn't. It merely adds an additional load on everyone to make sure that everything follows the fairly complex formatting rules.

      The one way it does work without too much pain (except the line-wrapping problem and other tool problems I mention below) is if you have really good tool support. Something like clang-format configured to work out the indentation and apply the proper mix of tabs for indent levels plus spaces for alignment. Especially if you run the formatter in a commit hook or similar. But if you've got something like that, it doesn't matter anyway because you can use spaces and everyone can automagically reformat the code to whatever indentation size (and other style) they prefer. With a decent editor and a good formatting tool, it's trivial to get the editor to reformat to the preferred style on load and the common style on save.

      And then by using spaces you don't have the problem that all command line tools output bits of code with 8-character tabs. You see the same thing in your editor and on the CLI. And web-based code browsers and whatever other ways you look at your code.

      An issue that arises with lots of automatic reformatting is line-breaking, but you have the same problem with using tabs of varying widths for varying indentation sizes. The guy who likes 8-space tabs will always want to line wrap much earlier than the guy who likes 1-space tabs, and that problem exists whether you use spaces and reformat or use tabs and change your editor config.

      All in all, this effort to allow developers to use different indentation sizes just creates headaches for everyone. It's much simpler and less error prone to mandate a fixed indentation size and specify that it must be done with spaces. And if you have an engineer who refuses to follow the coding style, you should fire him, and thank your lucky stars that you did so, because that attitude is going to bite you in other areas that actually matter.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    239. Re:Tabs vs Spaces by RabidReindeer · · Score: 1

      Ain't got time for that. I'm working with a lot of different systems. The amount of time I can afford to spend tweaking - and re-tweaking, since I'm doing a lot image-zapping - for personal idiosyncracies is limited.

      Anyway, MY inconsistent tab habits are only a small part of the problem. It's when you get a lot of other people involved that it gets really messy.

    240. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      It doesn't take that much time, you big baby.

    241. Re: Tabs vs Spaces by Marxist+Hacker+42 · · Score: 1

      See, that's what drives me crazy about alternate operating systems. Why would you paste to mark a block?

      --
      SJW: a person who perceives an injustice, and while correcting it, commits a greater injustice.
    242. Re:Tabs vs Spaces by werepants · · Score: 1

      I have never (ever!) had a bug based on a whitespace typo in Python. Compare to the times I've had the wrong number of braces or missed a semicolon in C++, which is probably something like 1 in 5 compiles. Even considering that I've spent 10x the time coding in Python, I've spent far less time dealing with syntax errors than I did in C.

      It is ludicrous to claim that tabs are more onerous to keep track of than superflous punctuation. Especially considering that you should be indenting anyway to make your code human readable, so what you've really done going to whitespace-based syntax is made life much simpler, however you look at it.

    243. Re: Tabs vs Spaces by sjames · · Score: 1

      How so? I've not found it to be a problem except when some ID10T uses spaces somewhere.

    244. Re:Tabs vs Spaces by sjames · · Score: 1

      Your argument supports using one or the other rather than a jumbled mix, but it doesn't actually show one to be preferable to the other.

      Given that, I argue the win goes to indenting with tabs and using spaces for other formatting on the line. Indenting with tab allows each person to have the visual appearance that works best for them without screwing up the code. If you like a 2 space indent and I like 4 but Joe who has a visual impairment needs 8 to avoid confusion, we can all have our way by using tabs and setting tabstops appropriately. But if Joe uses spaces, you and I are going to be quite unhappy.

    245. Re:Tabs vs Spaces by sjames · · Score: 1

      So you would prefer that they actually make it 2 spaces as a hard setting so when you are looking at the same deeply indented code, you keep losing track of what level of nesting you're in?

    246. Re:Tabs vs Spaces by sjames · · Score: 1

      No, tabs are the number of spaces you say they are, at least when indenting.

    247. Re:Tabs vs Spaces by sjames · · Score: 1

      Tabs are exactly one level of nesting, no matter what you choose to make that look like in your personal settings.

    248. Re: Tabs vs Spaces by sjames · · Score: 1

      neither of us sees any fucked up layout

      Provided we both have the same taste in indentation. Otherwise, we both see fucked up layout.

    249. Re:Tabs vs Spaces by sjames · · Score: 1

      I'm sorry :se ts=4 is so hard. Perhaps you should edit preferences so you need only do it once.

    250. Re:Tabs vs Spaces by sjames · · Score: 1

      Actually, tabs save a lot of grief in Python unless some bonehead mixes in some spaces in tab indented code.

    251. Re: Tabs vs Spaces by sjames · · Score: 1

      Why not use them as intended. Tab for line indentation and space for other formatting. Think of tab as specifying the nesting level.

      Done right, that will get it right no matter what the next guy sets tabs to look like in his editor.

    252. Re: Tabs vs Spaces by sjames · · Score: 1

      ^THIS^ exactly.

      Use an abstract character to express an abstraction.

    253. Re:Tabs vs Spaces by sjames · · Score: 1

      And every single person who uses spaces is doing it wrong by definition :-p

    254. Re: Tabs vs Spaces by swillden · · Score: 1

      Been there, tried that. It inevitably gets screwed up, meaning it adds yet another maintenance burden, unnecessarily.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    255. Re: Tabs vs Spaces by sjames · · Score: 1

      As opposed to every other whitespace scheme that gets messed up somehow leading to a maintenance burden?

    256. Re: Tabs vs Spaces by swillden · · Score: 1

      As opposed to every other whitespace scheme that gets messed up somehow leading to a maintenance burden?

      Nothing is free, but using only spaces is the cheapest policy.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    257. Re: Tabs vs Spaces by sjames · · Score: 1

      What makes it cheaper than cleaning up from tab indentation?

    258. Re: Tabs vs Spaces by swillden · · Score: 1

      Once you verify there are no tabs in your source code (which is trivial, e.g. grep -l '\t'), then any indentation or alignment problems are visible and the needed fix obvious (insert or remove spaces). The problem with mixed tabs and spaces is that since both are non-printable characters, you can't easily see which is which, which makes finding lines with improper mixtures difficult. You can write a regexp to identify lines with tabs that follow non-tab characters, then go fix them up, and you can even do things like create commit hooks to find such problems and deny commit, but its much less effort to simply disallow tabs from the outset. In theory it seems like it's roughly the same problem (identifying files with tabs vs identifying files with tabs that follow non-tabs), but in practice if you simply ban tabs you almost never end up with files that contain them. Trying to enforce the "correct" ordering of tab and non-tab characters always results in work.

      In addition to that, the point of mixing tabs and spaces is to provide variable indentation size, to match developer preference... but even when that works it creates yet another problem: disagreements about line wrapping. Developers who use larger tab sizes naturally need to wrap lines earlier (shorter lines), and those who use smaller tab sizes want to wrap them later (longer lines). This pretty much guarantees inconsistent line wrapping.

      This, of course, all assumes that you're doing manual formatting. The best way to handle formatting is to use a tool (e.g. clang-format) and ban all manual formatting. If you do that, then you can actually have the tool do the tabs-and-spaces mixture thing (e.g. for clang-format "UseTab: ForIndentation"), and, assuming the tool works, your tabs and spaces will always be applied correctly. But if you're using a tool like that, then there's really no point in mixing tabs and spaces, because any developer who wants a different tab size can simply run the tool with their preferred settings (including line wrapping), work on the code, then before submitting run the tool with the project settings. Ideally, the preferred settings should be applied by an editor load hook, and the project settings applied by a commit hook.

      In short, with proper tool support, mixing tabs and spaces provides no value. Without proper tool support, it creates more hassle than its worth. Particularly since it really doesn't take long for a developer to get used to any given indent size.

      Finally, among the whole space of developer code formatting preferences, indentation level is a trivial thing. If you want your team's code to have a consistent look (and you do... it really matters for maintainability), then you're going to have to specify a LOT of other things that different developers will disagree on, and which their editors can't paper over. So they're going to have to suck it up and accept some team style guidelines anyway. May as well include indentation level.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    259. Re: Tabs vs Spaces by sjames · · Score: 1

      It's worth noting that some people have visual problems such that if the indentation is too small, they can't really make out if a line is more indented than the line above or not. Suck it up may not be an option.

      Beyond that, we'll have to agree to disagree. Your method sounds like a lot of work just to get what I get for free by using tabs for indentation.

    260. Re: Tabs vs Spaces by Dr_Barnowl · · Score: 1

      The team decides what the indentation style should be

      Not on any project I run. "Discussions" about indentation style lead to some of the most unpleasant, passive-aggressive, time-wasting and downright unproductive meetings I've ever attended. There's always at least one or two people who are unwilling to compromise on what they consider to be the "best" style (as you can see by scrolling around this discussion).

      The reason I tend to prefer the IDE default (for languages where it's a no-brainer to use the IDE, like Java) is because it requires the least effort to get right. There's always some bonehead who joins the project later, doesn't read the style guide, and starts committing using the default settings. If your project standard is the default settings, this is fine. On projects where you wasted around 8 hours determining that the indent should be four spaces and there should be a rigid right-column margin of 80 chars, this means that someone will check out the source, open it in Eclipse, and start committing changes indented with tabs. The IDE guys already had all those arguments about style, and they almost certainly have more collective experience than you. Use that experience, don't waste your life reinventing the wheel.

      Have the team lead pick a simple, easily followed style, and allow a certain amount of leeway - as the saying goes foolish consistency is the hobgoblin of little minds. The point is to make the code easier to understand, and if there are occasions when deviating from the style guide improves this, do it.

      Spend the time you would have wasted arguing about tabs or spaces creating a culture of discussion about what makes for clearer, more understandable code. Rules of thumb like "if you find yourself with the urge to comment a particular stretch of code, consider that you might just write the code more clearly".

    261. Re: Tabs vs Spaces by Darinbob · · Score: 1

      How can the IDE settings be the standard if everyone uses a different IDE or editor?

    262. Re:Tabs vs Spaces by Anonymous Coward · · Score: 0

      No drawback? It uses more bytes. As a perl programmer and fan of perl golf, I can't have that.

      Then again, it's not a problem for me, because since I write in perl, nobody can or will read my code except me anyway.

  4. S/O IS FULL OF KNOW NOTHINGS by Anonymous Coward · · Score: 0

    It is mostly. It's like a welfare office. Sure, some are employed, but only because SO MANY ARE NOT!

  5. Re:Sounds about right to me by Anonymous Coward · · Score: 0

    And from my experience, only one out of 50+ friends and acquaintances that are developers is not heterosexual (he is bi), at least openly (though I have a gay friend that is a computer scientist/mathematician, but not developer). Anecdotal experience only goes so far.

  6. Outliers are most interesting by Anonymous Coward · · Score: 0

    "Only one respondent wrote in that he/she works with lasers."

    1. Re:Outliers are most interesting by Tablizer · · Score: 1

      "Only one respondent wrote in that he/she works with lasers."

      Woops, the same respondent said they drink a lot of caffeine.

  7. Re:Sounds about right to me by Anonymous Coward · · Score: 1

    In my experience, most 40 yr old males in SF are gay; so there might be a sampling bias here.

  8. Rust by Anonymous Coward · · Score: 0

    The love for Rust is a little surprising. But then, it occurs to me that Rust has accumulated a large following and today most contributors aren't employed by Mozilla.

    I am happy about this. After a 15-ish years of thinking about my ideal language Rust appears and comes pretty close. I guess I haven't been alone then. We may finally get a real, hard core systems language out of this.

  9. Re:Sounds about right to me by Anonymous Coward · · Score: 1

    Never met an openly gay Linux developer.

    It's San Francisco. Not Linux.

  10. Gender balance "problem"? by Anonymous Coward · · Score: 2, Insightful

    > Software development has a gender balance problem. Our internal stats suggest the imbalance isn't quite as severe as the survey results would make it seem, but there's no doubt everyone who codes needs to be more proactive welcoming women into the field.

    SJWs have spent decades telling women they need "special help" to become engineers and programmers. We can't overcome that by being "welcoming" because they chose a different path before college. Even without the SJW discouragement campaign, it's clear that women are choosing more rewarding fields that better fit their preferences. Staring at code all day isn't for everyone, just like working with babies all day would drive me mad. Different jobs for different folks, and we should all be glad for the variety.

    Just stop telling me this is all my fault, StackOverflow.

    1. Re:Gender balance "problem"? by Anonymous Coward · · Score: 0

      Coding is a dead-end field. Burnout, agism, and/or wrist problems zap most eventually. Why promote it?

    2. Re:Gender balance "problem"? by anyaristow · · Score: 1

      SJWs have spent decades telling women they need "special help" to become engineers and programmers. We can't overcome that by being "welcoming" because they chose a different path before college.

      If you think you are not involved before college you may be mistaken. Discouraging women has more to do with the culture of programming than with SJWs, and that culture exists everywhere a young woman might go to talk with programmers, including here. How it got that way is not your fault, specifically, but clearly you aren't interested in being "welcoming", which perpetuates the problem.

      Staring at code all day isn't for everyone, just like working with babies all day would drive me mad

      Yeah, like that.

    3. Re:Gender balance "problem"? by anyaristow · · Score: 1

      As to whether there is a "problem"...

      If you're surrounded by people just like yourself, of course you don't think there's a problem. But a monoculture may not be the most efficient way of getting things done. You may not think there's a problem, and your organization may not know any better because they've never seen any different, but you are almost certainly less efficient (and less profitable, less satisfied, less secure) for being so un-diverse.

    4. Re:Gender balance "problem"? by PopeRatzo · · Score: 0, Troll

      SJWs

      An interesting statistic that never gets mentioned by the "Men's Rights Activists" who like to talk about how women aren't suited for programming is that up until the late 1980s, half of the people graduating from Computer Science programs were women. They were already in programming and for decades until they started leaving in droves. And the statistics show that they weren't leaving to have babies like the stupid SOB that you're replying to suggested. They were pushed out, and by a culture that had become increasingly hostile to their presence.

      If a young male programmer doesn't have the educational credentials, he's said to have "street smarts" or "natural talent". If the same programmer is female, she is said to have "insufficient education". A study done at UC Hastings called "What Works for Women at Work" shows how the discrimination is done. In 250 performance evaluations, three-quarters of the women were criticized for their personalities, with terms like, "abrasive", while only two men were. I suggest those of you who work in mostly male shops think about the personalities of your co-workers and ask yourselves if that sounds right, considering the personalities of your co-workers.

      The shame of it is that promoting diversity isn't just an SJW agenda. A recent McKinsey study found that organizations with the most diverse workforces had dramatically higher returns on equity and earnings performance. A study by Brooke Harrington revealed that groups made up of both men and women outperformed single-sex groups in every single instance. It's not just for "social justice" that tech companies across the spectrum are trying to make their workforces more diverse. Companies are now using software to replace the "buddy" interview, to conduct "blind" interviews where it's not just one neckbeard in khakis and a t-shirt interviewing another. The questions are tailored very specifically to the job requirements. These blind interviews have in some cases quadrupled the number of women passing to the next level. This replicates the experience of orchestras in the 1970s who went to blind auditions and saw the number of women hired for orchestra positions go up eight-fold.

      The good news is that the copious tears and gnashing of teeth this is producing in the "Men's Rights Advocate" community are a sign that the situation is improving, in the workplace, in the boardroom and for investors. The sausage party in tech is coming to a rapid end.

      --
      You are welcome on my lawn.
    5. Re:Gender balance "problem"? by TechyImmigrant · · Score: 1

      >up until the late 1980s, half of the people graduating from Computer Science programs were women.

      Bullshit. I was studying computer science in college in the late 1980s. Occasionally a women would be seen, but it wasn't common. My recollection is of 3 or 4 women in a room of 200 students.

      --
      I should use this sig to advertise my book ISBN-13 : 978-1501515132.
    6. Re:Gender balance "problem"? by anyaristow · · Score: 1

      An interesting statistic that never gets mentioned by the "Men's Rights Activists" who like to talk about how women aren't suited for programming is that up until the late 1980s, half of the people graduating from Computer Science programs were women.

      I got into the field in the early 80's, when there were a lot more women than there are now. At my first job, half the developers were women.

      I blame the internet. I'm not kidding. Online forums have empowered the brogrammer culture. It's great that there is now a forum for interacting socially on a grand scale, but there's also an opportunity and an excuse for not developing socially.

      Today's employers don't know how bad they have it. They don't know how unproductive today's developers are, chasing after self-congratulatory complexity rather than doing real work. On the upside, there's real opportunity for people of any gender to be heroes, going against the grain of the culture. In organizations run by adults, it's not difficult to be seen as a standout performer.

    7. Re:Gender balance "problem"? by PopeRatzo · · Score: 1

      Bullshit. I was studying computer science in college in the late 1980s. Occasionally a women would be seen, but it wasn't common.

      In fact, the number peaked earlier in the 80s and then started to decline. The one statistic I could find, for 1984, showed that 37.1% of the graduates of computer science programs in that year were women. And 45% of the graduates of math programs were women in that year, by the way.

      My recollection is of 3 or 4 women in a room of 200 students.

      Your recollection is wrong. Or, you weren't paying attention. Or the women just happened to sit as far away from you as to not be seen.

      Here are some citations for you, if you care (and in case you're from GamerGate, yes they are all peer-reviewed):

      Camp, T. “The Incredible Shrinking Pipeline.” Communications of the
      A C M, vol. 40, no. 10, pp. 103-110, 1997.

      Fisher, A and Margolis, J. “Women in Computer Sciences:
      Closing the Gender Gap in Higher Education.”
      www.cs.cmu.edu/~gendergap/

      Hammond,R . “Overcoming Geek Mythology: Computer Science
      Opens Its Doors to Women.” Carnegie Mellon Magazine, vol. 19, no.
      3, pp. 13-17, Spring 2001.

      Hornig, L.S. “Women in science and engineering: Why so
      few?” Technology Review, 87(8), 31-41, 1984.

      Kiesler, S., Sproull, L., and Eccles, J. S. “Pool Halls, Chips, and
      War Games: Women in the Culture of Computing.” Psychology of
      Women Quarterly, vol. 9, pp. 451-462, 1985.

      National Center for Education Statistics, “Digest of Education
      Statistics 2000.” Washington, D.C.: U.S. Department of
      Education, Office of Educational Research and Improvement,
      NCES 2001-034, 2001.
      www nces.ed.gov/pubsearch/pubsinfo.asp?pubid=200103

      --
      You are welcome on my lawn.
    8. Re:Gender balance "problem"? by PopeRatzo · · Score: 1

      On the upside, there's real opportunity for people of any gender to be heroes, going against the grain of the culture. In organizations run by adults, it's not difficult to be seen as a standout performer.

      That's the truth.

      --
      You are welcome on my lawn.
    9. Re:Gender balance "problem"? by Anonymous Coward · · Score: 0

      Were women "pushed out" or did efforts to raise the glass ceiling work well enough to afford them better (paying) opportunities in previously closed off areas that, given the choice, they preferred to pursue instead?

      Assuming, arguendo, that women in those other areas are paid less than their male peers, earning a medium level VC, Wall Street or management salary can still be a rationally better outcome than earning a mid level STEM salary if you have a career rather than a passion.

      If you gnash your teeth over poor gender diversity in STEM and not over poor ethnic diversity in InfoSys USA, then you fully deserve to be derided as an SJW.

    10. Re:Gender balance "problem"? by Anonymous Coward · · Score: 0

      Truth? Truth is you are lying fuckface:

      http://news.slashdot.org/comments.pl?sid=7141493&cid=49333785

    11. Re:Gender balance "problem"? by Anonymous Coward · · Score: 0

      I chose to do my first programming class when I was 16. The students were virtually all male. Nobody who signed up for that course had the slightest idea about how to program, let alone what programming culture was like. So you want me to believe that all the girls in my grade went out to different jobs, experienced a culture of misogny and then decided not to enroll in programming because of that?

      I can tell you why most of the males were in my class and that's because we were all the kids who would sit around at lunch and talk about computers or videogames.

    12. Re:Gender balance "problem"? by anyaristow · · Score: 1

      I chose to do my first programming class when I was 16. The students were virtually all male. Nobody who signed up for that course had the slightest idea about how to program, let alone what programming culture was like. So you want me to believe that all the girls in my grade went out to different jobs, experienced a culture of misogny and then decided not to enroll in programming because of that?

      I can tell you why most of the males were in my class and that's because we were all the kids who would sit around at lunch and talk about computers or videogames.

      You were 16 at a time when "we were all the kids who would sit around at lunch and talk about computers or videogames". You are not old enough to remember a time when there were not enough kids talking about computers or video games for there to be a group of them chatting over lunch. You are not old enough to remember a time before there was a programmer/gamer culture. For you, it's always been that way, and it's always been a boy's thing. It's no surprise there were no girls in your group.

      Kids don't talk about accounting or engineering or nursing or law over lunch. Not that I know of, anyway. They didn't used to talk about computers, either. It wasn't until the 80's that computers became a mainstream entertainment medium. It wasn't until the 90's that programming was common among high-school aged kids. And in the 90's the internet turned any discussion of computers or video games into a boy's thing.

      Prior to that women could show up to a college (or high school) programming class on equal footing. Since then, they've learned that programming is a boy's thing. If they think they're going to buck that trend all they have to do is show up at a place like slashdot (or a gaming website) to be discouraged.

    13. Re:Gender balance "problem"? by gbjbaanb · · Score: 1

      I'm not sure he is - I studied late 80s and there were very few women in my comp.sci classes at my university.,

      Maybe its a regional thing, I was in the UK.

      Mind you, in my first year I had to take maths and another subject - I chose religious studies as it was 2 hours a week and the tutor explained that there were no wrong answers... I was 1 out of 2 males in the entire class of about 40. Best. Course. Ever.

    14. Re:Gender balance "problem"? by serviscope_minor · · Score: 1

      We can't overcome that by being "welcoming" because they chose a different path before college.

      Indeed not. I have many friends in science and engineering. Not one of the guys was met with gales of laughter when as a boy they said they wanted to be an engineer. The girl in question to whom that happened did not end up becoming an engineer.

      Now, I expect this will be met with dismissal about how "she didn't really want to be an engineer" etc. It's easy to see the past through the lens of how you feel now. Now most of us are adults. We have a circle of friends, we are in a stable position, and we have the kind of confidence that comes with age.

      It's easy to forget just how unsettling teenage years are and you impressionable teenagers are.

      Just stop telling me this is all my fault, StackOverflow.

      The anonymous coward doth protest too much. No one said it was YOUR fault. I don't feel it's my fault either. Doesn't mean I don't want things to improve, however.

      --
      SJW n. One who posts facts.
    15. Re:Gender balance "problem"? by CronoCloud · · Score: 1

      Maybe its a regional thing, I was in the UK.

      It is regional. UK computer culture was even more dude-centric than US computer culture was in the 80's. I can confirm the "around 30 percent" number in the mid 80's.

    16. Re:Gender balance "problem"? by Anonymous Coward · · Score: 0

      Looking for an SJW thread and not leaving disappointed.

      I was finally able to successfully get a cisgendered woman to become a programmer. She got chased out of the job by other cisgendered women.

      Look. I'm not Don Juan and I doubt many other geeks are.

      Look at the blatant homophobia that's present in the recent attacks against those of us who date men instead of women who also program computers and play video games. Sorry, I'm not a sexual object for cisgendered women.

      Look at the Michigan Womyn's Music Festival. Somehow everyone's been brainwashed that feminism is supportive of trans folks.

      Open your eyes. Look around. I am not a sexual object for women. If a woman wants to talk shop with me, I'm more than happy to talk shop. Otherwise I see no reason why I should worry about whether I'm attractive to cisgendered women or whether I've got the right pheromones or anything else.

      If not being a good little sexual object for women is what's preventing them from working in tech careers, I don't know what you tell you.

      It's been shown that women pay women less than men pay women. Women put other women under incredible pressure to have babies. This is not a problem anybody assigned the male gender at birth can fix.

      Cheers

    17. Re:Gender balance "problem"? by Anonymous Coward · · Score: 0

      Since then, they've learned that programming is a boy's thing.

      There was a lot of marketing in the 80s that pushed that stereotype. Yes, a lot of them believe it, too. Try to convince them otherwise, and you'll get called mean in a hurry. If I being assigned the male gender at birth mutes any voice I might have to convince womyn-born-womyn who think maths are hard or that programming is for girls, too, what could I possibly do?

      I see sexism coming from marketing and management types. I don't see sexism coming from my colleagues. I also don't see why this problem is something for geeks to solve.

      I am interested in hanging out with people who are interested in the same things I am. This group includes whites, blacks, homosexuals, straights, and transgendered people. Cisgendered women are for the most part absent.

      Now here's the trick. CLEARLY there is a problem here when I can point at a specific demographic, cisgendered women, and, with very few exceptions[1] be completely correct with saying that if I meet a cisgendered woman, she will not share any of my interests. SOMETHING is wrong here.

      Perhaps the chickens are coming home to roost. Do you really think that group punishments for all assigned males in elementary schools gets things off to a good start. Do you think institutional sexual harassment from authority figures about how being assigned the male gender means that one is hopelessly destined to be a sexual harasser and date rapist improves things?

      Sure, I'll get accused of misogyny here. True, watching things I worked to build and achieve in school get tore down and threatened with legal action because an administrator wanted to push an agenda that only had room for cisgendered women embittered me, but those things are over a decade in the past.

      My intention isn't to display misogyny. This isn't a black and white issue. All I wish to convey is ambivalence and detachment.

      Good luck to all those cisgendered women who can't be arsed to put together a Linux from Scratch or download a Python interpreter. I did my part. I reached out. I even succeeded. Except every time I get a cisgendered woman interested in programming, all the other women in her life drag her back down and browbeat her about how computers are for boys or get jealous and drag her back down anyway because, according to them--according to cisgendered women themselves , a woman's place is to make babies and not maths.

      There is nothing I can do. I don't make staffing decisions. I'm not allowed near "children" because raep, so I cannot influence their decisions. I cannot change the mind of a demographic that has decided that maths and science aren't for them and that making babies is. I'm utterly powerless.

      I don't know exactly what changed in the eighties, but the numbers are clear. Something did. Something big. Where did the empowering feminist movement go? How is blaming and punishing an entire demographic for sexual harassment and date rape helping things? How is shutting assigned males out of opportunities that used to be equal opportunities helping?

      I don't think it is. I think we need look no further than unfortunate changes in the feminist movement and the advent of the SJW. I'm pretty much done attempting to argue against the narrative that women are helpless victims. I suppose getting a Linux install or compiler in their hands isn't the Politically Correct thing to do. I guess they are helpless victims, so whatever.

      All I can guarantee is that flogging myself in my closet every night isn't going to influence a young woman's life choices such as career and family.

      As an assigned male, attempting to influence her choices is automatically a sign of misogyny.

      All that third wave feminism and SJWs have shown me is that I might as well give up. Geeks are easy targets for bullying, especially those of us who prefer dating men instead of being sexual objects to cisg

    18. Re:Gender balance "problem"? by TechyImmigrant · · Score: 1

      My recollection is of 3 or 4 women in a room of 200 students.

      Your recollection is wrong. Or, you weren't paying attention. Or the women just happened to sit as far away from you as to not be seen.

      My recollection is not wrong. I counted. It was a database lecture. It was 3 or 4 because the lecturer was female. 3 in the audience.

      My data point doesn't have to match your averages.

      --
      I should use this sig to advertise my book ISBN-13 : 978-1501515132.
    19. Re: Gender balance "problem"? by MenThal · · Score: 1

      MRA, eh? What's their slogan?

      "If you want my penis, you'll have to pry it from my cold dead hands!"

      Oh, wait, that sounds rather accurate.

    20. Re:Gender balance "problem"? by PopeRatzo · · Score: 1

      My data point doesn't have to match your averages.

      And your data point has absolutely no meaning beyond the purely anecdotal.

      So why did you present an anecdote to refute my statement?

      It was 3 or 4 because the lecturer was female. 3 in the audience.

      The fact that the person teaching you databases was female, yet you claim such a small percentage of female students is interesting.

      --
      You are welcome on my lawn.
    21. Re:Gender balance "problem"? by Anonymous Coward · · Score: 0

      This.

      Invariably, when my wife has a bad day at work, the first three words I'll hear from her are, "I hate women."

    22. Re:Gender balance "problem"? by TechyImmigrant · · Score: 1

      Yup. I was in the UK then. I studied at Manchester University.

      --
      I should use this sig to advertise my book ISBN-13 : 978-1501515132.
  11. Re:Sounds about right to me by Tablizer · · Score: 1

    No, that's from the Troll Survey, not the Developer Survey. You RTFA wrong.

  12. SQL by DogDude · · Score: 1

    I'm always skeptical when somebody says they "know SQL". 90% of the people I've met who "knew SQL" thought that SELECT * FROM TABLENAME was the extent of SQL.

    --
    I don't respond to AC's.
    1. Re:SQL by msobkow · · Score: 1

      And 95% write loops updating one record at a time instead of using a WHERE clause on a single update statement. :(

      --
      I do not fail; I succeed at finding out what does not work.
    2. Re:SQL by Anonymous Coward · · Score: 0

      Then there is the question of which SQL. They are all different, mysql is not postgre, postgre is not oracle, oracle is not access, etc. etc..

      I would much rather see on a resume: "experience with oracle, postgre and access databases". Then I know what I'm dealing with.

      Even better I would like to see a short rant in the cover letter on why database abstraction in a software project is extremely stupid. Pick a database platform, one, and use it. Don''t rewrite SQL so that someone working on your project needs to learn yet another implementation of SQL. Pick a database system and use it. Just one.

      Then there is the pretentious epic query coders who offload heaps of business logic to the database creating immense, convoluted and massively inefficient queries with sixteen joins on tables without proper indexes thinking they are oh so clever, meanwhile bringing the server to its knees when implemented in production.

    3. Re:SQL by msobkow · · Score: 1

      If you're still thinking in terms of "which SQL" rather than knowing how to move between dialects, then you don't KNOW SQL. You know a product.

      --
      I do not fail; I succeed at finding out what does not work.
    4. Re:SQL by Anonymous Coward · · Score: 0

      Exactly. There is no "SQL", there are only database products. State which ones you know well and which ones you will have to consult the documentation on.

    5. Re:SQL by Shados · · Score: 1

      This can be pretty trippy lately as the various "products" are diverging quite a bit.

      I hadn't used MySQL in ages, and recently moved to a company that did for their smaller transnational dbs. It messed me up big time to see queries that had stuff in the select part that were not in the group by clause or aggregates.

      Then someone asked me for help with a Vertica query...and that is pretty bizzare in itself, being a vertical store with fairly high postgresql compatibility. Some stuff you expect to work just plain don't for weird reason (if you're not used to it. They all make sense once you understand the product's limitations). Other things that are completely unthinkable on a normal relational dbs however work just fine there (doing a where clause on a column ran through a function on a 500gb column, which would cause an impossibly slow full table scan in a normal relational db, run nearly instantly...)

      Its a big, big world out there...

    6. Re:SQL by DogDude · · Score: 1

      That's not at all true. SQL is SQL. Every product has add-ons, but SQL, which is supported by all major DB vendors, is very powerful in and of itself.

      --
      I don't respond to AC's.
    7. Re:SQL by Anonymous Coward · · Score: 0

      Eh, true SQL gurus don't use update... all tables are append only anyway :-)

    8. Re:SQL by Anonymous Coward · · Score: 0

      PostgreSQL's short name is 'Postgres' or 'Pg', never 'Postgre'

      While I'm at it, it's pronounced Postgres-SQL, with a doubled 's'. Not spelt that way though.

      (Sorry, it irked me how you repeated it three times in your post.)

    9. Re:SQL by Anonymous Coward · · Score: 0

      How does this not apply to every language? I know a lot of people who claim to know several but I don't think any of them are even close to mastering a single one.

  13. Huge red flag about the survey by Anonymous Coward · · Score: 0

    The thing that casts doubt on this survey is the results for the "Visit Frequency" question. 65.4% of respondents visit Stack Overflow multiple times per day and another 20% once per day? I'm struggling to find a charitable explanation for these numbers. (The uncharitable ones being either that the respondents are copy & paste code monkeys or the sort of person that spend more time on the Internet than working.)

    1. Re:Huge red flag about the survey by AuMatar · · Score: 1

      It skews highly towards the websites users. Hardly surprising. But when you consider that googling almost any programming question will lead to an answer on SO in the top 3 or 4 hits, I'm not sure how you can avoid visiting the site at least once a day on average.

      --
      I still have more fans than freaks. WTF is wrong with you people?
    2. Re:Huge red flag about the survey by beelsebob · · Score: 1

      Simple, people who don't spend their life copy-pasting don't google problems much.

      They look up the documentation for the API directly and figure out the right way to solve the problem themselves.

    3. Re:Huge red flag about the survey by Anonymous Coward · · Score: 0

      Googling is usually the option of last resort when stuck on a problem. I would be a little scared working with people that have to do this once let alone several times each day.

    4. Re:Huge red flag about the survey by DahGhostfacedFiddlah · · Score: 4, Insightful

      If I need to know about executeFoo() in SomeLibrary, I can:

      • Google "SomeLibrary executeFoo"
      • Go to SomeLibrary.com, and navigate through Support->Documents->API->executeFoo
      • Thumb through a dead-tree SomeLibrary book until reaching executeFoo

      I've tried all three, and vastly prefer the simple Google search. Not only will SomeLibrary.com be in the first 3 results (assuming their documentation doesn't suck), but there's a good chance you'll find a StackOverflow thread that not only explains executeFoo, but also covers the caveats and options better than the documentation.

      Code samples tend to be more elegant than my own code. Many questions have multiple samples by multiple authors refined by multiple editors over multiple years. In comparison, I find API documentation often turns stale, or the samples are too simple to cover the cases I'm interested in. I don't "spend my life copy-pasting" - code samples tend to be useless for any real-life task. But I do get to see a gallery of how other people have solved similar problems.

    5. Re:Huge red flag about the survey by paskie · · Score: 1

      Exactly. When the concepts are already well sorted out in your head but you need to quickly get something going with an unfamiliar API, it's typically way more time-efficient to just peek at a few code snippets over ten seconds rather than plodding through a confusing API docs written by a graphomaniac with ADHD. StackOverflow is a god-send that made me immensely more productive, especially in unfamiliar programming environments.

      --
      It's not the fall that kills you. It's the sudden stop at the end. -Douglas Adams
    6. Re:Huge red flag about the survey by beelsebob · · Score: 1

      Which is basically a long winded way of saying "if you're lazy, it's really fast to not bother understanding things, and just copy/paste a chunk of sample code from SO"

      So... basically exactly what I originally said.

    7. Re:Huge red flag about the survey by paskie · · Score: 1

      No, my point is that it's often easiest to *understand* things from a couple of examples, especially when your programming fundamentals are solid.

      But even what *you* are saying is nothing bad to do, when you just need to do a quick hack - quickly. (The real burden is on deciding when a quick hack will or will not do.)

      In the end, it's about whether what you create works. SO helps that happen.

      --
      It's not the fall that kills you. It's the sudden stop at the end. -Douglas Adams
    8. Re: Huge red flag about the survey by Anonymous Coward · · Score: 0

      perldoc, javadoc, godoc ...
      Languages come with documentation. Read the manual, be a professional, stop pretending you're an engineer.

    9. Re:Huge red flag about the survey by ranton · · Score: 1

      Googling is usually the option of last resort when stuck on a problem. I would be a little scared working with people that have to do this once let alone several times each day.

      What are you talking about? Googling is almost always my first resort when stuck on a problem. The only exception I can think of is if the problem is algorithmic in nature. Most problems I run into have to do with how to use an API, framework, platform, or third party application. For those I would never waste time trying to figure it out by myself before seeing if someone already solved the issue.

      10 years ago the number of technologies I could consider myself an "expert" on at one time was much lower than it is today. I could be an expert at perhaps one or two languages, probably one framework, and a few third party APIs. Today I can be my company's expert on a few languages, a half dozen frameworks and platforms, and dozens of third party APIs. I didn't get smarter. I just have the help of Google and sites like Stack Overflow.

      This not only makes me more valuable, it helps prevent me from pigeonholing myself into a small niche market. I can be an AngularJS, Salesforce, C#, and MS SQL developer at the same time. There is no way I could be a senior level resource on all four of these technologies without the help of Google.

      --
      -- All that is necessary for the triumph of evil is that good men do nothing. -- Edmund Burke
  14. The Problem With Stack Overflow by Anonymous Coward · · Score: 0

    Is that it is full of power tripping asswipes who lock productive and useful discussions because it does not fit their forum nazi view of what goes where. Kind of like slashdot moderation.

  15. Stick to ANSI SQL 92 by Anonymous Coward · · Score: 0

    Stick to ANSI SQL 92 as much as you can, add limit, offset, top when you must.

    Use coalesce() when you can.

    Avoid if/case/when, if you can

    Avoid stored procedures, unless it's a must, since that is not portable and will bottleneck the database workload.

    Use JPA or a compat layer if you deal with string operations or date / time operations/formatting or do it inside the code, if you can.

    There you go, now your SQL code is "portable" to some degree.

  16. Big Mac Index by speedplane · · Score: 1

    It is unfortunate that SO is using the Big Mac index to rank purchasing power in various countries. Sure, it's a fun and easily understandable metric, but it is so flawed that it is practically useless. Those quickly reviewing SO's study won't realize how flawed it is.

    --
    Fast Federal Court and I.T.C. updates
    1. Re:Big Mac Index by njahnke · · Score: 1

      Citation?

    2. Re:Big Mac Index by ILongForDarkness · · Score: 2

      Not a citation but a bit of an explanation why the earlier authors comment on the Big Mac index deserves consideration. Differential pricing. For example: I live in Canada, we pay more for pretty much every good then the US even for goods made in Canada. In economics one of the factors is called price elasticity of demand. It varies with product (luxury, stable), availablity of substitutes but also by culture/country. Canada and europe generally have fairly low price elasticities (a comparable change in price has a smaller effect on demand than in the US) so that means companies gouge us because the optimal price/demand tradeoff lands at a higher price. A Toyota Camry made in Cambridge Ontario will sell for more there than if you buy it across the border in Detriot, even before taxes. Why: because they can.

      The problem holds for the Big Mac index. Sure a Ukrainian developer can buy a lot of Big Macs with their salary but is that because they earn more, or McDonalds is taking a smaller margin to try to gain market share, government subsidizes of favorable exchange rates are lowering the cost of ingredients, or culturally Ukrainians aren't as big on fast food or have better substitutes? Who knows. But just having a single number you can't account for other factors.

    3. Re:Big Mac Index by angel'o'sphere · · Score: 1

      Citation of what?

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
  17. Stack Overflow is not a forum by tepples · · Score: 1

    There's no "forum nazi view" because Stack Overflow is not a discussion forum. It is a question and answer site. If you want something more like a forum, try Discourse or Stack Overflow Chat.

    1. Re:Stack Overflow is not a forum by Anonymous Coward · · Score: 0

      OK fine, Q&A website nazis. Happy?

      The point is that there are plenty of pickle-up-the-ass power tripping assholes on stack overflow who quash useful questions and answers (aka discussions) just to flex their authoritative muscle and prove their superiority in their own minds.

    2. Re:Stack Overflow is not a forum by H0p313ss · · Score: 1

      OK fine, Q&A website nazis. Happy?

      The point is that there are plenty of pickle-up-the-ass power tripping assholes on stack overflow who quash useful questions and answers (aka discussions) just to flex their authoritative muscle and prove their superiority in their own minds.

      There appear to be two significant groups of contributors, those who are genuinely there just to help out and the power trippers. I feel kind of sad for the power trippers.

      --
      XML is a known as a key material required to create SMD: Software of Mass Destruction
  18. Stats on wages & employment by SternisheFan · · Score: 1

    U.S. Occupational Employment and Wages, May 2014 http://www.bls.gov/oes/current...

  19. Programming In High School by Aspiring+Astronomer · · Score: 1

    Lucky for me, my high school offers an excellent Computer Programming course long with an even better AP Computer Sciences course. I am looking forward to taking these courses and learning Java, and eventually programming like a pro!

    1. Re:Programming In High School by Anonymous Coward · · Score: 0

      My high school computer science course taught assembly language programming for the Mac II. Avoid Java like the plague. You can thank me later.

  20. "Vim is almost 4 times more popular than Emacs" by snikulin · · Score: 1

    Stuff that matters!

    1. Re:"Vim is almost 4 times more popular than Emacs" by serviscope_minor · · Score: 1

      Preach it!

      We have:
      * Vi versus emacs (which never gets old)
      * Tabs versis spaces (also never gets old)
      * Favourite operating system (...)
      * Which languages to hate (a gold mine with no depth)

      This is basically like crack cocaine for nerds. PS: vi, tabs, Linux, every web framework ever invented and basically everything to do with the web.

      --
      SJW n. One who posts facts.
  21. We're supposed to trust a Windows site? by Anonymous Coward · · Score: 0

    I hired two of their former developers, and they were the biggest Microsoft fanbois I've ever met. They both thought that since Stackoverflow via a ton of hard work and experience could keep an ASP.NET site running that every site should use it. Both accepted Java positions and didn't work-out because of their attitudes. I doubt you can get an honest set of statistics from such people.

  22. You chose product marketing - deal with it! by jezhumble · · Score: 1

    Not much has changed in product marketing since this "instructional video" from the 80s made by some bright sparks with a sense of humour at Sun: https://www.youtube.com/watch?...

  23. Punch cards by bradley13 · · Score: 1

    What wimps. I code with punch cards, and I make the holes by hand, with an awl

    Seriously, you guys still have your typewriters? How do you compile?

    --
    Enjoy life! This is not a dress rehearsal.
    1. Re:Punch cards by Anonymous Coward · · Score: 0

      What wimps. I code with punch cards, and I make the holes by hand, with an awl

      Seriously, you guys still have your typewriters? How do you compile?

      I compile by hand. Are you saying an automated compiler can produce optimised code better than me?

    2. Re:Punch cards by CronoCloud · · Score: 1

      I am not a programmer, but if I was, I would use butterflies.

    3. Re:Punch cards by BarbaraHudson · · Score: 1

      What wimps. I code with punch cards, and I make the holes by hand, with an awl

      Seriously, you guys still have your typewriters? How do you compile?

      Take the ribbon out and run it through a tape reader, of course :-)

      --
      "Transparent" is a shit show that trades on every stereotype going. A man in drag is NOT a transsexual.
    4. Re:Punch cards by angel'o'sphere · · Score: 1

      I especially bought a week ago new rubber gloves, usually needed if I have to clean my bathroom etc. but quite handy if you want to take the ribbon out without coloring your hands. Especially with my old typewriter which has a two colour ribbon, blue or black the upper stripe and red for the lower stripe.

      But now I get sweaty hands ... we have spring already. Well, well ...

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    5. Re:Punch cards by BarbaraHudson · · Score: 1

      Remember the days of spraying WD-40 on old ribbons to get extra life out of them? Now when the printer says "low toner" or "low ink" it won't print even when it's not true, because you've printed n number of pages.

      --
      "Transparent" is a shit show that trades on every stereotype going. A man in drag is NOT a transsexual.
    6. Re:Punch cards by angel'o'sphere · · Score: 1

      Unfortunately not :D The typewriters I used belonged to my parents ... I only used them to learn 10 finger typing.
      My first printer was a line printer, though.

      However it is indeed sad that we now have "cheating" printers ...

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
  24. Technology section seems... odd by Dave+Emami · · Score: 3, Insightful

    Javascript and AngularJS and NodeJS? If you're using one of the latter, aren't you using the former by definition? And also, while I have nothing against Angular (learning at the moment myself), is it really more-used than jQuery? I see jQuery all over the place when I look into the source of sites I find interesting, far more often than I run into Angular.

    --

    "The Greens lynched a hacker in Chicago. Last month, but I think the body's still hanging from the old Water Tower."
    1. Re:Technology section seems... odd by Anonymous Coward · · Score: 0

      ^ This.

      This is what takes all credibility from these surveys. The fact that the people using the damn "language" doesn't know what it is, AND THEN the people who compiled the results gave those people a nod of the head and passed it on to us.

    2. Re:Technology section seems... odd by felipou · · Score: 1

      AngularJS is not an alternative or competitor of jQuery.

      AngularJS is a complete framework that largely dictates how you will structure all of your UI code. jQuery is a set of very handy utilities that can be used by anyone that writes javascript for the browser (including those writing a AngularJS application, although I'm not sure that really makes sense given everything that AngularJS provides). So basically anyone can use jQuery to help make things easier.

      I'm not an expert in any of them, but given my limited knowledge, I think that summarizes it well.

  25. Now sum up the EU market by YoungManKlaus · · Score: 1

    because seriously, thats like putting the US in based on separate states ...

  26. Remote workers by codeButcher · · Score: 1

    Notice that remote workers in India and Russia earn way more than local workers - as compared to the USA, where the pay is much more equal. Which probably skews the statistics. After all, remote workers in India and Russia may earn dollars, euros or pounds, not necessarily rupees or roubles. While USA-based remote workers also earn mostly dollars (and maybe some euros or pounds), but probably negligible rupees or roubles.

    --
    Free, as in your money being freed from the confines of your account.
  27. Annnnndd... OS X kills off Linux by Anonymous Coward · · Score: 0

    First OS X killed off Linux's chances at being a desktop OS and now it is effectively destroying Linux's chances at being a developer OS. This is fucking great news for anyone who thinks earning money as a software developer is more important than doing charity work for some toe-jam-eating communist hippy.

  28. How are these stats in any way relevant? by jtara · · Score: 1

    Both the best and the worst developers are unlikely to have every used StackOverflow...

    1. Re:How are these stats in any way relevant? by jtara · · Score: 1

      As well, developers go to StackOverflow because they have problems. So, the survey shows us the popularity of technologies that are poorly-documented and/or difficult to understand.

  29. Developers who work remotely? by jez9999 · · Score: 1

    On average, developers who work remotely earn more than developers who don't.

    I'm in the UK. Someone really needs to tell me how you get this double-whammy of goodness. I always end up getting employers that require me to be physically in the office and, apparently, lower wages. :-(

  30. Why Is Salesforce The Most Dreaded? by Anonymous Coward · · Score: 0

    Why Is Salesforce The Most Dreaded? Just started working for a company that uses it. Curious to know the reason why for this response.

  31. Which features? by Anonymous Coward · · Score: 0

    What sets Notepad++ apart from other scintilla based editors?
    List of editors

    1. Re:Which features? by TechyImmigrant · · Score: 1

      I'd have to try them to know.

      --
      I should use this sig to advertise my book ISBN-13 : 978-1501515132.
  32. Ach! by Anonymous Coward · · Score: 0

    Do you, by any chance, happen to also wear a kilt?

  33. Re:Sounds about right to me by Marxist+Hacker+42 · · Score: 1

    Sounds like a good reason to stay away from Linux and ARM

    --
    SJW: a person who perceives an injustice, and while correcting it, commits a greater injustice.
  34. "Vim is almost 4 times more popular than Emacs" by Slashdot+Parent · · Score: 1

    I KNEW IT! I always knew that Emacs sucks ass! Long live vim! Death to the infidels!

    --
    They don't grade fathers, but if your daughter's a stripper, you fucked up. --Chris Rock