|
I use the following analogy, which seems to get the point across most of the time. Imagine you're catering an event, and you need to make 500 identical sandwiches. Now, the usual approach is to get out the bread slices, lettuce, tomatoes, turkey, etc and set to work constructing each sandwich by hand. And what if the client suddenly tells you they need 1,000 sandwiches? Your work doubles! But what if you do this instead: build a machine where you press a button and it creates one perfect sandwich, exactly to specification. Then even if you have an event that calls for 1,000, 100,000, or 1,000,000 or more sandwhiches, your work doesn't really increase. You just keep pressing a button, and any number of sandwiches pop out of the machine, exactly to specification. In this case, the machine is the program. More accurately, the machine is the CPU and its instructions for creating a sandwich are the program, but you will lose people going to this level of detail. And the sandwiches are the output. |