×

Announcing: Slashdot Deals - Explore geek apps, games, gadgets and more. (what is this?)

Thank you!

We are sorry to see you leave - Beta is different and we value the time you took to try it out. Before you decide to go, please take a look at some value-adds for Beta and learn more about it. Thank you for reading Slashdot, and for making the site better!

Comments

top

Ask Slashdot: Is Non-USB Flash Direct From China Safe?

JackDW Re:don't worry about it (178 comments)

This sort of test may not detect all fakes.. really you need to write a test pattern and read it back, as the writes may appear to succeed.

Programs exist to do this for you, e.g. https://sites.google.com/a/int...

When I had one of these fake cards, it seemed to me that the firmware had been designed to allow a filesystem to be created on the device, by remapping the blocks that the filesystem would use for its metadata.

Formatting utilities should really check for bad SD cards...

about two weeks ago
top

Tetris Is Hard To Test

JackDW Re:Infomercial for a code coverage tool? (169 comments)

If you really were working on systems where a failure would have catastrophic consequences, I would hope you had a QA process a lot more sophisticated than running a test suite and this kind of coverage tool to check for problems!

Oh, certainly! The good news here is that the avionics industry knows this, and in any case, the FAA won't let them cut corners. I don't know exactly how the industry uses our tools, but it's typically in conjunction with lots of manual testing, with the coverage tool capturing data as human testers run through test scripts.

And you're right, non-safety critical projects can benefit from it. For any large project, it really isn't an expensive part of the development process, and it can be very revealing. The techniques we use have a low overhead in terms of memory and CPU time, so they're good for both embedded systems and high-performance desktop/server software. An "instrumented" build for coverage is not that different to a regular debug build: a bit slower, a bit larger, but with lots of helpful stuff included. But perhaps I am wandering into "infomercial" territory again... :)

about a month ago
top

Tetris Is Hard To Test

JackDW Re:Nonsense -- make your own test suite (169 comments)

Thing is, you need both your own test suite and a coverage test tool. The two work together. The coverage tool tells you if your tests are incomplete, helping you to fix them.

If I were actually testing Tetris I would definitely do it the way you suggest: a pre-arranged sequence of blocks and a pre-programmed series of moves. I'd run the game with that sequence, then look at the coverage data to see if I needed to add anything. Some of the process can be automated, but the test cases themselves have to be made by hand.

about a month ago
top

Tetris Is Hard To Test

JackDW Re:Infomercial for a code coverage tool? (169 comments)

You're right, this sort of testing should really be about covering the range of possible inputs. But that is typically impossible. There are too many possible scenarios. You need a practical substitute.

I agree that statement coverage is quite crude, it tells you very little about the data being processed. There is more detailed information being produced here - "MC/DC coverage" - which does tell you whether conditional statements have been thoroughly exercised, because each possible reason for the "true" or "false" branch of the conditional has been seen during the test. But even with that, it is no silver bullet, and you can certainly write programs that get 100% coverage on all the metrics, and are still full of bugs.

It is, however, better to have this information than not have it at all. And coverage tools are very practical in real-world situations, particularly those involving testing safety-critical code. They provide evidence that the tests have tested everything that they claim to have tested.

about a month ago
top

Tetris Is Hard To Test

JackDW Re:Nice advertisement (169 comments)

Submitter here. It's "marketing spam" in the sense that it's based on something I did at work. I don't see why this is a problem. Many articles linked from this site involve something that someone did at work.

I thought it was interesting that, though this is a really simple game, you can't test it effectively just by playing it. You have to deliberately seek out all of special cases. That's a fact about virtually all software, but it's not an intuitive one, and that's what the article is about.

about a month ago
top

Tetris Is Hard To Test

JackDW Re:Perl-standard line length (169 comments)

A BBC BASIC line is limited to 256 bytes, including the line number. It is impressive to squeeze the whole game into that space. There's also a 140-byte Javascript version, also very impressive, though it has fewer features and doesn't have all the block types.

about a month ago
top

Ask Slashdot: VPN Setup To Improve Latency Over Multiple Connections?

JackDW Re:Actually, it's easy. (174 comments)

Do you know, you're the first person in this topic to actually answer the question? Most others missed the VPN part.

OpenVPN already knows how to discard duplicates and retransmit lost packets. It's a lovely way to build a semi-reliable network on top of an unreliable one, and very hackable.

The questioner only needs to modify OpenVPN (on his PC) to send its UDP packets via two different routes. He should configure his VPS to have two public IP addresses, with OpenVPN (server-side) bound to both of them, and then manually adjust the routing table on his PC to force the use of a specific route for each of those two IP addresses. The hard bit (and it's not really that hard) is making OpenVPN (on the PC) send each packet twice to two different IP addresses, which would require modifications to the source code and some familiarity with the sockets API.

I think it would work, not just for Battlefield but for anything. And it sounds like fun.

about a month and a half ago
top

Actual Results of Crimean Secession Vote Leaked

JackDW Re:Again? (557 comments)

I don't believe this either. There's no corroborating evidence, not even a screenshot (though that could be trivially faked).

This is a conspiracy theory and it's as nonsensical as thinking that Bush's "people" accidentally leaked "the truth" while they were supposed to be covering up "the facts" about 9/11.

Take note of the names of the Slashdotters who automatically believe this sort of thing, and give their opinions an appropriate level of credit.

about 7 months ago
top

Death Wish Meets GPS: iPhone Theft Victims Confronting Perps

JackDW Re: Low Priority? (664 comments)

They can't deprioritize the job until you have given your statement.

about 7 months ago
top

Mathematical Proof That the Cosmos Could Have Formed Spontaneously From Nothing

JackDW Re:If you make this a proof of God... (612 comments)

Hmm. Experience suggests the intelligent beings would stare at the 0.0001% and either deny the evidence for it, deny its relevance, or try to destroy it. Inconvenient facts are inconvenient.

You want a piece of toast with the face of Jesus? You already had a man with the face of Jesus, and look what happened to him.... What chance does some toast stand?

about 8 months ago
top

How the Internet Is Taking Away America's Religion

JackDW Works both ways (1037 comments)

I became an atheist when I was about ten or eleven years old. I was sure of myself at the time.

Twenty years later, I have some serious doubts about it, and have retreated to agnosticism. That's partly because the Internet has given me easy access to all sorts of information about philosophy, religion and politics. I was able to read what the other side actually thought, not what my side said they thought.

I could say that the Internet destroyed my faith in atheism, but I know that you guys really hate the implications of statements like that, so please take it as a (trollish) joke!

What I would say, not as a joke, is that the Internet has not stopped people believing weird and/or stupid things. In fact it has strengthened all sorts of weird beliefs, some weirder than anything in the Bible.

about 8 months ago
top

Non-Coders As the Face of the Learn-to-Code Movements

JackDW Re:Am I the only one.. (158 comments)

It's not a worry. A company that would hire cheap, bad "programmers" is not somewhere I would want to work anyway.

about 10 months ago
top

Non-Coders As the Face of the Learn-to-Code Movements

JackDW Re:Am I the only one.. (158 comments)

But Zuckerberg and the other industry leaders don't want programming skills to be valuable. They want programmers to be cheap and easily replaced, like unskilled workers in a factory. The "year of code" is not for the benefit of school children, or programmers in general. It is for the benefit of the upper management of major corporations, who live in hope that good programmers will one day be cheap.

Imagine that instead of the "year of code", it's the "year of football". The government notices that the England soccer team is not very good. The soccer industry finds that good players are really expensive, and wishes that it could recruit a few more good players straight out of school while they are cheap. They get together with this initiative called the "year of football", with the aim of (1) reducing the cost of employing good football players, and (2) improving the performance of the national team.

The immediate result is a massive investment: a soccer coach for every school, extra soccer lessons, one football to be provided to each child and so on.

But of course it achieves nothing, because the children who love playing football are already playing it in their spare time. The impact is only on the children who hate football and don't want to play it. They are forced to take part in this boring activity, developing skills they don't want in order to play a game that they don't enjoy. They come to hate football even more than before.

And, because the children who love it are forced to play with children who hate it, this ruins the subject for everyone. They all hate having to learn about basic stuff like how to pass a ball and how to tell if someone is off side: the good players already know this, and the others don't care. Meanwhile the schools spend less time teaching general subjects that are widely useful. Everyone loses.

about 10 months ago
top

UK Govt's Censorware Blocks Tech, Civil Liberties Websites

JackDW Re:Useless Article (148 comments)

I see what you're saying, but here's how I think that would actually play out.

If this gets further than Slashdot and Reddit, the government's PR will point out the nature of the mistake, and there will be articles on the BBC News about how a blogger got it wrong and the whole thing went viral before anyone checked any facts. Which is absolutely true.

But next time - when there really is some censorship, when Amnesty International really is on the blacklist - the government's PR will say that once again, it's a mistake, and once again, the bloggers are looking at some ISP's opt-in whitelist rather than the real thing. Meanwhile they can quietly correct the blacklist before too many people notice, making it look like (once again) the Internet has cried wolf.

However this goes, they win. The best thing for us to do is take the high ground, and be absolutely truthful about what's going on. Yes, obviously, this on-by-default filtering idea is stupid, staggeringly bad even for the Tories, but we're not going to deal with that by playing amateur PR against resourceful people who do it for a living.

about a year ago
top

$39 Arduino Compatible Boardset Runs Linux On New x86 SoC

JackDW Re:Non-starter for me. (95 comments)

I think it sounds quite good, but international shipping is $35.60, nearly doubling the cost.

about a year ago
top

$39 Arduino Compatible Boardset Runs Linux On New x86 SoC

JackDW Re:wow its a vortex board (95 comments)

That matches my experience with a similar Vortex x86 CPU. It was 486-compatible, but Pentium-specific instructions such as RDTSC were illegal. I had to compile a custom kernel, and make sure that all the userspace libaries and programs were 486. But this was no big deal. You always have to do things like that for embedded development, and it's usually a lot more hassle for an ARM-based platform because of the higher degree of variation.

I'd also expect it to run older versions of Windows, though XP may be a stretch.

about a year ago
top

First Cases of Flesh-Eating Drug Emerge In the United States

JackDW Re:Gross, but... (618 comments)

Gladly: More crime. Poorer grades in school. Higher unemployment, lower employability. General decline in public health and living standards. The emergence of neighborhoods where nobody would choose to live. Large numbers of cases of child neglect handled by the police and social workers.

Not good things. But these are the results of non-enforcement of drug laws. If you look for the evidence you will find it, and if you really want specific examples of places to look, then I can tell you about those. Really, science is not on your side here.

about a year ago
top

First Cases of Flesh-Eating Drug Emerge In the United States

JackDW Re:Gross, but... (618 comments)

"Legalize heroin to prove me wrong"

Some proof. It would not be a controlled experiment - the results would not be useful.

We would simply end up arguing over the statistics. You'd say that fewer people were dying of overdoses - your criteria for success. Whereas I'd point out that society was damaged in other ways by the large increase in drug use that would inevitably follow legalization. Nothing would be proved either way.

Case in point is, well, anywhere that any drug has been decriminalised. Some people say things are better, and others say they are worse, and both groups have some evidence to support their claims. Personally I would recommend not forcing radical, uncontrolled and potentially dangerous experiments on living people without their consent, particularly when the results are worthless, but then I'm one of those awful people who thinks that drugs should probably not be legalised, so my opinion hardly matters.

about a year ago
top

5-Pound UAV Flies For 50 Minutes, Streams HD From Over 3 Miles

JackDW Re:Bad guys (115 comments)

Ha! Very good. I think you're making my point better than I did. If I ever decide to become an evil dictator, I'll recommend you for a job at my propaganda ministry, so you can share this sort of thing with a wider audience.

about a year and a half ago
top

5-Pound UAV Flies For 50 Minutes, Streams HD From Over 3 Miles

JackDW Re:Bad guys (115 comments)

That would be a flaw in the plan, if the plan were to kill people. But it isn't. The plan is to turn them into passive supporters of the regime, unwilling to offer any resistance, and quite possibly unable to comprehend why resistance might be important.

about a year and a half ago

Submissions

top

Tetris is hard to test

JackDW JackDW writes  |  about a month ago

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

Journals

JackDW has no journal entries.

Slashdot Login

Need an Account?

Forgot your password?