Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
Check out the new SourceForge HTML5 internet speed test! No Flash necessary and runs on all devices. Also, Slashdot's Facebook page has a chat bot now. Message it for stories and more. ×

Comment Re:This is pretty obvious. (Score 1) 308

Who would have bet on self-driving cars the next 20 years in 2010? And yet, we seem to be on the brink of it.

Who would bet on self-driving cars that work safely and reliably in the next 20 years right now? It's always easy to wheel out some dandy-looking prototype that works fairly well 99% of the time. But that remaining 1% is what hurts you. Given tens of millions of people hurtling about in "self-driving" cars, how many deaths, injuries and other harm does that tiny-sounding 1% represent? http://spectrum.ieee.org/cars-...

How about facial recognition systems for airports and other public places that don't produce prohibitive numbers of false psoitives? How about speech recognition systems that get above that hard-to-improve-on 99% accuracy? (Sounds great until you work out that with 500-600 words per page, 99% accuracy means 5-6 errors per page - randomly distributed so you have to proof-read everything you have just so breezily dictated).

Comment And they said it could never be done! (Score 3, Insightful) 308

"Called DeepCoder, the software can take requirements by the developer, search through a massive database of code snippets and deliver working code in seconds..."

This I have got to see. By the way, I notice that the first thing mentioned is the proposed name. "DeepCoder" - well, with a name like that, how could anything go wrong? After finding that name, I expect the rest of the project was all downhill. So to speak. Erm...

1. "...take requirements by the developer..." Expressed in what form? As random remarks over a cup of coffee - in which case the usual proportion of incorrect, incompatible and misconceived requirements can be expected, along with the standard quota of perhaps 90% of the requirements not being mentioned at all (because no one has thought of them). Or perhaps in some rigorously defined logical format, in which case we might simply call them "pseudocode" or "Model Driven Design" or perhaps "formal methods".

2. "...search through a massive database of code snippets and deliver working code in seconds..." Ah, the long awaited "Frankenstein IDE"! Now you too can have a loving companion or friends stitched together from offcuts of raw liver and other offal. If only it weren't so easy to pass so airily over real difficulties to conjure up images of working code delivered in seconds. I wonder if Microsoft has thought of providing some kind of validation utility to make sure that the "working code" actually implements the requirements?

Comment Always Assuming... (Score 2) 59

...(and it's a pretty big assumption) that human beings themselves survive for the next 200 years. And have good enough technology to reach other planets. Our descendants in the year 2217 (if any) may have their work cut out finding enough food and fighting off enemies who want to take their food.

As our numbers grow, and it becomes increasingly obvious that none of our fancifully so-called "leaders" have either the power or the intelligence to do anything to curb the growth, Homo Sapiens [sic] stands revealed as a species which throws up the occasional intelligent individual - but which cannot possibly be deemed intelligent as a whole.

Otherwise, how come no one is in charge? When did you last hear of a bunch of people who were faced by serious threats to their existence, and survived without any central leadership? Instead, we have bought into the "capitalist free market free enterprise democracy" fantasy, which essentially says that if everyone goes flat out in pursuit of his or her own selfish ends, the overall result will be the best of all possible worlds for everyone.

To be honest, you couldn't get away with that as a plot line in "Doctor Who".

Comment Re:Rose tinted glasses (Score 2) 472

World wars have a similar effect. Lots of people die, lots of work to be done, few people able to do it, price of labour goes up.

Actually, the total US deaths in WW1 and WW2 combined were about 522,000. Almost insignificant. Only slightly more than the Russian dead in the Battle of Stalingrad alone.

Comment There is nothing new under the sun (Score 4, Interesting) 388

"Gentlemen, you are now about to embark on a course of studies which will occupy you for two years. Together, they form a noble adventure. But I would like to remind you of an important point. Nothing that you will learn in the course of your studies will be of the slightest possible use to you in after life, save only this, that if you work hard and intelligently you should be able to detect when a man is talking rot, and that, in my view, is the main, if not the sole, purpose of education".

- John Alexander Smith, Professor of Moral Philosophy, Oxford University, 1914.

Comment Re:Until (Score 1) 374

OK, I'll give you that.

Still, people like Linus Torvalds aren't helping by insisting that Linux never be tainted by a single C++ feature.

Even if he only allowed STL usage (std::string/std::vector/std::list, etc) and stack unwinding it would still be a huge step forwards.

Comment Re:An example for rest of the nation. (Score 0) 158

I am sure he can learn more than you in 24 hours about launching satellites.

His attention span is about 10 seconds. The idea of him spending 24 hours learning something is laughable.

PS: Check his Twitter sometime. The idiot has over 34000 (thirty four thousand) tweets to his name. How is that even possible?

https://twitter.com/realdonald...

Comment Re:Until (Score 0) 374

Use std::string and std::vector instead. You can use them perfectly well in "C" code so there's no excuse.

Uhm, no. Both are C++ additions that are not in any ISO C standard. If you want to use them, you need to compile with a C++ compiler and you need to link against C++ libraries, which may or may not be available for your target platform, even if you don't mind the additional clutter without any real added functionality.

I didn't say they were in the ISO C standard, that's why I out "C" in quotes.

You can write old fashioned C code but use std::string instead of malloc/strcpy/strdup/etc. There's no clutter or overhead, std::string most likely uses malloc/free underneath so in effect the compiler will produce the exact same code as you.

The difference is that the compiler never has a bad hair day and messes up the size of a malloc. It's also easier, you don't have to worry about ownership, you can throw exceptions in a deeply nested file reader and all the temporary strings will be freed for you automatically (assuming they're stack-based objects). etc., etc.

Anybody using malloc/free to manage strings in 2017 is doing it wrong.

And by extension: Anybody managing data arrays without std:vector is also doing it wrong.

Comment Re:Until (Score 1) 374

I manage a 500,000 line C++ program which does a lot of memory management. There's exactly nineteen "delete" statements in all that code and the last one was added about 10 years ago. The person who adds number 20 has to invite everybody out for dinner.

Nobody in the last ten years has done any manual memory management in this program or had a leak or a dangling pointer. It also closes all files promptly, etc. (try getting a garbage collector to do that!)

Whatever else Rust may do, C++ memory management isn't one of the problems it solves.

Comment Re:Until (Score 4, Insightful) 374

Right, but it's shitty for the programmer to manage it manually, isn't it?

Not as shitty as having to guess when Java will close the file you just wrote (eg. so you can copy it to a USB stick).

Resource management is much more than RAM, it's files, network connections, etc. Garbage collectors handle RAM OK but they're really really crap for everything else. In reality languages like Java need just as much manual resource management as C.

The only language which really doesn't need manual work is C++. C++ has stack unwinding. C++ frees resources immediately when objects go out of scope, not when some garbage collector decides to wake up (which might be "never" - your file might _never_ close unless you quit the program).

Comment Re:Until (Score 1) 374

What can you do in C about memory management?

Simple: Use C++ memory management instead. Your existing "C" compiler can probably do it if you let it.

When you're there you might find you enjoy some of the other features too.

Slashdot Top Deals

Pause for storage relocation.

Working...