Linus Torvalds In Sweary Rant About Punctuation In Kernel Comments (theregister.co.uk)
An anonymous reader shares a report on The Register: Linus Torvalds has unleashed a sweary rant on the Linux Kernel Mailing List, labelling some members "brain-damaged" for their preferred method of punctuating comments. "Can we please get rid of the brain-damaged stupid networking comment syntax style, PLEASE?" the Linux Lord asked last Friday. "If the networking people cannot handle the pure awesomeness that is a balanced and symmetric traditional multi-line C style comments, then instead of the disgusting unbalanced crap that you guys use now, please just go all the way to the C++ mode."Torvalds despises the following two comment-punctuation styles (with his comments):/* This is disgusting drug-induced
* crap, and should die
*/ and:/* This is also very nasty
* and visually unbalanced */Torvalds prefers the following two styles:/* This is a comment */ and:/*
* This is also a comment, but it can now be cleanly
* split over multiple lines
*/
* crap, and should die
*/ and:/* This is also very nasty
* and visually unbalanced */Torvalds prefers the following two styles:/* This is a comment */ and:/*
* This is also a comment, but it can now be cleanly
* split over multiple lines
*/
...I happen to agree with his stance on this particular issue.
I'd remind him from the real world that he should be glad there are comments at all.
Seeing as 'C++ mode' // comments were added to the C99 spec; this would be my preference. I've always hated all forms of /* */
No bugs left other than comment style disagreements? Rejoice, the year of Linux on the desktop can't be far!
For what it's worth, my single contribution to the Linux kernel fucked up some white space. Torvalds didn't notice or I guess I would have woken up in the burn ward.
Hard-to-read comments make hard-to-read code. On a large project with multiple developers that matters.
I stole this Sig
Not the OP, but I don't particularly care about it in this instance (though I've got my own pet peeves in plenty of other cases), but when you work for a company or contribute to a project, you should follow their style conventions.
No, fuck you. Stop coding if you can't write simple fucking comments because you're butthurt over what one person said on the Internet, you stupid anonymous faggot cucklord.
Linus is right. I've been using the Linux kernel coding style as much as possible in all of my programming, regardless of the language, since around 1994. I get nothing but compliments.
When it comes to the kernel, the most important thing is writing code that other people can read and modify. Anybody can write new code. It takes an artist to write code that other people can easily understand.
What happened in his childhood to arrest his development? Any shrinks in the house?
It came in early adulthood when he confused good luck with genius. It happens all the time with the successful. They begin thinking they know more than their peers rather than they happened to be the lucky one at the right place at the right time.
My preference is
this type of comment
*/
Who ordered that?
Linus got an abundance of coders and by far most are paid, you can't compare it to other projects where you're lucky to get volunters at all. The kernel runs everything from cell phones to supercomputers and the markets it doesn't dominate is not the kernel's fault. He can well afford to only take high quality code that follows the style guides. Linux is simply not like most projects.
Live today, because you never know what tomorrow brings
I wish he would worry more about systemd and less about comments.
I'd remind him from the real world that he should be glad there are comments at all.
Since for anything to get merged it must pass by Linus, he can insist that you put comments on it or it does not get merged.
The Kernel source actually has quite a few comments, and some very funny jokes running throughout it.
So when dealing with a BDL or core maintainers for a project, you just do what they say as if they were your employer paying you - as any professional would do; or you go do something else.
Truth is like the sun. You can shut it out for a time, but it ain't goin' away. - Elvis Presley (source: imdb.com)
Not to back up the "all success is luck" meme but I would put it like this.
There are any number of people who might have the skill to write a kernel.
His "luck" was being the one who put in the work at the right time, caught the attention of other like-minded individuals to make it a community effort, and very effectively filled the niche that needed to be filled at the time. Without him it is fairly likely that another project would have eventually emerged, or that BSD would have been what people rallied around. And we'd then know another personality or group of personalities or company as the face of the open source operating system.
That is not to say he doesn't have a crazy amount of skill.
But that skill and that "luck" don't necessarily make his opinions infallible especially on something as asinine as this.
That said, you don't like his management style don't work with him or with a company that requires you to work with him.
I'm in college to become a software engineer, and so far the differences are meaningless.
Software engineering is about the process, but really it doesn't bloody matter. None of the software development processes I was taught have really helped me. Meanwhile I've been forced to learn actual useful things like git and bash on my own rather than being taught in school.
tl;dr a software engineer is really just a software developer. You say potato, I say potato.
I like to make people work harder to figure out what I did.
I used to get a chuckle out of doing that... but then I figured out that the guy working hard to understand my code later is almost always me. I strive to write clean, clear code with useful comments to avoid making myself work harder to figure out what I did. Sometimes it even works.
Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
C++ lets you have classes that clean themselves up. The useful pattern is to do this for primitives, not complicated objects. E.g
FileHandle file = fopen(...)
You use file just like you would a FILE*, except you don't need to explicitly call fclose(). No clean-up block at the bottom, you just return, and fclose(file) is called as part of exiting scope. You can call fclose() if you want to for some reason, and that's safe too. It's as idiot-proof as code is going to get.
That means you can return from any point in the code, and each such object you created will be unwound safely in the reverse order.
It's really a huge win, and the pattern is easily adaptable to anything with reserve-release bookends.
Socialism: a lie told by totalitarians and believed by fools.
I don't agree with this viewpoint at all.
I have been working on some scientific simulator code and the comments have the math equations that a block of code is based on. It makes it so much easier to understand since it is often not obvious how an equation is mapped into implementation (things like discretization make things far more complex).
Comments should not say what code does it should be why. I don't need you to see that your code is adding up a bunch of numbers but knowing why it is doing it is very important.
Computer modeling for biotech drug manufacturing is HARD!