Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

?
Lv 7

Spaces or Tabs?

Richard Hendricks seems to throw fits over this question. He prefers tabs over spaces. Does it really matter even though it's the same after compiling?

2 Answers

Relevance
  • SteveO
    Lv 7
    5 years ago
    Favorite Answer

    Spaces for consistent viewing across various editors and different implementations of the tab character. With that said I have my editors set to insert spaces each time I press the tab key instead of inserting the tab character. Silicon Valley is pretty humorous and I got a pretty good laugh about the space versus tabs, but there are actually style guides in companies that define how you code in the real world. Google, for example, uses spaces. Facebook uses a tool to correct whitespace errors not in accordance with their style guide.

  • 5 years ago

    Just a coding practice when you work in a group, on the same program.

    The "rules" are set by the head programmer, in such a way that any piece of code can have been written by anyone, and are indistinquishable between them.

    In UK, we had a team working on a totalisator, and we were "obliged" to add a "PDL" (Programming Development Language) for each function. This was, in layman's terms, what the function did, what parameters it receives, and what are returned values. A little like a ".h" file (C). It has the advantages that you avoid repeated functions, names that "say what they do". The collection of all PDL went to another file that built the whole "manual" for the code.

    And, yes, we did use tabs instead of spaces, and I would not tolerate spaces :-) (nor "blank lines")

    I still do use the same protocols. The discipline forces you to write clear, understandable, easy to maintain and well commented code.

    But, again, who really cares?

Still have questions? Get your answers by asking now.