Linus Torvalds really doesn’t like spaces – as in, tabs vs. spaces – and got a little annoyed that a commit removed a hidden tab because it “apparently showed breakage in some third-party kernel config parsing tool”. So, Torvalds decided to add some hidden tabs to trigger breakages like this, and is threatening to add more hidden tabs if necessary.
It wasn’t clear what tool it was, but let’s make sure it gets fixed. Because if you can’t parse tabs as whitespace, you should not be parsing the kernel Kconfig files.
In fact, let’s make such breakage more obvious than some esoteric ftrace record size option. If you can’t parse tabs, you can’t have page sizes.
Linus Torvalds
I’m not a programmer so I’m not going to wade into this debate – I have a personal Mastodon account to state it’s obviously tabs – but I did note that it seems like, at least in this commit message, Torvalds uses a double space after a period. Which is objectively the worst thing, right before Fahrenheit.
Sounds like the “third-party kernel config parsing tool(s)” needs to be fixed. It shouldn’t matter if you’re using tabs or spaces. I think if you started of with Python, you’re going to use spaces by default. If you started with just about anything else, you probably prefer tabs. Or, it could be that I’m just old and been using computers for 35 years or more and I was taught to use tabs.
I first learned to use drum control cards. Much more powerful than tabs or spaces.
No that debate existed well before python was common. In my line, everyone else has preferred spaces. I think I prefer spaces, but I don’t care that much other than to say I appreciate languages like golang which has a language approved formatter. Consistency is more important than anything else.
Started using spaces, tried tabs for the lulz, never came back. My take on the subject : https://github.com/Kochise/Koding_Style#indenting
The “double space after a period” thing may be due to his age. He’s about eight years older than me, and I learned touch typing in high school in the early 90s on an IBM Selectric typewriter; while we had computers they were reserved for the computer science classes. One had to pass their Keyboarding class on a typewriter before moving on to those. My class was taught by a former law clerk and she instructed us to use two spaces after each period for better clarity in typed formal documents. It took me a few years to break out of that habit.
I learned two spaces after a period in typing class as well, but by that time I had already been using a word processor for 8 years without doing that. I makes sense, but yeah, no.
I learned typing in high school in 1994. We were the first class to use computers and the typing teacher insisted on 2 spaces. We failed assignments if we didn’t. I still do it most of the time.
Double space after a period is correct. Nowadays people don’t capitalise or use apostrophes, the world has gone to hell.
Doulbe space after a period. One. Two. Three. Yeah, this forum strips the extra space which is typical leftist censorship.
Hmm, it’s just does appear to work just not visually. More leftist deception. LOL.
tux2bsd,
“Leftist censorship”…haha.
The spaces actually got recorded and output just as you typed them. Something you wouldn’t know unless you’ve dabbled in web development is that HTML combines all adjacent whitespaces before rendering text. This was standard behavior for web pages since the 90s. If I were to guess, mosaic probably did this too.
I think the reason they did this was to allow HTML authors to use whitespaces including newlines around html tags arbitrarily without affecting the rendered output. To explicitly output a whitespaces you’d have use html tag (or “ ” in case that gets converted to spaces).
I am all about that double space after a period. It just makes sense so clearly, those of us that do it are right.
–Torvalds uses a double space after a period. —
There is a catch here. Open up any book teaching typing from the early 90s and before. You find the taught typing convention is double space after period. Single space after a period comes in latter and up until the end of the 90s it was technically wrong todo at all. Yes modern taught people get themselves into trouble when they have to type on particular electric typewriter for this reason as well. The double space after period can be important. Some typewriters function on condensed space that is that you space is about half the width of a char so to be sure a full char space after a period on typewriters you have to double space. Double space after the period typing with typewriters is the safe bet not to end up with bad readability.
Yes on computers we are use to justification automatically adjusting spaces old typewriters you don’t have this feature. Doing a class when everyone had to make a simple news letter using 1980s tech one of the traps was the old typewriters lack of justification and modern taught typist were getting really annoyed due to how many redos they had to do to get the item correct due to failing to type double space after period resulting in hard to read. Something us older taught typist have no problems with made them value justification more
Yes a single page document took one group over 40 attempts and all these people had tested typing skill saying they could type at 100 percent. The introduction of justification and the stop of using double space after period is linked and is a trap for the unaware. Heck even a trap for the aware who have been trained to do single space after period because its a really hard thing to stop doing instantly. Just like me I still almost always type double space after period because I was trained that way but I don’t get screwed up if I have to use 1980s typewriters for some reason..
I understand why people prefer tab to spaces and while in theory I do as well, in practice I prefer spaces. Basically every file I’ve ever worked on that uses tabs ends up becoming a mixed spaces an tabs document as people use a couple of spaces here and there, maybe accidentally, maybe to “fix” some alignment that doesn’t look quite right to them, or for whatever reason. Eventually the file ends up becoming a mix of tabs and spaces, at which point it rapidly gets worse since everyone uses a different width for their tabs and chaos reigns. Sure, formatters should take care of it, but I’ve never found one that always handles them correctly in all cases, and what about for those oddball files that you haven’t set one up for? Or when you’re forced to use ed/emacs/vim on a rarely used embedded machine or whatnot?
I was spaces until someone pointed out tabs are better for accessibility since their size can be scaled.
As for Celsius vs Fahrenheit, Fahrenheit. It makes more since when talking about how human perceive temperature. Metric makes conversions easier for other things, except computers since they’re base 2 rather then base 10.
Flatland_Spider,
I prefer tabs for indentation. The amount of space a tab represents can be a localized user preference. Doubly so when code gets checked into source control. Spaces are used very inconsistently. Sometimes project managers dictate a specific number of spaces, but the number differs everywhere. I’ve seen 2/3/4 spaces prescribed even in different divisions of the same company. That’s too arbitrary. Tabs are more concise, which is why I prefer them.
I think it has much more to do with what you grew up using.
Your mention of it reminds me of this SNL sketch about metric vs english units. So many of their sketches are bad, but this one is fantastic
“Washington’s Dream – SNL”
https://www.youtube.com/watch?v=JYqfVE-fykk
I’ve stopped using base 2 units for most things, they just confuse people. In instances where exact binary representations are needed I’ll specify mebibytes explicitly just to consistently differentiate the units from metric ones.
2 or 3 spaces is odd. I’ve seen 2 spaces in YAML, but it’s usually 4 spaces everywhere else. Of course, in clearspace sensitive languages it’s whatever makes the interpreter or parser happy.
I’ve come to really dislike clearspace sensitivity, and the preference for tabs dovetails with that..
That’s definitely part of it, and it definitely would have been the reason before someone on the Internet made a very convincing argument for Fahrenheit in weather. It was basically, Fahrenheit is a wider band which maps more to how humans experience heat, and people aren’t water. Celsius makes more sense when cooking since 100 is boiling water, but Fahrenheit makes more sense when talking about perceived heat in relation to the weather.
I only talk with computers about size.
PS: For anyone who cares, I’m not using double spaces after my periods.
Flatland_Spider,
3 spaces is odd, but not 2.
It was a choice by a lead developer who felt 3 spaces was the best balance between typing efficiency and clarify. It was a valid opinion, but IMHO it would be better to just use tabs and let everyone configure their own space preference.
Same.
I strongly prefer having consistency versus needing to switch scales based on contexts. Even living in a Fahrenheit-centric country I still think of some temperatures in Celsius first like computer temps and scientific measurements. But this makes it difficult to gain an intuitive understanding of where temperatures stand in relation to one another because we switch scales. I’d rather we standardize on metric consistently everywhere and not have a plurality of units. But I do realize that opinions like mine are a minority in the US.
I started out using 2 spaces, but a professor of mine told me to use 4 because it was hard to read.
I don’t think it was. It’s 4 spaces or 1 tab. LOL
Once my editor is configured or I have a code formatter, I don’t really care. One of the great things about Go is the builtin formatter. I don’t have to think about formatting, the formatter will do it automagically.
I’m working on being able to convert between the two in my head as a fun project. C -> F is (C*2)+32, and F -> C is (F/2)-32. I think. I’ve been able to figure out 40C is hot! Converting between the two just reinforces how Celsius isn’t great for weather.
I’m not particularly bothered by it. I’ve gotten used to switching between the two. I do wish cooking would standardize on metric, and I’m working on switching in my cooking. The math is much easier to do when scaling recipes.
The weirdest metric unit is time. There is really a 10base time system.
https://metric-time.com/
https://en.wikipedia.org/wiki/Metric_time
Flatland_Spider,
This is great if you own the project. But if you’re committing source code in a team setting it gets messy quick and we were instructed to have the same format settings across all developer desktops. With tabs it matters less, but since they used spaces we actually couldn’t change the setting locally without spamming code repositories with tons of unwanted changes. Another reason to use tabs exclusively.
I think people who are used to celsius don’t have a problem, but I realize there’s no point in saying one opinion is better than the other. I am more concerned about that mathematical shortcut however…
Fahrenheit = (Celsius * 2) + 32
versus
Fahrenheit = (Celsius * 1.8) + 32
These match up at water’s freezing point. However at a body temperature of 37C the real conversion gets us 98.6F but 106F using that shortcut.
Gotta fix that math:
F = 1.8 * C + 32
C = (F – 32) / 1.8
I find the mental math shortcut handy
F = 2 * C + 30
C = (F – 30) /2
It isn’t good for anything scientific but the C values calculated from F are accurate to 2 deg C between -10 and 30 deg C (with zero error @ 10 deg C) — good enough to tell if you need a scarf or not.
rlees42,
F=(C*2)+30 and C=(F-30)/2 works better. Thanks!
Alfman,
Pre-commit Git hook to run the auto formatter. The commit gets rejected if the formatter doesn’t run cleanly.
Or in the case of Go, run “gofmt” on every save. https://pkg.go.dev/cmd/gofmt
With Python deferring to Black is the standard I’ve seen. https://pypi.org/project/black/
Auto-formatters is feature every language should have in it’s tooling. It solves the problem of style drift, and it keeps the devs from having to think about code style.
Flatland_Spider,
I find autoformatters frequently mess with formatting across lines, despite applying rules, they can sacrifice the visual clarity the author was going for. Also not everyone wants to use the same tools/formatters.
I’m often the odd one out when working on windows projects.
Honestly my opinion is that it’s simple tabs for the win, nobody needs to use spaces for indentation.
Oh, just to be clear about it, more often than not I work on projects that I don’t set the policies for, so if I use an autoformatter and commit those changes, they may not be so appreciative of that.
> As for Celsius vs Fahrenheit, Fahrenheit. It makes more since when talking about how human perceive temperature. Metric makes conversions easier for other things,
I am sorry, but literally every child understands when water freezes and when water boils. (Exceptions are made for the tropics and the Himalaya/Andes of course, but they won’t grasp F either). We are not talking about kelvin after all.
American should feel ashamed of their “freedom units”, but ignorance is a bliss I guess.
And the body temperature is 36-37oC. I don’t know how there something simpler than that.
Both are equally arbitrary. Fahrenheit is useful for relating temperatures for humans, Celsius is useful for relating temperatures for water.
If you’re doing anything science related, you’d be using Kelvin. Otherwise, it doesn’t matter one bit.
Drumhellar,
They are arbitrary, but it’s not the specific values that are the problem so much as having multiple scales that we need to switch between. I do understand people not wanting to change the units they’re already familiar with, habits die hard. But I feel that switching to different scales depending on what’s being measured was always a idea and I don’t think it is justified. It harms our intuition about relative temperatures.
“The Sun and planetary bodies shall be measured in Celsius., Human bodies shall be measured in Fahrenheit, computers and electronics in Celsius, ovens and kettles in Fahrenheit, lab heaters in Celsius, atmospheric temps in Celsius except in weather reports, HVAC in Fahrenheit, ocean temperatures in Celsius, pool temperatures in Fahrenheit,”
It reminds me of the arbitrary genders assigned to nouns in languages like french where milk is defined as masculine but ice cream is feminine. This complexity exists because we made it this way, but it’s so sub-optimal. I feel this same way about mixing/matching Fahrenheit scales.
I agree. However,
Shitting on people over it, as the person who said this did, seems a bit over the top for something that is 100% arbitrary anyways, and that’s really what I was replying to.
Double-spacing after a period, or not, is a non-issue.
To be correct depending on what you are doing says if it a issue or not. Having to use a legacy old half space typewriter for some reason like some government department demanding you use carbon copies and the only way that works well is the old impact solutions. Then having poor read ability on the other end because you did not double space after the period is a problem.
Then you are typing into MS word you use double spaces after period this can be causes of MS word automatic align solutions going stupid if MS word is on default Punctuation Conventions. Yes MS Word you can set no check or 1 space or 2 space after period with default being 1. Yes using 2 space and not setting 2 space things have a habit of going wrong.
https://en.wikipedia.org/wiki/Sentence_spacing
The major convention change from double to single after period early 2000. The double and triple space after period is requirement on different types of typewriters. There are 1/2 width space typewriters and 1/3 width space typewriters. Yes legal office typewriters to fit as much god darn text possible on a page using a typewriter. Yes compressing the spaces does add up. These are typewriters normally made before 1990s as in the 1980s and before.
Some of us for different thing still have to use the old typewriters thank you government departments having very old mandatory submit standards for different things. Yes double and triple space after the period can be defined in the submit standard and if you don’t do it the person on the other end can be a jackass and make you resubmit. Yes some government departments have document formatting standard from the 1970s and before.
Worst I found recently was one submit standard mandating very old school cursive hand writing. Finding someone who can 1 read that 2 write that well these days. This came a dispute to have department update their submit standard. When I say old school I mean the style taught in the 1905-1927s there is a new style 1928. So needing 90+ year old person to-do the submit…. That not sane but this also normal at times for government department submit standards.
Like or not these old writing/typing standards hang around in different parts of governments for a very long time. This requires people to still be able to-do them until those submit standard can get update to get stuff done.
Yes I wish this stuff was always a non issue but bad news sometimes this stuff is the very issue why a document sent in is rejected even that everything else was correct. You can just think imagine some of the bad language that come out of company owners mouth when they find out a project is being delayed just because a document that should have had double or triple space after the period was submitted with single space and that the only reason it was rejected. Yes dot your i cross you t and get your spacing right or be ready for dealing with a unhappy employer when dealing with particular governments departments. Mind you all the government departments i have had dealings with that take single space after the period don’t care if you done double or tipple after period.
I didn’t mean it’s a non-issue to everyone anywhere, just to me.
What if it’s a spicy period?
Flatland_Spider
I’m not sure what you are talking about I assume this is what a spicy period looks like
Ever since Thom introduced us to , I’d like to find more uses for it:
https://www.osnews.com/story/135325/unicode-15-0-0-adds-more-eyes-to-%EA%99%AE/
Edit:
WordPress ruined my joke by stripped out unicode characters, but I terminated my sentence with a hot pepper character….
https://emojiterra.com/hot-pepper/
I was thinking about peppers and how some are spicier then others. It was a non-sequitur comment.
Flatland_Spider
Oh I see, you meant a period with greater emphasis. Could we designate ‘!’ as the spicy period? I like that!
Can we all agree that misspacing commas ,is the worst?
No. I can not. I do that frequently , and I don’t notice or mind it. Its fine. you all understand what I mean.
What is confusing is the inconsistent use of periods verses commas for numbers.
3,923
3.923
I’m more mindful of it now, but I remember this tripping me up when I was reading international texts for the first time.
That’s why Germans write the numbers as 3’923,00.
And don’t even get me started on dates!
And upper case spelling of nouns.
Andreas Reichel,
There’s nothing strictly wrong with any of the numerical formats in their own right, but the fact that we don’t all use the same one can be problematic for communicating unfortunately. The world’s a big place and maybe these kinds of differences were always going to be inevitable.
Yep. I grew up with mm/dd/yyyy, but I feel this is objectively stupid for being internally inconsistent with respect to scales of time. I’m forced to use it in formal documents because of society, but I never write dates this way for personal records. I use yyyy-mm-dd, which has the very nice property of making filenames sortable and coincidentally or not is the native format used by sql databases.
And don’t even get me started on pi….
pi = 1/2 tau, the more fundamental unit for a complete revolution rather than half of one.
And don’t even get me started on electric charge, where electrons leave the negative side of a battery and are represented by negative numbers.
Is there anything anyone else wants to get of their chest while we’re at it? Haha.
Andreas Reichel,
Just curious, do you write gps coordinates this way?
40°45’53.28″
73°58’50.88″
I’m not a fan of this “degrees, minutes, seconds” BTW. I find it obtuse, harder to type and harder to understand than a simple floating point number that takes fewer characters.
That actually make some sense, since electrons are negatively charged. Of course, it is completely arbitrary which is negative and which is positive, since there is nothing inherently “negative” or “positive” about charge. I suppose those are not the worst examples to be found in particle physics.
Quarks, after all, are up/down, top/bottom, and charm/strange.
But they also have color qualities – red, blue, green – via the strong nuclear force, that is completely divorced by what color means.
And anti-quarks? Well they’re anti-red, anti-green, and anti-blue.
Drumhellar,
Initially it wasn’t arbitrary, it was that the current exited the possitive side and we’ve kept the convention even after we learned that current travels in the opposite direction, which is why electrons become negative. It we had a redo based on what we now know it would have been the opposite.
edit: it was thought that the current exited the possitive side
Bah
And let’s not talk about the space as thousands separator.
That’s actually pretty simple. In the US you use a period as a decimal separator. In the rest of the world, you use a comma.
darkhog,
The problem is the potential for ambiguity. This list doesn’t even show the apostrophe as Andreas Reichel used (and that I have seen elsewhere).
https://docs.oracle.com/cd/E19455-01/806-0169/overview-9/index.html
I wish I had saved the link, but watching a youtube video I came across a number in a video that didn’t seem right and I had to try and guess the youtuber’s country of origin based on the number and his accent This may seem like a funny curiosity to us now, but in other contexts it could actually be dangerous.
Then you obviously never paid attention to typesetting a book or an article. Sad.
Funnily enough, I have. I’m a huge disappointment to my father , a former typesetter , and my grandmothers who were both grammar teachers.
That is actually really funny.
Pfft. The answer is obviously spaces
Wait, I didn’t see anyone discussing the actual situation here…
From what I understand (and I might be completely wrong), this is not about tabs vs spaces. Instead, a tab in one of the Linux kernel files caused a parser tool to break, and the maker of the parser software submitted patch to the kernel instead of fixing their software. When Linus saw this he said (my words, not his), “No, FIX YOUR STUPID SOFTWARE.” And threatened to (or did?) put MORE tabs in to force parsers to handle valid whitespace correctly.
drcouzelis,
I agree with Linus Torvalds on that. It’s certainly not the kernel’s responsibility to change for limited 3rd party tooling (I would have really liked to know what tool this actually was).
I kind of disagreed with him on this point though…
In “make” tab is semantically significant and I think it would be awful for make to accept any whitespace in place of those tabs. That said though, I don’t know that using tabs or spaces is ever a good choice to use as a token. Normally tokens would go in between spaces and are not created by spaces.
Once I was forced to use spaces, because the PL wanted everybody to “see the code the same way”. Yeah, right, would he enforce everybody using same font and font-size also? It is just nonsence.
Tabs has the big advantage that you can simply set how many spaces you want, so if you like more very small indentation, use 2 spaces, otherwise go crazy and use 8 or so. Freedom to the user is what tabs give.
The title and first sentence of this article are 100% completely inaccurate and nothing but clickbait.
This has absolutely NOTHING to do with whether tabs or spaces are better, and EVERYTHING to do with a 3rd-party tool not being
able to parse whitespace correctly. Rather than fix the 3rd-party tool, the developers of the tool submitted a change to the kernel to replace a tab character with a space.
Devs discover bug in tool, ship patch for kernel to workaround bug in tool, instead of fixing tool. That’s the real issue.
But, I guess posting the truth doesn’t generate enough clicks, so let’s ignore reality. :roll-eyes:
I too am of the age where we learned typing on typewriters and it was drilled in to our heads that two spaces follow a sentence (and colons). No spaces surrounding ampersands when writing abbreviations (always AT&T never AT & T). All of those rules were about dealing with the single font of the typewriter. I can’t break the habit of two spaces after a sentence, but I also don’t care. I don’t care if others do one space. To me this is a non-issue.
It did get me remembering some version of Microsoft Word (perhaps 6.0 on Windows) that introduced autocorrect for a lot of things. They advertised being able to autocorrect “teh” to “the” as you type. But it also did things like automatically put two spaces after a sentence if you only did one. I wonder if Word still does that. That was the last version of Word I remember using.
On tabs vs. spaces in code, spaces. Two problems I have always run in to when working with code using tabs for alignment. The first is that tabs require you to either accept the default configuration of the editor and go with their tab stops or it requires proper editor configuration to be able to see the code as the author intended. Second, when people start mixing tabs and spaces for alignment, such as multiline if expressions in C where you need just one or two more spaces, and everything goes to crap unless you are using the author’s tab stop settings. I stick with spaces and always have because it looks the same everywhere. I do have my editor configured such that I can use tab while coding, but spaces are what go in the file.
But more important than tabs vs spaces is to follow the style of the existing code whether you like it or not. If you are contributing something to another project, use that project’s coding style.
But even MORE IMPORTANT than that is that Linus hates the GNU coding style, which is something I can 100% support.
I take exception to the Fahrenheit hate.
If you’re quantifying human experience, Freedom Units like Fahrenheit are awesome. it’s for talking about the weather, and so the range of temperatures people typically experience is expressed on a scale of 0-100. Winter? 0. Summer? 100. Spring and Fall? 50-75.
So me, I think about how warm or cold it is pretty much every morning, so I use Fahrenheit. If I thought more about the temperature of neutron stars that I do about which shirt to wear, I’d use Kelvin.
So I don’t get the Fahrenheit hate. Just because a system of temperature is calibrated against a precise, objective referent — the temperature where molecules stop moving, where ammonia freezes, or whatever — doesn’t make it meaningful.
The 18th-century physicist Daniel Gabriel Fahrenheit originally took as the zero of his scale the temperature of an equal ice-salt mixture and selected the values of 30° and 90° for the freezing point of water and normal body temperature, respectively; these later were revised to 32° and 96°, but the final scale required an adjustment to 98.6° for the latter value.
https://www.britannica.com/science/Fahrenheit-temperature-scale
I come from an area where if we used Fahrenheit, winter minimum would be about 40°F, summer maximum about 80°F
Absolutely. I live in a metric country but my trailer is 6×4′. I wish I 17 18 & 19 mm thick plywood wasn’t a thing and I’m 6′ tall. Freedom units makes more sense day to day.
(Double spaced my sentences in protest of bad journalism.)
Ha. Tabs are useful and shouldn’t cause any issues, even mixed with spaces, with processors – tell that to python. As for the two spaces after a period vs one… the issue is readability – if modern apps would display full stop correctly (adding additional space) one would be preferred. It makes things oh so much more readable. That said, I use one space after punctuation regardless.