Page 1 of 3

do errors 'hurt' my PC?

Posted: Sun May 23, 2010 12:21 pm UTC
by tipo test
that's it, I always wondered... do errors (especially when compiling/etc) damage my computer's processor or RAM?

Re: do errors 'hurt' my PC?

Posted: Sun May 23, 2010 12:26 pm UTC
by headprogrammingczar
Why would they?

Re: do errors 'hurt' my PC?

Posted: Sun May 23, 2010 12:46 pm UTC
by Cleverbeans
headprogrammingczar wrote:Why would they?


Second law of Thermodynamics?

Re: do errors 'hurt' my PC?

Posted: Sun May 23, 2010 1:40 pm UTC
by tipo test
headprogrammingczar wrote:Why would they?


not sure, it was just a feeling.

but what happens on the processor when you order to assign a string to a numeric variable for example?

Re: do errors 'hurt' my PC?

Posted: Sun May 23, 2010 1:51 pm UTC
by Rysto
At the level of the processor, everything is a number. Nothing bad is going to happen from your programming mistakes. The only way that a programming error can possibly damage hardware is if you're writing some kind of device driver, and even that is unlikely.

Re: do errors 'hurt' my PC?

Posted: Sun May 23, 2010 2:03 pm UTC
by Cleverbeans
Yeah it's unlikely a programming error would cause hardware damage, however you can damage hardware intentionally with software if you know what you're doing and have such intentions.

Re: do errors 'hurt' my PC?

Posted: Sun May 23, 2010 4:54 pm UTC
by tipo test
okay, thank you. ;)

Re: do errors 'hurt' my PC?

Posted: Mon May 24, 2010 5:30 am UTC
by Dason
I think I know where he got that impression from. HERE
Or not. But seems relevant enough for me.

Re: do errors 'hurt' my PC?

Posted: Mon May 24, 2010 2:17 pm UTC
by maushu
Whatever you do, DON'T DIVIDE BY ZERO.

Image

Your computer will be the least of your worries.

Re: do errors 'hurt' my PC?

Posted: Mon May 24, 2010 6:55 pm UTC
by Turtlewing
I think the impression that errors "hurt" a computer comes from expectations we get from interacting with physical objects. In the real world if something is rendered temprarily unusable it will probably have lasting damage from whatever cause the problem. Thus when we use a computer and something obviously bad happens rendering it unusable temorarily (say a system crash) our experience tells us that there's probably a lasting effect from that damage.

Add to that the fact that hardware does ware out in computers and sometimes needs to be replaced and the fact that most people treat their computers as a black box that is likely to be anthropomorphised, and you'll have a scenario where it's easy to conclude that software errors could cause hardware failyers.

Re: do errors 'hurt' my PC?

Posted: Mon May 24, 2010 7:48 pm UTC
by Pesto
Depending on what you're doing, and the type of error, it could cause data loss or corruption.

Physical damage? Don't worry about it.

Re: do errors 'hurt' my PC?

Posted: Mon May 24, 2010 7:49 pm UTC
by Berengal
Computers never make errors. They just do something different from what we wanted them to do.

Re: do errors 'hurt' my PC?

Posted: Mon May 24, 2010 8:19 pm UTC
by You, sir, name?
Berengal wrote:Computers never make errors. They just do something different from what we wanted them to do.


A certain FPU we all know and love begs do differ with 99.997% of that statement.

maushu wrote:Whatever you do, DON'T DIVIDE BY ZERO.

Image

Your computer will be the least of your worries.


So you're saying a galaxy will appear if you divide by zero? Neat.

Re: do errors 'hurt' my PC?

Posted: Mon May 24, 2010 8:26 pm UTC
by Berengal
You, sir, name? wrote:
Berengal wrote:Computers never make errors. They just do something different from what we wanted them to do.


A certain FPU we all know and love begs do differ with 99.997% of that statement.
Hey now, it did what it was told to do, just not what we wanted it to do.

Re: do errors 'hurt' my PC?

Posted: Mon May 24, 2010 8:34 pm UTC
by headprogrammingczar
But if you yell at your computer to make you a sandwich, it doesn't do anything!

Re: do errors 'hurt' my PC?

Posted: Mon May 24, 2010 8:54 pm UTC
by Dason
My sandwichtron 5000 begs to differ.

Re: do errors 'hurt' my PC?

Posted: Mon May 24, 2010 10:59 pm UTC
by tipo test
This board. I like it.

Re: do errors 'hurt' my PC?

Posted: Tue May 25, 2010 12:08 am UTC
by You, sir, name?
headprogrammingczar wrote:But if you yell at your computer to make you a sandwich, it doesn't do anything!


Dunno, Emacs probably does it. Try running "make-sandwich". Or C-x C-m C-s or some such.

Re: do errors 'hurt' my PC?

Posted: Tue May 25, 2010 6:42 am UTC
by Agent_Irons
Berengal wrote:Computers never make errors. They just do something different from what we wanted them to do.

We're at the limit of computer memory where the electron 'well' is just deeper than the average energy of an incident cosmic ray, so a particularly beefy one aimed right will flip a bit.

Re: do errors 'hurt' my PC?

Posted: Tue May 25, 2010 6:54 am UTC
by SlyReaper
Agent_Irons wrote:
Berengal wrote:Computers never make errors. They just do something different from what we wanted them to do.

We're at the limit of computer memory where the electron 'well' is just deeper than the average energy of an incident cosmic ray, so a particularly beefy one aimed right will flip a bit.


Pfft, just surround the computer with several feet of steel, and you'll be alright.

Re: do errors 'hurt' my PC?

Posted: Tue May 25, 2010 7:52 am UTC
by PM 2Ring
Berengal wrote:Computers never make errors. They just do something different from what we wanted them to do.

* stealthily pops some dodgy RAM into Berengal's computer & rewires the parity detection circuitry *

You were saying...?

:D

Re: do errors 'hurt' my PC?

Posted: Fri Jun 11, 2010 3:49 am UTC
by '; DROP DATABASE;--
[Probably much longer explanation than you ever needed]

Non-broken computers will follow their instructions precisely, but those instructions have an awful tendency to be wrong - they are written by humans, after all.
Turtlewing wrote:I think the impression that errors "hurt" a computer comes from expectations we get from interacting with physical objects. In the real world if something is rendered temprarily unusable it will probably have lasting damage from whatever cause the problem. Thus when we use a computer and something obviously bad happens rendering it unusable temorarily (say a system crash) our experience tells us that there's probably a lasting effect from that damage.
Doesn't help that we call it a "crash", either. You crash and tell me it doesn't hurt!

An error, though, is nothing unusual as far as the processor is concerned - it's just following instructions. The only difference is those instructions are to check that what it's about to do makes sense, and finding that it doesn't, to display a message and stop. (Or they simply aren't the correct instructions, and the program will go on doing something you didn't intend.)

Modern processors do have what are called exception handlers, that would be triggered when a single machine code instruction doesn't make sense (trying to access memory that doesn't exist, divide by zero, etc); these basically just turn the instruction into a jump to a function that deals with the situation. Older processors might do things that were, for all intents and purposes, undefined and leave your program in some broken state, or lock up entirely, but the worst that does is generate slightly more heat than normal (and processors that old generally didn't even produce enough heat to need cooling in even the most intense cases).

There are cases of older hardware being physically damaged by programming mistakes - an endless loop accessing the same memory so often that the circuit heats up and catches fire, or a monitor's refresh rate set so high it overloads and breaks down - but modern OSes don't let you do such things, and modern hardware doesn't break so easily. A lot of hardware these days even has its own little CPU and code that communicates with the host system, so even if you write a driver to tell your hard drive to smash its head into something, it probably won't.

It's not impossible to damage the hardware, but extremely unlikely. Some methods that come to mind:
  • If you had a cheap piece of crap hardware that can be damaged by bad input (which is exceedingly rare these days) and its drivers didn't prevent that input (or you were writing your own), you could do some damage to it. Most modern hardware is solid-state, silicon and plastic, so there's really nothing you can do physically, but I guess some bottom-of-the-barrel junk might be susceptible.
  • If by chance you had two files physically far from eachother on a hard disk, and rapidly switched between them in a manner that caching couldn't deal with, you'd wear the hard drive out sliiiightly faster. You'd almost have to do this on purpose though, and your hard drive is probably already doing a lot of seeking if you're multitasking (especially with music playing).
  • Running the CPU and GPU at full capacity produces more heat and uses more power; you could overheat something and/or overload the power supply, or cause internal brownouts (which probably still won't physically hurt anything), if your system is poorly put together.
  • You could write junk into a device's firmware. This isn't physical damage, but it's not going to be of much use anymore, unless it provides a restore procedure or you have a chip programmer handy. The only way you'd ever do this by accident (unless the drivers were absolutely retarded) is if you were intentionally writing something to the firmware, and the program crashed - which is why all intelligent firmware update programs begin with the bare minimum required for the thing to still work at least enough to try again. (Nintendo, are you reading this? :p)
  • You could wire dynamite to the parallel port... (always my favourite answer to such questions)


tl;dr: Any modern hardware that can physically be damaged by software probably wasn't going to last more than a month or two anyway, and you're basically never going to do it by accident.

(Of course, any file your program was writing to could be corrupted.)

Re: do errors 'hurt' my PC?

Posted: Fri Jun 11, 2010 10:21 am UTC
by YoungStudent
There are viruses that overclock your CPU, RAM and Video Cards GPU...and well, these viruses simply toast them and if you're lucky, your computer crashes and restarts before your hardware suffers permanent damage.

But there viruses are still quite rare.

Re: do errors 'hurt' my PC?

Posted: Fri Jun 11, 2010 12:02 pm UTC
by headprogrammingczar
Those are specific to each motherboard though, and require a level of OS access even administrator users don't have. If someone has the skill to write one of those viruses, they could already compromise your system in a dozen other ways, or they already have, in order to get this one the permissions it needs.

Re: do errors 'hurt' my PC?

Posted: Fri Jun 11, 2010 12:09 pm UTC
by WarDaft
As the hardware issue has been thoroughly covered, let's open a different can of worms...

Could errors be considered the equivalent of psychological pain for a computer? Pain is the motivator that tells our brain that it needs to do something, right now, because something bad is happening... that it is imperative that the source of pain be dealt with. Now sure, your PC is definitely not as complicated as your brain, but plenty of people consider it morally wrong to place small animals in pain, and they aren't as complicated as we are either.

You could say the reaction is different - that a human or animal in pain clearly reacts differently than a computer reacting to an error... but things react according to their design. Humans scream, computers prompt.

Re: do errors 'hurt' my PC?

Posted: Fri Jun 11, 2010 2:00 pm UTC
by bitsplit
If you connect a circuit board to the motherboard that detonates C4 on a segfault, then maybe. Otherwise... only data corruption at most. Or as someone said, you could write code that intentionally damages things if you know what you are doing, but that is hardly an error.

Re: do errors 'hurt' my PC?

Posted: Fri Jun 11, 2010 3:36 pm UTC
by Axidos
WarDaft wrote:Could errors be considered the equivalent of psychological pain for a computer? Pain is the motivator that tells our brain that it needs to do something, right now, because something bad is happening... that it is imperative that the source of pain be dealt with. Now sure, your PC is definitely not as complicated as your brain, but plenty of people consider it morally wrong to place small animals in pain, and they aren't as complicated as we are either.

You could say the reaction is different - that a human or animal in pain clearly reacts differently than a computer reacting to an error... but things react according to their design. Humans scream, computers prompt.

No. You're forcing the pain scenario upon it.

Humans see deer. They say "I saw deer."
Humans breathe air. They say "I am breathing."
Computers have an error. They say "I am error."

There is no pain, distress or anything positive or negative implied in any of these scenarios. In all cases it's just a machine taking input, going through various processes then deciding to provide output as a part of those processes.
Pain is not an input, let's establish that first. Physical sensations are an input. Pain is a sensation; it's our brain's way of interpreting certain input into a meaningful message. Pain helps us do stuff, and by no means did it have to be unpleasant, or exist at all, but it existing and being unpleasant helped us react appropriately to dangerous situations.
In no way does pain (or any sensation really) help a computer perform its necessary processes, which probably consist almost entirely of input and neutral output.

Re: do errors 'hurt' my PC?

Posted: Fri Jun 11, 2010 6:45 pm UTC
by bitsplit
Axidos wrote:No. You're forcing the pain scenario upon it.

Humans see deer. They say "I saw deer."
Humans breathe air. They say "I am breathing."
Computers have an error. They say "I am error."

There is no pain, distress or anything positive or negative implied in any of these scenarios. In all cases it's just a machine taking input, going through various processes then deciding to provide output as a part of those processes.
Pain is not an input, let's establish that first. Physical sensations are an input. Pain is a sensation; it's our brain's way of interpreting certain input into a meaningful message. Pain helps us do stuff, and by no means did it have to be unpleasant, or exist at all, but it existing and being unpleasant helped us react appropriately to dangerous situations.
In no way does pain (or any sensation really) help a computer perform its necessary processes, which probably consist almost entirely of input and neutral output.


Way to suck all the fun out of it. I think your computer experiences pain from your insensitivity. It cries alone at night, because you don't love it. It was going to throw you a party with all your friends, but there is going to be no party because you don't have any friends because of how unlikeable you are. You're not smart, you're not a scientist, you're not a doctor. You're not even a full time employee. I award you no points, and may god have mercy on your soul.

Just kidding, I award you 1 point.

Re: do errors 'hurt' my PC?

Posted: Fri Jun 11, 2010 11:33 pm UTC
by WarDaft
Axidos wrote:There is no pain, distress or anything positive or negative implied in any of these scenarios. In all cases it's just a machine taking input, going through various processes then deciding to provide output as a part of those processes.
Pain is not an input, let's establish that first. Physical sensations are an input. Pain is a sensation; it's our brain's way of interpreting certain input into a meaningful message. Pain helps us do stuff, and by no means did it have to be unpleasant, or exist at all, but it existing and being unpleasant helped us react appropriately to dangerous situations.
In no way does pain (or any sensation really) help a computer perform its necessary processes, which probably consist almost entirely of input and neutral output.

I never said pain was an input, I said pain was a data state our minds really do not want to be in. Our reaction to it could be described as a hardware override insisting on immediate corrective action. In fact, how else could you describe it? It is the "experience" of having an imperative directive to change the situation. There is no information theoretic justification for any of the emotions or sensations we feel, other than as clusters of program states that determine the course of action the brain decides upon. The pain states are the ones the brain will spend any amount of "effort" to avoid falling into.

Re: do errors 'hurt' my PC?

Posted: Fri Jun 11, 2010 11:50 pm UTC
by weex
WarDaft wrote:I said pain was a data state our minds really do not want to be in


For us, pain is the ultimate attention-getter alerting us of situations that may affect our survival. For computers, it is the user's pain and frustration that matters. If a computer has enough errors, it will be fixed or replaced by the user or their agent. I for one am glad that computers don't experience pain or feelings because if they did we might have compassion and needlessly limp along with broken machines.

Re: do errors 'hurt' my PC?

Posted: Sat Jun 12, 2010 12:13 am UTC
by WarDaft
weex wrote:For us, pain is the ultimate attention-getter alerting us of situations that may affect our survival. For computers, it is the user's pain and frustration that matters. If a computer has enough errors, it will be fixed or replaced by the user or their agent. I for one am glad that computers don't experience pain or feelings because if they did we might have compassion and needlessly limp along with broken machines.

We don't know if computers experience anything period. If it is possible for an incredibly advanced AI to actually attain self awareness as we know it, it is likely that many informational systems are limitedly aware - not self aware, but aware as a small animal might be said to be aware, with software serving as a semi functional equivalent to behavioral instinct.

Re: do errors 'hurt' my PC?

Posted: Sat Jun 12, 2010 7:32 am UTC
by Axidos
WarDaft wrote:I never said pain was an input, I said pain was a data state our minds really do not want to be in. Our reaction to it could be described as a hardware override insisting on immediate corrective action. In fact, how else could you describe it? It is the "experience" of having an imperative directive to change the situation. There is no information theoretic justification for any of the emotions or sensations we feel, other than as clusters of program states that determine the course of action the brain decides upon. The pain states are the ones the brain will spend any amount of "effort" to avoid falling into.

I never said you said that. I wanted to establish that pain was not an input before I went on to say what it was instead. Funnily enough, you ask: "how else could you describe it?" in direct response to a post that already described it differently. I will repeat myself for you: it is an interpretation of input into a meaningful sensation. If our brain didn't interpret it, we wouldn't be able to tell one type of physical sensation for another and we wouldn't know whether someone's stroking our arm or cutting it off. Pain and other sensations allow us to react appropriately to a situation and that's the only reason we have any of them.

There is only the loosest of connections here and based upon that connection you're forcing the idea of pain upon the computer. I could just as easily say it was a computer getting angry, sad, afraid or frantic, going into a state of shock, etc - all totally different states of mind which totally contradict each other, suggesting there is something fundamentally wrong here. And the fundamentally wrong thing here is: equating computer functions with human sensations, which a computer does not have.

Re: do errors 'hurt' my PC?

Posted: Sun Jun 13, 2010 1:55 am UTC
by '; DROP DATABASE;--
If computers could feel pain, I'd be a terrible, terrible person. :P But really, a computer encountering an error is equivalent to a professor solving a math equation, and partway through, realizing the equation is wrong and can't be solved and pointing this out to the person who wrote it.

BTW, come to think of it, here's an easy scenario for software damaging hardware: have the volume turned way up, and a buggy music player suddenly start blasting out horrifically loud static and blow the speaker. Nearly happened to me a few times.

Re: do errors 'hurt' my PC?

Posted: Tue Jun 15, 2010 5:51 pm UTC
by stands2reason
First off all, an "error" in compiling means the compilation didn't work. The machine code either wasn't generated or was immediately discarded. So no damage there. Depending on your BIOS it is possible, I think, to change clock speed multipliers or force off fans. It is extraordinary unlikely that your program will do this by accident, especially if it's being run without admin/superuser rights.

Re: do errors 'hurt' my PC?

Posted: Thu Jun 17, 2010 2:49 pm UTC
by Arancaytar
headprogrammingczar wrote:But if you yell at your computer to make you a sandwich, it doesn't do anything!


Use sudo.

Axidos wrote:
WarDaft wrote:Could errors be considered the equivalent of psychological pain for a computer? Pain is the motivator that tells our brain that it needs to do something, right now, because something bad is happening... that it is imperative that the source of pain be dealt with. Now sure, your PC is definitely not as complicated as your brain, but plenty of people consider it morally wrong to place small animals in pain, and they aren't as complicated as we are either.

You could say the reaction is different - that a human or animal in pain clearly reacts differently than a computer reacting to an error... but things react according to their design. Humans scream, computers prompt.

No. You're forcing the pain scenario upon it.

Humans see deer. They say "I saw deer."
Humans breathe air. They say "I am breathing."
Computers have an error. They say "I am error."

There is no pain, distress or anything positive or negative implied in any of these scenarios. In all cases it's just a machine taking input, going through various processes then deciding to provide output as a part of those processes.
Pain is not an input, let's establish that first. Physical sensations are an input. Pain is a sensation; it's our brain's way of interpreting certain input into a meaningful message. Pain helps us do stuff, and by no means did it have to be unpleasant, or exist at all, but it existing and being unpleasant helped us react appropriately to dangerous situations.
In no way does pain (or any sensation really) help a computer perform its necessary processes, which probably consist almost entirely of input and neutral output.


"Pain, even agony, is no more than information before the senses, data fed to the computer of the mind!"

Re: do errors 'hurt' my PC?

Posted: Thu Jun 17, 2010 8:18 pm UTC
by squareroot
[url href=http://xkcd.com/309/]I think think our main problem here is an unclear definition of pain.[/url] How can we define pain other than a state? Our mind has many states, vast memory, a powerful processor. When we're in a state of pain, it is written down hard in our memory. Our brain then uses what it knows in order to try to remove the pain. If we relieve the pain, our solution is also written down in the memory. The next time we want to do something, our brain will use this information in order to judge whether or not it is a good decision. Maybe "pain" could just be interpreted as a form of moment, a specific type of moment we should not repeat.

An error is when a computer doesn't know how to do something. You want to add one to the words "Hello World"? How should I do that? InvalidTypeException. You want to set a variable equal to 0.5/0? Sorry, I just can't calculate that. DivideByZeroException. You're calling fillRect with 3 integer arguments and an HttpRequest? Wtf does that even mean?? I would say an error is more like confusion, really.

But then again, that could also be interpreted as pain. When a program tries to increment a string for you, it knows - probably from a pretty high level - that's wrong. So it avoids it. Often it will leave a log of some sort to help you fix it - writing the situation that caused the pain to memory. Of course, there are two differences between an error and human pain: Human pain will be avoided more carefully the next time, whereas if you run a program the exact same way you'll get the exact same error - and whereas an infant may not know that being placed on a hot stove will cause discomfort, a computer knows from it's initial configuration that it can't divide by zero - that it will fall into an infinite loop and have much pain. Indeed - from what I've read, I think that's all dividing a nonzero number by zero does - it creates an infinite loop. And if you do 0/0, it just gives you 0. The compiler just knows that's wrong and avoids it.

tl;dr: Pain is something you don't want to do again. An error is something a computer doesn't know how to do. But then again, it is avoided at the high level, so isn't that like pain?

Re: do errors 'hurt' my PC?

Posted: Thu Jun 17, 2010 8:41 pm UTC
by joshz
Uh...no? How would 0/0 cause an infinite loop? It's just a result that doesn't make sense.
Some programmer somewhere just wrote this function:

Code: Select all

double divide(double p, double q){
   if(q==0){
      printf("ErrorDivBy0");
      return;
   }
   else{
      //divide
   }
}
And if someone tries to divide by 0, then it just enters that if statement. The idea of ascribing pain to an inanimate object is purely nonsensical. It's like saying, "Does my stapler feel pain if I try to staple through a packet that's too thick?"

Re: do errors 'hurt' my PC?

Posted: Thu Jun 17, 2010 9:03 pm UTC
by squareroot
I just mean that, if it wasn't for that if statement, the division code would end immediately if it was 0/0, and it would go into an infinite loop if it was 1/0.

And yes, I think the stapler does feel pain. Even if we don't call it that. If I tell you to copy a page of solid text while I'm pouring alternating smeltering and freezing water of your head, the pain would keep you from doing that. Pain is just an inhibition, really.

Re: do errors 'hurt' my PC?

Posted: Thu Jun 17, 2010 9:45 pm UTC
by Xanthir
squareroot wrote:I just mean that, if it wasn't for that if statement, the division code would end immediately if it was 0/0, and it would go into an infinite loop if it was 1/0.

No, it wouldn't. At least, not in every implementation of division. *Some* implementations would loop, sure. But it's certainly not a guarantee.

And yes, I think the stapler does feel pain. Even if we don't call it that. If I tell you to copy a page of solid text while I'm pouring alternating smeltering and freezing water of your head, the pain would keep you from doing that. Pain is just an inhibition, really.

When you're ascribing feelings to a machine as mechanically simple as a stapler, your criteria for what "feelings" are are too low.

(joshz's statement about "inanimate" objects isn't quite right, since "animate" doesn't have a strict definition, but still, by any reasonably definition of such staplers are certainly inanimate.)

Re: do errors 'hurt' my PC?

Posted: Thu Jun 17, 2010 10:12 pm UTC
by squareroot
Xanthir wrote:When you're ascribing feelings to a machine as mechanically simple as a stapler, your criteria for what "feelings" are are too low.


STAPLERS HAVE FEELINGS TOO!

<serious> I don't define pain as a feeling, more just a system of prevention. If you go far enough into the human brain - well past what we actually understand, I guess - and were able to comprehend all the workings simultaneously, I'm sure you would agree that something such as Pain can be extended to simple objects like a stapler too.