Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
DEAL: For $25 - Add A Second Phone Number To Your Smartphone for life! Use promo code SLASHDOT25. Also, Slashdot's Facebook page has a chat bot now. Message it for stories and more. Check out the new SourceForge HTML5 Internet speed test! ×

Comment Re:This reminds me of the nuclear boy scout story. (Score 1) 134

The moral of the story is that even a stupid human being can be pretty smart. Particularly a sufficiently motivated stupid person.

That's an odd thing to say, since stupid is the antonym of smart. I think what you meant to say is:

The moral of the story is that even a foolish human being can be pretty smart. Particularly a sufficiently-motivated fool.

Foolishness is the opposite of wisdom, and the foolish/wise axis is roughly orthogonal to the stupid/smart axis.

Of course it also helps that intelligence comes in different flavors. Some people are good at spatial reasoning, others are good at verbal reasoning. But we often overlook social reasoning because it's not part of the traditional IQ tests. I think another reason that Social IQ testing hasn't caught on is that there is good reason to believe that social reasoning ability isn't fixed. Changes in attitude can strongly impair or enhance an individual's ability to process social information.

I don't think this has anything to do with social intelligence. It's perfectly possible to have high intelligence across every category, including social intelligence, and still be foolish. Wisdom/foolishness is in how you think about things more than in how your are able to think about things. Wise people consider the consequences of their actions carefully. I'm sure this guy was fully capable of thinking through what would happen if he got caught... he just didn't bother to do it.

Comment Re:Still a dream (Score 0) 41

The problem with flying cars, is that they will not be able to compete with Hyperloop. The idea of 700 MPH (1125 KmPH) travel is something that current jet technology can't really do, short of reviving Concorde. While Hyperloop is theoretical at this point, so are affordable flying cars, but I see hyperloop being mainstream within 10 years if everything pans out. Combined with self driving cars, Hyperloop is the future of transportation. But only because someone was crazy enough to think it up.

That is the real disruption technology, that will only be supplanted by Beam me up Scotty style transporters.

Comment Re:CEO's fear (Score 1) 93

I seem to recall a study a few years back that showed that most highly paid CEOs' decisions were not better than random and, in a number of cases, were significantly worse. They shouldn't be worried that they can be replaced by AI, they should be worried that they can be replaced by a magic 8 ball.

Comment Re:Robots are good (Score 1) 93

The problem isn't robots taking all our jobs, it's robots taking half of our jobs. How do you manage a society in which 50% of the working-age population are contributing essential work for the functioning of civilisation and the other 50% are not able to do anything that a machine can't do better? Unemployment rates of 10-20% are currently seriously problematic for western societies and cause huge economic problems. For some jobs, you can solve it by dividing the work among more people, so you have four people working a 10 hour week instead of one working a 40 hour week, but that doesn't help you to deal with the people who aren't able to do any available jobs.

Comment Re:I like functions... (Score 1) 298

Yes, it means your functions aren't allowed to have side effects (i.e., all parameters are passed by value and the only result is the value returned to the caller).

It's quite a bit more than that, at least if you're talking about pure functional programming. You also have to get rid of most all of your old notions of flow control. Imperative programming is about defining sequences of steps, some of which are conditional. Functional programming is all done with nested transformations; there are no sequential steps, there are no branches, there is no iteration.

If this sounds freakish and impossible to someone raised on imperative programming paradigms... yes, it is. Functional programming requires thinking in an entirely new way. It's a very powerful tool. I'm not sure it's the best tool for the systems I build (though I'm also not sure it isn't), but at a minimum it's a useful way to think about code construction. Every programmer should spend some time learning it.

Comment Re:"Like"? (Score 2) 298

I don't get what you mean by "like".

Procedures are procedures, period.

Indeed they are. And purely functional programming languages don't have procedures.

The grafting of functional programming constructs onto imperative languages is interesting and useful, but every programmer should spend some time learning to program in a purely functional style, even if they then go back to imperative languages for their everyday work. It opens up a whole new way of thinking about code.

Comment Re:It has its uses (Score 1) 298

At some point, the complexity of the task the program is executing requires complex code.

This is a more profound statement than it appears at first. I'd say that the minimal complexity of the code necessary to accomplish a task defines the complexity of the task itself.

As for GOTO the issue isn't GOTO per se, but implicitly building other control structures like loops using GOTO as a primitive -- a legacy of the very earliest machine languages in which you implemented algorithms using a very limited instruction set. The flexibility of GOTO makes it a good choice if you have only a few control structures to work with; but that same flexibility imposes the cognitive load of figuring out what the original programmer (possibly yourself) meant.

But even if more structured (i.e., limited) control structures available, there are problems where GOTO is the natural way to express them. State machines for example. I've seen them implemented with long if-then-elseif chains or case conditional constructs, but that's just thoughtless programming that obscures what is going on. A state machine is much more clearly implemented with GOTOs, although tail recursion can be a reasonable alternative.

Comment Re:It has its uses (Score 1) 298

There's two big things that have come out of the recent move towards more functional programming which are really important.

You missed the biggest one: Eliminating mutable state makes code inherently safe for concurrency. Not an inconsiderable issue, since the direction of hardware progress seems to be towards ever more cores.

Of course, pure functional programming eliminates mutable state by creating massive numbers of copies. Actual functional programming languages (e.g. Haskell) are quite clever about optimizing out nearly all of those copies, but the result of that is that the generated code has mutable state. Still, this may very well be the best way forward... automatic parallelization of imperative code is very hard. It may well be that it's easier to automatically decide how to split work up by analyzing data copying, and then apply copy optimization to each thread.

Comment This reminds me of the nuclear boy scout story. (Score 2) 134

You know, the one where a kid figured out how to refine thorium by reading the Golden Book of Chemistry and turned his mother's garden shed into a Superfund site.

The moral of the story is that even a stupid human being can be pretty smart. Particularly a sufficiently motivated stupid person.

Of course it also helps that intelligence comes in different flavors. Some people are good at spatial reasoning, others are good at verbal reasoning. But we often overlook social reasoning because it's not part of the traditional IQ tests. I think another reason that Social IQ testing hasn't caught on is that there is good reason to believe that social reasoning ability isn't fixed. Changes in attitude can strongly impair or enhance an individual's ability to process social information.

Which leads to the flip side of the stupid people being able to be smart: even smart people can be stupid, particularly in making social judgments.

Comment Re:FSF = not practical (Score 1) 115

But it's still hard to take Stallman seriously because he doesn't provide practical solutions to these problems.

Actually he does: opt out. It won't kill you to only buy entertainment which is DRM-free. So you can't stream the latest episode of Game of Thrones; if you have access to a library you have more alternative ways to entertain your imagination than you'll ever have time to use.

The problem is not being able to buy what the people around them are buying is just too radical for most people.

This is not a practical or tolerable solution for 99% of the population.

This is not anticipated to be tolerable by 99% of the population. They don't actually know, because they'll never try it. Stallman seems to be happy enough without Netflix. But Stallman is a nut. Why is he a nut? Because he's happy enough without Netflix. It's circular reasoning; for all you know you're a nut too, you just don't know it.

This is how powerful corporations control people: by manipulating their unexamined assumptions of what they can tolerably live with. They don't need police power, because people will police themselves.

In a sense this is nothing new, they're just manipulating a longstanding fact about human nature: people are very bad at predicting how things will affect their future happiness. I've recently developed an interest in the old Greek and Roman philosophers called the Stoics. They reasoned more or less thus: if happiness is having all your wants satisfied, the surest path to happiness is to want less. But even they realized that nobody can really adequately regulate their own desires. The best you can achieve is a kind of skepticism about what would otherwise be unchallenged assumptions about what you need. But even though it falls short, it goes a long way toward freeing you from self-afflicted dissatisfaction.

Comment Re:It's not that I want to brag I'm old... (Score 1) 298

Add to that, the defining feature of a functional language is the set of things that it disallows, not the set of things that it permits. A multi-paradigm language, by definition, has to permit anything that the various paradigms permit and so doesn't gain the benefits that you get from being able to reason about your code in a language that doesn't permit unconstrained mutability or side effects.

Comment Re:It has its uses (Score 3, Interesting) 298

This needs moderating up. Talk to an Ocaml programmer and a Haskell programmer about what makes a functional language and you'll see very different opinions and these two are languages that were actually designed as functional languages: the bits that end up in other languages are a tiny subset.

Coming from the Haskell side, I see functional programming as programming without side effects and with monads. You can implement monadic constructs in other languages, but it rarely makes code cleaner. Just having higher-order functions doesn't make a language a functional language any more than having structs makes C an object-oriented language.

If the question is 'do you think using higher-order functions simplifies the expression of some algorithms' then the answer is obviously 'yes': programmers have a lot of tools to choose from and most of them are useful at least some of the time.

Comment Re:It has its uses (Score 2) 298

In C++14 in particular, lambdas with auto parameters dramatically reduce copy-and-paste coding. If you have a couple of lines of code that's repeated, it isn't worth factoring it out into a separate templated function (in particular, you'll often need to pass so many arguments that you'll end up with more code at the end), but pulling it into a lambda that binds everything by reference and has auto-typed parameters can reduce the amount of source code, while generating the same object code (the lambda will be inlined at all call sites).

Slashdot Top Deals

The bogosity meter just pegged.

Working...