Why would a programmer use spaces instead of tabs for indentation?

1 Answer

Answer :

Because the programmer works with other programmers, some of whom have their editors set to expand tabs to 8 spaces, others of whom have their editors set to expand tabs to 4 spaces, and still others of whom have their editors set to expand tabs to 2 spaces. It’s easier to get everyone to use only spaces than it is to get everyone to agree on how wide a tab stop should be.

Related questions

Description : Who is Letterman's music programmer?

Last Answer : Why don’t you look at the show’s credits on IMDb? It’s probably one of the regular producers. They probably get record companies pitching them all the time as well.

Description : How do I get a job as a computer programmer?

Last Answer : Get on the internet and learn your head off. That is the only way.

Description : Where can I go to find out about volunteer programming projects as a novice programmer?

Last Answer : I would suggest sourceforge.net: http://sourceforge.net/apps/trac/sourceforge/wiki/What%20is%20SourceForge.net

Description : What's the best way to find a reliable programmer?

Last Answer : I either find open source projects that are already completed, or I program it out myself. If you are looking for a reliable programmer you are going to be paying a lot of money and probably be put on a ... wants to just put his own logo and things on it I don't see the point in making another.

Description : How can I find a smart, reliable, experienced web programmer who's easy to work with?

Last Answer : I nominate [at]jp.

Description : Why do the majority of Python packages use urllib2 instead of httplib?

Last Answer : answer:urllib2 is closer to curl. It's closer to a real client-and for many of us, makes much more sense than doing 4 or 5 steps to request an url and read the response. httplib is a lower ... It is normally not used directly - the module urllib uses it to handle URLs that use HTTP and HTTPS.

Description : Why most of the web developments are done in using Mac OS instead of Windows?

Last Answer : At my company, all of our servers are running linux and our designers are using OS X. So, as a web developer, it makes it easier for me to work with the designers and to work in a linux environment if I have a mac.

Description : What kind of mistake is it to write print f instead of printf and why ?

Last Answer : Write print f instead of printf, the syntax is wrong. If the syntax is wrong then the language in which the program is written is grammatically incorrect. As can be seen , the word Printf ... error. This error is easily detected when translating with a compiler and sends a message to the computer.

Description : What is the indentation under nose that bumps into tips of upper lip called?

Last Answer : there is a word for it, and I am not sure how you spell it, but is sounds very simiar to dybbuk or dibic...

Description : Write the CSS code to: (i) Apply 50px indentation to all text paragraphs marked with . -Technology

Last Answer : P{text-indent: 50px;font-style: italic;}

Description : Which of the following is not true with regard to the coastal plains of India ? (a) The west coast has a narrow alluvial margin interspersed by hilly terrain (b) The eastern coast has a ... little indentation except towards the south (d) The west and east coasts, have the same alluvial features

Last Answer : Ans: (d)

Description : The ability of a material to offer resistance to scratching or indentation is a measure of its (A) Brittleness (B) Toughness (C) Hardness (D) Resilience

Last Answer : (C) Hardness

Description : FOLLOW UP IN NEWS WRITING MEANS: a) A story giving later development of a story one printed earlier. It is a second day story also a subsidiary story following a big lead or similar subject b) A paragraph without indentation c) An addition to news item sent for publication d) None of these

Last Answer : a) A story giving later development of a story one printed earlier. It is a second day story also a subsidiary story following a big lead or similar subject

Description : _________ of test specimens is not involved in any hardness testing method. (A) Fracture (B) Indentation (C) Wear (D) Scratch

Last Answer : (A) Fracture

Description : Mho's scale of hardness, which consists of 10 standard minerals is used for the measurement of __________ hardness. (A) Scratch (B) Indentation (C) Dynamic (D) Rebound

Last Answer : (A) Scratch

Description : The difference in one unit of Rockwell hardness number corresponds to a difference in the depth of indentation of __________ mm. (A) 0.001 (B) 0.01 (C) 0.002 (D) 0.02

Last Answer : Option C

Description : Which of the following complete sets do not recommend the siting of a harbor layout in that vicinity ? 1. Submarine canyon 2. Lee of an island 3. Closely located promontories 4. Indentation coves on the coastline 5. Hooked bays ... (b) 1, 4 and 5 only (c) 2, 3 and 4 only (d) 3, 4 and 5 only

Last Answer : (a) 2, 3, 4 and 5

Description : The alignment of beginning and the end of lines is referred to as (1) Indentation (2) Justification (3) Superscript (4) Font

Last Answer : Justification

Description : Do you still use spaghetti code , like QBasic?

Last Answer : talljasperman Sorry I didn’t know that spaghetti code was a pejorative. My teacher called it that and I did not look it up.

Description : Regulating email use?

Last Answer : What Operating System are you using and do you use a Desktop client for email or a web-based client?

Description : Why use ASP.NET MVC 4 over just HttpHandlers with JQuery Ajax?

Last Answer : answer:I'm not familiar with asp.net, so I'm not sure what it gives you, but a common problem with a single-page app using a lot of jQuery is that it can quickly become unmanageable, especially if ... you other questions, I'm a fan of using only as much as you need and your approach sounds fine.

Description : What does the use of the # symbol mean in XML Document Type Definitions?

Last Answer : answer:

Description : How to use cron in ruby on rails (2.3.5). Please help?

Last Answer : answer:At the UNIX prompt, type man crontab and help documentation will appear. - Crontab is the interface you use to schedule jobs in cron. It launches a basic text editor - usually vi but anything you want - and you enter in one ... . 30 21 * * 3 /path/to/maintenance.sh # #---------------------

Description : Why should I use JavaScript Library if it may effect the performance of a web site?

Last Answer : You might want to check out some extremely lightweight Javascript libraries such as xui, zepto, or jQuery Mobile. However, 17KB should not be a huge concern on iOS and Android devices. On phones with ... .example.com or mobile.example.com with minimal CSS, small page size, and no Javascript at all.

Description : Do any other ask-public users use J (the programming language)?

Last Answer : answer:Interesting. How can it confuse experienced programmers, and how is this an awesome thing? Also, is this one of those languages great for mathematics and scientific computation?

Description : If I already know basic PHP/MySQL, what else should I learn to use Google App Engine?

Last Answer : answer:I am not an expert, I just started reading up on this myself, but here are a couple of starting points on data storage. Rather than a separately maintained SQL database, ... .com/appengine/articles/datastore/overview.html http://code.google.com/appengine/docs/python/datastore/overview.html

Description : When to use stored procedure and when function in SQL Server 2008?

Last Answer : There’s no technically right answer here – I think I’d do the SP calling SP.

Description : Will using .NET 3.5 server side for a web site place any notable restrictions on what web browers can use the site?

Last Answer : .NET 3.5 VSTS feature won’t restrict you on any navigation features.VSTS is solely browser independent.You could publish your site on any browser, but you need to do some customization while using firefox.Some addin features are needed to make your Server side setup function properly.

Description : How does one use his mind to create a plan ?

Last Answer : By deconstructing a problem into smaller pieces. I think people intuitively write business rules in their head for all problems. They may not account for all the options, and they may only see the ... but in reality, problem solving comes in the form of deconstructing a problem into Yes/No format.

Description : Which Windows program to use to introduce 6 year old to programming? Best program to teach LOGO or BASIC with graphics?

Last Answer : Get an old machine and load DOS 6.1 on it.

Description : Does anyone use ELGG?

Last Answer : Have you tried using www.ning.com as an alternative. It's pretty simple to use and no coding knowledge is required. It's pretty simple to modify, but you can't change the layout all that much. ... all look a lot alike. I believe you can break the mold and handcode the template in HTML though.

Description : What Kind Of Preset Should I Use On Handbrake?

Last Answer : Honestly, just give it a shot and use whatever preset produces the results you like. You won't ruin your movie or delete your computer or anything. So try all of the ones you have access to ... , and compare the final results, then continue to use the preset that produces the results you like best.

Description : Can I use an RSS feed like this?

Last Answer : RSS is a pull technology, so you are relying on the client to refresh to get the update.

Description : In OOP why would you even want to use an interface?

Last Answer : Because you can then indicate things like this method takes an argument, which can be of any class that implements this interface. It's not for the benefit of the classes that implement it, but ... in this specific sense) are a way of formalizing the contract between the caller and the called code.

Description : Why not always use .Classes in CSS and skip #IDs alltogether?

Last Answer : answer:IDs allow you to identify a unique element whereas classes are used for specifying just that, classes of elements. Its an important distinction but I can see how it might seem that it isn't needed ... of the more advanced selectors in CSS you'll find that it goes way beyond classes and IDs.

Description : Can you use JavaScript to force-replace a particular image in the browser cache?

Last Answer : answer:I'm not sure about doing it in js but if you make it so that the image/stylesheet/javascript file in question has a unique string after the filename like '/images/header.jpg?somerandomstring', when ... the string. That way, whenever you deploy a new version, it'll have a new cache string.

Description : How can i use programming to eliminate static in an audio clip?

Last Answer : hmm, fastest thing i can come up with right now is audicity, it has a plugin for it if i remember correctly, you could give it a try

Description : What kinda of code commenting system do you use?

Last Answer : answer: I write bad code. Seriously, that is in stuff viewable be to public. And I comment the fuck out of everything.

Description : Should I use a domain like youstre.am, or mystre.am or will no one remember it?

Last Answer : I think it’s memorable and clever. Go for it.

Description : State the use of OF and DF flags of 8086 microprocessor.

Last Answer : Overflow Flag: This flag is set if an overflow occurs, i.e. if the result of a signed operation is large enough to be accommodated in destination register. Direction Flag: It selects either increment or decrement mode for DI &/or SI register during string instructions.

Description : Salesforce SDK uninstallation from XCode?

Last Answer : Too many variables – only you know your code, how it was written, and how extensible (or not) it was in the first place. I assume you have been to the Saleforce API and SDK pages.

Description : Is there a program where you can identify music in a specific website?

Last Answer : Need Answer

Description : What is a good programming language to make a multiple choice quiz?

Last Answer : Google classroom should work.

Description : Is there a website that shows all the English words, idioms, etc ever invented, including archaic, unofficial, and newest words that have just been invented?

Last Answer : The problem with such a lexicon would be that there have been a lot of slang, dialect, idioms, and unofficial words that 99% of people have never heard of. Besides that, the English language is ... pretty good vocabulary. Hopefully, someone will recommend some. I am unable to do this at the moment.

Description : How can I add HTML markup to this ajax result?

Last Answer : Need Answer

Description : Function or application allowing me to connect or disconnect wifi?

Last Answer : Some routers - Belkins and older Ciscos, had an app that would allow you to remotely-control your router from your phone. You didn't say what kind of router you have, so it's hard to guess. You can ... . Bottom line - you can do this easily if you have a wifi-based power switch and an app. example

Description : How can I become advanced in javascript in 2 months?

Last Answer : Study hard…work hard!!!

Description : Can you help fix this programming problem in Python?

Last Answer : You can’t treat arrays of digits as a single number. The easiest way to read a numeric string is to use the sys library to read a line from the keyboard. import sys print(“Enter value for mass”) mass = sys.stdin.readline() mass = float(mass)

Description : What's the best book for understanding Unity 2D?

Last Answer : Are you a beginner programmer in general, or just new to Unity? That would make a big difference in how I would respond.

Description : Programmers: Is this puzzle a "named problem?" and can you help me with it?

Last Answer : I'd call it enumerating a list of all combinations . There's a field of math called combinatorics which I did not study but I assume probably has a word for this. It doesn't seem like a puzzle ... each iteration, and tweak it to get the output format you want, but that's essentially it, I think.