[Tutor] try..except - what about that ton of **Error statements?

Steven D'Aprano steve at pearwood.info
Wed May 22 19:20:19 CEST 2013


On 23/05/13 02:09, boB Stepp wrote:

> I was not aware that hardware damage could be caused by poor
> programming. I am curious; can you give some examples of how this
> might occur?

Does your computer have a DVD drive? Or Blu-Ray? Is it region-locked? Some region-locked drives let you change the region up to a maximum of (say) 3 times. A malicious or unlucky program may "accidentally" change the region 3 times, then you are locked for good. If you're locked in the wrong region, the drive might as well be dead.

Some DVD burners are capable of operating at speeds faster than low-quality discs can stand. DVDs have been known to shatter inside the drive, destroying both the disk and the drive. If a program runs the DVD at excessively high speed, not only do the mechanical parts wear faster, but cheap disks could shatter.

(I never shattered a DVD or CD, but I went through about 50 blank CDs, back when they were about two dollars each, making "coasters" from them because I was trying to burn data to them faster than the disc was capable of dealing with. I will never forgot the moment I realised why four out of five of my burns were failing: it was when I reached for the SECOND LAST DISC in the pack.)

You can destroy old CRT monitors by running them at the wrong frequency. I don't think LCD monitors are subject to that particular flaw, but they may have their own flaws.

Many computer components are running firmware from flash memory, and you can update the firmware. If you update it with garbage instead of code, your device will be bricked. Flash memory can only be written to so many times. If your code "accidentally" writes to flash memory, over and over again, eventually it will get corrupted or die, and your device is bricked.

The Stuxnet computer virus was designed to physically break centrifuges.

http://arstechnica.com/tech-policy/2011/07/how-digital-detectives-deciphered-stuxnet-the-most-menacing-malware-in-history/

See also:

http://en.wikipedia.org/wiki/Killer_poke
http://en.wikipedia.org/wiki/Halt_and_Catch_Fire
http://superuser.com/questions/313850/can-some-software-physically-damage-hardware

and of course, always mount a scratch monkey before performing hardware tests:

http://edp.org/monkey.htm


[...]
> I would like to ask some general questions here.

I'd love to answer, but it's past 3am here and I must get some sleep eventually, so I'll try to return to this topic tomorrow.



-- 
Steven


More information about the Tutor mailing list