He's blunt. He's aggressive. He's offensive.
He's right.
And thank heavens he still cares enough about his baby to kick ass when needed.
Linux Lord Linus Torvalds has unloaded as only he can in a post to the Linux Kernel Mailing List. At issue is some new networking code that popped up in what was hoped to be the final version of Linux 4.3. Torvalds' first words on the code were: Christ people. This is just sh*t. Torvalds is grumpy because some new code has …
He's not corporate either, he has no need to be polite.
In professional atmospheres, I've witnessed a whole lot worse than "what is this shit?". Privately, I've heard even high-end corporate types use such languages in private meetings - they are only more polite for fear of some HR-comeback if they're not. In everyday personal life, I sure give such verdicts on crap that I'm forced to use.
I'm more interested in why anyone thinks this is worthy of an article. "Elite software developer gets pissed off at crap software code foisted upon him".
What gets me is that a few messages later is a re-pull request without that code - so it's entirely unnecessary, unjustified and only creeped in (if the new pull request is to be believed) because nobody commented on it when it was posted to the usual mailing lists. This is a heads-up to his maintainers, and the people posting patches, and those reviewing patches. "We don't do this".
And guess what? I bet nobody's going to try pushing that shit into the kernel again.
"I'm more interested in why anyone thinks this is worthy of an article. "Elite software developer gets pissed off at crap software code foisted upon him"."
I suspect the 'newsworthy' part of this is actually how restrained Linus was in his rant this time. After all, nothing caught fire and women and children didn't run screaming.
It's small wonder that GNU/Linux is going the way of the Blackberry! It's run by people who act like little children! Nay, worse than children.
Incivility is rarely appropriate and never constructive. Much better ways exist to get one's point across, without resorting to such tawdriness! And anyone defending such antics deserves equal blame.
Besides, in a few years, GNU/Linux will go the way of the Blackberry. And small wonder, that.
"Incivility is rarely appropriate and never constructive. "
Oh shut up! Yes, I do agree but sometimes you have to vent, clear the air make people aware of your emotions THEN most of us will apologise and get the thing fixed.
Sorry but despite us have having this noble air of civility, we're all just monkeys with technology. The killer instinct is just below the surface in every single one of us and it's only the brainwashing we get in our familie, schools and social circles that helps us to keep it under control. Once in a while it bursts out, we break something, shout and scream and then we get back to normal.
Sorry but despite us have having this noble air of civility, we're all just monkeys with technology. The killer instinct is just below the surface in every single one of us and it's only the brainwashing we get in our familie, schools and social circles that helps us to keep it under control. Once in a while it bursts out, we break something, shout and scream and then we get back to normal.
Although I don't like what you wrote, I'm forced to agree with it.
You "politically correct at all cost" types make me wanna puke. How is this incivil? he's insulting the code no the author. The code IS crap and he's pointed that out with the force it requires to nip it in the bud and stop some moron copying that approach again later.
>> It's small wonder that GNU/Linux is going the way of the Blackberry!
Wow how uniformed can you be? You need to go get a clue.
Guess what OS over 99% of the worlds 500 top supercomputers run? Guess what OS is the parent of what most of the world's smartphones run? Guess what OS Google and most of the other servers on the internet run? Guess what OS your own home networking gear is probably running?
It's open source development. Licensed under GNU GPL. Pray tell how it can go the way of Blackberry? It is not even a company...
Sure other people have formed companies which have created products based Linux like Redhat, VMware and Canonical to name few.
There's a rather good argument that he's wrong. Essentially using the compiler built-in function is more efficient and in a way more readable as everybody understands what this code is about. (checking for an overflow)
Overflows are one of the hard parts of C(++/#) and even Java.
Here is the full argument by someone who professionally finds integer overflows:
http://blog.fefe.de/?ts=a8c95274 (In German of course, this is about computing after all)
There's a rather good argument that he's wrong.
I don't think it's a zero-sum game in this case. The code he's complaining about is not particularly readable; I'm with him on that. And using language extensions is suspect, in my book, but then I've never been fond of Gnu's "almost but not entirely unlike C" language.
On the other hand, his proposed alternative, while very clear, duplicates the addition and so risks skew - in a future edit, someone might change one line but miss the other.
The broader point, that checking for over/underflow in C is a pain in the ass and easy to get wrong, and at best makes the code more verbose and harder to read, is well-taken. This is one of the real problems with C: making it safer is possible, but expensive both for the author of the code and anyone reading it later (and some studies put reading and understanding code at as much as 40% of the overall cost of typical software development).
beaten into Microsoft software people "Make money at all cost!
Well, Windows 10 says the beatings didn't work.
I've no doubt that if MS had been taken private by somebody like Silverlake (a private equity outfit focussed on IT for those not familiar) then W10 would have been very different, would have been a winner, and we'd (happily) have been reaching for our wallets because no way on this planet would it have been free.
Maybe I'm alone on that, but on balance I would have payed for W10 if it had worked. So a choice of a pure tiles'n'apps or W7 menus according to my choice, ideally some new whizzy tech to justify the price (that is, not crapware like Cortana), no spyware, better security (including a complete ban on security ground-zeroes like Flash) and all for a cost of around thirty quid.
But Microsoft don't see this. W10 will be rammed down our throats (and when pressure doesn't work, they'll just end-of-life W8 to force us), but speaking for myself, I can smell a couple of things. One is the smell of decay (I thing somewhere Redmond way), and the other thing I can smell is mint. Linux Mint. I'm not there yet, but Microsoft are pushing and pushing, and eventually my patience will give way. I just needed to replace a domestic laptop, and I've ordered a Chromebook. I know that's Google spyware, but the point is that it's the first non-Microsoft computer in this household in nigh on thirty years.
Mint is not the highest quality Linux distribution. So don't judge all of Linux by Mint if you ever end up running it. Although Mint has a lot of features that do make it new user friendly. Mint is akin to your first bicycle with training wheels on it. Once you get your balance you might want to try out a distribution with a more mature orientation. By then you'll know which to choose.
Now as far as spyware goes everyone is spying on your as soon as you access the web. So I don't know how much Google spying on your some more really matters. Have a cookie.
I think this tired argument about Windows being "undeniably insecure" is wearing thin.
In reality Windows is now pretty secure, sure it was insecure 10 years ago, but now as each vulnerability has been patched the malware writers are having to attack things like Java and Flash as it's increasingly difficult to attack Windows itself.
The old claims about FOSS being inherently secure because it is open and that means more eyes were able to look over the code has been debunked lately. I am thinking of the likes of OpenSSH/Heartbleed and TrueCrypt and the number of viruses that are appearing on Android.
The truth is, (shock horror), that whilst few end users were using Linux and thus it was not worth the malware writers attention it seemed secure. Now that finally it's going mainstream in its Android form and there are substantial amounts of end users with Bank Accounts to hack, suddenly we are seeing the true facts that Linux like Windows is written by mere mortals and there are just as many bugs as Windows had.
GOTO is fine in very select circumstances. i.e. (and the forum code will make a mess of indentation here)
int init_structure(struct my_structure** s)
{
int ret = 0;
*s = malloc(sizeof(struct my_structure));
if (!(*s)) {
ret = errno;
goto exit_init;
}
*s->substructure = malloc(sizeof(struct another_structure));
if ((*s)->substructure) {
ret = errno;
goto exit_init;
}
free(*s);
*s = NULL;
exit_init:
return ret
}
Yes, that GOTO could be factored out quite easily in this situation, but suppose you had not one, but three or four sub-structures to allocate? Then an IF-based solution becomes messy. GOTO actually works out clearer to understand. Easy to read code is easy to debug code. There's no spaghetti here!
What's not okay is jumping between labels in other functions or using it to replace if, while and for statements. The C language has things like setjmp and longjmp for doing exactly this, and it's one feature that to my mind is just asking for trouble, so I never use that feature. That's what leads to a big tangled mess that no one can understand.
setjmp and longjmp are essentially the C version of exception handling and save doing if-then checks on returns of nested functions. But they're really only for use when things are really in a mess and unrecoverable - as exceptions should be used rather than as a general function return method which is what seems to happen in C++ rather too often due to poorly written libraries and ignorant coders.
This post has been deleted by its author
This post has been deleted by its author
It's not a leak. If the sub-structure allocation succeeds, the goto just after it is there to skip round the free. The free is only called if the first malloc succeeds and the second fails, and in that case, you want to free *s but not the sub-structure.
Having said that, the confusion caused by a supposedly simple example of how to write good code with gotos is a shining example of why most people steer clear of them.
Vic is correct, OP is leaking.
No I'm not - I misread the sense of the allocation test - it changes betweent the two mallocs. The goto is on successful allocation for the second one. I should look more carefully next time.
Although I don't make hard-and-fast rules about the use of goto, I think this is a case where it really shouldn't be used...
Vic.
This post has been deleted by its author
In C, there is never a strict need to use goto. Anything that does need goto can be rewritten without using it - this can be proven mathematically. C without goto is still turing-complete.
But it can sometimes be cleaner - a single goto can take the place of a chunk of code repeating twice and taking brackets five levels deep. Some consider the goto to be a tidier option.
This is wrong.
Even very good c or c++ developers make errors that can be security holes. All you can say is that they are less likely take them, which isn't really good enough. These languages often silently hide these flaws, ripe for exploitation later. Lots of tools help identify the flaws, but it's a lot of effort.
It's the 21st century and we still have languages that demand perfection from flawed humans. No wonder this site is stuffed with exploit news.
This post has been deleted by its author
This post has been deleted by its author