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


Forgot your password?

Comment Re:It would mean the contract has been poorly writ (Score 1) 134

Ah I see what you mean now. Actually I think you've hit upon the key feature of Design by Contract that most people miss. It's not just tossing assertions all over your code. It's a design discipline that shapes the way you write the system, and that's why it's good at finding design problems.

Comment Re:It's just syntactic sugar anyway (Score 2) 134

Actually Design by Contract is a design discipline, not a bunch of error checks. It's a bit like programming without gotos: the benefit comes not from avoiding typing "goto" into your source code, but rather from the style of reasoning you use when you learn the proper alternatives.

Comment Re:It would mean the contract has been poorly writ (Score 1) 134

The "definition of correct" is the system working the way it should. I'm not sure what you're suggesting here: that a system should stick with the original, possibly flawed, contracts rather than fix them to operate properly? That once you make an error in a contract, you should live with it forever? I fail to see how that perspective is helpful or realistic, and, forgive me if I'm wrong, but I suspect you may be lacking in practical experience with Design by Contract.

Comment Re:Fail (Score 1) 134

Contracts can easily have bugs. That shouldn't be too hard to imagine. You could easily have a postcondition "ensure item[index] == 123" when "index" is out of bounds, or when you meant to write "0x123", or when the array is actually called "items".

The fact that contracts can have bugs doesn't negate their value any more than the same fact about software negates software's value.

Comment It's the instant-revert crowd (Score 1) 632

I know I find it increasingly frustrating to contribute because whatever you add, there's always someone waiting to revert it immediately without any attempt at compromise or discussion.

I also have to say that I think people will find it humourous 50 years from now when they look back at comments from 2009 about how there's not much new stuff to add. That's a bit like the fellow who wanted to close the patent office in 1899 because everything had already been invented.


Computer Reveals Stone Tablet "Handwriting" 42

ewenc writes "A computer technique can tell the difference between ancient Greek inscriptions created by different artisans, a feat that ordinarily consumes years of human scholarship, reports New Scientist. A team of Greek computer scientists created the program after a scholar challenged them to attribute 24 inscriptions to their rightful cutter. The researchers scanned the tablets and constructed an average shape for several Greek letters in every tablet. After comparing the average letters between different tablets, they correctly attributed the inscriptions to six stone-cutters."

"We don't care. We don't have to. We're the Phone Company."