Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!


Forgot your password?

Comment: Re: Poor Alan Kay (Score 1) 200

by martin-boundary (#48903581) Attached to: Bjarne Stroustrup Awarded 2015 Dahl-Nygaard Prize
Essentially, they should never be used at all. If you're going to have an unrecoverable error, it's trivial to design the system to exit without using exceptions anyway.

Probably the most useful side effect of exceptions is printing the stack trace, and that's not something where the overhead (both performance wise, and logical complexity wise) of exceptions is needed. And you should really be doing logging rather than relying on cryptic exception traces.

The one theoretical case where exceptions are sometimes argued to be superior is if you don't know what to do locally about an error, and you're hoping that a higher level part of the program might know how to recover. Classic example is a read error, and then asking the user to put a usb stick in.

But guess what? That's not how nontrivial programs work. The higher level simply can't know fully the effect of handling an exception that bubbled up, because the low level details that matter can and often do have unpredictable consequences in terms of program correctness, especially when you're reasoning at a higher level. When an exception is thrown, your program state is wonky. Only trivial programs are like the usb stick example. Real programs become subtly wrong if you try to recover a partially completed, partially incomplete, multi statge operation, especially if you're not the guy who wrote the code, but feel you're doing the right thing at a higher level.

Your greatest chance of correctly handling errors is a few lines above or below where the error actually occurs. Anything else sounds good but is worse.

Comment: Re:Poor Alan Kay (Score -1) 200

by martin-boundary (#48897451) Attached to: Bjarne Stroustrup Awarded 2015 Dahl-Nygaard Prize

Exceptions are absolutely the right way to do error handling.

Really? You have no clue.

Exceptions are utterly wrong, they are Gotos Considered Harmful: An exception is basically a nonlocal jump and that's exactly the wrong way to do error handling, because it cause spaghetti logic, where pieces end up all over the place without any simple way to check what the code does besides unravelling the whole mess. And when multiple people maintain the code, it guarantees failures of logic.

The correct way to do error handling is _locally_, right where the failure occurs. It's the _nonlocal_ nature of exceptions which is evil because it causes brittle code and broken logic. Robust code requires that you handle all contingencies correctly. And you simply can't do that correctly way up the callchain except in trivial cases. But you can always do so at the site of the error. It's just very tedious and longwinded. But that's the difference between well written professional code and amateur hour anyway.

Comment: Re:Umm, no. (Score 1) 187

If you knew anything about building construction, you would know that the first humans that built an accurately square large structure must have known Pythagorean Theorem as it is the simplest and only way to set out the structure.

You're either a troll or a moron, pardon my French. The simplest way to construct a square is to take a piece of string, fold it into four identical lengths, and tie it into a ring. Now take four people and pull at the corners until the four sides are taut.

Comment: Re:Umm, no. (Score 1) 187

Instead of self-glorifying episodic re-writes, how about discussing continuous, progressive and well reasoned contributions to culture and civilization?

While that's an admirable thought, the reality is that modern mathematics owes very little to the prehistoric findings pre ca 1500. The breakthroughs that transformed mathematics into the tool we use today occurred mostly in Europe during the Renaissance period and later. Perhaps the only significant (*) contribution before then is Euclid's tour de force (**), technically also in Europe.

(*) to modern mathematics

(**) I'm talking of course of the logical structure, not the actual geometrical results.

Modern mathematics only became possible by inventing a language in which abstractions can be precisely and economically stated. Before this happened, mathematical ideas could only be expressed in analogies, with very lenghty, hard to interpret, paragraphs. It took until the Renaissance for mathematicians to understand that.

Think about legalese. That's exactly what old mathematical documents are like. Over time, symbols with precise meanings were invented. This is how future generations of mathematicians are able to completely assimilate, and then surpass, in a very short time, the discoveries of their teachers.

Incidentally, the lack of such a development in the legal world is one reason why there is so much confusion and irrationality in that world. It's literally at the same primitive stage that pre-Renaissance mathematics used to be, but without so much even as Euclid's Elements for a guide.

Before the modern European era, mathematical ideas were sporadic, and highly subject to interpretation. Where one scholar sees a universal theorem, another only sees a single numerical example, clumsily expressed. More often than not, generalizations were just wishful thinking. Once the modern era began around the time of Descartes, these old results could be rediscovered easily enough by anyone using the modern mathematics.

That's the power of the new mathematical language, and that's also the reason that the old results, while mildly amusing to read about, are not important milestones for modern mathematics.

Comment: Re:I object. (Score 1) 61

by martin-boundary (#48728183) Attached to: The Next Big Step For Wikidata: Forming a Hub For Researchers

Data is racist.

I agree. Just last week I was interviewing for an engineering job with a Nascar team, and all they could talk about was fuel data this, weight data that, etc. I told them that's not how I roll. I'm writing my congresscritter right now to stop this despicable behavior.

Comment: Re:Jimmy Wales On Crack Again (Score 1) 61

by martin-boundary (#48728161) Attached to: The Next Big Step For Wikidata: Forming a Hub For Researchers

[...] and to make all this available to everyone, without any restrictions on use and reuse.

The fundamental problem remains, however. Even if scientists curate the data honestly and comprehensively, what's to stop people from taking the material, editing/changing it, and publishing/claiming their version is correct? The only way to protect against this is to make the data read-only downstream, eg only credentialed scientists will get to create or modify data - and that's a pretty fundamental restriction on use and reuse.

Basically, the idea seems contradictory.

Comment: Re:languages are fads (Score 1) 578

by martin-boundary (#48727643) Attached to: What Language Will the World Speak In 2115?
Incorrect. The Frankish kingdom was located in what is now occupied by France. It is true that Charlemagne ruled a much larger domain, including modern Germany, Italy, and parts of eastern Europe, but these peoples are not considered Franks. Moreover, after Charlemagne died, his territories were split up among his three sons, which resulted in the plethora of countries composing Europe.

In any case, the frankish tongue spoken in the days of the kingdom of the Franks was closer to Latin than modern French or German. The lingua franca before modern English was modern French. For example, the language of modern diplomacy worldwide is often still French, although English is now preferred.

Comment: Re:That is not doxing (Score 0) 171

by martin-boundary (#48724101) Attached to: Doxing -- Something To Expect More of In 2015

ignoring the fact it was his fault for associating his real name with his post in the first place.

Uh, what? The FAULT for the real name fiasco is GOOGLE's and FACEBOOK's and their insistence on making accounts with real identifying information. They are the technology trendsetters and API providers, who turned the internet into a giant fishbowl where people can be easily stalked by anyone.

Ten to fifteen years ago, before they got their grubby ad ridden paws on the web, it was common knowledge and standard operating procedure for people to post things anonymously, and keep their internet usernames well separate from their real world personas.

You can blame the guy for being ignorant, but you can't blame him for acting the way most people are forced to act by those two companies' evil(*) behaviours over the last 10 years or so. The current web is way too unfriendly to anonymity for regular people.

(*) don't be evil my ass.

Comment: languages are fads (Score 1) 578

by martin-boundary (#48724039) Attached to: What Language Will the World Speak In 2115?
The best tool for the job argument some of you want to use doesn't work with languages. When viewed over millenia, all languages are fads. It's best to view them as reflecting the local power structures of the times. The current widespread adoption of English as the lingua franca is purely due to the (now waning) influence of America and Britain combined.

Even the phrase "English as the lingua franca" is ironic, since "lingua franca" originally meant a loose version of French, so this phrase really means eg "English is the New French", which of course implies that French was once the obvious final world language that everyone wanted to learn (about a hundred to a hundred fifty years ago) - although it wouldn't have helped them understand the phrase "lingua franca" itself, since that is Latin, the other final world language that everybody wanted to learn - in Roman times.

Languages in societies evolve slowly and inexorably, as most people here know, eg consider the previous meanings of words like hacker or gay etc. This evolution is not always to promote communication, it is often to impede communication among groups as well (which is why the best tool for the job argument fails).

Simple examples where language evolution is intended to make communication more difficult is where teenagers invent their own dialects, eg in school, as a way to exclude grown ups or other undesirables.

When England was invaded by the Norman French in the Middle Ages, the rulers spoke French and expected the subjects to learn the language or suffer the consequences, since the laws were now in French too. There was no concept of trying to improve communication among all people, instead it was a good way of keeping benefits and privileges among a certain group. The English language as the language of the ruling class was later reinstated of course, again as a result of politics, to exclude certain undesirables, and include others. Similar examples exist in other countries, eg when the Mongols invaded China and Mongolian became fashionable as a result.

There's no reason to think that, when China takes over economic leadership from the US, there won't be a wholesale change of the dominant language, with English playing a backwater role after that. This kind of thing has happened several times in the past. Moreover, even if it wasn't necessary, China would benefit more if the world is forced to adapt to its culture - eg its economic dictates, its laws, and its language - rather than if it adapts to world culture. So the ultimate question isn't so much will it happen (I guess there's a small chance China will implode and not become dominant), but when (it will take a generation or two after China becomes dominant for the language to spread universally) .

Comment: Re:And that's still too long (Score 1) 328

Sorry, but you're doing it wrong. If you've started your novel in 2001, and you've decided to write two more over a total period of 14 years before even considering publishing it, then you're not operating a business, you're playing a hobby. That's fine, but you're not qualified to discuss commercial imperatives of publishing books.

Copyright isn't intended for hobbyists. It's great that hobbyists can benefit from copyright as well, but the purpose is to promote the creation of works, ie to improve the natural rate of creation. What you're doing is a high-risk labour of love. It's high risk if you're spending 10+ years without actual feedback from paying customers, it means there's a high chance it will never be read by more than 10 people in the world and it's possible you might have to pay for the publishing costs yourself. And *that* is not sustainable for a society if all writers were doing this. Hence copyright, to increase production.

What you should be doing (or should have done before) is publish your first novel quickly, or even publish a few short stories first to get real feedback from customers. Lots of science fiction authors got their start that way in the 50s, or even today online. It's the right thing to do because it minimizes risk and ensures that *something* gets published and read. And you get timely feedback, and you can adjust your writing so that more people will want to read what you write next. Read Asimov's advice for young writers, for example.

That is what copyright is intended for: to accelerate the creation and dissemination process. Hobbyists don't need the incentives of copyright as they're quite happy to spend years writing at their own pace, even if it costs them opportunities, readership, and their own money.

And that is not a criticism of you or anyone else who's a hobbyist, life is more enjoyable if you do what you love, rather than what others force you to do for a living. Keep doing what you love, soon you'll be dead like all of us (except for Ray Kurzweil...)

Comment: Re:No, I'm not really saying that. (Score 1) 755

by martin-boundary (#48703649) Attached to: Science Cannot Prove the Existence of God

By your own admission, you consider the world's literature and mythology to "illustrate basic truths" about human behaviour. So fucking what? Illustrations are useless, for every illustrated truth I can illustrate the opposite. Illustrations are a dime a dozen, the point you're missing about Science is that its statements are *difficult*. Laws of Physics aren't illustrations, they're incomparably more than that. They are the certainties upon which the world is built, bridge by bridge, skyscraper by skyscraper, etc. Religious myths can be (and sometimes are) invented by ignorant teenagers.

Apples and oranges, really.

One has to look out for engineers -- they begin with sewing machines and end up with the atomic bomb. -- Marcel Pagnol