By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,484 Members | 1,568 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,484 IT Pros & Developers. It's quick & easy.

Can a C++ program affect time and space ???

P: n/a
According to Einstein, objects of great mass affect timespace.

Can a great mass of bits in a badly written C++ program affect
timespace, making the harddisk were it is written on incredibly slow
and cause a system crash or even worse - a paradox and the destruction
of the universe ?

Can a small bug cause a fractal overload and destroy a whole internet,
you know, something like the butterfly effect ?

If yes, then programming is a more dangerous job than working with high
explosives or radioactive elements...

Nov 22 '05 #1
Share this Question
Share on Google+
11 Replies


P: n/a
if you make some code like this, say me i want to see the source:)

Nov 22 '05 #2

P: n/a
Eliot Coweye wrote:
According to Einstein, objects of great mass affect timespace.

Can a great mass of bits in a badly written C++ program affect
Bits generally require an external medium to store their state in.
timespace, making the harddisk were it is written on incredibly slow
and cause a system crash or even worse - a paradox and the destruction
of the universe ?
No, as the bits on a hard disk are limited by the physical size of the
disk pallet (sp?)
Can a small bug cause a fractal overload and destroy a whole internet,
you know, something like the butterfly effect ?
Perhaps, if everything was running on one platform.
If yes, then programming is a more dangerous job than working with high
explosives or radioactive elements...


Perhaps... perhaps. What controls the systems dealing with radioactive
elemens or high explosive detonation devices? =P

Nov 22 '05 #3

P: n/a
"Eliot Coweye" <ci**********@lycos.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
According to Einstein, objects of great mass affect timespace.

Can a great mass of bits in a badly written C++ program affect
timespace, making the harddisk were it is written on incredibly slow
and cause a system crash or even worse - a paradox and the destruction
of the universe ?

Can a small bug cause a fractal overload and destroy a whole internet,
you know, something like the butterfly effect ?

If yes, then programming is a more dangerous job than working with high
explosives or radioactive elements...


R.W. Hamming once confided in me his growing concern with the
number of academic journals he was receiving. He computed that,
at the then current rate of growth (circa 1970), his shelving
was facing a crisis. As each journal came in, he'd slap it on
the left end of his "things to read" shelf, pushing the older
stuff to the right. He figured that by 1985 the journals on
the right end would be moving away from him faster than the
speed of light.

Then he realized that the problem was nonexistent. Einstein's
laws only prohibit the propagation of *information* faster
than the speed of light.

I'm sure you can work up a similar argument about the
information density (hence energy density, hence effective
mass, hence effective ability to warp space and time) of a
badly written C++ program.

P.J. Plauger
Dinkumware, Ltd.
http://www.dinkumware.com
Nov 22 '05 #4

P: n/a
Eliot Coweye wrote:
Can a small bug cause a fractal overload and destroy a whole internet,
you know, something like the butterfly effect ?


Yes, if only the code produces undefined behaviour.

- J.
Nov 22 '05 #5

P: n/a
Excellent question! In order to get answers to this, let's look at the
thermodynamical limits of computing. You know, the stuff that even the
space aliens from Zarbnulax have to obey. Particularly, the Landauer
Bound.

The Landauer Bound says that it costs energy to erase information. Off
the top of my head, I want to say that every time you erase a bit of
information (like, say, by replacing the value of a variable with a new
value), you have to pay kT ln 2 joules of energy, where k is the
Boltzmann constant, T is the temperature in Kelvins at which your
computer is running, and ln 2 is just the natural logarithm of two.
This comes out to a very small but nonzero number, about 3.15 * 10**-23
joules. Thus, if you're writing some hideously inefficient algorithm
which requires upwards of 10**38 bit erasures to complete, you're going
to require an amount of energy comparable to a strategic nuclear weapon
(one megaton is around 10**15 joules).

Since E = mc**2, we can use high school algebra to show E/c**2 = m.
Plugging in c = 300,000,000 meters per second gives us roughly 10**18
as a value for c**2, meaning our computer program has a mass-energy
equivalent to about 10**-3 kilos, or about a gram.

Congratulations! Your C++ code is now warping space-time with
predictable, measurable effects. Given gravity is so weak on less than
celestial scales I'm not quite sure how you'd measure it, but I'm
absolutely certain that at this point the joke has gone on too long.
:)

Nov 22 '05 #6

P: n/a
Eliot Coweye wrote:
According to Einstein, objects of great mass affect timespace.

Can a great mass of bits in a badly written C++ program affect
timespace, making the harddisk were it is written on incredibly slow
and cause a system crash or even worse - a paradox and the destruction
of the universe ?

Can a small bug cause a fractal overload and destroy a whole internet,
you know, something like the butterfly effect ?

If yes, then programming is a more dangerous job than working with high
explosives or radioactive elements...


Well actually I wrote a program last year which opened a wormhole in
the bathroom. I was quite excited, but I found out it was just
undefined behavior. Sheesh.
Jonathan

Nov 22 '05 #7

P: n/a
P.J. Plauger wrote:

R.W. Hamming once confided in me his growing concern with the
number of academic journals he was receiving. He computed that,
at the then current rate of growth (circa 1970), his shelving
was facing a crisis. As each journal came in, he'd slap it on
the left end of his "things to read" shelf, pushing the older
stuff to the right. He figured that by 1985 the journals on
the right end would be moving away from him faster than the
speed of light.

Then he realized that the problem was nonexistent. Einstein's
laws only prohibit the propagation of *information* faster
than the speed of light.

That story's great! Thanks, P.J.!!!!
Nov 22 '05 #8

P: n/a
In article <11**********************@g14g2000cwa.googlegroups .com>,
Eliot Coweye <ci**********@lycos.com> wrote:
According to Einstein, objects of great mass affect timespace.

Can a great mass of bits in a badly written C++ program affect
timespace, making the harddisk were it is written on incredibly slow
and cause a system crash or even worse - a paradox and the destruction
of the universe ?

Can a small bug cause a fractal overload and destroy a whole internet,
you know, something like the butterfly effect ?

If yes, then programming is a more dangerous job than working with high
explosives or radioactive elements...


In addition to the Big Bang, this has been well known as Big-O.
See http://en.wikipedia.org/wiki/Big_O_notation .
It is said that this always occurs but w/o our knowledge
(older people experience this, however, instead they are call senile).
Furthermore, it has been known to occur along side of the notion that
"One line of text no longer necessarily corresponds to one line of code"
(see http://en.wikipedia.org/wiki/Source_lines_of_code )
with the special wrench thrown in that "Every program can be
reduced by one instruction, and every program has at least one bug.
Therefore, any program can be reduced to one instruction which doesn't work."
But, even that line of code just pop away but gets replaced
by gotohere: goto gotohere; which for sure is a time/space whammy.
However, it's _very important_ to remember that GNU is not UNIX,
otherwise, 'tis very dangerous indeed.
--
Greg Comeau / Celebrating 20 years of Comeauity!
Comeau C/C++ ONLINE ==> http://www.comeaucomputing.com/tryitout
World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?
Nov 22 '05 #9

P: n/a
> R.W. Hamming once confided in me his growing concern with the
number of academic journals he was receiving. He computed that,
at the then current rate of growth (circa 1970), his shelving
was facing a crisis. As each journal came in, he'd slap it on
the left end of his "things to read" shelf, pushing the older
stuff to the right. He figured that by 1985 the journals on
the right end would be moving away from him faster than the
speed of light.

Then he realized that the problem was nonexistent. Einstein's
laws only prohibit the propagation of *information* faster
than the speed of light.


Consider a 10' pole on the ground. You push it forward 1". The end 10'
away moved forward INSTANTLY as you pushed. Did this break the law of
movement faster than the speed of light? No, the pole moved slower than the
speed of light. But didn't the information that you pushed on one end
travel 10' faster than the speed of light?

Incidently, this is how some scientists made light travel faster than the
speed of light. They actually didn't. They just sent it to a medium which
acted like a pole, when the light beam hit one side DIFFERENT light was
emitted from the far side faster than the light would have taken to travel
there.
Nov 22 '05 #10

P: n/a
In article <11**********************@g14g2000cwa.googlegroups .com>,
Eliot Coweye <ci**********@lycos.com> writes
According to Einstein, objects of great mass affect timespace.

Can a great mass of bits in a badly written C++ program affect
timespace, making the harddisk were it is written on incredibly slow
and cause a system crash or even worse - a paradox and the destruction
of the universe ?

Can a small bug cause a fractal overload and destroy a whole internet,
you know, something like the butterfly effect ?

If yes, then programming is a more dangerous job than working with high
explosives or radioactive elements...


Many of us work on safety critical systems like nuclear reactor control
systems, aircraft, missiles, weapons systems, vehicle control systems
etc

In fact a vast amount of SW Engineering is safety critical.

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
/\/\/ ch***@phaedsys.org www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Nov 22 '05 #11

P: n/a

"Eliot Coweye" <ci**********@lycos.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
According to Einstein, objects of great mass affect timespace.

Can a great mass of bits in a badly written C++ program affect
timespace, making the harddisk were it is written on incredibly slow
and cause a system crash or even worse - a paradox and the destruction
of the universe ?

Can a small bug cause a fractal overload and destroy a whole internet,
you know, something like the butterfly effect ?

If yes, then programming is a more dangerous job than working with high
explosives or radioactive elements...


This was very funny, but OT. It made a lot of people laugh.
By the way, Einstien's equation is now E=MC^3 due to inflation.

Tom the Canuck.
Dec 3 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.