Jump to content

User:Timhowardriley

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Timhowardriley (talk | contribs) at 15:58, 3 October 2007 (→‎What is a computer program?). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

This user maintains a strict policy advising against all personal attacks.
BScThis user has a Bachelor of Science degree in Computer Science.
This user is a software engineer.
C-4This user is an expert C programmer.
This user has been programming for the Everglades National Park since 1998.
This user used to commute daily to here.
This user is writing a book.
This user has a website, which can be found here.
mysqlThis user writes programs that access MySQL.
This user contributes using Linux.
This user contributes using Vim.
This user misses his 1966 Ford Mustang Convertible.
This user plays the trombone.
This user served in the Army Band at Fort Benning.
This user just LOVES to cycle here.
This user can bench press 4 tons in 7 sets.
This user used to use a rotary dial phone.
File:Trs80 2.jpgThis user's first computer was a TRS-80 Model I.


What is a computer program?

How does a Mathematician move a pot on a stove?

Given a stove with the top-right burner warming, how does a Mathematician move a pot from the top-left burner to the top-right burner?

1) Lift the pot 3 inches.
2) Move the pot 18 inches to the right.
3) Lower the pot 3 inches.
4) Call these steps algorithm number 1.

Now, how does a Mathematician move a pot from the bottom-left burner to the top-right burner?

1) Lift the pot 3 inches.
2) Move the pot 12 inches forward.
3) Lower the pot 3 inches.
4) Execute algorithm number 1.

As you can see, an algorithm is a sequence of instructions.

How does a Computer Scientist move a pot on a stove?

How does a Computer Scientist move a pot from the bottom-left burner to the top-right burner?

procedure move_right( pot )
begin
pot.lift( 3, inches )
pot.move( right, 18, inches )
pot.lower( 3, inches )
end
main()
begin
stove.burner_heat( top_right, warm )
pot = stove.create_pot( bottom_left )
pot.lift( 3, inches )
pot.move( forward, 12, inches )
pot.lower( 3, inches )
execute move_right( pot )
end

As you can see, the Computer Scientist moves the pot the same way as the Mathematician, except for the special syntax. Therefore, a computer program is a special case of algorithm. Because this is the definition of a subset, we have a computer program being essentially an algorithm. More specifically, a computer program is an algorithm in a syntax that can be parsed by a compiler, interpreter, virtual machine, or CPU. And because an algorithm is a sequence of instructions, a computer program is a sequence of instructions in a syntax that can be parsed by a compiler, interpreter, virtual machine, or CPU.


Why the sky is blue.

  • Teacher: The sky is blue because ...
  • Student: Wrong. The clouds are white.
  • Teacher: The sky is blue — except for the white clouds — because ...
  • Student: That's improper. During an overcast, the sky has no blue.
  • Teacher: The sky is blue — except for the white clouds and not during overcast days — because ...
  • Student: You're not qualified to teach. At night the sky is black.
  • Teacher: The sky is blue — except for the white clouds, not during overcast days, and not at night — because ...
  • Student: That's rubbish. Air pollution is gray.
  • Teacher: The sky is blue — except for the white clouds, not during overcast days, not at night, and away from pollution — because ...
  • Student: You lack knowledge. During a solar eclipse, the sky is dark.
  • Teacher: The sky is blue — except for the white clouds, not during overcast days, not at night, away from pollution, and not during a solar eclipse — because ...
  • Student: That's sloppy. During evenings, the sky is orange.
  • Teacher: The sky is blue — except for the white clouds, not during overcast days, not at night, away from pollution, not during a solar eclipse, and not at evenings — because nitrogen and oxygen scatter the blue wavelength.
This user believes peripherals should not cloud the essence of the message.
This user believes Be Afraid is an unfortunate reality. "You should also learn that Wikipedia users often display ownership of articles they've edited, and jealously guard the fiefdoms and cliques they've developed..."