Original Post
🔒 Locked
Tabs
Advertisement
This happens when different programmers are using different tab widths. As a rule of thumb, NEVER use hard tabs when dealing with end-of-line comments alignment and other spacing. hard tabs should be restricted to indentation, where they will be ok regardless of the user's preffered width. (Notice how, in the picture, your lines are all perfectly aligned, but all hell breaks loose at the end of the line.)
Some people advocate that you should never use hard tabs, but I disagree. "Let the programmer decide but don't make any assumptions" is my motto.
Some people advocate that you should never use hard tabs, but I disagree. "Let the programmer decide but don't make any assumptions" is my motto.
Keep in mind that tabs in browsers usually come out at 8 spaces. That means unless you use 8 space tabs in your IDE, when transferring that to the boards you'll get distortions in the source blocks. Solution one is to get your IDE to convert the tabs to spaces before you post. Solution two is to switch to 8 space tabs in your IDE. Another possibility is to stop using tabs in your IDE and switch to spaces yourself.
Tabs are evil. The only time I might use them is in a makefile because it actually means something other than what a bunch of spaces would, which is probably a design flaw. Who's idea was it to make different whitespace characters have different meanings?
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement