The Instigator
KRFournier
Pro (for)
Winning
21 Points
The Contender
Tatarize
Con (against)
Losing
19 Points

Source Code without Tabs is Superior to Source Code with Tabs

Do you like this debate?NoYes+2
Add this debate to Google Add this debate to Delicious Add this debate to FaceBook Add this debate to Digg  
Post Voting Period
The voting period for this debate has ended.
after 6 votes the winner is...
KRFournier
Voting Style: Open Point System: 7 Point
Started: 10/11/2008 Category: Technology
Updated: 8 years ago Status: Post Voting Period
Viewed: 2,662 times Debate No: 5702
Debate Rounds (3)
Comments (9)
Votes (6)

 

KRFournier

Pro

This debate is in regards to computer programming, but anyone is welcomed to accept the challenge. The only caveat is that programmer speak may creep into the debate, though I've made every attempt to avoid undefined geek-speak for the benefit of the readers.

Definitions:
Source code: The original textual form of a computer program
Tab: The digital character representing white space - usually wider than a single character
Superior: Having greater value
Source Code Readability: The ease to which source code can be comprehended

1. Source code that is more readable is more desirable.

Source: http://web.mit.edu...

The most expensive phase in any software's lifecycle is the maintenance phase. Furthermore, "The majority of the time and effort expended during maintenance-related activities is code reading." It follows then, that if source code readability can be improved, corporations reduce costs and programmers save time. Saving time or money is generally more desirable than losing time or money. Therefore, source code that is more readable is more desirable.

2. Formatting plays a significant role in readability.

Several factors contribute to readability, such as useful comments, well named variables, and indentation of code blocks. Formatting, the use of white space to position source code text in a meaningful way, is of great importance in readability. Indenting blocks of code, formatting comment blocks, and right aligning variable initializations or post-statement comments, all serve as landmarks to the reader, directing attention to where it's needed to assist in reader comprehension. Similar techniques are used in magazine articles, websites (including this one), books, etc. Thoughtfully formatted code increases the ease to which source code can be comprehended. Therefore, source code with superior formatting will also have superior readability.

3. Tabs cannot guarantee original formatting.

Tabs are not directly portable. That is to say, tabs are not guaranteed to appear the same from one system to the next or from one user to the next. The original source code author might operate within an environment that treats tabs as whitespace equivalent to the width of 4 spaces whereas another programmer might use 2-space tabs. Worse yet, a manager might open the source code in Microsoft Word, in which case, the tabs are based on inches instead of characters. While such differences may not hinder leading indents, right aligned blocks of code such as post-statement comments might lose their alignments. Since tabs are system and user independent, they cannot be a guaranteed method for preserving original formatting.

4. Guaranteed original formatting improves readability

When using tabs, a source code document has a potential readability. If the document is read by the same user or another user with the same settings, then the document's actual readability is equal to its maximum potential readability. If, however, it is read by a user with different settings, the document's actual readability is less than its maximum potential readability. When using only spaces, there is no potential readability, only actual readability. Or said another way, the document's actual readability is always equal to its maximum potential readability. Therefore, guaranteed original formatting improves readability by ensuring that no readability can ever be lost.

I have shown that using tabs creates a potential for decreased readability. Given that readability accounts for a significant part of software maintenance, the more readable the source code, the more desirable and valuable it becomes. Hence, source code without tabs is superior to source code with tabs.
Tatarize

Con

I am a computer scientist myself. I've written plenty of programs and graduated with a BS in Computer Science about 4 years ago.

In this economy the most important thing is Job Security, therefore your arguments about readability are completely moot. Readability helps in the maintaining of code by Indian programmers after your program is outsourced to them and you are laid off. If one were to rather than ever use a space use tabs in their stead along with using l and O as very common variables, double nested for loops with i and ii rather than j and k and avoid any and all documentation or typical "good" behavior your job will be safe for years to come.

Considering the crash of stock market, and the precarious nature of IT right now, you should rue the day you scoffed at learning COBOL.

I say, tab the hell out of your source code, tab it randomly, use bizarre declares which replaces the word "beefstro" with for and use "beefstro" loops on and off throughout your code.

#define beefstro for

int main() {
int qbert = 1337;
int l1l1l1l10O = 0; //inital step to q processor memory
beefstro (int O = 1; 0 >= 100 ||1 == 7; (O++)++)
{
if((rand() % 1000) % 100) == 1) l1l1l1l10O++;
;
if l1l1l1l10O == 100
exit(0);
;
} { }
return 0;
}

--- You have a job forever.

The original code has random tabs throughout it. The formatted code here is far more readable which reduces your employment opportunities.
Debate Round No. 1
KRFournier

Pro

I want to thank my opponent for taking the challenge. He took this debate into an unexpected direction, but I'll bite. My opponent argues the following:

A) Writing readable code increases the likelihood of outsourcing and loss of employment, so render the code meaningless to everyone but yourself for the sake of job security.

This is a red herring argument, specifically, that two wrongs make a right. He argues that corporations are only going to reward readable code by outsourcing the programmer's job to India. My opponent didn't really substantiate this, but even if it were true, it does not follow that the proper response is to hold the code hostage through obfuscation. Of course, the cleverness of his argument is that he creates a nifty straw man by refocusing the debate towards a moral issue rather than refuting my arguments and the named resolution. Be that as it may, I address the moral argument below.

B) Writing unreadable code locks the employer into an indefinite relationship with the programmer thereby placing job security in his own hands.

The only reason to believe this would work is if you buy into his previous argument. It goes something like this: writing readable code places your job in jeopardy, therefore writing unreadable code secures it. Taken further, he'd have you believe that the more readable the code, the more at risk your job; the less readable the code, the more secure your job. In fact, the opposite is more likely to occur. Once an employer discovers such practices, your job is all the more at risk. The logic only follows if companies were known to reward good practices with job terminations and could in fact be rendered powerless by secret codes and random assortments of tabs. After all, if outsourcing is so cheap, then it's not very expensive to fire you and have your code repaired overseas.

His whole argument begs some questions. One assumption is that corporations are only interested in cheaper employees, when in fact they are interested in only profit and efficiency. There are costs to outsourcing as there are benefits to local employees (http://www.heritage.org...). The cheapest employee does not always provide the greatest return on investment. Another assumption is that job security can be manipulated entirely by the employee, when in fact the employee's job is held secure by free market forces. A programmer's job is secure so long as the company is secure.

Now, I will address the moral issue and include one more argument for my position. Since my opponent did not directly address my previous contentions (1 through 4) I will extend them into this round and my new arguments will start with point 5:

5. It is immoral to intentionally obfuscate source code that is not entirely owned solely by the programmer.

Since my opponent wants to bring morality into this, I'll address it. When under employment, the employer owns the sole copyright for any source code you develop while under that employment. If the copyright does not belong to you, then intentionally rendering source code completely unreadable as a ransom for your job is tantamount to embezzlement. If the copyright does belong solely to you, then there is no fear of losing your job to outsourcing, so the argument is moot. In any case, the morality of the issue is actually of minor importance as my next argument will show.

6. Improved readability results in improved job security.

As mentioned earlier, my opponent presupposes that job security is solely a factor of your behavior. In reality, job security is directly affected by the security of the company. If a company does not stay competitive and profitable, then its chance of success decreases as does the job security of its employees. Therefore, anything you can do to help your company stay competitive and profitable is in your best interest, not only for job security, but also for advancement.

Take for instance last month's strike at Boeing. (http://www.heraldnet.com...). 27,000 machinists rejected Boeing's new contract offers not because of money but because of job security. The strikers wanted guarantees that their jobs would not be outsourced. In the meantime, the strike was costing Boeing $100 million each day, which would only increase the likelihood for outsourcing rather than reducing it. This example illustrates why it's in your best interest to contribute to the company's growth and success rather than hinder it.

I have shown the flaws in my opponent's arguments and further supplemented my original position. In my first argument, I showed how no-tabs results in increased readability, and that readable code is more desirable. In my second round, I showed how writing readable code benefits both the employer and employee. Therefore, my argument is made all the more compelling. Readable code is more desirable by both corporations and programmers. Therefore, source code without tabs is superior (of greater value) to source code with tabs.
Tatarize

Con

My opponent suggest my argument is a red herring but it is not. If you had the job security of your average COBOL programmer you'd be set for life. Readable code helps with the maintaining phase of software development and readable code just means that somebody else will be maintaining it.

My opponent suggests that I have conconcted this novel argument myself, I have not. It is well known in programming circles, slashdot has run several articles on the practice and there have been books written on the subject
http://developers.slashdot.org... - How To Write Unmaintainable Code
""Make sure you're irreplaceable -' In the interests of creating employment opportunities in the Java programming field, I am passing on these tips from the masters on how to write code that is so difficult to maintain, that the people who come after you will take years to make even the simplest changes. Further, if you follow all these rules religiously, you will even guarantee yourself a lifetime of employment, since no one but you has a hope in hell of maintaining the code."

Maintainable code makes you simply another encapsulated bit of the programming structure. You can be replaced as easily as you can switch a selection sort for a quick sort.

My opponent then attacks my argument on the grounds of morality. We aren't discussing morality. We are discussing the superiority of source code. As such, whether it's ethical or moral takes a backseat to whether it's better or worse. If you want to write absolutely fantastic and brilliant code for an open source product you are completely within your rights to do so. However, is that code better than code that gives you job security in a turmoil ridden time such as this?

-------
Allow me to add another line of argument.

My opponent does not specify a computer programming language. I thusly suggest he is talking about the programming language called whitespace.
http://en.wikipedia.org...(programming_language)

The programming language is composed of spaces and tabs and without tabs could not program anything at all. It would completely fail to function in any and all respects and be completely useless without tabs. I suggest that programming code without tabs is not superior because I prefer my programs to function.

------

Also, I hate cutting and pasting a bunch of idiot spaces to tell where one set of brackets starts and ends and needing to readjust the lines in proper order. Tabs may not be universally uniform between different text editors but they are uniform between each other and that's all that is required to properly tab a source document. Assuming one wanted to code for readability it is far easier to do with tabs than without. Tabs are another tool in your toolbox and having the option is clearly superior than not.

I thank my opponent for his arguments but cannot accept that source code without tabs is superior to source code with tabs.
Debate Round No. 2
KRFournier

Pro

As the debate comes to a close, I want to thank my opponent for accepting the challenge and making this debate very much worthwhile.

My opponent insists that his argument is not a red herring, but I will insist that it is and explain why. On the surface, it would seem my opponent is merely attempting to refute point 1 of my opening remarks by stating that unreadable source code is more desirable, but his reasoning behind this argument is that two wrongs make a right. He wants us to accept on good faith that companies haphazardly take jobs away from programmers with good coding habits and send them overseas. Then he wants us to accept that the only appropriate response is to hold source code hostage by making it unreadable to anyone but the author. If we aren't discussion morality, as my opponent suggested, then this argument must be ignored because it presupposes that companies engage in unethical behavior.

The comparison of writing unreadable code to the job security of COBOL programmers is a weak analogy. COBOL can be just as readable as any other language. The reason COBOL programmers are employed for life is that companies are invested in the technology such that the skill is still quite valuable. If anything, this analogy only serves to weaken my opponent's position since it shows that job security is possible without obscuring source code.

I rather appreciate my opponent linking to a Slashdot.org entry in support of his unmaintainable code theory, as it serves to earn me the most reliable source vote. First, Slashdot.org is a collection of entries submitted by site members. Second, the entry in my opponent's link was anonymously posted. Third, the entry's link to the rules of writing unmaintainable code is dead. At best, my opponent linked to an anonymous internet poster's opinion. To add insult to injury, many of the comments recognize the post as a joke. Perhaps my opponent knows this and is simply not taking this debate seriously, in which case I should get the conduct vote as well.

The best part of my opponent's second round is the additional argument regarding the Whitespace language. My opponent suggests that since I did not specify a language, I must have been talking about the Whitespace language. This is a blatant straw man attempt. Since he cannot defeat my arguments using sound reason, he modifies the debate parameters as to avoid my arguments altogether. I defined source code to be "the original textual form of a computer program." I think it's clear that my definition was language agnostic. To interpret the debate parameters otherwise is to argue semantics, a typical last resort of a debater unable to refute his opponent's arguments head on.

However, even if I conceded that the Whitespace language (which was written as an April Fool's Day joke according to his own source) is one possible language, there is still another logical problem in using it in his argument: it begs the question. Indeed, the Whitespace language must have tabs to function, but it is also unreadable according the definition to which my opponent implicitly agreed. Therefore, the Whitespace language is only a good example if he's able to prove that unreadable code is more desirable. In other words, my opponent must first win the debate before his Whitespace argument is meaningful.

Lastly, my opponent argues that tabs are more convenient than spaces. However, given modern advances in source code editing environments, this is no longer the case. Pasting code with spaces is not a problem since editors can automatically adjust the snippet's indents to match the current block. Programmers can still use the tab key and let the editor convert it into spaces on the fly. Editors can even be smart enough to make backspacing spaces as easy as backspacing tabs. While my opponent's argument might have held more weight in the past, using only spaces in source code today comes with little inconvenience.

In conclusion, I laid out six points of contention affirming the resolution. My opponent has focused on refuting only the first of those six contentions, and I've shown how his attempts fall short. Much of my opponent's arguments tangent from the stated resolution and focus instead on the ethical dilemma of outsourcing jobs overseas versus job security through code obfuscation. I showed that code readability is ethical (point 5), is just as capable of securing one's job (point 6), and that code without tabs is the only way to guarantee maximum readability (points 3 and 4). I urge the voters to see through my opponent's clever schemes and vote in favor of Pro.
Tatarize

Con

My argument isn't a red herring rather it's a semantic point as to what you mean by superior. Clearly code that gets you paid should and could be easily seen as superior to code that does not. Unreadable code is not necessarily a bad thing. I have backed this point up with references to articles and books by programmers suggesting exactly what I am suggesting. In this job market, anything you can do to keep your job is clearly superior.

Our argument is on the superiority of code and morality does not play a part. It does not follow that my argument should be ignored because it assumes what has demonstratively been happening.

1) You should write code that only you can maintain.
2) Your job will not be outsourced if only you can maintain code.
3) This has nothing to do with morality but rather the superiority of code.

You are arguing that:
1) Outsourcing is immoral.
2) Therefore we should assume that outsourcing doesn't occur.
3) Therefore my argument is void.

What? Outsourcing isn't immoral, outsourcing does occur, and it has no bearing on the argument. Your company can save money by having other people maintain your code. If other people can't maintain your code then you get to keep your job.

----

My opponent has clearly never written COBOL. The job security is largely because COBOL is an awful language that takes a lot to learn and pretty well ruins good programmers. It's effectively an unmaintainable mess and a pain in the butt. On top of that the subsection in the system cannot be replaced because it's all based on mainframes.

You have cited no sources and the fact that Slashdot.org is a collection of submitted entries by knowledgeable programmers, and therefore a bad source, is absurd. It simply references to another page on the topic. It's a link to a link.

---

"The best part of my opponent's second round is the additional argument regarding the Whitespace language. My opponent suggests that since I did not specify a language, I must have been talking about the Whitespace language. This is a blatant straw man attempt. Since he cannot defeat my arguments using sound reason, he modifies the debate parameters as to avoid my arguments altogether."

In the programming language Whitespace tabs are required to make the code produce anything at all. Clearly functional code can be seen as superior to non-functioning code and therefore by that argument, in parallel to my other various arguments, I succeed. The programming language was clearly left vague and as such it is entirely within my purview to offer a language where source code without tabs is significantly inferior to those with tabs.

My citation of whitespace was meant to function in independent of my argument on the subject of readability.

----

1) Source Code without any readability allows you to maintain your job, tabs are superior.
2) Whitespace code will not even function without tabs, tabs are superior.
3) Tabs are more convenient than spaces, tabs are superior.

While some editors can do the same thing as tabs with spaces it doesn't suggest any superiority in formatting. I write code in wordpad from time to time and it doesn't have the function my opponent suggests. Some editors being able to work around deficits do not imply those deficits do not exist. I could also use tabs throughout my source code and simply to a regex replace of any tab with 4 spaces on the finished source code. That too would not make it remotely superior. Tabs work fine. Whether it's creating functional code that cannot work without tabs or making your code insure you'll have a job for years to come. Tabs are superior.
Debate Round No. 3
9 comments have been posted on this debate. Showing 1 through 9 records.
Posted by Kleptin 8 years ago
Kleptin
Hello KR :) Would you please turn on your message accepting option? I'd like to talk to you!
Posted by Lightkeeper 8 years ago
Lightkeeper
Let's sum it up.
Pro says that tabless codes are superior (defined as "higher in value").
Con takes no issue with the definition and hence can be taken to accept it.

Pro's argument is that tabless codes are of higher value because they ensure readability and therefore the code can be passed on to other developers. Furthermore, Pro contends that this is desirable because the programmer's superiors would not be impressed with unreadable code.

Con's argument essentially centers on the contention that producing unreadable code enhances job security. He does not address how this ehnances the code's value. He does not argue that value to the programmer is of higher significance than the objective value of the code (if sold or if passed on to be further developed). Neither does he produce any reliable sources to support his contention.

Whitespace is a red herring. Clearly Pro intended to discuss Tabs as a formatting (Comments and the look n feel of the code). Con has said nothing about the value of tabs as such a tool in Whitespace.

Morality is indeed not relevant in my opinion.

Pro used better sources and argued more fairly. Con resorted to semantics that didn't really address Pro's contention.

My conclusion is as follows:

Conduct: Pro
Language: Tie
Convincing: Pro
Posted by KRFournier 8 years ago
KRFournier
I never argued this:

1) Outsourcing is immoral.
2) Therefore we should assume that outsourcing doesn't occur.
3) Therefore my argument is void.

I'm curious to know what I said specifically to lead to such an absurd conclusion.
Posted by KRFournier 8 years ago
KRFournier
LOL. The Whitespace programming language is awesome!
Posted by KRFournier 8 years ago
KRFournier
If we could agree that achieving code readability is a best practice, than it behooves the programmer to use it even for private use. First, best practices should always be used, if only to build better coding habits. Second, even if you don't have to share the code, maybe you'll come back to it years later and it won't conform to your new standards. Third, because it's not always immediately obvious that the code won't be examined by someone else.

In the end, no-tabs protects against all possible scenarios. If private code goes public or not, your safe. With tabs, private code is safe until it goes public. Therefore, no-tabs still carries with it the guarantee in formatting.
Posted by Wayne 8 years ago
Wayne
what if your source code is only intended for yourself to read? then you don't really have to worry about the "portability"
Posted by Lightkeeper 8 years ago
Lightkeeper
Problem is you'll have to find another coder here to take it up.
Or I might take you up on it. I'll just have to experiment a bit with my Visual FoxPro, VB, C++, MQL4 editors and copying and pasting code all over the place :D
Posted by KRFournier 8 years ago
KRFournier
You'd think so, given my arguments. Actually I am a programmer who used to tabs and now use spaces exclusively. The tab/no-tab debate is more of a holy war, which is why I thought it would be fun to debate. Both sides are very passionate about their positions.
Posted by Lightkeeper 8 years ago
Lightkeeper
You wouldn't happen to be a manager who has recently reviewed someone's code and found a bunch of unintelligable gibberish due to their use of tabs? :x
6 votes have been placed for this debate. Showing 1 through 6 records.
Vote Placed by JBlake 8 years ago
JBlake
KRFournierTatarizeTied
Agreed with before the debate:--Vote Checkmark0 points
Agreed with after the debate:--Vote Checkmark0 points
Who had better conduct:Vote Checkmark--1 point
Had better spelling and grammar:Vote Checkmark--1 point
Made more convincing arguments:Vote Checkmark--3 points
Used the most reliable sources:Vote Checkmark--2 points
Total points awarded:70 
Vote Placed by Numquam 8 years ago
Numquam
KRFournierTatarizeTied
Agreed with before the debate:Vote Checkmark--0 points
Agreed with after the debate:Vote Checkmark--0 points
Who had better conduct:Vote Checkmark--1 point
Had better spelling and grammar:Vote Checkmark--1 point
Made more convincing arguments:Vote Checkmark--3 points
Used the most reliable sources:Vote Checkmark--2 points
Total points awarded:70 
Vote Placed by soldierboy 8 years ago
soldierboy
KRFournierTatarizeTied
Agreed with before the debate:--Vote Checkmark0 points
Agreed with after the debate:-Vote Checkmark-0 points
Who had better conduct:--Vote Checkmark1 point
Had better spelling and grammar:--Vote Checkmark1 point
Made more convincing arguments:-Vote Checkmark-3 points
Used the most reliable sources:-Vote Checkmark-2 points
Total points awarded:05 
Vote Placed by Labrat228 8 years ago
Labrat228
KRFournierTatarizeTied
Agreed with before the debate:-Vote Checkmark-0 points
Agreed with after the debate:-Vote Checkmark-0 points
Who had better conduct:-Vote Checkmark-1 point
Had better spelling and grammar:-Vote Checkmark-1 point
Made more convincing arguments:-Vote Checkmark-3 points
Used the most reliable sources:-Vote Checkmark-2 points
Total points awarded:07 
Vote Placed by KRFournier 8 years ago
KRFournier
KRFournierTatarizeTied
Agreed with before the debate:Vote Checkmark--0 points
Agreed with after the debate:Vote Checkmark--0 points
Who had better conduct:Vote Checkmark--1 point
Had better spelling and grammar:Vote Checkmark--1 point
Made more convincing arguments:Vote Checkmark--3 points
Used the most reliable sources:Vote Checkmark--2 points
Total points awarded:70 
Vote Placed by Tatarize 8 years ago
Tatarize
KRFournierTatarizeTied
Agreed with before the debate:-Vote Checkmark-0 points
Agreed with after the debate:-Vote Checkmark-0 points
Who had better conduct:-Vote Checkmark-1 point
Had better spelling and grammar:-Vote Checkmark-1 point
Made more convincing arguments:-Vote Checkmark-3 points
Used the most reliable sources:-Vote Checkmark-2 points
Total points awarded:07