Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror

Comment Re:Thank you. (Score 1) 112

Bear in mind that one generally isn't supposed to publically inherit from STL classes such as vector, since they don't have virtual destructors. Generally speaking, with C++, it's better to use composition to reuse functionality (e.g. making an STL vector a data member of a class) and to use inheritance to implement run-time polymorphism.

Comment Re:Flash must be evil because HTML5 is so good? (Score 1) 102

Bear in mind that there already have already been several open-source attempts at rewriting the Flash Player -- namely Gnash, Lightspark, and Mozilla's Shumway -- and all of them are still relatively immature. In short, the plan of attack that you suggest has already been tried.

Submission + - How to win the copyleft fight—without litigation (opensource.com)

An anonymous reader writes: The Software Freedom Conservancy's Bradley Kuhn is probably best known for his work in enforcing the GNU General Public License (GPL). Enforcement-by-litigation might get the headlines, but Kuhn treats the courts as a last resort.

A regular OSCON speaker, he returns this year to share the story of a project that avoided the courtroom. Opensource.com spoke to Kuhn about his talk and the free software landscape at large.

Submission + - Einstein and Schrödinger didn't believe in quantum indeterminism

StartsWithABang writes: When it comes to the very nature of quantum mechanics — about the inherent uncertainty and indeterminism to reality — it’s one of the most difficult things to accept. Perhaps, you imagine, there’s some underlying cause, some hidden reality beneath what’s visible that actually is deterministic. After all, a cat can’t simultaneously be dead and alive until someone looks can it? That’s one of the problems that both Einstein and Schrödinger wrestled with during their lives. An investigation of that story, their work on that front, and their friendship that ensued as both pursued that same end is thoroughly investigated here by physicist Paul Halpern.

Submission + - Tetris is hard to test (jwhitham.org)

JackDW writes: Tetris is one of the best-known computer games ever made. It's easy to play but hard to master, and it's based on a NP-hard problem. But that's not all that's difficult about it. Though it's simple enough to be implemented in one line of BBC BASIC, it's complex enough to be really hard to thoroughly test.

It may seem like you can test everything in Tetris just by playing it for a few minutes, but this is very unlikely! As I explain in this article, the game is filled with special cases that rarely occur in normal play, and these can only be easily found with the help of a coverage tool.

Comment Re:Blame the tool... (Score 2) 422

there are no bad languages, just bad programmers.

There are, however, languages that make it far easier to write code that is less readable and harder to maintain. As a specific example, compare Fortran 77 with Fortran 90. I can write the latter without any need for numerical statement labels. I can write a straightforward "DO WHILE" loop in Fortran 90, while in Fortran 77, I'd have to use the dreaded GOTO to get the same effect. Aside from basic stuff like that, I can write formulas in Fortran 90 with whole arrays, which can really help readability. In short, it is far easier to write clear code in Fortran 90 than in Fortran 77.

Do they seriously think that if those models were written in C, Java or Perl they would have been magnitudes better?

Heck, yes! For one thing, in any of those languages, separation of code and data -- something which spreadsheets actively discourage -- would be much easier.

Comment Re:Because C and C++ multidimensional arrays suck (Score 1) 634

FORTRAN was *NOT* designed to support multidimensional arrays from the beginning. That only came in Fortran 90.

Not true. Multidimensional array were around at least as far back as Fortran 77. Now what is new in Fortran 90 are the ways to manipulate those arrays. In Fortran 77, one could do arithmetic on elements of arrays but not on arrays as a whole, so, for example, adding two arrays in Fortran 77 required DO loops. In Fortran 90, though, one can add arrays A and B with the expression "A + B".

Comment Re:well (Score 2) 557

Actually, I think of the Russian occupation of Crimea as more analogous to the German occupation of the Sudetenland. The pretext for Germany occupying the Sudetenland was the presence of the ethnic Germans there, while for Russia, the pretext was the presence of ethnic Russians.

Slashdot Top Deals

"There are things that are so serious that you can only joke about them" - Heisenberg

Working...