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

 



Forgot your password?
typodupeerror

+ - Tetris is hard to test->

Submitted by JackDW
JackDW (904211) 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."

Link to Original Source

Comment: Re:STEM is the new liberal arts degree (Score 1) 174

by gaudior (#47522777) Attached to: For Half, Degrees In Computing, Math, Or Stats Lead To Other Jobs

Liberal Arts education long ago stopped being about becoming a well-rounded, intelligent individual and became an indoctrination in fitting in to the social machine. STEM degrees are going the same way, churning out cogs for the machine, willing to take whatever they can get to pay off the indentured bond.

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

by J. J. Ramsey (#47104139) Attached to: Why You Shouldn't Use Spreadsheets For Important Work

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:Don't. (Score 1) 408

by gaudior (#47050465) Attached to: Ask Slashdot: Anti-Theft Products For the Over-Equipped Household?

Pretty much any German music will do the job, Polka, Techno, Glockenspiel Rap...all effective 'person with a sense of hearing' deterrents.

Except for repelling Germans obviously but then Germans aren't really a demographic known for committing burglaries.

Burglaries, no? Invasions, on the other hand....

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

by J. J. Ramsey (#46968817) Attached to: Why Scientists Are Still Using FORTRAN in 2014

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".

3500 Calories = 1 Food Pound

Working...