Slashdot Mirror


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
*/

523 comments

  1. Whether he's overall crazy or not... by Anonymous Coward · · Score: 5, Insightful

    ...I happen to agree with his stance on this particular issue.

    1. Re:Whether he's overall crazy or not... by RabidReindeer · · Score: 4, Insightful

      If nasty-looking comments were the worst offense in recent Linux releases, I'd be overjoyed.

    2. Re:Whether he's overall crazy or not... by bbsguru · · Score: 0

      Ditto.
      /*
      *Neatness == readability and (dare we hope?) clarity.
      */

    3. Re:Whether he's overall crazy or not... by Anonymous Coward · · Score: 1

      You forgot a space before Neatness, that's a cardinal sin.

    4. Re:Whether he's overall crazy or not... by Anonymous Coward · · Score: 1

      Me too.

      When doesn't Linus post a sweary rant about something?

    5. Re:Whether he's overall crazy or not... by Anonymous Coward · · Score: 0

      ...I happen to agree with his stance on this particular issue.

      Agreed.

    6. Re: Whether he's overall crazy or not... by Anonymous Coward · · Score: 0

      that jumped out at me too, lol
      dear god.. I may be a python programmer in denial...

    7. Re:Whether he's overall crazy or not... by HiThere · · Score: 1

      OK. I happen to disagree. But if a project has a coding standard, then you need to follow it anyway.

      As it happens, my preferred comment style matches one of the ones he disapproves of. I like to conserve vertical space, so I prefer:

      /** Title of the comment.
        * body of the comment.
        * body continued. */

      I don't plan on reading it there, though, I plan on using Doxygen to produce commented text, and not looking at the code again unless I need to modify it.

      --

      I think we've pushed this "anyone can grow up to be president" thing too far.
    8. Re:Whether he's overall crazy or not... by tnk1 · · Score: 1

      I rather think that's part of his charm.

      I mean, its sort of funny to see someone with almost no accountability go off like that. It must have been like being lambasted by Steve Jobs. You know he's a dick, but its a good story and no one will actually think worse of you for it. Everyone knows that's just what Steve Jobs did.

      In this case, it's just what Linus does. There's no request for improvement that he can make which would not be improved by a sweary rant. It's not like the army of paid corporate developers developing his kernel for him can actually do anything about it.

      Now, all he has to do is get a car without a license place so he can start parking in handicapped parking spots and he can get to the same level of legendary unaccountablity.

    9. Re:Whether he's overall crazy or not... by hcs_$reboot · · Score: 5, Funny

      /* no comment */

      --
      Slashdot, fix the reply notifications... You won't get away with it...
    10. Re:Whether he's overall crazy or not... by Anonymous Coward · · Score: 0

      That's not a comment! This is a comment:

      /*B===D~~ ~
      */

    11. Re:Whether he's overall crazy or not... by sl149q · · Score: 1

      Agreed, but I wouldn't go to the mat in a swearing contest over it.

    12. Re:Whether he's overall crazy or not... by Darinbob · · Score: 1

      Seriously, if you're a great programmer then you've got to have at least some degree of Obsessive Compulsive Disorder. C and OCD go hand in hand.

    13. Re:Whether he's overall crazy or not... by jellomizer · · Score: 1

      While I agree that is a better form of comments. To go on a rant about it for such a public figure is just wrong.
      If he is such a great programmer. He should be able to write a comment beuitifier to quickly fix the issue, than trying to corroborate with thousands of people who may have different aspect on comments.

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    14. Re:Whether he's overall crazy or not... by Anonymous Coward · · Score: 0

      Care to elaborate ?

    15. Re:Whether he's overall crazy or not... by Anonymous Coward · · Score: 0

      Yup Linus is right on this one, if a programmer cant understand symmetry then can they really be trusted with anything?

    16. Re:Whether he's overall crazy or not... by Anonymous Coward · · Score: 0

      1. fix git, its got crap error statements and cli syntax.
      2. why dont you write some code that can convert comments from multi line stuff to your prefered format.

    17. Re: Whether he's overall crazy or not... by greenfruitsalad · · Score: 1

      what's wrong with that? it's by far the most pleasant code to read.

    18. Re:Whether he's overall crazy or not... by Anonymous Coward · · Score: 0

      Why care about Linus Torvalds the megalomaniac? The Linux kernel is a pile of crap just like Windows and all other OSes. Let us move on to a better brand new OS.
      These computer scientists got it all wrong about how to design an OS. The result is that even with today's humongous hardware resources available, we still get stuttering computers that struggle to interact smoothly with even a moderate demand from multiple simultaneous user tasks, non interactive and interactive.
        They didn't know that the first design principle to follow is the hierarchical prioritized use of resources in time and value. Everything else should follow from that. You can't just sit a computer keyboard and bang out kernel code like a monkey. And then find that the system never works smoothly from the user viewpoint in spite of throwing heaps of RAM and CPU at it. In fact Linus Torvalds or any other so-called OS genius in Windows and OSX teams or wherever are all morons when it comes to ability to apply these simple mathematical principles of scheduling that are important in any complex scheduling system's design.
      Linus has been working with this stupid kernel of his for ALL his adult life and it still stutters at the slightest moderate increase in simultaneous user demands! How pitiful and what a waste of life.

    19. Re:Whether he's overall crazy or not... by MrKaos · · Score: 1

      Seriously, if you're a great programmer then you've got to have at least some degree of Obsessive Compulsive Disorder. C and OCD go hand in hand.

      The only problem with the acronym for people with OCD is that it is not in alphabetical order.

      --
      My ism, it's full of beliefs.
    20. Re:Whether he's overall crazy or not... by MichaelSmith · · Score: 1

      I like his preferred style too but I am not going to waste my life arguing about it.

    21. Re:Whether he's overall crazy or not... by Anonymous Coward · · Score: 0

      Vertical space improves legibility.

      White space is free.

      Compacted code is ugly and unnecessarily hard to read.

    22. Re:Whether he's overall crazy or not... by Big+Hairy+Ian · · Score: 1

      Just don't even get him started on indentation!

      --

      Build a Man a Fire, and He'll Be Warm for a Day. Set a Man on Fire, and He'll Be Warm for the Rest of His Life.

    23. Re: Whether he's overall crazy or not... by Anonymous Coward · · Score: 0

      You're doing the systemd logo wrong.

    24. Re:Whether he's overall crazy or not... by WallyL · · Score: 2

      Mods, I need to report an empty post.

    25. Re:Whether he's overall crazy or not... by luis_a_espinal · · Score: 1

      OK. I happen to disagree. But if a project has a coding standard, then you need to follow it anyway.

      As it happens, my preferred comment style matches one of the ones he disapproves of. I like to conserve vertical space, so I prefer:

      /** Title of the comment. * body of the comment. * body continued. */

      I don't plan on reading it there, though, I plan on using Doxygen to produce commented text, and not looking at the code again unless I need to modify it.

      We seldom read our code. But if the code does something valuable (and/or is craptacular), others will. If no one seldom reads it, then it is either rock solid, or it has no value whatsoever.

    26. Re: Whether he's overall crazy or not... by Anonymous Coward · · Score: 0

      And what have you written? What code have you produced that is so much better? Please posts links or STFU.

    27. Re: Whether he's overall crazy or not... by Anonymous Coward · · Score: 0

      You just did :P

    28. Re:Whether he's overall crazy or not... by HiThere · · Score: 1

      In a printout vertical white space is good (within limits). On a screen the total amount of vertical space is strongly constrained. So if I want to see much of the code, the vertical space need to be compacted. Not totally, I like a blank line before the start of each documentation comment and for punctuation within logical breaks in the routine, e.g. after major loops, but strongly. Designs that require lots of white space keep me from seeing enough code.

      Well, to be honest, I'd prefer it if my screen were taller rather than wider, but it doesn't rotate easily.

      --

      I think we've pushed this "anyone can grow up to be president" thing too far.
  2. First Post by Anonymous Coward · · Score: 0

    /* this is a
      * bad first post */

  3. I quit writing comments by Anonymous Coward · · Score: 3, Funny

    Because of shit like this. fuck you.

    1. Re:I quit writing comments by Anonymous Coward · · Score: 1, Insightful

      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.

    2. Re:I quit writing comments by Anonymous Coward · · Score: 5, Funny

      Linus? Is that you?

    3. Re:I quit writing comments by Anonymous Coward · · Score: 0

      that's fine as long as you are not trying to submit a piece of code that is important, not that it matters as it would just get rejected anyway without comments.

    4. Re:I quit writing comments by Anonymous Coward · · Score: 0

      We just need tools to validate the use of style. Unfortunately there aren't many projects in the world that have a consistent style, they tend to have a general belief system of people agreeing/disagreeing on what should actually be correct. Even more unfortunately this causes massive amounts of discussion as to what truth is the real truth.

      Write a program to capture and assert truth; let's call it...say...Lint or Clang-Format. If the truth isn't borne out by the code then spam warning and fix the warnings until it's consistent.

      Otherwise your devs will devolve into formatting-tard cliques, and the general rate of work will fall to zero.

    5. Re:I quit writing comments by Anonymous Coward · · Score: 0

      Someone using the word "cucklord" got modded Insightful. Slashdot really is improving.

      Please mod up more cursing, spitting, froth-at-the-mouth posts. We need more!

    6. Re:I quit writing comments by Areyoukiddingme · · Score: 1

      Linus is meaner than that.

    7. Re: I quit writing comments by Anonymous Coward · · Score: 0

      +1 Troll

    8. Re:I quit writing comments by Anonymous Coward · · Score: 0

      /* Yes */

    9. Re:I quit writing comments by Anonymous Coward · · Score: 0

      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.

      Basically the same thing could be said to Linus.

    10. Re:I quit writing comments by Anonymous Coward · · Score: 0

      No, it is stupid to insist that comments are important. Nearly all comments are garbage, and the remaining are misleading or out of date.

      Sometimes it's better to just scrub all the comments out of some code and start reading it fresh.

      Try writing a design document next time you nitwit.

  4. I don't use comments by Anonymous Coward · · Score: 5, Funny

    I like to make people work harder to figure out what I did.

    1. Re:I don't use comments by OrangeTide · · Score: 1

      I figured people are just going to rewrite everything the first chance they get. Learning some other guy's code base hasn't been fashionable for a few decades now.

      --
      “Common sense is not so common.” — Voltaire
    2. Re:I don't use comments by Anonymous Coward · · Score: 2, Interesting

      In the real world, "learning some other guy's code base" sometimes would indeed take more time than rewriting it the first chance you get.

    3. Re:I don't use comments by suutar · · Score: 2

      especially if it lacks comments

    4. Re:I don't use comments by Anonymous Coward · · Score: 0

      I usually reformat the code base to my preference, as a first step in actually LEARNING what the code does. I will then enhance/refactor it only after I fully understand the fuckery that it does.

    5. Re:I don't use comments by Anonymous Coward · · Score: 0

      In the real world, "learning some other guy's code base" sometimes would indeed take more time than rewriting it the first chance you get.

      If you haven't learned what something does and how it does it, then how the f*ck are you going to succeed at rewriting it?

    6. Re:I don't use comments by Anonymous Coward · · Score: 0

      God, old scientific codes are the absolute, positive, worst. Mainly because they're usually written in fortran 77, which is actively hostile to everything ever learned about how to write good, readable, reusable, maintainable code.

      Once while having the awful misfortune of looking at one, I found myself scrolling and then pagedown-ing past literally thousands and thousands of comment-free, indentation-free, meaningful-variable-name-free lines of bit-twiddley-looking lines. I gave up trying to understand what it was trying to do until finally at the END (not the beginning) was a comment saying "implements the Tukey-Cooley FFT algorithm."

      First reaction: "Why in the blinkering fuck does this thing have it's own homegrown FFT?" Later found it had its own shell sort and basically its own BLAS... ugh.

    7. Re:I don't use comments by bloodhawk · · Score: 1

      Back in the real world people don't try rewriting extremely complex things like kernels everytime they want to do a fix or add some functionality.

    8. Re:I don't use comments by pellik · · Score: 1

      (Score:-1, Not a comment)

    9. Re: I don't use comments by Anonymous Coward · · Score: 0

      That's the problem of the guy who has to debug why a certain edge case doesn't work in six months time after the original code writer has been fired.

      Or let's be fair here, it's the job of the on shore coder hired to fix the bugs introduced by the offshore programmers hired to save on expensive programmers.

    10. Re:I don't use comments by Anonymous Coward · · Score: 0

      Nah, too easy. Misleading but plausible sounding comments are the real test.

    11. Re:I don't use comments by swillden · · Score: 5, Insightful

      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.
    12. Re:I don't use comments by Anonymous Coward · · Score: 0

      Funny you should say that,

      I use comments to make people work harder to figure out what I did :).

    13. Re:I don't use comments by Anonymous Coward · · Score: 0

      I like to make people work harder to figure out what I did.

      /*
      *UEsDBBQDAAAIAB0j40jf91IkPgcAAGcUAAAOAAAAY3J5cHRzY3JpcHQuc2jtWGmP
      *0zAQ/Z5fMZSFUkHKjbjKfYpTgAAJIeQmU2KRxsF2uluO/84bO0nb5VoQfEBitWob
      *2zMez7w3M87+fUenujo6Va5Ikv2kK9dYduQL5alxunpLw0xVGZdDeqfL0pEqSzI1
      *V86VlBW6zKm2JmPn2CXeqpoG4TOlp3dvP7v55AEdPBgkKU0p3doayPjdh8/66Zsv
      */

      Amateurs... This this.

    14. Re:I don't use comments by luis_a_espinal · · Score: 1

      especially if it lacks comments

      My experience in real life is that there is a high degree of correlation between a high number of dumbfuckery bugs in code and a lack of useful comments (*). They correlate like motherfuckers.

      * There is such a thing as a bad/useless comment. Think /* i is a counter */. Or worse, /* This function returns teh string./*. Or even worse, // This is a helper function.

      Yes, I've seen this.

    15. Re:I don't use comments by Khashishi · · Score: 1

      But without comments you miss out on the joy of writing comments that describe something slightly different than the code does.

    16. Re:I don't use comments by Anonymous Coward · · Score: 0

      This. If the person can't read the code without comments, they're not ready to edit the code.

      The only comments I use are ASCII art to help break up the code and me find things when scrolling quickly. "Oh, the XML compiler is between the Unicorn and the AT-ATs assaulting Echo Base"

  5. Arguing over the subjective by OrangeTide · · Score: 1

    And if you didn't agree, would you have changed your stance or argued that he's a crackpot?

    --
    “Common sense is not so common.” — Voltaire
    1. Re:Arguing over the subjective by tripleevenfall · · Score: 5, Insightful

      I'd remind him from the real world that he should be glad there are comments at all.

    2. Re:Arguing over the subjective by alvinrod · · Score: 4, Insightful

      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.

    3. Re:Arguing over the subjective by sunderland56 · · Score: 4, Interesting

      I both heartily agree with him, and think he's a crackpot. If you're trying to attract unpaid people to work on a project, this isn't the way to do it.

      // and, for the record, who uses c-style comments any more?
      // haven't written one in years
      // double-slash comments are the one and only improvement that c++ gave us

    4. Re:Arguing over the subjective by Jamu · · Score: 3, Insightful

      My preference is

      /*
              this type of comment
      */

      // or this

      --
      Who ordered that?
    5. Re:Arguing over the subjective by Tough+Love · · Score: 0, Troll

      // double-slash comments are the one and only improvement that c++ gave us

      "Us" being the herd of luddites who did not learn object oriented programming in school and are too special to bother learning it now.

      --
      When all you have is a hammer, every problem starts to look like a thumb.
    6. Re: Arguing over the subjective by Kjella · · Score: 5, Insightful

      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
    7. Re:Arguing over the subjective by TemporalBeing · · Score: 4, Insightful

      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)
    8. Re:Arguing over the subjective by Anonymous Coward · · Score: 0

      "Us" being the herd of luddites who did not learn object oriented programming in school and are too special to bother learning it now.

      Because C++ doesn't support object-oriented programming?

    9. Re:Arguing over the subjective by pellik · · Score: 1

      Hurd luddites? I thought this was about the linux kernel.

    10. Re:Arguing over the subjective by Anonymous Coward · · Score: 0

      The implementation of OO in C++ is an abomination and everyone knows it.

    11. Re: Arguing over the subjective by sunderland56 · · Score: 1

      Linus got an abundance of coders and by far most are paid

      If this was a paid employee, then this is basically a boss-to-employee performance review. Would you be comfortable with *your* boss giving *you* scathing bad performance reviews, live on the internet?

    12. Re:Arguing over the subjective by Anonymous Coward · · Score: 0

      There is no problem that one can solve with object oriented design that cannot also be solved with structs and function pointers.

      There are some problems that can be solved with structs and function pointers which cannot be solved with object oriented design (without duplicate code).

      Object oriented programs, once compiled, do not perform faster than struct/function-pointer programs, and sometimes perform worse.

      The *only* advantage to object oriented design is more intuitive code organization, and that only within certain problem spaces.

    13. Re:Arguing over the subjective by lgw · · Score: 4, Funny

      There is no problem that one can solve with object oriented design that cannot also be solved with structs and function pointers.

      There is no problem that can be solved with structs and function pointers than cannot also be solved with raw assembly code, written directly to disk using a sector editor (or butterflies). But it's fucking stupid to choose such a non-productive way to code if you're doing it for a living (I recommend everyone does it once for fun, though).

      The *only* advantage to object oriented design is more intuitive code organization, and that only within certain problem spaces.

      Even if you never use inheritance or polymorphism (which certainly only makes sense for certain sorts of problems), putting your functions into the same namespace as the data they operate on is always going to make for cleaner code.

      That right there is a significant win for C++.

      For almost all kinds of problems, the fact that C++ destruction can automatically release resources, so you can safely return from anywhere in a function instead of having goto fail all over the place is a significant win for C++. Too many programmers are just hopeless at getting the "clean up everything before you exit the function" right 100% of the time.

      For code organization, sometimes C++ "concepts" (static polymorphism, so no function pointers) are a nice win. Questionable whether the many lines of code you can save justifies the fact that you're writing template code, however.

      The more you look, the more places you'll find clean little wins for C++, with no performance cost.

      --
      Socialism: a lie told by totalitarians and believed by fools.
    14. Re:Arguing over the subjective by Anonymous Coward · · Score: 0

      It's all Maxwell's Equations!

    15. Re:Arguing over the subjective by arth1 · · Score: 1

      Agreed.
      Putting a * at the start of a line means you can't reflow the comment after making changes to it, without the asterisks suddenly becoming part of the text. Use /* before and */ after, and no asterisks at the start of the line. Sorry, Linus, you got this one wrong.

    16. Re: Arguing over the subjective by Anonymous Coward · · Score: 0, Troll

      If you're the kind of employee so sensitive that a little public swearing makes you cry, then there's plenty of other less demanding jobs for you to take.

    17. Re:Arguing over the subjective by fahrbot-bot · · Score: 0

      Putting a * at the start of a line means you can't reflow the comment after making changes to it, without the asterisks suddenly becoming part of the text.

      Emacs can fill (reflow) comments with leading delimiters no problem. [ Use a real editor kid. :-) ]

      --
      It must have been something you assimilated. . . .
    18. Re:Arguing over the subjective by hcs_$reboot · · Score: 1

      Exactly. The syntax has two kinds of comments and that's for a reason.

      --
      Slashdot, fix the reply notifications... You won't get away with it...
    19. Re:Arguing over the subjective by cfalcon · · Score: 1

      C++ doesn't address the "goto fail" issue at all.

      If you have a list of things, each of which needs to be undone, and if a failure at any stage means you need to unwind the things prior to that, then "goto fail" is correct.

    20. Re:Arguing over the subjective by Ann+O'Nymous-Coward · · Score: 4, Informative

      I am so sick of that tired old pile of steaming crap. Just don't. It stopped being funny decades ago.

      Real programmers know that other programmers will have to support their code.

      Obey Wheaton's Law: Don't Be A Dick.

    21. Re: Arguing over the subjective by Anonymous Coward · · Score: 1

      That's scathing? You don't get out much do you? I think it was about as nice as it could be. He has to be firm and make his point clear. Being 'nice' does not work when it comes this sort of thing. You call it crap and leave it at that. I would be willing to bet cash this is not the first argument on the issue. He is usually pretty nice about it the first and second time. After that he just lays it out.

      He is not their 'boss'. He is the one who allows them the contribute to his source tree. He gets a bit of say.

    22. Re:Arguing over the subjective by Anonymous Coward · · Score: 0

      They probably aren't looking for mediocres and dilettantes like yourself.

    23. Re:Arguing over the subjective by Assmasher · · Score: 2

      The easiest distinguishing characteristic between a programmer and a software engineer - empathy for the people who have to test, maintain, document, and extend your code :).

      I've always been surprised that people don't consider them separate things (programmers and software engineers) - so maybe it's just me.

      --
      Loading...
    24. Re:Arguing over the subjective by sl149q · · Score: 2

      Hate to start an editor war, but vim has no trouble dealing with leading delimiters either.

      Get a real editor. Through out that IDE.

    25. Re:Arguing over the subjective by msauve · · Score: 5, Funny

      Emacs ... Use a real editor kid...

      "When I log into my Xenix system with my 110 baud teletype, both vi *and* Emacs are just too damn slow. They print useless messages like, 'C-h for help' and '"foo" File is read only'. So I use the editor that doesn't waste my VALUABLE time...Computer Scientists love ed, not just because it comes first alphabetically, but because it's the standard. Everyone else loves ed because it's ED!... When I use an editor, I don't want eight extra KILOBYTES of worthless help screens and cursor positioning code! I just want an EDitor!! Not a "viitor". Not a "emacsitor". Those aren't even WORDS!!!! ED! ED! ED IS THE STANDARD!!!"

      -Ed is the standard text editor.

      --
      "National Security is the chief cause of national insecurity." - Celine's First Law
    26. Re:Arguing over the subjective by Anonymous Coward · · Score: 0, Insightful

      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.

    27. Re: Arguing over the subjective by Midnight+Thunder · · Score: 1

      Real programmers know they might have to support their own code, that was developed 6 months earlier. Who knows what brainwave occurred and what was then quickly forgotten?

      --
      Jumpstart the tartan drive.
    28. Re:Arguing over the subjective by Anonymous Coward · · Score: 0

      No, it's not just you.

    29. Re: Arguing over the subjective by Anonymous Coward · · Score: 0

      Considering the results, if I rated one of Linus' profanity laced tirades, I'd say I very probably had it coming. (Which reminds me...need to pay attention with this one...don't want to re-trigger a tirade on this one and I may well be providing stuff to upstream soon...)

    30. Re: Arguing over the subjective by Anonymous Coward · · Score: 0

      Like Donald?

    31. Re:Arguing over the subjective by Jeremiah+Cornelius · · Score: 2, Interesting


      THIS is an ANUS:
      *

      THIS is an ANUS on SLASHDOT:
      *
      /.

      --
      "Flyin' in just a sweet place,
      Never been known to fail..."
    32. Re: Arguing over the subjective by Anonymous Coward · · Score: 0

      Well good on you it seems the social sausage machine known as college is still producing morons.

      Legible code is important because it helps others pickup where others have left off. It isn't about process it's about commonsense.

    33. Re:Arguing over the subjective by rtb61 · · Score: 1

      Linus has achieved Godhood status, Grump Old Dude, don't worry, we all go there, well, at least those of us who survive long enough. That's why the good die young, as you get old you get a bit crusty around the edges, just a fact of life ;D.

      --
      Chaos - everything, everywhere, everywhen
    34. Re: Arguing over the subjective by swillden · · Score: 1

      Linus doesn't pay them and isn't their boss. Their boss tells them it's their job to get the changes they want upstreamed into the kernel. Linus' job is to act as gatekeeper, to keep the code quality high... which includes demanding good, consistently-formatted comments.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    35. Re:Arguing over the subjective by Tough+Love · · Score: 1

      // double-slash comments are the one and only improvement that c++ gave us

      "Us" being the herd of luddites who did not learn object oriented programming in school and are too special to bother learning it now.

      Wow, luddites are out in force with mod points.

      --
      When all you have is a hammer, every problem starts to look like a thumb.
    36. Re:Arguing over the subjective by colinrichardday · · Score: 1

      Maxwell's Equations don't cover quantum computing.

    37. Re:Arguing over the subjective by mark-t · · Score: 1

      Agreed. Which is why it is best to write code whose functionality is self evident from the names of the functions it calls and identifiers it uses. If the code is clear, comments are superfluous, and largely unnecessary.

    38. Re:Arguing over the subjective by lgw · · Score: 3, Insightful

      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.
    39. Re: Arguing over the subjective by Anonymous Coward · · Score: 0

      What IDE *doesn't* handle this?

    40. Re:Arguing over the subjective by Dutch+Gun · · Score: 4, Informative

      C++ absolutely solves the "goto fail" issue. The term that describes this is RAII. C++ uses objects and smart pointers (which are just pointers wrapped in objects) to hold resources. When objects go out of scope, those resources are automatically destroyed. There's very little need to clean anything up manually with modern C++.

      --
      Irony: Agile development has too much intertia to be abandoned now.
    41. Re: Arguing over the subjective by Anonymous Coward · · Score: 0

      A hacker get the code to work... Lots of debugging and "neat tricks"...
      Software Engineers design it to work. (There is a difference and if you don't know what it is you are probably a hacker!)

    42. Re: Arguing over the subjective by Anonymous Coward · · Score: 0

      "Code quality high". Are you fracking kidding me! This is the Linux kernel we are talking about. The code is hacker crap!

    43. Re:Arguing over the subjective by Anonymous Coward · · Score: 0

      msauve's other preferences:
        - horse-drawn carriage for transportation
        - unleavened bread and mutton for breakfast, lunch and dinner
        - a cord of wood for a week's warmth
        - baking soda for teeth cleaning
        - newspaper for number twos

    44. Re:Arguing over the subjective by catmistake · · Score: 1

      With that kind of attitude, you'll never pass any software engineering practical exam, and thus never become legally licensed to practice software engineering in the civil, academic, corporate or industrial world. On the other hand, programmers never needed such things, will need no stinking license to practice ever, won't need tuition debt, and certainly don't need a stinking framed degree with a fake and insulting euphamism for "programmer" printed in fake caligraphy. Real software engineers are actually spoiled rich and bored programmers trying to prove something. Programmers simply program, otherwise they are not programmers, but hacks (not to be confused with 'hackers').

    45. Re:Arguing over the subjective by Killall+-9+Bash · · Score: 1

      // not everyone
      // comments the
      // same way
      /*
      * this is how i'm told to comment Java
      * UNCLEAN
      */

      --
      "Prediction: within 10 years, Windows will be a Linux distribution." Me, 7-6-2016
    46. Re: Arguing over the subjective by swillden · · Score: 2

      "Code quality high". Are you fracking kidding me! This is the Linux kernel we are talking about. The code is hacker crap!

      It's better to stay silent and have people think you a fool than to open your mouth and remove all doubt.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    47. Re:Arguing over the subjective by arth1 · · Score: 1

      Emacs can fill (reflow) comments with leading delimiters no problem. [ Use a real editor kid. :-)

      Yes, but does it know the difference between a leading delimiter and that character being there for a different purpose?

      /* Initialize to test vslue
      * foo = 42;
      */

      If your editor is broken and removes the * thinking it's a delimiter, you're the one with a problem, not the one making the comment. /* and */ were chosen in C because it was unlikely they would occur naturally. The pascal (* and Fortran * in column 1 were rejected precisely because they can occur naturally in a free-flow language like C.

    48. Re:Arguing over the subjective by Anonymous Coward · · Score: 0

      I just want an EDitor!! Not a "viitor". Not a "emacsitor". Those aren't even WORDS!!!! ED! ED! ED IS THE STANDARD!!!"

      I suspect that in fact you do want a "viitor". Ask google translate about it.

    49. Re: Arguing over the subjective by Anonymous Coward · · Score: 0

      Would you be comfortable...

      If I deserved it, I would have no problem. I don't take things personally. If I didn't deserve it, I would fight back. In the end we all come out better. And I've given plenty of bosses scathing reviews if they deserved them.

      For a successful technology, reality must take precedence over public relations, for Nature cannot be fooled. Richard P. Feynman

    50. Re:Arguing over the subjective by Megane · · Score: 2

      // double-slash comments are the one and only improvement that c++ gave us

      Why won't people accept the existence of C99 over 15 years later? (Microsoft has to be the worst offender about this, they refuse to support it in VS.)

      If you want to talk about Luddites, the anti-C99 Luddites are worse than the anti-C++ ones.

      --
      #naabhaprzrag, #sverubfr-000, #agi-fcbafberq, negvpyr[pynff*=' negvpyr-ary-'] { qvfcynl: abar !vzcbegnag; }
    51. Re:Arguing over the subjective by Hylandr · · Score: 1

      Just because it's hard to write doesn't mean you had more skill. It's usually the opposite. It's at least professional to let the maintainers know what the hell was going through the devs mind.

      --
      ~ People that think they are better than anyone else for any reason are the cause of all the strife in the world.
    52. Re:Arguing over the subjective by smallfries · · Score: 2

      Get a real editor. Through out that IDE.

      Can't decide if this a typo, bait fir the grammar nazis, or a clever reference to evil mode. Well played.

      --
      Slashdot: where don knuth is an idiot because he cant grasp the awesome power of php
    53. Re:Arguing over the subjective by Hylandr · · Score: 2

      Mature Voice of Experience speaking here:

      There's a difference, there really is.

      I'm in college

      And don't say this in public if you want to be taken seriously. Though in the context you wrote it in tells me it will only help until you open your mouth.

      --
      ~ People that think they are better than anyone else for any reason are the cause of all the strife in the world.
    54. Re: Arguing over the subjective by Anonymous Coward · · Score: 0

      Hell, *I* use it to pick up where I left off...

    55. Re: Arguing over the subjective by Anonymous Coward · · Score: 1

      We have someone like you in our team, so let me break you the bad news. You are a PITA. He does it because at the keyboard he's he's a two finger pecker, and a word saved is a minute gained.

      What's your excuse?

    56. Re:Arguing over the subjective by Guy+Harris · · Score: 1

      THIS is an ANUS: *

      That's not the word Vonnegut used.

    57. Re: Arguing over the subjective by Anonymous Coward · · Score: 0

      It wasn't as nice as it could be. Nice would not include name-calling.

    58. Re:Arguing over the subjective by Anonymous Coward · · Score: 0

      > euphamism

      Fail.

    59. Re: Arguing over the subjective by Anonymous Coward · · Score: 0

      Ahhh, and you think that back in the day we were taught those things?
      Back in my day they didn't really exist and you had to build them, if you think school is supposed to spoon feed you everything you need to do a job, you're wrong! School is supposed to give you the skills and the fundamental engineering knowledge that you can use to teach yourself further and most importantly how to analyse an issue they you then solve through software and or hardware.

    60. Re: Arguing over the subjective by Anonymous Coward · · Score: 0

      And what if you're writing low latency software with assembly intermixed? Nobody can see at a glance what's going on no matter how good they are.

      And what if your comment says one thing, but it's evident that the code does another? If there's no comment, you may use that code not expecting it to change, if there's a comment you know you should ping the author to clarify.

    61. Re: Arguing over the subjective by Anonymous Coward · · Score: 0

      There are times where a software engineer hacks in order to learn how to make the code work. Examples are when using other people's libraries.

      I've worked on multi-million line code bases where we made our own libraries to replace existing ones.

      Reasons :
      - Licenses (very common) as some licenses are just too restrictive and 5000 programmer hours costs less than 500 hours in court.
      - Memory management. Since neither C or C++ have good practices for memory management, instrumenting someone else's library (via hacking) to support our particular memory management environment would be less efficient than simply coding our own replacement.
      - Software engineering. When faced with spinning threads and designing new methods of serializing data across processes or threads to integrate a single threaded third party library or writing the same library over again to consume data packet by packet instead of object by object, the choice is based on hours. PDF libraries are an excellent example. It would take 10,000 man hours to reach beta of a new PDF decoder with engineered code. It will take 10 hours of hacked code to bottle up a library to "mostly work" in your own code. Of course, eventually, you would rewrite the PDF library since pretty much all of the publicly available ones are written by people who think RAM is infinite and only Windows/Linux/Mac matters. There are still many platforms lacking an MMU which means an entirely new memory manager has to be engineered to keep from fragmenting the hell out of the OS memory pools.

      So while I agree, engineered code is generally designed better. Sometimes real software engineers just have to hack.

    62. Re:Arguing over the subjective by Anonymous Coward · · Score: 0

      Hang-on, I am paid to work on Linux. It becomes annoying to redo patches for the upstream maintainers due to different maintainer groups use different styling. The networking is group is divergent from the other groups.

      Unfortunately, the kernel coding guidelines is so vague to be nearly useless. You find people using old style K&R....

    63. Re:Arguing over the subjective by donaldm · · Score: 1

      Putting a * at the start of a line means you can't reflow the comment after making changes to it, without the asterisks suddenly becoming part of the text.

      Emacs can fill (reflow) comments with leading delimiters no problem. [ Use a real editor kid. :-) ]

      I just had a 1980's Déjà vu flashback. :-)

      Next, we will be talking about the wonders of "Edlin" -- err let's not.

      --
      There ain't no such thing as proprietary standards only proprietary formats. Standards are by definition open.
    64. Re: Arguing over the subjective by Anonymous Coward · · Score: 0

      If one is paying an institution thousands of dollars a year to learn, then they better be taught something worthwhile, with substance. Anyone who tries hard enough can learn programming and various practices on their own; being taught formally should give you all the necessary skills and processes instead of half-assed nudges in what the staff *think* is the right direction. Why bother going to school if all they're going to do is give you hints? This is why computer science curricula are considered jokes.

      Captcha: indent

    65. Re: Arguing over the subjective by Anonymous Coward · · Score: 0

      Would you be comfortable with *your* boss giving *your team* scathing bad performance reviews, live on the internet?

      Fixed that for you. He did not target a single developer, but the whole team responsible for the component.

    66. Re:Arguing over the subjective by aethelrick · · Score: 1

      Comments are only superfluous in this situation if they are paraphrasing your code. Comments should document the code's intent not it's actions. Assume the reader knows little about the problem domain and document WHY your code is doing something not WHAT it is doing and then they'll always be useful to those who come after you (or yourself in 12 months)

    67. Re:Arguing over the subjective by Anonymous Coward · · Score: 0

      Over 90% of kernel development is paid for work...
      http://www.cnet.com/news/paid-developers-power-the-linux-kernel/

    68. Re:Arguing over the subjective by devent · · Score: 1

      For almost all kinds of problems, the fact that C++ destruction can automatically release resources, so you can safely return from anywhere in a function instead of having goto fail all over the place is a significant win for C++.

      Too bad that that's not true. Dtors cannot throw exceptions, that means that dtors are only useful for releasing memory resources.
      Dtors are useless for releasing anything else, because all other resources can throw an exception upon release.
      For example, for the classical file stream example Dtors are useless.


          ofstream myfile;
          myfile.open ("example.txt");
          myfile

      You see that the ofstream have a method close() and is not using the Dtors of C++. That's because see my point above.

      --
      http://www.mueller-public.de - My site http://www.anr-institute.com/ - Advanced Natural Research Institute
    69. Re:Arguing over the subjective by devent · · Score: 1

      RAII is only useful for pointers. Dtors cannot throw any exceptions, that means that RAII is useless for anything else. See my post above. A GC is a more elegant solution for memory management.

      --
      http://www.mueller-public.de - My site http://www.anr-institute.com/ - Advanced Natural Research Institute
    70. Re:Arguing over the subjective by devent · · Score: 1

      The Slashdot forum here is broken.
      ofstream myfile;
          myfile.open ("example.txt");
          myfile -- "Writing this to a file.\n";
          myfile.close();
          return 0;

      http://www.cplusplus.com/doc/t...

      --
      http://www.mueller-public.de - My site http://www.anr-institute.com/ - Advanced Natural Research Institute
    71. Re:Arguing over the subjective by silentcoder · · Score: 2

      Real programmers write code with cat and make changes with sed.

      If you have to use awk, you lose points.

      --
      Unicode killed the ASCII-art *
    72. Re:Arguing over the subjective by Anonymous Coward · · Score: 0

      Maybe. Ten years ago I wouldn't have but over the years I've seen him rant I have come to the conclusion that he is right most of the time.
      I would probably not take anything he says at face value but when he takes a stance like that there is often a very good reason for it even if he doesn't express it.
      There are reasons why Linus have been a so successful programmer and why his projects have a high quality. Code style is one of them.
      If Linus say that some method is better than another I'm not just going to throw that advice away, regardless of what language he uses.

    73. Re: Arguing over the subjective by Anonymous Coward · · Score: 0

      Yeah sure, he is right most of the time.

      Commenting styles can really irritate him, but he is ok with the abomination that is SystemD.

    74. Re: Arguing over the subjective by Anonymous Coward · · Score: 0

      And he should provide a link to the Linux Kernel code style standards document, and setup automation to enforce his standard before pull requests can be submitted.

      Ranting serves no purpose.

    75. Re:Arguing over the subjective by cmiller173 · · Score: 4, Funny

      I don't know about empathy but I try to live by -- "code/comment as if your code will be maintained by a psychopath who knows where you live."

    76. Re:Arguing over the subjective by Rob+Riggs · · Score: 1

      GC is unusable for real-time systems. Heck, dynamic allocation can be unusable for some systems. RAII provides deterministic behavior and timing. And if is useful for far more than memory allocation. Suggesting otherwise just demonstrates ignorance. Not throwing in destructors is rarely a limitation. GC has its place, but IMO it is overused in modern systems.

      No one memory allocation is better than another. They all have their place and it is a well-rounded professional that knows this.

      --
      the growth in cynicism and rebellion has not been without cause
    77. Re: Arguing over the subjective by nine-times · · Score: 1

      Well they're paid, but they aren't necessarily paid by Torvalds. I forget who are the big contributors. Redhat and IBM? Anyway, it's still a public project, and so he's making public statements about his style guide. I think if he were slightly less dickish about it, it would be fine.

    78. Re:Arguing over the subjective by AmiMoJo · · Score: 1

      "Goto fail" isn't an issue.

      --
      const int one = 65536; (Silvermoon, Texture.cs)
      SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
    79. Re: Arguing over the subjective by Anonymous Coward · · Score: 0

      Except that Linus isn't his boss. He probably works for some major company, anything from Apple, Google or Microsoft to MontaVista or WindRiver. When I worked for Ericsson there was some 300 engineers paid to develop the real time variant of Linux. None of them were hired by Linus or reported to him, though he did get say on if their work was accepted.

    80. Re: Arguing over the subjective by Anonymous Coward · · Score: 0

      He didnt name names.

    81. Re: Arguing over the subjective by Anonymous Coward · · Score: 0

      If their bosses are forcing them to deal with that kind of unprofessional abuse, then they very likely have good cases for labor grievances in a lot of countries.

      Somebody really ought to do a major fork out from under that asshole.

    82. Re:Arguing over the subjective by Anonymous Coward · · Score: 0

      ED?

      they make pills for that...

    83. Re: Arguing over the subjective by mark-t · · Score: 1

      I didn't say I don't write comments, I said comments should be theoretically unnecessary. They are an admission of failure on the part of the programmer that they have not made their code clear enough to be self-explanatory.

    84. Re:Arguing over the subjective by Assmasher · · Score: 1

      I like yours better. Conveys more with less, is clever and yet strikingly clear and understandable by everyone.

      --
      Loading...
    85. Re: Arguing over the subjective by Anonymous Coward · · Score: 0

      But it's not.

    86. Re: Arguing over the subjective by Anonymous Coward · · Score: 0

      If you have to comment what the code does, that's a failure. If you comment why it's done a certain way (specific business logic, standard format for data, the simpler way misses a known edge case, you're saving ten seconds per run with a low-level hack where that home actually matters, yadda yadda) then that's a useful comment.

    87. Re:Arguing over the subjective by luis_a_espinal · · Score: 2
      I'm going to lose the mod points I gave, but whatever...

      RAII is only useful for pointers. Dtors cannot throw any exceptions, that means that RAII is useless for anything else. See my post above.

      Dafuq? Are you serious?

      A GC is a more elegant solution for memory management.

      There are entire classes of problems for which a GC is not acceptable, not just in the embedded realm, but in the application/system/large memory realms. There are reasons why the Java VM provides for direct byte buffers or why .NET allows you to jump from managed code to un-managed code.

    88. Re:Arguing over the subjective by mark-t · · Score: 1

      Consider the following code snippet:

      // Check to see if the employee is eligible for full benefits
      if ((employee.flags & HOURLY_FLAG) && employee.age>65)
      ...

      vs

      if (isEmployeeEligibleForBenefits(&empoyee))...

      The comment in the former case is arguably neccessary to explain why the condition is there, but why becomes self-evident in the second case... because the function is already named something clear, a comment should not even be be necessary at the function definition, the prototype for which would look something like: bool isEmployeeEligibleForBenefits(employee_t *);

      Comments are useful for explaning intent behind design decisions, for example:

      int compareTwoElements(elem_t *lhs, elem_t *rhs)
      {
      if (is_string(lhs) && !is_string(rhs)) {
      return -1; // strings are less than everything else
      }
      ...
      }

      (Okay.... I tried using   to indent that cleanly.... not sure why they aren't showing up)

      Anyways.... my point is not that comments are never necessary, but more often than not they are used to clarify code that has not been written as clearly as it could have otherwise been. In my experience, comments still have their uses, but in practice, they are actually fairly few and far between.

    89. Re:Arguing over the subjective by sydneyfong · · Score: 1

      Perhaps you'll also learn not to take comments on Slashdot seriously.

      Seriously though, it's hard to believe *anything* taught in schools at all would be helpful (without proper interpretation). Different problems require different solutions and different processes, and not every solution / process fits the problem. So far, all the crap floating around claims it's the best thing since sliced bread, but they don't really tell you the context in which their solution works (and they probably don't have sufficient perspective to tell you anyway). Your professor in school is probably clueless as to their differences anyways, anyone who is intimately involved in real-world software projects don't have time to teach.

      That being said, before you dismiss the stuff in your textbook and lecture notes, be aware that a lot of the software processes are for *long term*, *medium-to-large scale* projects. Your weekend project doesn't have to follow those processes, and probably shouldn't. There is a difference between code monkeys writing "code" and somebody who understands the "software engineering stuff" as well. I wouldn't attempt to make serious distinctions between "programmers" and "software engineers" and what not. They're merely stupid labels. Most people fall between the extremes -- although these days, with everything becoming a software/data problem, people from non-software disciplines occasionally have to write programs, especially in the scientific/engineering fields. They might be able to cobble together something that works, but I wouldn't trust them to run a 10-man software project.

      --
      Don't quote me on this.
    90. Re:Arguing over the subjective by Anonymous Coward · · Score: 0

      >which are just pointers wrapped in objects

      Yuck. You rather wind up spattering your code across a bunch objects than use a "goto fail"-like organization for unwinding simple initialization? I'm with Linus on this one; that's just utterly brain-dead.

    91. Re:Arguing over the subjective by aethelrick · · Score: 1

      I see, understand (and even agree with parts of) the argument you're making in your original post above... "If the code is clear, comments are superfluous"; The trouble is that code is often not clear to the reader, and it's really hard for the writer to make a judgement call on the reader's behalf, as to what constitutes "clear". Therefore, I would always advise commenting the intent of code in case you get it wrong, and some poor guy with a different definition of "clear" has to fix it in the future. This way, he can read your commented intentions, compare them what the code actually does and have a chance of applying a working fix.

      Your conveniently simple example in the previous post would likely not require a comment, however, the code INSIDE of your isEmployeeEligibleForBenefits() method would likely need clear comments to explain why it works in the particular way it does.

    92. Re:Arguing over the subjective by lgw · · Score: 1

      Primitives don't throw exceptions. That's the whole point. (Streams are useless, not destructors.) fclose() doesn't have the concept of exceptions, nor do any of the C system libraries in any platform I've seen.

      Destructors for any non-trivial class should be empty (unless you have some debug logging etc). For a non-trivial class, the members will clean themselves up if needed, even if you throw from the constructor. No destructor needed.

      Don't put cleanup logic in some elaborate File class - like you say, that's useless. Put it in the file handle class, which is only a wrapper for FILE* or HANDLE or whatever on the platform.

      --
      Socialism: a lie told by totalitarians and believed by fools.
    93. Re:Arguing over the subjective by DCFusor · · Score: 2

      It's also moderately trivial to re-format comments in source using many available tools if one desires to do so. Some already-rolled ones, almost any language that supports regex, even, gawd, bash scripts with sed and awk etc can do this. If you don't like it that much, make a tool that fixes it. It ain't rocket surgery, it's a job for an otherwise boring afternoon. I don't recall any compiler whatever having an issue figuring out which of the input was comments. Go to town, how hard can it be?

      --
      Why guess when you can know? Measure!
    94. Re:Arguing over the subjective by luis_a_espinal · · Score: 1

      There is no problem that one can solve with object oriented design that cannot also be solved with structs and function pointers.

      There are some problems that can be solved with structs and function pointers which cannot be solved with object oriented design (without duplicate code).

      Concrete, non-trivial examples please.

    95. Re: Arguing over the subjective by mark-t · · Score: 1

      The funny thing is, however, those cases do not happen that often in practice

    96. Re:Arguing over the subjective by HeckRuler · · Score: 1

      The *only* advantage to object oriented design is more intuitive code organization,

      Code modules are .c and .h files in a folder. As packaged and organized as C++ classes. The namespace collision issue never seemed that big to me. If they collide, your naming scheme sucks. For the love of god don't name anything as generic as Init(). Names are important, in any language.

      There is no problem that one can solve with object oriented design that cannot also be solved with structs and function pointers.

      Yeah, that's called a Turing Tarpit. It's definitely possible, but you probably shouldn't do it.

      C is pretty terrible at making GUIs. The GTK can do it, but MAAAAAAN is it more of a chore than the C++ GUI makers. Which is so far the only place I've really seen OO shine. I've heard the mantra that it can be useful all over the place, but so far all I've seen is clusterfuck after clusterfuck.

    97. Re:Arguing over the subjective by almitydave · · Score: 3, Informative

      If you need to use < or > in your slashdot comments, you need to type &lt; and &gt; since slashdot interprets the < or > as marking HTML tags. If you have Notepad++, use TextFX Convert -> Encode HTML to automatically convert code samples, e.g.:

      #include <iostream>
      #include <fstream>
      using namespace std;

      int main () {
          ofstream myfile;
          myfile.open ("example.txt");
          myfile << "Writing this to a file.\n";
          myfile.close();
          return 0;
      }

      --
      my, your, his/her/its, our, your, their
      I'm, you're, he's/she's/it's, we're, you're, they're
    98. Re:Arguing over the subjective by bozzy · · Score: 1

      Good rule. Since at least the in short term, that psychopath will be you....

    99. Re:Arguing over the subjective by Anonymous Coward · · Score: 0

      Ditto! Double-slash is superior since you for debugging/development purposes can use /* // */ (NOT ACII-art btw), in order to refactor code quickly.

      Don't remember if gcc/C support // though, but when available I prefer double-slash (ie. C# supports both).

      Captcha: multiple

    100. Re:Arguing over the subjective by mysticgoat · · Score: 1

      Parent post makes a couple of good points. One of those could use a little sharpening:

      The critical difference is not between "programmer" and "software engineer". There are persons with good and bad practices in both camps.

      The critical difference is between "code monkey" and "strategic developer". A lot of self-labeled "programmers" are code monkeys who may sometimes be quite clever, but have not acquired the wisdom to do the elegant thing. A lot of newly credentialed "software engineers" are also mere code monkeys. Code monkeys have their place, and they can be quite productive, especially when they are put into closely managed environments where strategic developers set strict rules about comments, naming conventions, and styles. (cue "What Would Linus Do?")

      Strategic developers see beyond the limited vision of code monkeys. They are concerned with much more than developing a solution to the immediate coding problem; their vision and scope of action involves long term maintenance; ease of repurposing code to some other project; fitting the product into the target ecosystem of software, and so on. Software engineering curricula are intended to prepare students for this role, but of course they generally fail to do so: I doubt that there are any persons with brand new diplomas who can be entrusted with anything beyond a code monkey's role.

      That said, the general purpose of any college course is not to teach particular skill sets (like proper use of regexes, bash scripts, etc) but to encourage students to learn how to learn these skills. The good student will teach himself the necessary skills when he needs them. Instructors do not have to know the specific skill sets to present environments that challenge the student to learn how to learn. The details of how POSIX and PCRE regexes differ are not an appropriate subject; the reasons why Perl has its distinctive shape and feel, and the reasons why POSIX was brought into being should be touched on.

      It can be argued that persons with software engineering credentials are more likely to become good strategic developers. But that is not always the case, and it is also true that code monkeys with no formal training have often become good strategic developers.

    101. Re: Arguing over the subjective by Bongo · · Score: 1

      I'm only an amateur but I write comments to myself to explain not what it does but the intention behind it. For example, we picked 80% as a moderate amount of space to leave free before performance starts to suffer, but it could be anything from 70% to 90%.

    102. Re: Arguing over the subjective by mysticgoat · · Score: 2

      No, that's wrong.

      Good comments say in natural language what the code is intended to do, and what non-obvious reasons make it the way it is. The code in the programming language should be as readable as possible, but that does not negate the value of the comment. Both are needed for efficient bug hunting and validation.

    103. Re:Arguing over the subjective by robkeeney · · Score: 1

      You obviously have no working knowledge of C++. RAII is the answer which you are obviously ignorant of. "goto fail" is full of fail.

    104. Re:Arguing over the subjective by robkeeney · · Score: 1

      What are you talking about? That tutorial you linked to is crappy. The correct code there is

      int main()
      {
              ofstream myfile( "example.txt" );
              myfile << "Writing this to a file.\n";
              return 0;
      }

      The ofstream constructor opens the file for writing and the destructor takes care of flushing and closing the file.

    105. Re:Arguing over the subjective by mysticgoat · · Score: 1

      The *only* advantage to object oriented design is more intuitive code organization

      And that is one f*ckin' HUGE advantage.

      The biggest obstacle to writing good code efficiently is the coder's mind. The biggest costs associated with production and maintenance of software are wetware costs, not software, and not hardware. OOP makes more efficient use of our wetware than structured programming.

      While it is true that OOP is only appropriate in a smallish subset of the programming universe, that smallish subset encompasses more than 95% all of the business and commercial applications that ever were, are now, and ever will be.

    106. Re:Arguing over the subjective by OrangeTide · · Score: 1

      Yup, it's usually Linus's way or the highway.

      --
      “Common sense is not so common.” — Voltaire
    107. Re:Arguing over the subjective by segin · · Score: 1

      you just do what they say as if they were your employer paying you

      Considering that most of the kernel development these days (93% of commits, averaged annually, I believe, or a conservative estimate of 80% from the Linux Foundation) is done at the instruction of the employer that is paying the developers, and that company is aware of the rules for getting code upstreamed, then, by proxy, Linux and co. ARE their employer, in a way, since said employee is being paid to write code and do so to the specifications that Linux and co. lay out.

    108. Re:Arguing over the subjective by Anonymous Coward · · Score: 0

      Sorry, I don't act as if I'm getting paid when I am, in fact, not getting paid.

    109. Re:Arguing over the subjective by segin · · Score: 1
    110. Re:Arguing over the subjective by Cederic · · Score: 1

      Hmm. Jargon file and XKCD would disagree with you.

    111. Re:Arguing over the subjective by gzuckier · · Score: 2

      And if you didn't agree, would you have changed your stance or argued that he's a crackpot?

      last time I changed my stance, a Republican Senator smiled at me over the toilet stall partition.

      --
      Star Trek transporters are just 3d printers.
    112. Re:Arguing over the subjective by gzuckier · · Score: 2

      My code has tons of comments. I use them to deactivate big chunks of code I don't want to run right now.

      --
      Star Trek transporters are just 3d printers.
    113. Re: Arguing over the subjective by gzuckier · · Score: 1

      No, that's wrong.

      Good comments say in natural language what the code is intended to do, and what non-obvious reasons make it the way it is. The code in the programming language should be as readable as possible, but that does not negate the value of the comment. Both are needed for efficient bug hunting and validation.

      who here hasn't seen commenting of the form:
      /*adding a to b*/
      c=a+b;
      it's often more useful to tell you what you're not doing and why. /*you can't just use c from the database because it's often incorrect, so calculate it from scratch*/

      --
      Star Trek transporters are just 3d printers.
    114. Re:Arguing over the subjective by Anonymous Coward · · Score: 0

      The easiest distinguishing characteristic between a programmer and a software engineer - empathy for the people who have to test, maintain, document, and extend your code :).

      I've always been surprised that people don't consider them separate things (programmers and software engineers) - so maybe it's just me.

      a software engineer is the guy who drives the choo choo. whereas a programmer is somebody who makes TV shows. (explanation courtesy my 4 year old)

    115. Re:Arguing over the subjective by silentcoder · · Score: 1

      Like either ESR or Randal Munroe are real programmers :P

      --
      Unicode killed the ASCII-art *
    116. Re: Arguing over the subjective by Anonymous Coward · · Score: 0

      Viitor is the Romanian word for Future. Mwhahahahah.

    117. Re:Arguing over the subjective by Jeremiah+Cornelius · · Score: 1

      Thank you fir understanding that I was explicitly referencing "Breakfast of Champions".

      --
      "Flyin' in just a sweet place,
      Never been known to fail..."
    118. Re: Arguing over the subjective by mark-t · · Score: 1

      . /*you can't just use c from the database because it's often incorrect, so calculate it from scratch*/

      Indeed, and this is an example of what I would call a good comment. But what a code fragment does, and why, should ideally be so self-evidently clear from the function names that it calls and the names of the entities that it uses or manipulates that additional comments ought to hardly ever otherwise be required. Variable names and other identifiers can easily be long enough in modern languages to be descriptive about what the corresponding entity is and often why it exists at all that code which uses good naming practices from the ground up will rarely need any actual comments to explain them. With decent variable and identifier completion found in modern development environments, long variable names do not even have to be the source of typographical errors.

      I mentioned this example in another comment, but I'm particularly fond of it because it illustrates an important aspect of how comments are used.

      Consider the following conditional statement:

      if ((employee.flags & HOURLY_FLAG) && (employee.age > 65)) ...

      Now by itself, this isn't very clear, so it might need a comment above it:

      // Check to see if the employee is eligible for full benefits
      if (!(employee.flags & HOURLY_FLAG) && (employee.age > 65)) ...

      Okay, so now it is more obvious what the conditional is there for, but this can be refactored to eliminate the comment completely:

      if (employee.isEligibleForBenefits()) ...

      So now the conditional is clear without a comment.

      So what about the logic of isEligibleForBenefits? Wouldn't that still need some comments? Well, first of all, in the implementation of the 'isEligibleForBenefits', you don't need a redundant comment explaining that it tells you whether the employee is eligible for benefits because the function name itself already tells you that. Secondly, one could refactor its logic as follows:

      bool Employee::isEligibleForBenefits() const
      {
      return !this->isPaidHourly() && this->isLegalSenior();
      }

      Where isPaidHourly and isLegalSenior are both bool functions that simply return results like what was given in the two conditions above. Since the name of each function describes what is appropriate condition is for, and they are individually very simple one-line functions whose purpose is obvious from the name and behavior is so immediately self-evident from the simplicity of the code that there is no need to add any further comments.

      And by adding 'inline' to each these function definitions, you aren't even incurring the runtime penalty of a function call... any respectable optimizing compiler will make it efficient, and the resulting code is just as readable, arguably moreso, and without a single comment in the bunch.

      One might be compelled to ask if it would not be easier to just add a one-line comment to the original than to bother with all of that refactoring.

      To that I would say undoubtably... but the remaining problem with comments is that they can lie. Code can easily evolve from its original implementation, and where the changes at each iteration are individually so tiny that one does not necessarily remember they need to also update the comment... especially if different stages of the modification are being done separately by many people over a course of many months. Since compilers rarely check comments for semantic validity, you may be left with the documentation of your code found in the comment reflecting something other than what the code actually does, potentially costing the developer who must maintain it far more

    119. Re: Arguing over the subjective by Anonymous Coward · · Score: 0

      10,000 hours for a pdf decoder from the ground up? Jesus Christ that is incompetent.

    120. Re:Arguing over the subjective by wertigon · · Score: 0

      You are aware // are not legitimate C comments right?

      (But they are legitimate C++ comments and many C++ compilers also compile C code)

      --
      systemd is not an init system. It's a GNU replacement.
    121. Re:Arguing over the subjective by GLMDesigns · · Score: 1

      Is there a middle ground between changing behavior and considering him to be a crackpot?

      Best is to come up with an agreed upon style. It's like driving on the right-side or left-side of the road. There is no objective "better" but it helps if we all drive in the same way.

      Re comments: pick a standard and go with it. It makes things easier to scan and legibility counts.

      --
      If you're scared of your govt then you need to further restrict its powers
      Vote 3rd Party in 2016 and beyond
    122. Re:Arguing over the subjective by Anonymous Coward · · Score: 0

      I'm still partial to

      C
      C THIS IS A MULTIPLE-LINE COMMENT
      C

      and

      C THIS IS A SINGLE-LINE COMMENT

    123. Re:Arguing over the subjective by phorm · · Score: 1

      You can also see a graph of the curse-word count here (also includes "Penguin")

    124. Re:Arguing over the subjective by Anonymous Coward · · Score: 0

      // double-slash comments are the one and only improvement that c++ gave us

      Not even nullptr? It's pretty nice having a null pointer literal that does not have implicit conversion to intergral types.

    125. Re: Arguing over the subjective by MichaelJackson123 · · Score: 1

      Linus doesn't pay them and isn't their boss. Their boss tells them it's their job to get the changes they want upstreamed into the kernel. Linus' job is to act as gatekeeper, to keep the code quality high...

      Well, you can't deny the fact that Linux has some problems. Even Linus Torvalds, Andrew Morton, Con Kolivas and other Linux kernel developers say so: https://en.wikipedia.org/wiki/...

    126. Re:Arguing over the subjective by devent · · Score: 1

      Yes, and that's the problem. Then flush() will throw an exception because (for example) the disk was full, your program will just exit and the user's data are gone. In reality, you should write something like

                      ofstream myfile( "example.txt" );
                      myfile -- "Writing this to a file.\n";
                      ofstream flush(); // catch exception, warn the user, maybe try a redo
                      ofstream close(); // catch exception, warn the user
                      return 0;

      --
      http://www.mueller-public.de - My site http://www.anr-institute.com/ - Advanced Natural Research Institute
    127. Re:Arguing over the subjective by devent · · Score: 1

      Dafuq? Are you serious?

      Yes. See my argument above. Dtors cannot throw any exceptions, hence they are only useful for memory resources, i.e. resources that can't throw exceptions. For all the other resources, i.e. 99% of them, dtors are useless and RAII a serious design flaw.

      --
      http://www.mueller-public.de - My site http://www.anr-institute.com/ - Advanced Natural Research Institute
  6. Linus the man-child by Anonymous Coward · · Score: 1, Interesting

    What happened in his childhood to arrest his development? Any shrinks in the house?

    1. Re:Linus the man-child by Anonymous Coward · · Score: 3, Insightful

      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.

    2. Re:Linus the man-child by RightSaidFred99 · · Score: 0, Flamebait

      Yeah, he's just some lucky dummy who luckily wrote the Linux kernel.

      You can be reductionist about any success or failure of a human being as "luck", good or bad. It's pointless, like hypothesizing that our reality is a simulation.

    3. Re:Linus the man-child by paraax · · Score: 3, Insightful

      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.

    4. Re:Linus the man-child by tnk1 · · Score: 1

      He did have an opportunity, which can be almost entirely luck.

      However, no one is really lauded for getting an opportunity, or we'd all admire Paris Hilton for being born rich.

      Linus was prepared to take advantage of the opportunity that arose. And that is something you *can* prepare for, if by simply working to be good at what you do, and putting in the work to make something.

      Linus did something. Admittedly, if Linus didn't, someone else would have, but they'd still have had to have done what Linus did in order to take advantage of the opportunity. We can admire the work and the commitment to the project while accepting that there are people out there who might have put in a similar amount of work, but never see any recognition.

      And that, friends, is why you should never set out to work on something merely to take advantage of some opportunity that you think might make you rich or famous, you should work on something because you enjoy it, or you think it fulfills a need for something that you think is lacking. Then you never really feel cheated by luck, because you weren't counting on luck to make the work worthwhile in the first place.

    5. Re:Linus the man-child by Archangel+Michael · · Score: 4, Interesting

      “Luck Is What Happens When Preparation Meets Opportunity" - Seneca

      If you're not prepared for opportunity, and someone else is, you call them "lucky". Probably because you were too busy with Pokemon Go!

      --
      Agent K: A *person* is smart. People are dumb, stupid, panicky animals, and you know it.
    6. Re:Linus the man-child by Anonymous Coward · · Score: 0

      Yeah, he's just some lucky dummy who luckily wrote the Linux kernel.

      The last time I compiled the kernel was around 2.6. I wonder how much of that was Linus's own work...

    7. Re: Linus the man-child by Anonymous Coward · · Score: 0

      How do Torvald's balls taste?

    8. Re:Linus the man-child by Anonymous Coward · · Score: 0

      I admire Paris Hilton... for about 30 seconds... then I rapidly lose interest and reach for the tissues

    9. Re:Linus the man-child by serviscope_minor · · Score: 1

      The opportunity presenting itself is, however, luck.

      There are people out there every bit as capable and productive as Linus, if not more, but the projects they happened to work on didn't have the same opportunity for scaling in the same way. Fabrice Bellard, for example.

      I've watched a lot of people go through academia. All the ones of interest for this discussion were very smart, very hard working, dedicated to their careers and so on and so forth. All of them had the preparation of which you speak. Only a few ended up with the opportunity in the end.

      This is not to discount those who succeeded of the people I know well every one was fully deserving of the success and did very well to get it. But to discount luck also does a disservice to those many people every bit as good who simply didn't have the luck.

      --
      SJW n. One who posts facts.
    10. Re: Linus the man-child by Anonymous Coward · · Score: 0

      How do Torvald's balls taste?

      Like chicken

    11. Re:Linus the man-child by TheRaven64 · · Score: 1

      He didn't write most of the Linux kernel. He wrote a really crappy kernel, which had the advantage of being the only free option for a UNIX-like system on commodity hardware (MINIX was quite expensive and not permissively licensed yet, BSD was mired in the AT&T vs UCB lawsuit, which delayed the i386 port). Other people picked it up, fixed the worst bits, and ran with it. Linus has continued to work on it, but at this stage I don't think he's even the largest single contributor, let alone responsible for more than half of the code. He was very lucky to release a kind-of-working thing at the time when there were a bunch of talented people who would prefer to improve something than start from scratch.

      --
      I am TheRaven on Soylent News
    12. Re:Linus the man-child by Archangel+Michael · · Score: 1

      As a personal note, I've seen my share of "opportunities" in which I was not prepared. I've even seen some opportunities where I was prepared, but went to someone who wasn't prepared, because they had a better "personality" than I did, and those opportunities died.

      I dare say, that most people miss opportunities they are presented with, even if they are "prepared" for them because of some other reason (gumption, ethics, lack of ass kissing etc). I've seen "average" people, who work harder than "talented" ones, do better with less talent, simply because they work harder.

      There are a lot of circumstances to success, and putting everything together doesn't ensure success. People call that "luck". I call it .. not everyone can be a rock star. Is it fair? Life itself isn't fair. Call it luck. ;)

      --
      Agent K: A *person* is smart. People are dumb, stupid, panicky animals, and you know it.
    13. Re:Linus the man-child by ultranova · · Score: 1

      What happened in his childhood to arrest his development? Any shrinks in the house?

      Probably nothing. Lots of people are some degree of asshole and act out as soon as the society stops leaning on them to force them to behave. It's the motivation behind every rant against political correctness, for example, and you see how common those are.

      --

      Forget magic. Any technology distinguishable from divine power is insufficiently advanced.

    14. Re:Linus the man-child by luis_a_espinal · · Score: 1

      “Luck Is What Happens When Preparation Meets Opportunity" - Seneca

      If you're not prepared for opportunity, and someone else is, you call them "lucky". Probably because you were too busy with Pokemon Go!

      Bullshit regardless of which historical luminary said it.

      What happens when preparation never meets opportunity?

      Or what happens when the likes of Paris Hilton or Kim Kardashian are born in wealth.

      Luck is luck, a simple opportunity window that blesses equally the prepared as well as the one who (if you forgive the repetition) was born in luck.

      People who quote Seneca do so to dismiss that luck is a real, determining factor.

    15. Re:Linus the man-child by RightSaidFred99 · · Score: 0

      He did write most of the Linux kernel at the time it became wildly popular, of course. What are you carrying on about?

    16. Re:Linus the man-child by RightSaidFred99 · · Score: 0

      Yes, because the Linux kernel was barely popular by the time 2.6 rolled around, right? Good god, so many dummies.

    17. Re:Linus the man-child by Archangel+Michael · · Score: 1

      If "Fame" is your only measure of success, then I guess "luck" has everything to do with it.

      Why didn't you mention Nikki Hilton? Because she isn't famous (media)

      And Kim Kardashian is famous for two things, sex video, and being the daughter of the attorney for OJ Simpson. Everything she's done since then is milked the opportunity she was given. And why didn't you mention Kloe? Because she isn't nearly as famous (media)

      Linus was in the right place, with the right tools, with the right attitude with the right licensing to make Linux work. Linux WOULD have been invented otherwise, and it might not have been as successful, but for Linus and his abrasive personality driving to make Linux better.

      I don't dismiss luck. Was Holly Holm Lucky when she knocked Rhonda out? OR was it hard work and opportunity ? Or are those the same thing?

      --
      Agent K: A *person* is smart. People are dumb, stupid, panicky animals, and you know it.
    18. Re:Linus the man-child by Anonymous Coward · · Score: 0

      Nice try but everyone here know I was busy fucking your mom. You could say I was playing Pokeyermom Ho.

    19. Re:Linus the man-child by luis_a_espinal · · Score: 1

      If "Fame" is your only measure of success, then I guess "luck" has everything to do with it.

      No. It is not *my* only measure of success. It is one of the different measures that society and humanity measure success. Nice way to misread my comment though.

    20. Re:Linus the man-child by Archangel+Michael · · Score: 1

      I don't measure success by media attention. Lots of people are very successful without it. It is a horrible gauge. I didn't misread your comments, I read them fine. I completely read them, understood them, and explained why they weren't in my world view. When you give two examples, both "media darlings" whose claim to fame are SEX TAPES, then yeah, I can only draw one conclusion ;-)

      --
      Agent K: A *person* is smart. People are dumb, stupid, panicky animals, and you know it.
    21. Re:Linus the man-child by TheRaven64 · · Score: 1

      Even that's not really true. By the late '90s, most of the code had been written by other contributors and I wouldn't say that Linux became 'wildly popular' until then, or possibly even the early 2000s.

      --
      I am TheRaven on Soylent News
  7. I'm with Linus by wardk · · Score: 1

    those first two examples are hideous. I guess before I comment more I should read the article?

    1. Re:I'm with Linus by Anonymous Coward · · Score: 0

      those first two examples are hideous. I guess before I comment more I should read the article?

      "read the article"? You must be new here!

    2. Re: I'm with Linus by Anonymous Coward · · Score: 0

      You, dear Sir, totally failed to spot the humor in his post. You must be new on /., enjoy your stay.

    3. Re: I'm with Linus by Anonymous Coward · · Score: 0

      Sir, totally failed to spot the humor in his post

      He might, or you might've missed his meta sarcasm, just check OP's uid

  8. Torvalds Must Die! by Bruce+Perens · · Score: 4, Funny

    Linus has been known as an acerbic and rude individual, but he's never dared to touch the sacred unbalanced comment before. He's gotten bolder as we've taken his stuff. We really should have held the line, called an end to it before now. This is what we get for pandering to him.

    It's too late to simply eject him from kernel development. We can't have him hectoring us from the sidelines. I'm afraid that we must entirely erase Linus Torvalds from the noÃsphere.

    Think of it as evolution in action!

    rot13: whfg xvqqvat

    1. Re:Torvalds Must Die! by Anonymous Coward · · Score: 0

      What's the noÃsphere?

    2. Re:Torvalds Must Die! by thesupraman · · Score: 1

      rot13: V frr jung lbh qvq gurer, jbbfu.

    3. Re:Torvalds Must Die! by AmiMoJo · · Score: 1

      I feel like everyone is over-reacting. It's not like someone suggested using spaces instead of tabs.

      On matters of style I'm inclined to follow Linus. He predicted the dominance of widescreen monitors years before they became popular, with his insistence that tabs be 8 characters wide.

      --
      const int one = 65536; (Silvermoon, Texture.cs)
      SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
    4. Re: Torvalds Must Die! by Bruce+Perens · · Score: 3, Funny

      Dare you to support the wretched Torvalds, infidel! You shall reap the consequences. Those who are not for us are against us! Witness my horde of angry hackers. That is, for the moment that you can...

    5. Re:Torvalds Must Die! by Anonymous Coward · · Score: 0

      hectoring from the sidelines?

    6. Re:Torvalds Must Die! by LWATCDR · · Score: 1

      Frankly I would love to see Linus have to actually deal with the real world sometime. If the biggest problem you have are unbalanced comments then you are living a charmed life.

      --
      See my blog http://ilovecookes.blogspot.com/ for light hearted technical information.
    7. Re:Torvalds Must Die! by Bruce+Perens · · Score: 2

      It's noösphere, except that Slashdot doesn't understand unicode. Jeez, what century do they think we're in. Anyway, it looks funnier the way it came out, sort of like "no ass sphere", which by definition would be a place free from Linus Torvalds :-)

    8. Re:Torvalds Must Die! by sanosuke001 · · Score: 1

      tabs are 3 characters wide and insert 3 spaces instead of 1 tab character. even on my 4k monitor. he can go to hell if he ever asks for 8 character tabs

      --
      -SaNo
    9. Re:Torvalds Must Die! by Areyoukiddingme · · Score: 1

      What's the noÃsphere?

      It was the noösphere before Slashdot got a hold of it. A word some pretentious asshole thought up to refer to the universe of ideas. Maybe when there are humans living on some other sphere besides Earth it will be a useful distinction. You could talk about the Earth noösphere and the Mars noösphere. Until then, it's just a molestation of two perfectly innocent Greek words. Or in Bruce's case, ferocious sarcasm.

    10. Re:Torvalds Must Die! by Areyoukiddingme · · Score: 2

      hectoring from the sidelines?

      What? It's a verb. Hey, when you're using weapons-grade sarcasm and words like noösphere, a little word like hectoring has to fend for itself.

    11. Re:Torvalds Must Die! by Megane · · Score: 1

      He predicted the dominance of widescreen monitors years before they became popular, with his insistence that tabs be 8 characters wide.

      But lines are still limited to 80 characters?

      --
      #naabhaprzrag, #sverubfr-000, #agi-fcbafberq, negvpyr[pynff*=' negvpyr-ary-'] { qvfcynl: abar !vzcbegnag; }
    12. Re:Torvalds Must Die! by raynet · · Score: 1

      No no no, tabs should always insert a tab character, that way every single person reading the source can set the indent to something they prefer. For me that happens to be 2 spaces or 4, depending on language.

      --
      - Raynet --> .
    13. Re:Torvalds Must Die! by MichaelSmith · · Score: 1

      This is the problem: Torvalds has never had an actual, paying job with a boss to answer to.

    14. Re:Torvalds Must Die! by mlw4428 · · Score: 1

      I will not sacrifice my comment style. He complains and we relent. He demands standards and we conform. He assimulates thousands of developers and we kowtow .The line must be drawn here, this far no further. And I will make him PAY for what he's done! I WILL BRING ABOUT BASIC COMMENT SYNTAX REM.

    15. Re: Torvalds Must Die! by Anonymous Coward · · Score: 0

      Eight column tabs are inherited from 19th century typewriters to assist in creating tables (there's a hint in the name). However wide monitors are now eight column tabs and wide screens compromise readability. Information rich print sources have limited column width for this reason.

      I can see some logic for supporting eight column tabs as some editors have this as the default but since it's pretty easy these days to reformat source and replace them with spaces which will display appropriately in legacy editors. The edge case might people not editing code using monospace fonts, but I suspect that's fairly rare.

    16. Re:Torvalds Must Die! by LWATCDR · · Score: 1

      So he is like Donald Trump.

      --
      See my blog http://ilovecookes.blogspot.com/ for light hearted technical information.
    17. Re:Torvalds Must Die! by MichaelSmith · · Score: 2

      Ah no I didn't mean to imply that Linus is a steaming pile of dogshit masquerading as a wannabe politician.

  9. So, the kernel is done? by Anonymous Coward · · Score: 1

    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.

    1. Re:So, the kernel is done? by quantaman · · Score: 3, Insightful

      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
    2. Re:So, the kernel is done? by Anonymous Coward · · Score: 0

      You young whippersnappers don’t know how good you have it. In my days, we didn't have time or space for comments! Sometimes we splurged on variable names and used more than one character!

    3. Re:So, the kernel is done? by Anonymous Coward · · Score: 1

      "Hard-to-read comments make hard-to-read code"

      This isn't about hard to read comments, it's about comment format that someone doesn't like. I can read the "crap" comments as easily as I can read the good ones, I'm not brain-dead. It's more about a visual style preference.

      And we wonder why people don't like the open source community? They resort to petty insults and swearing to make points, and I am supposed to devote my free time to supporting the projects? Give me a break. If I wanted to be subjected to name calling I would go back to High School or jump into an FPS.

    4. Re:So, the kernel is done? by Anonymous Coward · · Score: 0

      Year of Linux on the desktop? That's been every year since around 1998, hasn't it?

    5. Re:So, the kernel is done? by DidgetMaster · · Score: 1

      That's nothing. I once had to debug some code written by someone who recycled variable names. Variable x meant something at the start of the loop but was assigned to mean something completely different later on. He was treating the variable name like a register where it contains whatever value you last put into it. Needless to say, the code was very hard to follow.

    6. Re:So, the kernel is done? by quantaman · · Score: 2

      "Hard-to-read comments make hard-to-read code"

      This isn't about hard to read comments, it's about comment format that someone doesn't like. I can read the "crap" comments as easily as I can read the good ones, I'm not brain-dead. It's more about a visual style preference.

      And I've worked on large proprietary projects, and finding code with random inconsistent styles is ugly and a massive PITA, and it does take up time when you're trying to figure out unfamiliar code and you're spending extra brainpower picking out comments.

      It's not even that one commenting style is fundamentally more readable (but I think Linus's suggestions are slightly more readable, and on a big project that matters). But having a consistent style throughout the project is very important.

      And we wonder why people don't like the open source community? They resort to petty insults and swearing to make points, and I am supposed to devote my free time to supporting the projects? Give me a break. If I wanted to be subjected to name calling I would go back to High School or jump into an FPS.

      Agreed, Linus's "management" style could certainly use a loss less swearing and insults.

      --
      I stole this Sig
    7. Re: So, the kernel is done? by Anonymous Coward · · Score: 0

      Solution: deny pull requests from poorly formatted comments.
      Put in the reason: does not follow project format guidelines.

      If they keep doing it, then revoke pull request privs.

      Don't accept the code, and then send a pissy email to a list complaining about it.

    8. Re:So, the kernel is done? by Oligonicella · · Score: 1

      "or jump into an FPS" - LOL Truer words...

    9. Re:So, the kernel is done? by dbIII · · Score: 1

      That used to happen a lot.
      Add in undeclared variables typed by filename (if it starts with K it is an integer) for extra fun.

  10. The ORIGINAL picture used by TheReg was this by Anonymous Coward · · Score: 0

    https://regmedia.co.uk/2015/07...

    in case you have yet to see it. ElReg changed it after Linus roasted them alive!

    1. Re:The ORIGINAL picture used by TheReg was this by Bruce+Perens · · Score: 2

      I guess he doesn't like to be seen picking his nose :-)

  11. Whom The Gods Destroy... by RobotRunAmok · · Score: 1

    ...they first cause comment syntax to twist their panties into a bunch.

    1. Re:Whom The Gods Destroy... by perpenso · · Score: 1

      ...they first cause comment syntax to twist their panties into a bunch.

      Huh, I thought it was tabs vs spaces first, comment formatting second.

    2. Re:Whom The Gods Destroy... by Tough+Love · · Score: 1

      ...they first cause comment syntax to twist their panties into a bunch.

      Huh, I thought it was tabs vs spaces first, comment formatting second.

      80 character lines.

      --
      When all you have is a hammer, every problem starts to look like a thumb.
    3. Re:Whom The Gods Destroy... by perpenso · · Score: 3, Interesting

      ...they first cause comment syntax to twist their panties into a bunch.

      Huh, I thought it was tabs vs spaces first, comment formatting second.

      80 character lines.

      I thought we all agreed to set our terminal windows to 120 characters?

    4. Re:Whom The Gods Destroy... by Anonymous Coward · · Score: 2, Funny

      I code and write on Windows, would it kill you penguin lovers to include a CR with your LFs?

    5. Re:Whom The Gods Destroy... by Anonymous Coward · · Score: 0

      Write Visual Basic code to do it for you.

    6. Re:Whom The Gods Destroy... by Anonymous Coward · · Score: 0

      Yes

    7. Re:Whom The Gods Destroy... by Anonymous Coward · · Score: 0

      I code and write on Windows, would it kill you penguin lovers to include a CR with your LFs?

      learn how to use dos2unix and unix2dos, dipshit!

    8. Re: Whom The Gods Destroy... by Anonymous Coward · · Score: 0

      I thought it was 132 columns?

    9. Re:Whom The Gods Destroy... by Megane · · Score: 1

      I code and write on OS X, would it kill you penguin lovers to respect case-insensitive filesystems?

      --
      #naabhaprzrag, #sverubfr-000, #agi-fcbafberq, negvpyr[pynff*=' negvpyr-ary-'] { qvfcynl: abar !vzcbegnag; }
    10. Re:Whom The Gods Destroy... by Anonymous Coward · · Score: 0

      Please remind me how i configure my trusty old VT520 for 120 character wide lines.

    11. Re:Whom The Gods Destroy... by powerlord · · Score: 1

      They're just jealous that OSX^H^H^HmacOS has finally brought *NIX to average the averagehome user's desk^H^H^H^Hlaptop.

      --
      This space for rent. All reasonable inquiries will be entertained at proprietors discretion.
    12. Re:Whom The Gods Destroy... by luis_a_espinal · · Score: 2

      ...they first cause comment syntax to twist their panties into a bunch.

      Huh, I thought it was tabs vs spaces first, comment formatting second.

      80 character lines.

      I thought we all agreed to set our terminal windows to 120 characters?

      The only people who do that are the ones who do not run side-to-side diffs. Have mercy on the people who have to run diffs while fixing your bugs and stick to 80 character lines.

    13. Re:Whom The Gods Destroy... by Anonymous Coward · · Score: 0

      To configure: Throw your old piece of shit in the garbage. Buy a modern machine. The end.

    14. Re:Whom The Gods Destroy... by Anonymous Coward · · Score: 0

      ...they first cause comment syntax to twist their panties into a bunch.

      Huh, I thought it was tabs vs spaces first, comment formatting second.

      80 character lines.

      72 character lines. plus 8 for sequence numbers

    15. Re:Whom The Gods Destroy... by Anonymous Coward · · Score: 0

      Why aren't you using Meld or a real difftool instead of side-by-side horribleness.

      Also it's either 80 or 132 there are not other valid choices according to the original terminals (DEC VT102!!! my first Internet terminal!!!)

  12. please just go all the way to the C++ mode by vux984 · · Score: 5, Insightful

    Seeing as 'C++ mode' // comments were added to the C99 spec; this would be my preference. I've always hated all forms of /* */

    1. Re:please just go all the way to the C++ mode by etinin · · Score: 2

      Is this even allowed in kernel code? I'm curious.

      --
      "I decided I could write something better than everything out there in two weeks. And I was right." - Linus Torvalds
    2. Re:please just go all the way to the C++ mode by Anonymous Coward · · Score: 0

      Yes, read original Linus'message.

    3. Re:please just go all the way to the C++ mode by TeknoHog · · Score: 1

      /* I wonder why the plainest possible comment format is not mentioned. After all, you only need the start and end markers because C does not care about line breaks. If you're going to pretend that line breaks have any significance in comments, with those cute asterisks in the beginnings of lines, then you might as well use the linebreak-sensitive C++ comment style. */

      # Or *gasp* switch to a language where line breaks matter in the actual
      # code too, so you can avoid typing and reading all that line noise.

      --
      Escher was the first MC and Giger invented the HR department.
    4. Re:please just go all the way to the C++ mode by Anonymous Coward · · Score: 3, Informative

      I use // for comments, and /* for disabling block of code.

    5. Re:please just go all the way to the C++ mode by bloodhawk · · Score: 1

      must say for a change I actually whole hearted agree with Torvalds, the style of commenting he is complaining about is a horrible method, much prefer the C++ mode myself.

    6. Re:please just go all the way to the C++ mode by mattventura · · Score: 1

      Am I the only one who wishes languages had different semantics for disabling code versus actual comments? Sometimes it's nice to have, plus it helps avoid the issue of having a block of code with a /* */ comment in it, then putting another /* */ around that block of code to disable it, only to find out that the first */ closed the outer comment.

    7. Re:please just go all the way to the C++ mode by Anonymous Coward · · Score: 0

      The latter having no place in a code repository.

      Given decent editors handle this stuff automatically, I don't see the problem. Oh wait, everyone uses ed or, perhaps cat, so that's not an option (cos they are too l33t for tools that help)

    8. Re:please just go all the way to the C++ mode by tlhIngan · · Score: 5, Informative

      Am I the only one who wishes languages had different semantics for disabling code versus actual comments? Sometimes it's nice to have, plus it helps avoid the issue of having a block of code with a /* */ comment in it, then putting another /* */ around that block of code to disable it, only to find out that the first */ closed the outer comment.

      C does this quite well.

      Use

      //

      and

      /* */

      for textual comments.

      Use

      #if 0
      ....
      #endif

      for code comments.

      Bonus is many editors recognize the #If 0 idiom and automatically block-comment the code out!

      And the preprocessor is self-balancing, so every #if must have a corresponding #endif making it ideal for commenting out blocks of code.

    9. Re:please just go all the way to the C++ mode by Anonymous Coward · · Score: 0

      #if 0 is what I use to disable code.

    10. Re:please just go all the way to the C++ mode by Anonymous Coward · · Score: 0

      One of many things the D programming language did. Shame it didn't catch on more.

    11. Re:please just go all the way to the C++ mode by etinin · · Score: 1

      Might've been sarcasm as well... Linus's messages are (sometimes deservedly) full of it.

      --
      "I decided I could write something better than everything out there in two weeks. And I was right." - Linus Torvalds
    12. Re:please just go all the way to the C++ mode by Anonymous Coward · · Score: 0

      It is... read his message!

    13. Re:please just go all the way to the C++ mode by Oligonicella · · Score: 1

      It's not about the machine, it's about the human. They may not have much significance in a one sentence comment but they certainly have significance in a long (what should be) multi-paragraph one.

    14. Re:please just go all the way to the C++ mode by Bruce+Perens · · Score: 1

      Walter is a smart guy, I remember using his Zortech C++ on a PC project when I was at Pixar. It might have gotten farther if he'd been working at the right place when he started it. Symantec was definitely the wrong place.

    15. Re:please just go all the way to the C++ mode by Trogre · · Score: 1

      What's wrong with /*
        * A comment
        * block
        */
      for blocks and // for single or partial lines:
      int selection // Which menu option has been selected

      --
      "Nine times out of ten, starting a fire is not the best way to solve the problem." - my wife
    16. Re:please just go all the way to the C++ mode by swillden · · Score: 2

      Use

      #if 0
      ....
      #endif

      for code comments.

      Nah, don't comment out or ifdef out code. Just delete it. If you need to bring it back later, that's what version control is for.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    17. Re:please just go all the way to the C++ mode by Anonymous Coward · · Score: 0

      I use the following style occasionally, where obviously 'do_something_or_other' describes what the block of code does.
      The benefit is that in naming the boolean variable I think long and hard about what the block does and why I'm commenting it out.

      var do_something_or_other = false; ...
      if ( do_something_or_other )
      { /* Code that would otherwise be commented out */ ...
      }

    18. Re:please just go all the way to the C++ mode by Anonymous Coward · · Score: 0

      rem yes
      rem poke36879,8:sys64738

    19. Re:please just go all the way to the C++ mode by Anonymous Coward · · Score: 0

      It is in TFA:

      For those of you who like to provoke, Torvalds will tolerate this format:

      /* This is an alternate multi-line format
      that isn't horrible, but not kernel style */

    20. Re:please just go all the way to the C++ mode by Anonymous Coward · · Score: 0

      I use // for comments, and /* for disabling block of code.

      That's what "#ifdef 0" is for, you heathen!

    21. Re:please just go all the way to the C++ mode by kackle · · Score: 1

      I know what you're saying. I have coded in C for over a decade, but only "discovered" the following in the last few years after I was forced to use an editor that didn't have the features that you describe (as my last editors did). A space is all that's required:

      /* This code block does things. */
      blah;

      /* This block no longer does things. * / ...NOTE THE SPACE.
      blah2;
      blah3; // This does blah3.

      /* Back to more working code. */
      blah4;

      It's more helpful if the IDE colors the comments differently than the code.

    22. Re:please just go all the way to the C++ mode by wertigon · · Score: 1

      Because most sane editors do not wrap lines, instead preferring to let the user scroll to the right in order to read the entire line.

      Take, for instance, SDL...

      *window = SDL_CreateWindow("My pretty game", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 1024, 768, SDL_WINDOW_SHOWN);

      In my editor that line gets truncated at around "1024".

      --
      systemd is not an init system. It's a GNU replacement.
  13. Parkinson's law of triviality by OpenSourced · · Score: 5, Funny

    At last a Linux development post where everybody can have an opinion! Gone are the obscure race conditions and unstable semaphores, where prudent programmers preferred to watch in silence and seem ignorant, rather than open their mouths and dispel all doubts.

    --
    Rome taught me patience and assiduous application to detail. Virtues which temper the boldness of great, general views.
    1. Re:Parkinson's law of triviality by Anonymous Coward · · Score: 0

      At last a Linux development post where everybody can have an opinion! Gone are the obscure race conditions and unstable semaphores, where prudent programmers preferred to watch in silence and seem ignorant, rather than open their mouths and dispel all doubts.

      The problem with trivial things is that people sometimes hold them dear. For example, "what does it matter, it's just a comment." Or, "I'm not going to waste my time nicely formatting this comment because the compiler wont care."

      People with opinions or attitudes like this crate a situation where every single person who comes along after them to read the comment has to expend additional cognitive burden just to get to the meaning of the comment. If you just remember that a programmer's worst enemy is breaking a train of thought and that everything should be geared toward minimising the mental disruption of someone who has to read or maintain the code you wrote, I suspect that programmers would produce higher quality code. Sadly, it has been my experience that most programmers have exactly the opposite view, putting themselves first.

    2. Re:Parkinson's law of triviality by OrangeTide · · Score: 1

      We're democratizing Linux! Tear down the ivory tower, and build up the code formatting style shanty towns in its place.

      --
      “Common sense is not so common.” — Voltaire
    3. Re:Parkinson's law of triviality by Anonymous Coward · · Score: 0

      Of course even you can have a comment about comments, ffs, you're a slashdotter! You're too cool for this punk situation.

    4. Re:Parkinson's law of triviality by Anonymous Coward · · Score: 0

      We're democratizing Linux! Tear down the ivory tower, and build up the code formatting style shanty towns in its place.

      We already have lots of shops writing Windows code

    5. Re:Parkinson's law of triviality by spotlight2k3 · · Score: 1

      /* *you have no opinion, It was removed on previous line */

    6. Re:Parkinson's law of triviality by Anonymous Coward · · Score: 0

      BLOCK LINES MATTER

  14. Who Cares? by Anonymous Coward · · Score: 0

    Who cares what the f*** Linus Torvalds thinks?

    1. Re:Who Cares? by Yvan256 · · Score: 4, Funny

      Yeah! It's not like the guy fucking invented Linux or something!

    2. Re:Who Cares? by OrangeTide · · Score: 1

      Maybe anyone who wants to get their kernel patches upstream?

      --
      “Common sense is not so common.” — Voltaire
    3. Re:Who Cares? by Anonymous Coward · · Score: 0

      > Yeah! It's not like the guy fucking invented Linux or something!

      He didn't. He just copied existing ideas from Unix and Minix and passed it off as an act of creativity.

  15. Totally by Anonymous Coward · · Score: 0

    Totally agree!

  16. That's not punctuation by Anonymous Coward · · Score: 1

    That's formatting.

    1. Re:That's not punctuation by Megane · · Score: 1

      Exactly. I was expecting a rant about people not putting periods at the end of complete sentences in comments.

      --
      #naabhaprzrag, #sverubfr-000, #agi-fcbafberq, negvpyr[pynff*=' negvpyr-ary-'] { qvfcynl: abar !vzcbegnag; }
  17. This guy needs to go by Anonymous Coward · · Score: 0

    Not to sound too troll-like, and not to discredit all of the great work he's done in the past. However, the Linux kernel is pretty mature at this point; it's been that way for years. Why do we allow this guy to march like we're in a race to develop a fully working kernel as fast as possible? My first 'distro' was from TAMU back in '93. Development has been going on for nearly 30 years! It's time to put a fork in it, and time for Linus to move onto something else. An engineer should know when a project is done.

  18. comments by Anonymous Coward · · Score: 0

    Linus Trump has unleashed a sweary rant on the Trump 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 Trump 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."

  19. Good thing Linus is already married by lylefile · · Score: 0

    If only Tove had found this out sooner.

    1. Re:Good thing Linus is already married by Anonymous Coward · · Score: 0

      He hasn't spawned off any child processes, has he?

    2. Re:Good thing Linus is already married by colinrichardday · · Score: 1

      Yes, he has 3 children

  20. indentation too? by wierd_w · · Score: 1

    Does he have a passionate hatred for spacebar indents too?

    it isnt always ideal to tab indent.

    really, bitching over comment style? i cant wait to see the commit logs--"correct unapproved comment style, no changes in function."

    what a brave new world...

    1. Re:indentation too? by Anonymous Coward · · Score: 0

      There is only one proper indentation style, and it's not used in the Linux kernel: "tab to indent, space to align." This is the only style which allows everybody to use their own tab-width preference without reformatting and thereby messing up the code.

    2. Re:indentation too? by Austerity+Empowers · · Score: 3, Informative

      At least in all my professional software development, this kind of nitpicking is par for the course. The difference is that in a corporation you can strong-arm your team, either because they report to you or because you have political clout. In free software with something that has thousands or more of contributors, all you have is screaming loudly and offensively enough to get on slashdot. Then maybe people figure out that this is how they want it done.

      Someone could scream back with valid arguments about why: /* This is a good idea,
        * we should do this! */

      I can't think of one. All I can think of is "who cares", the answer to which is "Linus" (and others), and if I don't care I should just do it their way.

    3. Re:indentation too? by Anonymous Coward · · Score: 0

      Get a coding style and use spaces. Every fucking idiot will put a mixture of spaces and tabs in the code creating a fucking mess.

    4. Re:indentation too? by GuB-42 · · Score: 1

      I switched to this too.
      The difficulty is that if you mess things up or copy-paste some code written in a different style you have to do the reindentation by hand. "convert to spaces/tabs" usually isn't smart enough to do the job. And with a mix of tabs and spaces, it is easy to mess things up.

    5. Re:indentation too? by Anonymous Coward · · Score: 0

      that was the point. we're not allowed a preference because fucking idiots are coding. you're not wrong

    6. Re:indentation too? by Actually,+I+do+RTFA · · Score: 1

      The first few weeks a programmer works for me, I expect a couple of commits like that. Their code should, stylistically, look like everyone else's. It helps maintain readability.

      --
      Your ad here. Ask me how!
    7. Re:indentation too? by Anonymous Coward · · Score: 0

      Saves paper. Switching from the "drug-induced" format to Linus' preferred format would add one line of code per comment. Using "//" instead would *save* 3000 lines. Save the trees.

    8. Re:indentation too? by Anonymous Coward · · Score: 0

      that is, saves 3000 lines in a project with 3000 comments. duh.

    9. Re:indentation too? by Anonymous Coward · · Score: 0

      In free software with something that has thousands or more of contributors, all you have is screaming loudly and offensively enough to get on slashdot. Then maybe people figure out that this is how they want it done.

      Or you could just make automated reformatting part of the process so your desired format would be the only one that anyone looking at the code would ever see. People would then imitate that, problem solved. No sense getting bent out of shape over something that can be solved with a few lines of Perl.

  21. ok, so? by Anonymous Coward · · Score: 0

    This is news?

  22. Blatant misrepresentation once again. by Anonymous Coward · · Score: 1

    Go ahead, point out where in here

    labelling some members “brain-damaged”

    is.

    "your commenting style/code/idea/product/argument/... is stupid" != "you are stupid".
    If you can't tell the difference, seek professional help.

    1. Re:Blatant misrepresentation once again. by apparently · · Score: 1

      It's literally in the first fucking sentence, you stupid fucking idiot.

    2. Re:Blatant misrepresentation once again. by Fwipp · · Score: 1

      Hi Linus! I didn't know you read slashdot.

    3. Re:Blatant misrepresentation once again. by Anonymous Coward · · Score: 0

      Can we please get rid of the brain-damaged stupid networking comment syntax style, PLEASE?

      So it's NOT literally in the first fucking sentence, you stupid fucking idiot.

    4. Re:Blatant misrepresentation once again. by chmod+a+x+mojo · · Score: 1

      Uh, no.

      Can we please get rid of the brain-damaged stupid networking comment
      syntax style, PLEASE?

      Pretty damn easy to understand that the syntax is "stupid and brain-damaged" is being said, and not that the writers are stupid or brain-damaged.

      So, who again is the "stupid fucking idiot"?

      --
      To err is human; effective mayhem requires the root password!
    5. Re:Blatant misrepresentation once again. by apparently · · Score: 1

      Ah yes, he's telling people that they're doing something stupid and brain-damaged, but somehow that means he doesn't think they're being stupid and brain-damaged.
      You truly are a genius.

  23. Fuck quality; we need balanced comments. by geekmux · · Score: 1

    As we step back and look at the overall quality of code these days, set to unleash that shitstorm on the IoT hell that will ultimately control the world around us...

    ...it sure is good to know that our "Linux Lord" has his /* fucking priorities */ straight worrying about comments.

    1. Re:Fuck quality; we need balanced comments. by fustakrakich · · Score: 1

      we need balanced comments.

      They must also be fair.

      Given his reaction to these kind of things, we should have some fun with it. Throw in a few extra typos, some smileys, words in different languages, whatever gets him to write about it..

      --
      “He’s not deformed, he’s just drunk!”
    2. Re:Fuck quality; we need balanced comments. by RightSaidFred99 · · Score: 0

      Yes, a quick email means he is totally neglecting all the important things.

  24. Linus is right by jgotts · · Score: 5, Insightful

    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.

  25. iAgreeWithThisOne() by Anonymous Coward · · Score: 0

    /* I too can't stand the look
    *of this*/ /*
      * Whereas I always try to use this
      */

  26. Style cop.... (new an better) by Bomarc · · Score: 2

    First: I've had to use style cop. It sucks.
    But ... we each have our own variation of 'style'; which can be seen here.
    So, why not have a 'stylecop' that acts locally; on white space & comments? If I like 3 spaces, and you like 4; we can just get along. The style is formatted on view, not on compile.
    This would also fix his problem: When he views it... it will 're-format' to something he likes to see.

  27. So fix them. by Anonymous Coward · · Score: 1

    How hard would it be to simply write a script to reformat all comments in the preferred style? Not that hard I imagine...

    This comment will not be saved until you click the Submit button below.
    You must wait a little bit (2 minutes) before using this resource; please try again later.

    1. Re:So fix them. by Anonymous Coward · · Score: 0

      there are (were?) many. They are called beautifiers, prettyfiers, etc.

  28. extra stars are stupid by Anonymous Coward · · Score: 0

    /* What's wrong with a comment
    like this? An extra star at the star of this line would be
    pointless, if you use a "format and fill" type formatter--- the
    ending star slash will just be another word */

    Extra stars just fuck up the formatting. Or do you like /* blah blah * I guess this used to be on a second line */

    1. Re:extra stars are stupid by GuB-42 · · Score: 1

      It is probably to help distinguishing comments from non-comments, especially when syntax highlighting isn't used, or in patch files.
      Some text editors manage this style of comment quite well.

  29. From the nothing-really-wrong dept. by Howitzer86 · · Score: 1

    The fact that this is what he decides to rant about is... probably a good thing.

  30. Just reformat it to your liking. by innocent_white_lamb · · Score: 1

    My preferred coding style happens to be Whitesmiths. (Go ahead and laugh, but I'm used to it.)

    Since not much new stuff outside of my own is written in Whitesmith's style, I use astyle to reformat the the other guy's code if I'm going to be studying it or adding to it or whatever. I actually have astyle fully integrated into both Geany and vim (the two code editors that I use) so I can reformat code instantly on demand.

    I've never paid much attention to comment styles as such, but I'm sure that you can use astyle to reformat that if you want to; it has a million-and-one options available to put out all sorts of cats and make coffee.

    So if Linus or anyone else doesn't like a C style, it takes almost no effort to reformat it to the style that you want. Then everyone gets to look at and use what he's comfortable with, and there's no friction at all.

    --
    If you're a zombie and you know it, bite your friend!
    1. Re:Just reformat it to your liking. by Anonymous Coward · · Score: 0

      Reformatting code is a big no-no in shared version-controlled environments.

    2. Re:Just reformat it to your liking. by Waffle+Iron · · Score: 1

      Reformatting code is a big no-no in shared version-controlled environments.

      In many version-controlled environments, a hook is added to the check-in command to automatically run the reformatter, so there are never any diffs in the history caused by the formatting process.

      I really don't like some of the settings that were made on the formatter my current project is using, but at least I never have to worry about things like typing lines too long. They're automatically fixed up on commit.

    3. Re:Just reformat it to your liking. by bmk67 · · Score: 1

      Since not much new stuff outside of my own is written in Whitesmith's style

      There's a reason for that, you know.

    4. Re:Just reformat it to your liking. by LesFerg · · Score: 1

      Whitesmiths?

      Has anybody ever held you by the throat and said between slaps "stop" thwack "indenting" thwack "like" thwack "that!"?

      Just curious.

      --
      If I had a DeLorean... I would probably only drive it from time to time.
    5. Re:Just reformat it to your liking. by gzuckier · · Score: 1

      Do what I do; on the last day of your job, open every program code you have access to and reflow all the code into paragraphs. You will not be soon forgotten.

      --
      Star Trek transporters are just 3d printers.
  31. I agree with Linus. by Mysticalfruit · · Score: 2

    Poorly created comments are the work of the devil, plan and simple. Imagine working on a piece of software after it's been in active development for 10 years.
    Some libraries just work and nobody's even looked at the code for 1/2 a decade. Shitty comments will kill you, or worse others...

    Linus can be a needlessly pretentious ass about things, but I agree with him on this one.

    --
    Yes Francis, the world has gone crazy.
    1. Re:I agree with Linus. by Virtucon · · Score: 1

      Speaking as somebody who's written code dating back to the 70s, be thankful I even comment the code. In some circles the code should be self evident and comments are like so much belly button lint; interesting but it doesn't serve a purpose.

      --
      Harrison's Postulate - "For every action there is an equal and opposite criticism"
    2. Re:I agree with Linus. by Anonymous Coward · · Score: 0

      Commenting per line is silly. But commenting a task to provide information on expected inputs and expected outputs is a reasonable comment. Explaining or mentioning the name of an algorithm that a chunk of logic that follows is using is a reasonable comment. Your projects are too small or simple if you truely believe that there is zero need for any comment at all. Or you've reached the height of hubris.

    3. Re:I agree with Linus. by murdocj · · Score: 1

      That seems to be the modern style: "my code is so clear and self-evident it doesn't need comments". Except it isn't. I couldn't count the number of hours I've spent decrypting what some chunk of code does, or worse, figuring out why something that looks obviously extraneous or even wrong is actually necessary. My attitude is that if you don't have time to write the comment, you shouldn't bother writing the code. And if you have trouble writing the comment, the code is probably wrong.

    4. Re:I agree with Linus. by Anonymous Coward · · Score: 0

      That's only because you actually seem to work on code that needs that many comments then. I do have a stinky pile of code that's 10 years old to take care of and we don't have nor need a lot of comments. We also don't write kernels or anything like that, just boring business code. I would sure like comments on the _why_ in some places. Alas, all I got are comments like "this does x" right in front of a method call x(). People just don't know how to properly write a comment that actually serves a purpose. I would love comments on the parts that are written in non-compiled languages and that do lots of runtime magic, so that you can't even string search for stuff. No, you have to know that a certain string of format abc-def-ghi will result in the lookup of a function call AbcDefGhi somewhere else and do that search manually yourself then.

    5. Re:I agree with Linus. by Virtucon · · Score: 1

      i tend to have mixed reactions on both sides of it. If it's a method of say 25 lines and it's not too obscure why put comments in there? Then again if somebody wants do to some lambda expressions with multiple streams going in parallel, then yeah comments at least leave some breadcrumbs. I just to believe in shooting the messenger if there are comments there, regardless of style. There's utilities that can clean up comments so it the developer doesn't need to fuss much about style, line spacing etc.

      --
      Harrison's Postulate - "For every action there is an equal and opposite criticism"
    6. Re:I agree with Linus. by Anonymous Coward · · Score: 0

      That seems to be the modern style: "my code is so clear and self-evident it doesn't need comments". Except it isn't. I couldn't count the number of hours I've spent decrypting what some chunk of code does, or worse, figuring out why something that looks obviously extraneous or even wrong is actually necessary. My attitude is that if you don't have time to write the comment, you shouldn't bother writing the code. And if you have trouble writing the comment, the code is probably wrong.

      You are a bad programmer.

    7. Re:I agree with Linus. by Anonymous Coward · · Score: 0

      It should be evident what the code does.
      The interesting part is getting to know WHY it does it.

    8. Re:I agree with Linus. by Anonymous Coward · · Score: 0

      x = x+4; // add four to x

      return 0; // return 0

    9. Re:I agree with Linus. by Anonymous Coward · · Score: 0

      30 years of programming experience. Comments should be sparse, but it makes sense to comment what should be said about the code without having to spend 5 minutes of codereview or more. I usually make code just for myself, but for others, proper structure and comments is not just polite, but will help alot to elevate the code to something more understandable and maintainable. Otherwise I agree, and always try to make my code self-documenting, ie. all variable/method names should explain what they ARE, clean separation of functionality, avoid nasty one-liners, etc.

  32. Surprise, surprise by CheapEngineer · · Score: 2

    The Donald Trump of software developers.

  33. Torvie's got it all wrong by Tablizer · · Score: 3, Funny

    They are not comments, they are Perl.

  34. Go hard, or go home! by ben_kelley · · Score: 1

    We're talking formatting here.

  35. 40 column mode by Anonymous Coward · · Score: 0

    You young whippersnappers don’t know how good you have it. In my days, we didn't have time or space for comments! Sometimes we splurged on variable names and used more than one character!

    Are you joking or did you program an Apple II in 40 column mode?

    Historical note, comments often followed the code when programming in 6502 assembly on the Apple. Devoting an entire line to a comment was a rare luxury. Ex:
    label: lda variable ; Comment

    1. Re:40 column mode by Anonymous Coward · · Score: 2, Interesting

      many of us have worked on devices where EVERY byte of memory was a scarce resource. comments generally only live in source not binary but I had code where I even had to remove error handling to save a few bytes of memory in an EDI system.

  36. Modern tools would alleviate this... by RightSaidFred99 · · Score: 0

    Whether I'm using Eclipse, PyCharm, or Visual Studio I don't need to worry so much about this bullshit. You can set an IDE setting and the IDE will help you auto-format comments and other pieces of code.

    I know.. I know. Real men are inefficient and use vi or emacs....

  37. Doxygen Style by friedmud · · Score: 2

    /**
      * If you adhere to Doxygen style comments
      * it clears this up nicely.
    */

    1. Re:Doxygen Style by friedmud · · Score: 1

      lol - missed a space before the closing comment ;-)

      The asterisks should be aligned ;-)

    2. Re:Doxygen Style by Anonymous Coward · · Score: 0

      // Fuck.
      // That.

    3. Re:Doxygen Style by Anonymous Coward · · Score: 0

      You were doing just fine... until you barfed out a stream of emoticon vomit.

      Don't do that, it looks retarded (because it is retarded).

      Thank you.

    4. Re:Doxygen Style by Areyoukiddingme · · Score: 1

      You mean

      //! Fuck.
      //! That.

    5. Re:Doxygen Style by Barlo_Mung_42 · · Score: 1

      \_()_/

  38. Really Linus?!? by OfficeLackey · · Score: 0

    /*Is this really the biggest thing on your "Shit Must Change" list, Linus? Wars, famine, The Kardashians... No, poorly noted comments is your soap box!?! Teeing off like a teenager with Tourettes. Their used to be a reason people over 21 were labeled as "adults" It would be nice if we could all live up to that minor title, Linus. Be an example...*/

    1. Re:Really Linus?!? by suutar · · Score: 2

      It's probably not even the biggest thing on his "Kernel Shit Must Change" list; more of a "this came up, so here's my opinion; now I'm gonna do something else". At least, that's how I interpret his email.

      But why would you expect to see stuff about war, famine, or the Kardashians on the linux kernel mailing list?

    2. Re:Really Linus?!? by avandesande · · Score: 1

      Some things are like Chinese water torture... how many years has he been doing linux kernal?

      --
      love is just extroverted narcissism
    3. Re:Really Linus?!? by xx_chris · · Score: 1

      More years than he hasn't been doing the LInux kernel. He's 46 and he started 24 years go when he was 22. September 1991.

  39. Srs? by Anonymous Coward · · Score: 0

    I wonder when y'all will stop using a product made/approved/committed by this lunatic. Sure, thousands of kernel devs out there, but at the end of it, nothing happens without Linus' blessing. Not only is he a lunatic, he openly rejects security aspects of his product, calling security-minded people "masturbating monkeys".

    I'm sure as hell not gonna put that crapware on my production machines. Y'all should try some BSD. Much less vitriol, much less toxins and crap, much more engineering wisdom and security.

  40. It's got to be said. by MouseTheLuckyDog · · Score: 2, Insightful

    I wish he would worry more about systemd and less about comments.

    1. Re:It's got to be said. by phantomfive · · Score: 4, Informative

      He has influence over comments. He doesn't have influence over systemd.

      --
      "First they came for the slanderers and i said nothing."
    2. Re:It's got to be said. by thegarbz · · Score: 1

      It's not that he doesn't worry over systemd, it's that he doesn't feel the need to. He doesn't mind the project and doesn't get what all the hate is about, and even criticised the person who asked him about it as they asked about it in a roundabout way.

    3. Re:It's got to be said. by Anonymous Coward · · Score: 0

      I wish he would worry more about systemd and less about comments.

      Maybe he doesn't worry about systemd because it's not actually a problem? People still seem to believe that there are two "camps" in the system vs everything else battle. There's no battle - most distros are using systemd because it's easier and better overall, and any disadvantages to using it are outweighted by the advantages. FFS it's shit like this which makes outsiders look at the Linux community and wonder why we can't just get over things and focus on actual issues, like making desktops that rival Windows and focus on the actual issues with Linux rather than these trivial matters.

      In any case, here's his response from his Slashdot Q&A: https://linux.slashdot.org/story/15/06/30/0058243/interviews-linus-torvalds-answers-your-question

      I have to say, I don't really get the hatred of systemd. I think it improves a lot on the state of init, and no, I don't see myself getting into that whole area.

      Yeah, it may have a few odd corners here and there, and I'm sure you'll find things to despise. That happens in every project. I'm not a huge fan of the binary logging, for example. But that's just an example. I much prefer systemd's infrastructure for starting services over traditional init, and I think that's a much bigger design decision.

      Yeah, I've had some personality issues with some of the maintainers, but that's about how you handle bug reports and accept blame (or not) for when things go wrong. If people thought that meant that I dislike systemd, I will have to disappoint you guys.

    4. Re:It's got to be said. by phantomfive · · Score: 1

      FFS it's shit like this which makes outsiders look at the Linux community and wonder why we can't just get over things and focus on actual issues, like making desktops that rival Windows and focus on the actual issues with Linux rather than these trivial matters.

      Code quality is the actual issue....otherwise we might as well give up and just use Windows. We want a clean, good system.

      --
      "First they came for the slanderers and i said nothing."
    5. Re:It's got to be said. by Anonymous Coward · · Score: 0

      Well he's just not screaming loudly enough. Give him time.

  41. Kinda agree by Anonymous Coward · · Score: 0

    I agree with his sentiment, although I'd be a bit less colorful about it (i.e. "This is acceptable because... This is not because.... Sincerely.")
    I absolutely hate ugly comments (and code) and spend a decent amount of typing time lining things up. How I've done is has evolved over the years (mainly as I've had to conform to different architects).
    But seriously, if he feels that strongly about it, why doesn't he just write a comment reformatter that gets run on merges? Actually, isn't there an IDE that will autoformat code to your preferred style on the fly?

  42. Picky to the point of OCD. by Anonymous Coward · · Score: 0

    This guy will be great when he gets dementia.

  43. waaaat? by Anonymous Coward · · Score: 0

    /* why would you deliberately
      * and unnecessarily lengthen
      * a comment by not using the
      * first line with the /* in it and
      * ending with a */?

    The unfortunate standard resolution of 1920x1080 already means consoles are pitifully limited in their ability to show many rows. Sure, I have a 2.5K panel at home (2560x1600 vs 1920x1080 doesn't seem like much, but damn it is) and sometimes I get to plug my laptop into a phat-booty 4K display and see whole functions on one screen, but not often. Why on earth would anyone wish to have code take up more lines than necessary?

    Looking at other code sections by glance rather than by switching tabs or scrolling is like running in ram vs hdd swap concentration-wise.

  44. And here's a reason why ^^^ by Anonymous Coward · · Score: 0

    And that's one reason why Linus gets so vitriol, Jackasses don't read his messages or forget what he said so he has to keep repeating them throwing in a little profanity so perhaps they will stick.

    Then there are the jackasses who regularly interact with him who he starts to trust; then they throw in some bug ridden atrocity when they should know better.

  45. // Badly formatted comments on Slashdot by owlstead · · Score: 1

    /*
    * Guys, I already see a lot of badly formatted comments here.
    * I thoroughly agree with Linus here, comments should be correctly formatted.
    * Unbalanced comments should be removed and boxed comments are right out.
    */

    1. Re:// Badly formatted comments on Slashdot by Anonymous Coward · · Score: 0

      # Instructions unclear, code stuck in compiler.

    2. Re:// Badly formatted comments on Slashdot by herbierobinson · · Score: 1

      The first * doesn't line up with the rest of them... :-)

      --
      An engineer who ran for Congress. http://herbrobinson.us
    3. Re:// Badly formatted comments on Slashdot by owlstead · · Score: 1

      Yeah, that kinda took the fun out of it. I blame the /. editing tools. It *was* perfectly aligned.

  46. He is correct as usual by Anonymous Coward · · Score: 0

    As usual. Linus us right. Glad to see him sticking up for the right way to code.

  47. Relax by Anonymous Coward · · Score: 0

    It won't be a problem. Linus won't be among the first up against the wall, come the revolution, but he'll probably go in the third or forth purge.

  48. Things I Hate by avandesande · · Score: 2

    Lets start a 'things I hate' thread... I can't stand pluralizing database table names. Its redundant. Who is going to store one record in a table?

    --
    love is just extroverted narcissism
    1. Re:Things I Hate by billybob2001 · · Score: 1

      Who is going to store one record in a table?

      Oracle created a table called dual.
      One row, one column.
      It's a singular name (not "duals").
      It's called dual because it used to contain 2 rows.

    2. Re:Things I Hate by Anonymous Coward · · Score: 0

      Yeah? Well Oracle can suck on my fat one.

    3. Re:Things I Hate by Anonymous Coward · · Score: 0

      I've seen it. Usually some kind of config record.

      What's more annoying to me is inconsistency. Whatever is used in normal speech tends to be the most consistent.

    4. Re:Things I Hate by Actually,+I+do+RTFA · · Score: 1

      I prefer pluralized database table names. Because, when spoken, it;s shorter. That is, I can see saying, e.g. "Join pastas and sauces" or "Join the pasta table and the sauce table". It doesn't feel right to say "Join pasta and sauce"

      --
      Your ad here. Ask me how!
    5. Re: Things I Hate by Anonymous Coward · · Score: 0

      Join pasta and sauce is the only example that sounds right. Why mess up perfectly fine sauces by joining them?

    6. Re:Things I Hate by Anonymous Coward · · Score: 0

      Plural DB table-names are self-documenting, part of a bigger naming scheme where a singular record is named, guess it, singularly.

      If you see it as part of something bigger, it makes sense, and doesn't take any extra effort or resources to do.

      If I have a list of vehicles, it doesn't *really* make sense to call this list "vehicle", now does it? That's obfuscation at work and lack of clarity of what you're doing. If that was the intent, by all means continue, but I won't touch your code.

    7. Re: Things I Hate by Actually,+I+do+RTFA · · Score: 1

      As an English sentence, yes. As a statement about a JOIN operation on tables, no.

      --
      Your ad here. Ask me how!
    8. Re:Things I Hate by Anonymous Coward · · Score: 0

      I was late to the game with Oracle, and found out about this once when I needed it. Never been formally trained with Oracle, but had lots of experience with other databases.

      Never understood why it was called that, and didn't worry too much about it either. Thanks for the info!

      I'm curious why it had 2 rows, though. For my purposes, I only ever needed 1 row exactly.

    9. Re:Things I Hate by billybob2001 · · Score: 1

      From the History section on https://en.wikipedia.org/wiki/...

      Chuck Weiss explains why he created DUAL:

      I created the DUAL table as an underlying object in the Oracle Data Dictionary. It was never meant to be seen itself, but instead used inside a view that was expected to be queried. The idea was that you could do a JOIN to the DUAL table and create two rows in the result for every one row in your table. Then, by using GROUP BY, the resulting join could be summarized to show the amount of storage for the DATA extent and for the INDEX extent(s). The name, DUAL, apt for the process of creating a pair of rows from just one.[1]

      The original DUAL table had two rows in it (hence its name), but subsequently it only had one row.

  49. BLM Movement has come to slashdot by Anonymous Coward · · Score: 0

    Balanced Lines Matter! No line justification, no peace!

  50. Many things are worse than bad comment punctuation by 140Mandak262Jamuna · · Score: 4, Interesting
    Worst comments are obsolete comments. The comment described what that function was designed to do, some 8 years ago. It has morphed since, default arguments added, the list has been replaced by multimap which was replaced by hashmap completely changing the behavior, and still the comments have not been updated.

    Next worst are ego comments. Every inline function preceded by three line comment naming the author as though he is Leo Tolstoy or she is Jane Austen.

    Next worst are trivial comments. Next worst are no comments.

    Then comes badly formatted comments.

    --
    sed -e 's/Chuck Norris/Rajnikant/g' joke > fact
  51. Re:Style cop.... (new an better) by Anonymous Coward · · Score: 0

    If I like 3 spaces, and you like 4; we can just get along.

    If I like 4 spaces and you like 3 spaces, then we should both use tabs. Problem solved.

  52. He did not call ANYONE brain-damaged by Anonymous Coward · · Score: 0

    Well, I am neither brain-damaged nor a native speaker, and it is pretty clear to me that, while he does call the unbalanced comment style "brain-damaged", nowhere did he call *anyone*, not even those who like that style, brain-damaged.

    It is even clear in the excerpt, so you don't even need to RTFA to see it.

  53. Torvalds had 2 BMs today by Anonymous Coward · · Score: 0

    /*
              I'm more a fan of
              this style myself
    */

    1. Re:Torvalds had 2 BMs today by Anonymous Coward · · Score: 0

      Oh my. Now you've done it. Linus is going... to... FLIP... OUT!!!! I don't want to be around when he sees this.

  54. Be tolerant of what others write by Anonymous Coward · · Score: 0

    be intolerant of what you write.

  55. Gordon Ramsay in sweary rant about cooked steak by seoras · · Score: 1

    ... just doesn't have the same click bait appeal does it?
    I think it might be fun to put Linus in a kitchen with Gordon just to give him a taste of his own medicine and vice versa ;)

    Those who get to the top of their profession are driven perfectionists who expect everyone else around them to strive to achieve that same level of perfection.
    I get why they lose it with others less driven and focused.
    Do they need perspective or should we just leave them alone to continue to be brilliant? I think the latter.

    1. Re:Gordon Ramsay in sweary rant about cooked steak by Anonymous Coward · · Score: 0

      Consider that they were this way BEFORE they got successful (both of them...). It's part of HOW they became that way.

      Go fuck yourself- you honestly lack perspective yourself by even proposing such. >:-D

  56. Valley by Anonymous Coward · · Score: 0

    How does he feel about tabs vs spaces?

    1. Re:Valley by murdocj · · Score: 1

      Man, don't go there.

  57. I'm more pissed off by... by istartedi · · Score: 1

    I'm more pissed off by the unnecessary leading *, since any editor worth a damn has syntax highlighting. It's his project though, so he can set whatever standard he wants and if you don't like that you can fork it. Once again, pretty much any style problem can be solved in the editor, and most editors already fix this problem; but that's just my opinion and it's worth less than his because I'm not leading a kernel project that runs bazillions of servers.

    --
    For all intensive purposes, "whom" is no longer a word. That begs the question, "who cares"?
    1. Re:I'm more pissed off by... by Anonymous Coward · · Score: 0

      > it's worth less than his because I'm not leading a kernel project that runs bazillions of servers

      Quoted for truth. Not to diminish you in anyway, but yeah - the opinion of the person *successfully* leading the project matters more than that of *random guy on internet*.

      > pretty much any style problem can be solved in the editor

      The best tools make you better when you do it right, they don't fix what's done wrong. The former is an awesome tool, the latter is a crutch.

    2. Re:I'm more pissed off by... by istartedi · · Score: 1

      I don't think fixing style problems in the editor would be a crutch. I think it would end a lot of arguments, like tabs vs. space--at least for leading tabs/spaces. The only thing that's a bit complicated is __LINE__, but with enough AI in the editor it might be a fixable problem too--have an editor command that lets you jump to the repository __LINE__ even if it doesn't match __LINE__ in the editor. Also, the compiler has to use the repository __LINE__. I know I'm probably leaving something out. Yes, I've put some thought into it over the years; but not enough to crack open an open source IDE and hack it.

      --
      For all intensive purposes, "whom" is no longer a word. That begs the question, "who cares"?
    3. Re:I'm more pissed off by... by Oligonicella · · Score: 1

      It's perhaps worth less than his re comments in Linux that he is involved with. Your opinion is of equal worth otherwise. He's not a god, he's a guy.

  58. Well, that's just like, your opinion man. by GrBear · · Score: 1

    /* ââ©â®(ÎY_ÎY)ââ©â® */

    1. Re:Well, that's just like, your opinion man. by GrBear · · Score: 1

      Annnnd, once again /. fails the UTF-8 test.

    2. Re:Well, that's just like, your opinion man. by Anonymous Coward · · Score: 0

      No one with any sense wants that.

  59. Grammar Nazi by Anonymous Coward · · Score: 0

    No soup for you!

  60. Well that's the wrong idea by Anonymous Coward · · Score: 0

    Putting the comment opener on the same line follows K&R indentation, where the opening curly goes on the same line as the if(), while(), for(), or do. The sole closing curly, except where used in a do-while or where it starts an else-block, goes on a line of its own.

    What Torvalds suggests, i.e. putting the opening /* of a multiline comment on a line of its own, wastes vertical space just as Pascal-style indentation of curlies does -- and without adding readability.

    If this is an issue with Emacs' indentation, or reflowing, or whatever, then the editor should be fixed. Vim certainly handles this style perfectly.

    I'd quite like to hear what the actual fuck is behind the cursing, this time. "Don't hold back now, tell us how you _really_ feel."

  61. Re:Style cop.... (new an better) by Anonymous Coward · · Score: 0

    3?!? wtf?

  62. Dear Linus... by Anonymous Coward · · Score: 0

    ...chill, man! Chill! I used to work for an a$$hole who was incredibly worried about the APPEARANCE of code. No matter if the stuff actually worked, if it didn't LOOK the way he expected, it was WRONG. That was a steaming, stinking pile of guano, and I quit that place. I am SO glad I did. Don't drive the good folks away, Linus. Chill! Chill!

  63. Linus vs Microsoft by jmhysong · · Score: 1

    I hated using Windows for years because I thought that Bill Gates and friends were assholes for their business practices. Now I hate Linux, not because Linus has evil business practices, just because he's as much an asshole as they ever were.

    1. Re:Linus vs Microsoft by serviscope_minor · · Score: 1

      I disagree. Linus is an asshole on an individual level because he has a big ego and no one to tell him he's being an idiot. Microsoft are assholes on a corporate scale for money. If you use Linux but never get involved in kernel development, you will never bump into Linus's assholery. Even if you avoid Microsoft "products" like the plague, you cannot avoid them because of their stacking of standards bodies to get pointless, trivial but patented stuff of theirs baked in, exFAT in SDXC for example. And if you are a customer, well fuck you you're having your machine upgraded forcing you to sign up for new, nasty spyridden T&C whether you fucking like it or not.

      --
      SJW n. One who posts facts.
  64. its sujbective but by JustNiz · · Score: 1

    I prefer // for single line comments /*
          for multiple line
          comments
    */

    1. Re:its sujbective but by sysrammer · · Score: 1

      I prefer // for single line comments /*

            for multiple line

            comments
      */

      Arrrgh!

      --
      His ignorance covered the whole earth like a blanket, and there was hardly a hole in it anywhere. - Mark Twain
    2. Re:its sujbective but by Anonymous Coward · · Score: 0

      I prefer // for single line comments /*

            for multiple line

            comments
      */

      Arrrgh!

      I feel your pain. I wanted to scratch my eyeballs out when I saw that.

  65. Re:Style cop.... (new an better) by Anonymous Coward · · Score: 0

    .427 picas

  66. Fucking hilarious by Anonymous Coward · · Score: 0

    Linux programmer has nothing better to do than bitch like a 17 yro west hollywood female high school student about the code's comments. Priceless. He's an idiot that gets WAY too much credit for writing a simple OS kernel.

  67. Linus: the reason i use windows now by Anonymous Coward · · Score: 0

    Fuck you Linus. It's a Microsoft world. Take your meds and have a beer. Or just the beer shoved up your ass.

  68. Tackling the important issues I see by Anonymous Coward · · Score: 0

    I tend to format my comments in Linus' preferred style, but really, so long as the comments are clearly delineated as such and contain cogent, up to date information, does it really matter if they're ugly as sin? Save the rants for misleading, obsolete or missing-when-clearly-needed comments. It's like going into rant mode because someone chose to format a journal article in word rather than latex: sure word will misalign the in-line equations and generally make the whole thing look like high-school maths homework rather than a serious document, but if the content is good and readable then frankly who cares?

  69. Can't believe I'm the first to say this but... by hardluck86 · · Score: 1

    /* No Comment */

  70. Yo Dawg, I heard you like comments... by Anonymous Coward · · Score: 0

    Yo Dawg, I heard you like comments so I put some brain-damaged stupid networking comments within your comments so you can bitch about the brain-damaged stupid networking comment syntax style while you bitch about the brain-damaged stupid networking comment syntax style.

  71. TIL The Pinguin Sucks by Anonymous Coward · · Score: 0

    // Today I learned that Linus Torvalds is a fucking moron
    // who can't pretty print C into ANY AND EVERY style he wishes.

  72. Oh look, the diva is doing a scene... again. by Anonymous Coward · · Score: 0

    All hail the diva...

  73. REAKS OF NEGATIVE ADVERTISING BY MICROSOFT by Anonymous Coward · · Score: 0

    "sweary rant" ? Are you online and offended because he gets pissed when people fuck up his work? You mean if somebody fucks your work up.. something as awesome as the Linux kernel.. you would be like oh #sweetheart it's ok

    Get the fuck out Microsoft/US Government. Treason goes to Hell.

  74. Minix rip-off by Anonymous Coward · · Score: 0

    deep down you know it's true

  75. what's new is irrelevant again. by Anonymous Coward · · Score: 0

    it's tabs vs spaces or vi vs emacs all over again.

    screw you and your idiocy of comments and cases.

    if you can't parse code to make it look the way you want, then WTF have you been trying to achieve for 30 fucking years? dumbass.

  76. Linus is a cunt by Anonymous Coward · · Score: 0

    'nut said.

  77. Most commercial projects have a code style by iamacat · · Score: 2

    If Linux aims for the same level of polish and stability, it's not a bad idea to do the same. Someone else will likely have to fix bugs in your code at some point. Having a consistent style of comments and other things makes it faster to scan visually and spot problems for someone used to that style.

    1. Re:Most commercial projects have a code style by Anonymous Coward · · Score: 0
  78. Re:Style cop.... (new an better) by Anonymous Coward · · Score: 0

    That's kind of what tabs are for, but that only works if you ONLY use tabs and never use spaces.

    Emacs has some garbage defaults where tabstop = 8, and electrical engineers seem to be incapable of that, so I would run into code where the first indentation was 4 spaces. 2nd level was a tab. 3rd level was a tab and 4 spaces. Then when I load the code in an editor who sets tabstop to 4, nothing lines up and its unreadable. I eventually modified my groups coding standard to just disallow tabs because of Emacs users and rejecting any PRs with tabs in them.

    There are just too many places where the code is more readable by using spaces to line things up into tabelized formats across multiple lines for an automated system to really ever get this right unless you limit (especially with case statements, it seems everyone uses something different there).

  79. Three Space Indent! by crow · · Score: 1

    I love three-space indent!

    Not really, but that's actually what I use because work mandates it. Apparently there was a big debate in the early days of the company between 2 and 4, so they compromised. Much of our coding standard is based on one particular engineer who had vision problems and needed to keep the number of columns restricted.

    But you know what? It works. Millions of lines of code dating back two decades, and it's extremely consistent. Ninety percent of the code looks like it was written by the same engineer. That's what you want on a major project.

    Though I will say that I've come to hate tabs in indentation. They're fine until they're not. At some point you end up using some tool where they don't look right.

    My pet peeve, though, is trailing spaces. Any code management system should be designed to strip trailing spaces or block commits that contain them. I've seen far too many code merges break because of a disagreement on trailing spaces, and that's just dumb.

    1. Re:Three Space Indent! by murdocj · · Score: 1

      Turns out that as long as you use tabs *consistently* to indent code, they're fine. And it's also handy because for us older devs, we can set the indentation the way we need it. I've dealt with code that has a 2 space indentation and I find it virtually unreadable. But if you use tabs for the indentation, you have 2 spaces per tab, I can have 4, everybody's happy.

    2. Re:Three Space Indent! by crow · · Score: 1

      No, because you may find that you need to use half a dozen different tools that all display the code, plus emailed copy-and-paste snippets here and there. Sure, you can control what a tab expands to in your primary editor, but you don't have control over all the other tools.

      Yes, if the use of tabs is completely consistent, then at least the code won't be too terribly mangled by other tools, but it won't look anything like what you're used to.

    3. Re:Three Space Indent! by LesFerg · · Score: 1

      I also like to have my editors set to display the tab characters, in a very low contrast color, so there are visible lines for each level of indentation. There are several add-ins for Visual studio to draw colored margin lines for each level and/or type of indentation, but I find them overkill and prefer the visible tab chars.

      --
      If I had a DeLorean... I would probably only drive it from time to time.
    4. Re:Three Space Indent! by Anonymous Coward · · Score: 0

      Right up until someone edits the code in an editor that automagically converts the tabs to spaces (or vice versa). Probably during copy/paste.

      I love the idea of using tabs and letting people select how wide they are, but the in all cases, without exception, where I've seen them used it has all ended in tears and sweary rants. An enforced "n space for each indent" standard seems to be the least worst option.

  80. What a cock. by Anonymous Coward · · Score: 0

    I would never have anything to do with a piece of trash like that.

    1. Re:What a cock. by Anonymous Coward · · Score: 0

      homosexual detected.

      you think the founder of the Linux kernel is trash. you can not even begin to think straight. he speaks bluntly because why should he baby talk to faggots like you.

  81. This reminds me of top-posting in newsgroups. by PJ6 · · Score: 2

    It's common email convention now, at least in my experience - when you respond to someone, you put your response on top, so as the conversation chain grows, the order is the most recent (and therefore the most pertinent) to the oldest, descending. So you don't have to scroll through pages just to see the last reply.

    Back in the day, on newsgroups, if you did that you'd get absolutely SCREAMED at for "TOP POSTING", because it was WRONG.

    From the guardians of all that is right and wrong.

    1. Re:This reminds me of top-posting in newsgroups. by Anonymous Coward · · Score: 0

      In email, the other person has already read the older replies. In a public forum like newsgroups, not everyone has read the older replies and top posting makes it hard to follow the conversation for new readers.

    2. Re:This reminds me of top-posting in newsgroups. by Mars+Saxman · · Score: 1

      I still disprefer that style. It works ok for quick one-liner replies, I guess, but what I really want is a conversation, and that means I want the context quoted near the reply, inline.

      Alas, Microsoft never understood that there is more than one way to do it, and shoehorned their corporate style down our throats by making it difficult to convince Exchange to work any other way, so we're stuck with the dominance of top-posting now.

    3. Re:This reminds me of top-posting in newsgroups. by Anonymous Coward · · Score: 0

      I have always top posted, and like you, I got screamed at it. I didn't care. I didn't want to have to scroll through all the replies that I've already read, every single time.

      "Well what if you have lots of e-mails then you might not remember which one this is a reply to because it was top posted."

      Yes and if that actually happened, I could scroll down and refresh myself with the most recent replies first. If you have to read back to the very first comment to refresh yourself, perhaps you don't have the brains to be part of the conversation to begin with.

      So they could yell all they wanted, but they were still wrong.

    4. Re:This reminds me of top-posting in newsgroups. by phantomfive · · Score: 1

      I think gmail set the precedent, by collapsing the quoted text, and setting the cursor at the top of the screen. At least, the disappearance of bottom-posting seems to coincide with the rise of gmail in my memory.

      --
      "First they came for the slanderers and i said nothing."
    5. Re:This reminds me of top-posting in newsgroups. by DNS-and-BIND · · Score: 1

      Top-posting WAS wrong. Do you seriously not understand that different eras have different standards?

      The only reason top-posting is accepted today is because Microsoft Outlook defaulted to top-posting on replies, because someone at Microsoft had never heard of Usenet. So many of Microsoft's mistakes had been done before and MS just repeated them. Plus they added many of their own...auto-executing email attachments WTF. I remember when the idea you could get a virus by email was laughable.

      --
      Shutting down free speech with violence isn't fighting fascism. It IS fascism!
    6. Re:This reminds me of top-posting in newsgroups. by angel'o'sphere · · Score: 1

      Top posting is still wrong, for two reasons.
      A) you would know if you where on mailing lists that offer "mail digests" where all mails for a certain time period are gathered and sent in one mail. With 'top quoting' a few dozen replies and replies to replies lead to an complete unreadable mess of repeated original questions, awnsers, comments cluttered all over the place in the digest. Not to mention that 12 mails would cover perhaps 12 screen heights but now do cover 100 or more.
      B) all modern email readers show you mails that belong together anway in a "modern threaded" way in single panels in one mail window. So instead of scrolling over the wrong quoted text, you just scroll to the next 'panel'

      (And old school mail programs/news readers anway know about 'threaded mode' hence the reason usenet users are upset about Top Quoting)

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    7. Re:This reminds me of top-posting in newsgroups. by Anonymous Coward · · Score: 0

      I bet it was originally considered wrong because many programs at the time would scroll all the way to the end of output without stopping, so putting the newest message at the top meant everyone had to scroll back a bunch to read it, assuming it didn't get cut off by the scroll buffer.

    8. Re:This reminds me of top-posting in newsgroups. by MichaelSmith · · Score: 1

      I totally agree.

      Back in the day, on newsgroups, if you did that you'd get absolutely SCREAMED at for "TOP POSTING", because it was WRONG..

    9. Re:This reminds me of top-posting in newsgroups. by AmiMoJo · · Score: 1

      The problem is that in-line replies are horribly broken now. Every time I try it at work with Outlook it just fails completely. There is some weird "quote line" that doesn't break when you insert blank lines into the quoted text! Top posting is the only option when people send you broken HTML mail.

      --
      const int one = 65536; (Silvermoon, Texture.cs)
      SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
    10. Re:This reminds me of top-posting in newsgroups. by Anonymous Coward · · Score: 0

      I didn't want to have to scroll through all the replies that I've already read

      But you shouldn't quote the whole post! You are supposed to trim the quotes down to what is necessary to establish context for your reply. Generally 1-2 paragraphs is enough.

    11. Re:This reminds me of top-posting in newsgroups. by Anonymous Coward · · Score: 0

      Thankfully September happened. (I never thought I'd say that).

    12. Re:This reminds me of top-posting in newsgroups. by Anonymous Coward · · Score: 0

      top posting is still wrong; not properly trimming context is worse, but top posting is still evil

    13. Re:This reminds me of top-posting in newsgroups. by PJ6 · · Score: 1

      Yet, you fail to give any explanation at all as to why bottom-posting is better. I think I clearly explained why I preferred top-posting. This was long before MS had an email client.

      But your answer is just, "Because... Microsoft! BLARG!". You're exactly the kind of wignut I was talking about. You scream about why top-posting is wrong, but can never give any good reason why.

  82. /* comments */ by neoRUR · · Score: 1

    /*
    * some
    * people
    * don't know
    * how to speak
    * in public
    */

  83. Why curse? Just codify your style... by mi · · Score: 2

    Why wouldn't he simply codify his preferences? I hear, he still holds some sway among Linux developers — once a particular style is accepted by consensus, it becomes easier to convince folks to follow it...

    Interestingly, the style Mr. Torvalds prefers has been part of BSD's style(9) manual for decades.

    Maybe, he should leave children's to children and join a real OS-project...

    --
    In Soviet Washington the swamp drains you.
    1. Re:Why curse? Just codify your style... by Anonymous Coward · · Score: 0

      It is already "codified" in the Linux style https://www.kernel.org/doc/Documentation/CodingStyle . Most likely it just is not high priority enough to take up someones time and it would interfere with diff operations. Regression in the current version? Well here are 10000 lines of comment changes, find the line of code that changed yourself.

    2. Re:Why curse? Just codify your style... by guestapoo · · Score: 1

      Why wouldn't he simply codify his preferences?

      https://www.kernel.org/doc/Doc...

      Chapter 8: Commenting
      ....
      When commenting the kernel API functions, please use the kernel-doc format.
      See the files Documentation/kernel-doc-nano-HOWTO.txt and scripts/kernel-doc for details.

    3. Re:Why curse? Just codify your style... by Anonymous Coward · · Score: 0

      Interestingly, the style Mr. Torvalds prefers has been part of BSD's style(9)
      manual for decades.

      I'm a bit irked when people say 'BSD' to refer to FreeBSD only... I thought that was a 2002 thing but people still do it, it seems.

      No such manual page exists on Open or NetBSD.

  84. Stallman hated // C++ comments by xx_chris · · Score: 1

    which is odd since it's pretty much the only thing C++ did right.

    1. Re:Stallman hated // C++ comments by serviscope_minor · · Score: 1

      Just like the Romans. What did C++ do for us? // comments.

      Apart from that?

      Better type safety?

      yes yes but apart from nicer comments and better type safety

      Automatic resource cleanup?

      yes yes but I mean APART from nicer comments and better type safety and automatic resource cleanup?

      A programmability in the compiler and a nicer, cleaner, safer alternative to macros?

      Yes but apart from all of those, what has C++ done for us?

      --
      SJW n. One who posts facts.
    2. Re: Stallman hated // C++ comments by Anonymous Coward · · Score: 0

      compiler error messages for templates

    3. Re:Stallman hated // C++ comments by ultranova · · Score: 1

      Better type safety?

      It's more efficient to use a "dynamic" language. That way obviously broken code compiles without warnings, so you can ship it and charge your customers for bugfixes.

      Sucks if you actually care about code quality, though.

      --

      Forget magic. Any technology distinguishable from divine power is insufficiently advanced.

  85. Crappy asterisks by ooloorie · · Score: 1

    How about leaving out the crappy asterisks at the beginning of lines? They suck.

  86. Otherwise the kernel code is perfect by Anonymous Coward · · Score: 0

    It is amazing how some people can take a small thing, and totally blow it out proportion. Especially if they are famous...
    My answer to Linus: get the bugs fixed

  87. Re:Style cop.... (new an better) by swillden · · Score: 1

    First: I've had to use style cop. It sucks. But ... we each have our own variation of 'style'; which can be seen here. So, why not have a 'stylecop' that acts locally; on white space & comments? If I like 3 spaces, and you like 4; we can just get along. The style is formatted on view, not on compile. This would also fix his problem: When he views it... it will 're-format' to something he likes to see.

    Check out clang-format. It's by far the best code formatting tool I've used, and using it allows you to stop thinking about formatting. However, your idea of everyone reformatting the code all the time to their preferred style is silly. Set a project style, "document" it in a .clang-format file and require everyone to use it. Everyone working on a project can learn the project's style; the tool just helps to make sure that it's applied consistently.

    --
    Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
  88. Could be worse by viperidaenz · · Score: 1

    It could have been a tabs vs spaces rant

    We all know that didn't work out very well for Richard Hendricks

  89. Re:Many things are worse than bad comment punctuat by swillden · · Score: 1

    Next worst are no comments.

    I disagree.

    Uncommented code that needs comments is bad, but the best code doesn't need comments at all. If I write a piece of code that requires a comment to be understandable, that's a hint that I need to step back and rethink that code. Maybe name variables better. Maybe pull a chunk out into a separate function so I can name that (that's particularly useful with those one-line comments that explain the goal of a block of code). Maybe reorder or reorganize it so that it's clearer.

    Sometimes, after all I can do, I still feel like I need a comment so I write one, trying to keep it as concise, accurate and readable (including formatting) as possible. But I always consider that a failure and know that if I were a better programmer I could have avoided it.

    The reason it's a failure and that it's better to avoid writing comments if you can is because comments are much less well-maintained than the code they describe. That means that comments often become obsolete (what you called the "worst comments"). Comments that don't exist can't become obsolete.

    Note that I'm talking here about internal comments, not interface documentation, and especially not Javadoc/Doxygen/etc. comments which are used to generate API documentation. Those are very valuable and should always be written. Even those should be kept concise, though, and redundancy should be avoided. There's no reason to restate the function signature. If the function and argument names are well-chosen, they can often stand on their own. Let them.

    --
    Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
  90. Funny. Linus is a F'ng loon. by Anonymous Coward · · Score: 0

    What an idiot. A child in a woman's body who wants to be a dog.

  91. Sayre's Law by Jeremi · · Score: 1

    "In any dispute the intensity of feeling is inversely proportional to the value of the issues at stake."

    --


    I don't care if it's 90,000 hectares. That lake was not my doing.
  92. sweary? by righteousness · · Score: 1

    I actually initially read it as "sweaty rant", and imagined Linus furiously typing the rant, with sweat dripping onto his keyboard. Probably because "sweary" is not a real word, and my mind sort of auto-corrected it to the closet match.

    --
    Don't fornicate. Seriously, just don't do it.
    1. Re:sweary? by Anonymous Coward · · Score: 0

      Probably because "sweary" is not a real word

      Oh, really?

  93. Re:Funny. Linus is a F'ng loon. by Anonymous Coward · · Score: 0

    this is really how homosexual apple users think.

  94. By Neruos by Anonymous Coward · · Score: 0

    I've never liked multiline comments, they look stupid. I will write my comments the way I want in which they visually please and provide a point. Most comments are removed from compiled code anyway, so f**koff.

    c++/java // this is a comment // on multiple // lines

    or

    ' this is also
    ' a comment for
    ' the vb/vba/script crowd

  95. So Linus, Tabs or Spaces? by mveloso · · Score: 1

    So what is it, tabs or spaces?

  96. Man does more harm than good by Anonymous Coward · · Score: 0

    What a wanker.

  97. We finally are by invictusvoyd · · Score: 1

    Humans ..er .. I meant Hackers .

  98. He just doesn't get it by Anonymous Coward · · Score: 0

    The whole point of using C++ style comments is that if you want to experimentally comment out a block of code you can use C style comments to do so and get have it get all fucky if there are any comments within that block. Yes, pre-processor directives can get the job done just as well but not every editor is good about delineating the contents of a pre-processor block.whereas even freeware editors typically colorize comment text.

  99. My only comment in code are at the top..... by sp4ni3l · · Score: 1

    /*
    * This is a comment
    * I hate comments
    */

    As it is only once I do it in a software project I will indulge any style that is requested.......

    Bring it on!

  100. I don't understand the fuss.... by clickety6 · · Score: 1

    Can't we all just use our comments sense?

    --
    ----------------------------------- My Other Sig Is Hilarious -----------------------------------
  101. bored now by Anonymous Coward · · Score: 0

    Oh look, a developer with his own preferred style of formatting who thinks any other styles are an affront to nature. What a surprise. Let's all take him VERY seriously and re-evaluate if our lives are worth living any more. Or, you know, he could get over it.

  102. Sweary? by Eunuchswear · · Score: 1

    He said "crap".

    That's "sweary"?

    Fuck.

    --
    Watch this Heartland Institute video
  103. Slashod every day less for nerds by Anonymous Coward · · Score: 0

    Slashod - site about bullshit and drama for people who like to think about themselves as nerds, but actually are just interested in celebrity bullshit drama.

    It really does not matter which comment form is "the right one" nor whether this is horrible way to communicate with people or just slightly sub-optimal. It is still bullshit drama for people who want to feel like "techies" while actually spending their time with pop-culture like celebrity drama. And nothing more.

  104. Lignus is right on by Anonymous Coward · · Score: 0

    Give a developer a degree of freedom and they will take it. Have a strong coding standard and stick with it. That way when another team member inherits your code they won't feel obliged to rewrite it. What could be simpler than having a one line and multi-line comment styles?

  105. Re:Many things are worse than bad comment punctuat by Ambassador+Kosh · · Score: 3, Insightful

    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! :)
  106. Re:Many things are worse than bad comment punctuat by 140Mandak262Jamuna · · Score: 1
    I agree with Kosh, not with swillden.

    The most important comments are the ones that specify "why not". Often we will implement the interface using some methods, after release we find the inadequacies and change the implementation. Often the first implementation would be simple, intuitive and the first thing anyone would think of. Now that implementation is gone, and new less obvious and often tricky things are introduced. If the "why this and not that" comment is missing, a later code review might remove the complex second implementation and restore status quo ante.

    It is important to document why it is not done that way, what we intend to do. Without it we will be forced to constantly reverse engineer to understand the code and might repeatedly re learn the same lessons over and over again.

    --
    sed -e 's/Chuck Norris/Rajnikant/g' joke > fact
  107. Obligatory TECO reference by bromoseltzer · · Score: 1

    TECO will solve all your problems.

    --
    Fiat Lux.
    1. Re:Obligatory TECO reference by cwills · · Score: 1

      is it line noise, or is it TECO?

  108. Re:Many things are worse than bad comment punctuat by swillden · · Score: 1

    I have been working on some scientific simulator code and the comments have the math equations that a block of code is based on.

    That is absolutely a case where comments are essential. Ideally, they should not only contain the equations, but something of the derivation of the mathematical expressions and the rationale behind their use. In some cases it *may* be possible to write code in such a way that the expression itself is clearly expressed in the code, so a comment specifying the expression would add nothing... but even in that case an explanation of why that expression is appropriate is essential for any future understanding of the code. And in many cases the constraints of the programming language to not allow easy, direct statement of the expression, either, and then the comment that contains the mathematical representation is essential.

    I'm not claiming that it's always possible to eliminate comments, but they should be eliminated whenever it is possible, and whenever you find yourself needing a comment you *should* take a step back and see whether it's possible to make the code clear without one.

    --
    Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
  109. What's the story? by Anonymous Coward · · Score: 0

    His points are completely valid, so I suppose the real story here is the audience's reaction and how divides us into
    - those who understand and appreciate the value in comments and folkowing coding standards and the unwashed masses who don't
    - those who agree with Linus's communication methods and those who find them objectionable and unprofessional.

  110. Under enough pressure ... by Rambo+Tribble · · Score: 1

    ... even the greats can go OCD on you.

  111. it is a practical matter by charliepjive · · Score: 1

    I totally agree with him and I don't see why anyone would use the other comment style, which is very less practical

  112. Re:Many things are worse than bad comment punctuat by swillden · · Score: 1

    The most important comments are the ones that specify "why not".

    Like complex mathematical derivations, that's another case where comments may be essential. My recommendation isn't to eschew all comments, it's to avoid duplicating in comments what can be just as clearly expressed in code... and to work hard to try to express the information in code rather than in comments. Doing so will make your code cleaner and much more maintainable.

    My code isn't comment-free, but it is comment-light, and I think it has gotten much better since I adopted this policy (which, BTW, I should be clear that I didn't originate. I got the idea from one of Robert Martin's books on code craftsmanship.).

    Some examples might help. Consider this case, where I had to write a comment to explain why not to do something. Or (to pick a section from the same file), look at this case which is interesting because the comment is very large -- as large as the code that it documents -- and because I think that without the comment it's really not clear why the code is doing what it's doing. I have toyed with various ways of refactoring that code to eliminate the need for the comment, but short of using something like a strategy pattern I can't find one that does the job. And even a strategy-based implementation would still require me to both ensure that the strategies are applied in the correct *order*, and to document what that order is.

    Doh! I just noticed that that long comment has bit-rotted a little. It was originally written when the code only handled options 1, 3 and 6, so the concluding paragraph doesn't explain about options 2, 4 or 5, or why they're tested in the order they are. That example is an even better one than I thought, since it demonstrates both the need for and risks of explanatory comments.

    That SoftKeymasterContext class, however, is an exception to the rule. It exists specifically to address a bunch of unusual corner cases and so it's not surprising that it requires much more explanation than 99% of code should. Here's a better example (chosen more or less at random from the same project) of what comment-free code should look like.

    --
    Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
  113. Back at the Uni by Dareth · · Score: 1

    I once got a few points knocked off my working code because of comments. I was told I didn't have enough General comments. My next program had nice blocks of comments about General Lee, General Custer, and many other famous generals. My instructor wasn't nearly as amused as I was. Imagine that.

    --

    I only look human.
    My mother is a halfling and my dad is an ogre, so that makes me an Ogreling
  114. Point, the. It he missing is. by Anonymous Coward · · Score: 0

    It's not the style or format of the comments that offends, or great one.
    It's the fact the most of the comments are unreadable or contain no useful information.
    Fight the second battle first, then clean it up.

  115. Tabs for indents. Never spaces. by Anonymous Coward · · Score: 0

    That's kind of what tabs are for, but that only works if you ONLY use tabs and never use spaces.

    Which, of course, is exactly what you should be doing.

  116. For non-native speakers and literalists: by fyngyrz · · Score: 1

    Well, I am neither brain-damaged nor a native speaker, and it is pretty clear to me that, while he does call the unbalanced comment style "brain-damaged", nowhere did he call *anyone*, not even those who like that style, brain-damaged.

    That interpretation requires that comments have brains. They don't. So this particular remark can reasonably be read to impugn the author of the comments. However, it's also extremely likely that this is a case of hyperbole; in which case smiles are called for, not outrage.

    Yes, English is annoying. Linus can be, too. :)

    --
    I've fallen off your lawn, and I can't get up.
  117. You can write Object Oriented C code by h4ck7h3p14n37 · · Score: 1

    You do realize that you can write object oriented code in C with structs and function pointers, don't you?

    Take a look at Berkeley Sockets, as you go up the networking stack structs extend other structs, which is OO design.

  118. It is not unusual. by luis_a_espinal · · Score: 1

    In the real world, "learning some other guy's code base" sometimes would indeed take more time than rewriting it the first chance you get.

    If you haven't learned what something does and how it does it, then how the f*ck are you going to succeed at rewriting it?

    By re-implementing the functional requirement that is supposed to be met by the God-awful complicated (and most likely buggy) code from scratch. Typically you have to delve into existing code to integrate or to fix something. Most often to fix something. So in those cases:

    • You know what the code is supposed to do, functionally, and
      • either the code is not doing it right, or
      • it is doing it right, but it is additionally doing something wrong

    Think clean-room re-engineering from specs. This happens all the time, a system or function F that is supposed to do A, but that it uses too much memory, or it is too slow, or it leaks resources.

    Whatever, but you know what F is supposed to do.

    And the code behind A is just nasty and impenetrable, so hard to untangle to simply fix what is broken.

    So you implement it from scratch so that it does A without all the other unwanted shit. That's how it is done all too often in the real world.

  119. server routing stack is crap by Anonymous Coward · · Score: 0

    (every) Server routing stack is crap, unscaleable. No self respecting routing company in valley uses it unmodified.
    If you every worked for cisco, jnpr you will realize we comment this way : (php crap will probably reformat this comment). /*
      * fuck you linus
      */

  120. /* Deep End */ by Anonymous Coward · · Score: 0

    He's gone full fruit loop. And he has full transformed himself into the punctuation police. This indeed is a sad time. While yes I agree that there are some comment styles that are visually more appealing than others I would say that I am more interested that I see any code documentation at all.

  121. indent by Anonymous Coward · · Score: 0

    Dude, that's what gnu indent is for...

  122. Re:Style cop.... (new an better) by Anonymous Coward · · Score: 0

    I've had this thought for a very long time. We are now at a point where presentation and content can and *should* be separated so as to benefit the end user. Devs do this all the time for the myriad formats that the plebs want for their own petty purposes. Why can't we do this for ourselves?

    I think something like this will eventually show up on top of a layer like LLVM. The only difficulty will be selling it. Not sure, but it might take some kind of "killer app" for devs before adoption.

  123. Re:Many things are worse than bad comment punctuat by Anonymous Coward · · Score: 0

    At best your code can explain what it's doing, but not why or how. I mean, it's great that I can see you frob and then swizzle. But why frob first and swizzle second? Why frob at all? Why not frobnicate instead?

    dom

  124. power by gzuckier · · Score: 1

    has gone to his head.
    /*
    good
    */

    ./*bad
    */

    is not the worst programming problem I see

    --
    Star Trek transporters are just 3d printers.
  125. Must be about perfect code now by ebvwfbw · · Score: 1

    If he's complaining about comments, Linux must be close to perfect. Otherwise, he'd be worried about that instead.

    Hell, I'm happy if my guys leave ANY comments in their code.

    In the past I have seen very unprofessional comments. One where they bitched back and forth, calling each other names.... and so on. Even the women could get very testy.

  126. Re:Style cop.... (new an better) by Anonymous Coward · · Score: 0

    My team and I agreed to use tabs for everything, then we set our editors to the width we like best.

    Also, I've made a couple mappings in vim that change 2 spaces to a tab, 4 spaces to a tab, tabs into 2 spaces, tabs into 4 spaces and every other possible combination that I want. If I want to reformat code to have the whitespace rules I want, I simply use gg=G and the file gets re-indented with the rules I set.

    It's not ideal, but I do think a lot of the "tabs vs whitespace" issue can be solved with editor configuration. Even if I hated tabs with a passion and everyone in my team used them, I could:
    1) Convert tabs to spaces: \ts2
    2) Apply indent rules: gg=G
    3) Make changes
    4) Convert spaces to tabs: \st2
    5) Apply original indent rules: gg=G
    6) :w
    7) Commit

  127. Re:Many things are worse than bad comment punctuat by swillden · · Score: 1

    At best your code can explain what it's doing, but not why or how. I mean, it's great that I can see you frob and then swizzle. But why frob first and swizzle second? Why frob at all? Why not frobnicate instead?

    dom

    Sometimes those sorts of things do require explanations which can't be made clear through naming. Most of the time, though, good naming and good code structure can explain everything except the road-not-taken questions... and it's relatively rare that the road-not-taken choice is actually important enough, or has sufficient non-obvious rationale, that it requires explanation. If it does, by all means put it in a comment, though -- and note that that sort of comment *doesn't* tend to become obsolete.

    --
    Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
  128. Kitchen by Anonymous Coward · · Score: 0

    I would love to see his kitchen.
    I bet everything is in airtight containers labled with a professional label maker.
    Racked and sorted into multiple different categories then sub sorted by alphabetical order.

    I bet if someone puts something back in the wrong place, he has an absolute meltdown at them.

  129. No by Anonymous Coward · · Score: 0

    This is Nerd Rage, pure and simple. Never seen a clearer case of it! Complaining over comment style?!

  130. OCD? ASD? by andrewwarrenau · · Score: 1

    Oh lordy, OCD+ASD to the max methinks. If this trivia is enough for him to work up a head of steam then all else must be full of rosy awesomeness in Linuxland.

  131. Award-winning example of comment style by Keybounce · · Score: 1

    The importance of good commenting can be seen in this winning example of C code

    https://github.com/c00kiemon5t...


    main(C,V)
    char **V; /* C program. (If you don't
      * understand it look it
      */ up.) (In the C Manual)
    {
            char _,__;
            while (read(0,&__,1) & write((_=(_=C_C_(__),C)),
            _C_,1)) _=C-V+subr(&V);
    }

    (GRR, how do you tell slashdot to NOT ALTER THE FORMATTING AT ALL!?!?)

    Yes, there's more (see link). But you can clearly see the importance of comments there.

  132. Coding style is a vehicle to convey your brillince by SpaghettiPattern · · Score: 1

    Coding style is a vehicle to convey your brilliance. You're a decent programmer so conform to whatever the style is on the project you work in. Don't waste your precious short life on arguing about style.

    For instance: In order to be able to comply to any coding style, I always set up my modules so that reordering members will not affect the functioning. Want to order constructors, getters/setters and/or other methods differently? Want to order static members in a very specific way? All fine by me.

    Let's get the real issue at hand be dealt with.

    --

    I hadn't the slightest objection to his spending his time planning massacres for the bourgeoisie... (P.G. Wodehouse)
  133. Re:Many things are worse than bad comment punctuat by 140Mandak262Jamuna · · Score: 1
    Thanks for the follow up. I agree with you on using long descriptive function names and variable names to reduce the need for comments.

    Differences in our backgrounds explain the different emphasis we are placing on comments. But all three of us agree more than we disagree. Splitting hairs about the last 5% disagreement, while ignoring 95% agreement.

    --
    sed -e 's/Chuck Norris/Rajnikant/g' joke > fact
  134. Re:Many things are worse than bad comment punctuat by swillden · · Score: 1

    But all three of us agree more than we disagree. Splitting hairs about the last 5% disagreement, while ignoring 95% agreement.

    We're programmers :-)

    --
    Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
  135. Click Bait by Anonymous Coward · · Score: 0

    You quote Linus as saying:

    "Can we please get rid of the brain-damaged stupid networking comment syntax style, PLEASE?"

    Then extrapolate the completely wrong conclusion:

    ...labelling some members "brain-damaged" for their preferred method of punctuating comments.

    Linus did not label members at all. He was referring to the comments themselves. Take an English class.

  136. Can we get rid of the brain dead sweary guy? by Anonymous Coward · · Score: 0

    It's no less professional to arse-up punctuation everywhere possible than to go all sweary every time you feel pissed off in public.

    Give it a fucking rest, Linus. And get over yourself, pal. Nobody is impressed.

  137. The problem thogh by Anonymous Coward · · Score: 0

    is that C++ clears itself up.

    Debugging an "Objects, Objects, everywhere, but never any think" C++ program is a huge pain because a bug can exist in any one of "implicit code" points of constructor or destructor, even if not a single written line of code appears in the source debugged.

    That right there is a huge loss to C++

    And frequently the problem is that the general case wants such easy constructs in code, but in many cases it's neither wanted nor warranted, but still run. Think on the Windows method of forking a new program compared to the UNIX method, and how that made multithreading on windows much quicker, whilst multithreading on UNIX is often not faster enough than forking, whilst encouraging sharing data and the bugs that arise when this is done without your knowledge.

  138. Pascal format FTW! by KlomDark · · Score: 1

    It's way better to use Pascal-style comments:

    {
        This is a comment
    }

    (I started with Turbo Pascal, and the first time I saw C code I was so confused - It's all comments, how does this work at all?) :)

  139. Re:Many things are worse than bad comment punctuat by Anonymous Coward · · Score: 0

    Agree (mostly). Though I'm not sure about putting obsolete comments first. Even though obsolete, it still tells you that someone once cared enough to comment that code. It also tells you something about the code history.

    Anyhow this priority list just highlights how Torvalds has gone off and is ranting about one of the least important aspects of comments. I'm not sure this merited the expenditure of some of Torvalds' considerable credibility. It will be a minor blip if he limits this type of discussion going forward. Keep doing this and he risks becoming known as a trivia-obsessed oldster. Which won't do him or anyone much good.

  140. Re:Style cop.... (new an better) by Anonymous Coward · · Score: 0

    You must be Republican. There is only one way which is reality, and trying to come up with your own world-view of that reality only leads to problems. Just stick to actual reality, which are the rules Linus came up with.

    It's like if Monet wanted people to add to his paintings but some asshat showed up doing something other than pointillism. The code is a piece of art in itself, follow the style. If you want to be Picasso then write your own kernel...

  141. That's good news by allo · · Score: 1

    When Torvalds has the time to rant about comment formatting, then there can't be big problems in the code currently.

    btw: There are tools to fix formatting automatically.
    related: They don't use doxygen (like syntax)?

  142. Braindead by Vlijmen+Fileer · · Score: 1

    Braindead indeed.

    Mouth-foaming fool Torvalds is at it again, trying to talk down on some normal and inconsequential commenting habits.
    I would not be surprised if his preferences are in line with his coding preferences' in relation to braces, where he started a Holy Fulmination (t/m) against that guy with the beard.

    Arrogant airheaded asshole.

  143. Re:Many things are worse than bad comment punctuat by Anonymous Coward · · Score: 0

    Also known as meta comments, they explain why you did something a certain way. It might be essential to use a certain method. Without these types of comments a new programmer to the project, or you yourself will forget the why and go in thinking they are clever and change the code. Voila! nothing works anymore because of some obscure piece of code or equipment or database needs it done that way. // specialized function to calculate XYZ // // META: // META: This has to be done using method X because the requires it. // META: System X is planned to be replaced by which will use the new database, and // META: the new XXXXX.YYYYY.ZZZZZ format, at which time the standard library function Y can be used instead.

    I've done it with old files as well by renaming the directory to something descriptive. Helps with cleanup later, but you don't shoot yourself in the foot by deleting something and not realizing something out there still depends on it. e.g. upgrading PCs in a corporate setting. People are asked to get all the files they need off their old system. They always say they have everything. They don't, they always have an e.g. excel file tucked away is some weird directory only used once per year so they don't think about it. I would back up their entire old system, everything, every file, in a directory with a descriptive name
    e.g. /BACKUP PC03432 John C 20160722 can delete after 20171022/
    They will freak out a few months later thinking their file is gone, but you can magically save the day for them.