do errors 'hurt' my PC?

A place to discuss the implementation and style of computer programs.

Moderators: phlip, Moderators General, Prelates

User avatar
tipo test
Posts: 66
Joined: Sun May 23, 2010 12:15 pm UTC

do errors 'hurt' my PC?

Postby tipo test » Sun May 23, 2010 12:21 pm UTC

that's it, I always wondered... do errors (especially when compiling/etc) damage my computer's processor or RAM?

User avatar
headprogrammingczar
Posts: 3072
Joined: Mon Oct 22, 2007 5:28 pm UTC
Location: Beaming you up

Re: do errors 'hurt' my PC?

Postby headprogrammingczar » Sun May 23, 2010 12:26 pm UTC

Why would they?
<quintopia> You're not crazy. you're the goddamn headprogrammingspock!
<Weeks> You're the goddamn headprogrammingspock!
<Cheese> I love you

User avatar
Cleverbeans
Posts: 1378
Joined: Wed Mar 26, 2008 1:16 pm UTC

Re: do errors 'hurt' my PC?

Postby Cleverbeans » Sun May 23, 2010 12:46 pm UTC

headprogrammingczar wrote:Why would they?


Second law of Thermodynamics?
"Labor is prior to, and independent of, capital. Capital is only the fruit of labor, and could never have existed if labor had not first existed. Labor is the superior of capital, and deserves much the higher consideration." - Abraham Lincoln

User avatar
tipo test
Posts: 66
Joined: Sun May 23, 2010 12:15 pm UTC

Re: do errors 'hurt' my PC?

Postby tipo test » Sun May 23, 2010 1:40 pm UTC

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?

Rysto
Posts: 1460
Joined: Wed Mar 21, 2007 4:07 am UTC

Re: do errors 'hurt' my PC?

Postby Rysto » Sun May 23, 2010 1:51 pm UTC

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.

User avatar
Cleverbeans
Posts: 1378
Joined: Wed Mar 26, 2008 1:16 pm UTC

Re: do errors 'hurt' my PC?

Postby Cleverbeans » Sun May 23, 2010 2:03 pm UTC

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.
"Labor is prior to, and independent of, capital. Capital is only the fruit of labor, and could never have existed if labor had not first existed. Labor is the superior of capital, and deserves much the higher consideration." - Abraham Lincoln

User avatar
tipo test
Posts: 66
Joined: Sun May 23, 2010 12:15 pm UTC

Re: do errors 'hurt' my PC?

Postby tipo test » Sun May 23, 2010 4:54 pm UTC

okay, thank you. ;)

User avatar
Dason
Posts: 1311
Joined: Wed Dec 02, 2009 7:06 am UTC
Location: ~/

Re: do errors 'hurt' my PC?

Postby Dason » Mon May 24, 2010 5:30 am UTC

I think I know where he got that impression from. HERE
Or not. But seems relevant enough for me.
double epsilon = -.0000001;

User avatar
maushu
Posts: 8
Joined: Fri Apr 09, 2010 9:26 am UTC
Location: Portugal
Contact:

Re: do errors 'hurt' my PC?

Postby maushu » Mon May 24, 2010 2:17 pm UTC

Whatever you do, DON'T DIVIDE BY ZERO.

Image

Your computer will be the least of your worries.
You just wasted some seconds trying to see what this phrase said. You probably have too much free time on your hands.

Turtlewing
Posts: 236
Joined: Tue Nov 03, 2009 5:22 pm UTC

Re: do errors 'hurt' my PC?

Postby Turtlewing » Mon May 24, 2010 6:55 pm UTC

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.

User avatar
Pesto
Posts: 737
Joined: Wed Sep 05, 2007 5:33 pm UTC
Location: Berkeley, CA

Re: do errors 'hurt' my PC?

Postby Pesto » Mon May 24, 2010 7:48 pm UTC

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.

User avatar
Berengal
Superabacus Mystic of the First Rank
Posts: 2707
Joined: Thu May 24, 2007 5:51 am UTC
Location: Bergen, Norway
Contact:

Re: do errors 'hurt' my PC?

Postby Berengal » Mon May 24, 2010 7:49 pm UTC

Computers never make errors. They just do something different from what we wanted them to do.
It is practically impossible to teach good programming to students who are motivated by money: As potential programmers they are mentally mutilated beyond hope of regeneration.

User avatar
You, sir, name?
Posts: 6983
Joined: Sun Apr 22, 2007 10:07 am UTC
Location: Chako Paul City
Contact:

Re: do errors 'hurt' my PC?

Postby You, sir, name? » Mon May 24, 2010 8:19 pm UTC

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.
I edit my posts a lot and sometimes the words wrong order words appear in sentences get messed up.

User avatar
Berengal
Superabacus Mystic of the First Rank
Posts: 2707
Joined: Thu May 24, 2007 5:51 am UTC
Location: Bergen, Norway
Contact:

Re: do errors 'hurt' my PC?

Postby Berengal » Mon May 24, 2010 8:26 pm UTC

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.
It is practically impossible to teach good programming to students who are motivated by money: As potential programmers they are mentally mutilated beyond hope of regeneration.

User avatar
headprogrammingczar
Posts: 3072
Joined: Mon Oct 22, 2007 5:28 pm UTC
Location: Beaming you up

Re: do errors 'hurt' my PC?

Postby headprogrammingczar » Mon May 24, 2010 8:34 pm UTC

But if you yell at your computer to make you a sandwich, it doesn't do anything!
<quintopia> You're not crazy. you're the goddamn headprogrammingspock!
<Weeks> You're the goddamn headprogrammingspock!
<Cheese> I love you

User avatar
Dason
Posts: 1311
Joined: Wed Dec 02, 2009 7:06 am UTC
Location: ~/

Re: do errors 'hurt' my PC?

Postby Dason » Mon May 24, 2010 8:54 pm UTC

My sandwichtron 5000 begs to differ.
double epsilon = -.0000001;

User avatar
tipo test
Posts: 66
Joined: Sun May 23, 2010 12:15 pm UTC

Re: do errors 'hurt' my PC?

Postby tipo test » Mon May 24, 2010 10:59 pm UTC

This board. I like it.

User avatar
You, sir, name?
Posts: 6983
Joined: Sun Apr 22, 2007 10:07 am UTC
Location: Chako Paul City
Contact:

Re: do errors 'hurt' my PC?

Postby You, sir, name? » Tue May 25, 2010 12:08 am UTC

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.
I edit my posts a lot and sometimes the words wrong order words appear in sentences get messed up.

Agent_Irons
Posts: 213
Joined: Wed Sep 10, 2008 3:54 am UTC

Re: do errors 'hurt' my PC?

Postby Agent_Irons » Tue May 25, 2010 6:42 am UTC

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.

User avatar
SlyReaper
inflatable
Posts: 8015
Joined: Mon Dec 31, 2007 11:09 pm UTC
Location: Bristol, Old Blighty

Re: do errors 'hurt' my PC?

Postby SlyReaper » Tue May 25, 2010 6:54 am UTC

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.
Image
What would Baron Harkonnen do?

User avatar
PM 2Ring
Posts: 3715
Joined: Mon Jan 26, 2009 3:19 pm UTC
Location: Sydney, Australia

Re: do errors 'hurt' my PC?

Postby PM 2Ring » Tue May 25, 2010 7:52 am UTC

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

User avatar
'; DROP DATABASE;--
Posts: 3284
Joined: Thu Nov 22, 2007 9:38 am UTC
Location: Midwest Alberta, where it's STILL snowy
Contact:

Re: do errors 'hurt' my PC?

Postby '; DROP DATABASE;-- » Fri Jun 11, 2010 3:49 am UTC

[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.)
poxic wrote:You suck. And simultaneously rock. I think you've invented a new state of being.

YoungStudent
Posts: 127
Joined: Wed Sep 10, 2008 10:14 am UTC

Re: do errors 'hurt' my PC?

Postby YoungStudent » Fri Jun 11, 2010 10:21 am UTC

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.
Okay, quote me - We try to explain magic, presence of spirits and supernatural with science, which only explains 'the physical world' that we observe. It's like blind earthworm declaring that there is no light.

User avatar
headprogrammingczar
Posts: 3072
Joined: Mon Oct 22, 2007 5:28 pm UTC
Location: Beaming you up

Re: do errors 'hurt' my PC?

Postby headprogrammingczar » Fri Jun 11, 2010 12:02 pm UTC

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.
<quintopia> You're not crazy. you're the goddamn headprogrammingspock!
<Weeks> You're the goddamn headprogrammingspock!
<Cheese> I love you

User avatar
WarDaft
Posts: 1583
Joined: Thu Jul 30, 2009 3:16 pm UTC

Re: do errors 'hurt' my PC?

Postby WarDaft » Fri Jun 11, 2010 12:09 pm UTC

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.
All Shadow priest spells that deal Fire damage now appear green.
Big freaky cereal boxes of death.

User avatar
bitsplit
Posts: 57
Joined: Thu May 13, 2010 12:40 pm UTC

Re: do errors 'hurt' my PC?

Postby bitsplit » Fri Jun 11, 2010 2:00 pm UTC

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.

Axidos
Posts: 167
Joined: Tue Jan 20, 2009 12:02 pm UTC
Location: trapped in a profile factory please send help

Re: do errors 'hurt' my PC?

Postby Axidos » Fri Jun 11, 2010 3:36 pm UTC

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.

User avatar
bitsplit
Posts: 57
Joined: Thu May 13, 2010 12:40 pm UTC

Re: do errors 'hurt' my PC?

Postby bitsplit » Fri Jun 11, 2010 6:45 pm UTC

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.

User avatar
WarDaft
Posts: 1583
Joined: Thu Jul 30, 2009 3:16 pm UTC

Re: do errors 'hurt' my PC?

Postby WarDaft » Fri Jun 11, 2010 11:33 pm UTC

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.
All Shadow priest spells that deal Fire damage now appear green.
Big freaky cereal boxes of death.

User avatar
weex
Posts: 87
Joined: Wed Oct 29, 2008 5:50 am UTC

Re: do errors 'hurt' my PC?

Postby weex » Fri Jun 11, 2010 11:50 pm UTC

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.
Salvador Dali wrote:Those who do not want to imitate anything, produce nothing.

Simple Pen Art, now with an Archive page.

User avatar
WarDaft
Posts: 1583
Joined: Thu Jul 30, 2009 3:16 pm UTC

Re: do errors 'hurt' my PC?

Postby WarDaft » Sat Jun 12, 2010 12:13 am UTC

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.
All Shadow priest spells that deal Fire damage now appear green.
Big freaky cereal boxes of death.

Axidos
Posts: 167
Joined: Tue Jan 20, 2009 12:02 pm UTC
Location: trapped in a profile factory please send help

Re: do errors 'hurt' my PC?

Postby Axidos » Sat Jun 12, 2010 7:32 am UTC

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.

User avatar
'; DROP DATABASE;--
Posts: 3284
Joined: Thu Nov 22, 2007 9:38 am UTC
Location: Midwest Alberta, where it's STILL snowy
Contact:

Re: do errors 'hurt' my PC?

Postby '; DROP DATABASE;-- » Sun Jun 13, 2010 1:55 am UTC

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.
poxic wrote:You suck. And simultaneously rock. I think you've invented a new state of being.

stands2reason
Posts: 16
Joined: Wed Jun 09, 2010 2:32 pm UTC

Re: do errors 'hurt' my PC?

Postby stands2reason » Tue Jun 15, 2010 5:51 pm UTC

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.

User avatar
Arancaytar
Posts: 1642
Joined: Thu Mar 15, 2007 12:54 am UTC
Location: 52.44°N, 13.55°E
Contact:

Re: do errors 'hurt' my PC?

Postby Arancaytar » Thu Jun 17, 2010 2:49 pm UTC

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!"
"You cannot dual-wield the sharks. One is enough." -Our DM.
Image

squareroot
Posts: 548
Joined: Tue Jan 12, 2010 1:04 am UTC
Contact:

Re: do errors 'hurt' my PC?

Postby squareroot » Thu Jun 17, 2010 8:18 pm UTC

[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?
<signature content="" style="tag:html;" overused meta />
Good fucking job Will Yu, you found me - __ -

User avatar
joshz
Posts: 1466
Joined: Tue Nov 11, 2008 2:51 am UTC
Location: Pittsburgh, PA

Re: do errors 'hurt' my PC?

Postby joshz » Thu Jun 17, 2010 8:41 pm UTC

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?"
You, sir, name? wrote:If you have over 26 levels of nesting, you've got bigger problems ... than variable naming.
suffer-cait wrote:it might also be interesting to note here that i don't like 5 fingers. they feel too bulky.

squareroot
Posts: 548
Joined: Tue Jan 12, 2010 1:04 am UTC
Contact:

Re: do errors 'hurt' my PC?

Postby squareroot » Thu Jun 17, 2010 9:03 pm UTC

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.
<signature content="" style="tag:html;" overused meta />
Good fucking job Will Yu, you found me - __ -

User avatar
Xanthir
My HERO!!!
Posts: 5426
Joined: Tue Feb 20, 2007 12:49 am UTC
Location: The Googleplex
Contact:

Re: do errors 'hurt' my PC?

Postby Xanthir » Thu Jun 17, 2010 9:45 pm UTC

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.)
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))

squareroot
Posts: 548
Joined: Tue Jan 12, 2010 1:04 am UTC
Contact:

Re: do errors 'hurt' my PC?

Postby squareroot » Thu Jun 17, 2010 10:12 pm UTC

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.
<signature content="" style="tag:html;" overused meta />
Good fucking job Will Yu, you found me - __ -


Return to “Coding”

Who is online

Users browsing this forum: No registered users and 8 guests