What vs. How in Problem Solving
In this essay "what" and "how" will be defined as follows:
* "What" is the abstract algorithm designed to solve a problem.
* "How" is the implementation of the algorithm.
Say the problem was to determine the number of hours spent on a project that was broken up into smaller tasks. It's easy to derive the algorithm; the hours from the tasks need to be added together, but that doesn't answer the question. An algorithm (the "what") doesn't actually do anything, it just creates a path to the answer. It is like planning a trip, and implementation (the "how") is actually getting in the car and driving down the road. I could add the hours in my head, I could put them in a spreadsheet, I could enter them in a calculator, or I could do it some other way. The point is that variations in the implementation are not important as long as the algorithm is implemented correctly. It takes a good algorithm combined with a correct implementation to reach the desired goal. A good algorithm should be correct and implementation independent (e.g. it shouldn't matter how the numbers are added as long as the result solves the problem), and a good implementation should meet the requirements of the algorithm as efficiently as possible (e.g. it doesn't matter if I walk or drive to my neighbors house as long as I get there and do it in a timely manner).
The level of abstraction is another thing to consider when working on the implementation. If the problem is determining who gets paid this week, then getting out a soldering iron and a circuit board might not be the correct level of abstraction. Something more abstract like a spreadsheet might be a more appropriate level of abstraction. Each level of abstraction is an implementation of an algorithm on top of another implementation of another algorithm. These levels build up and up until the implementations fade away and allowing the user to focus on the problem at hand. As I type this, the implementation of the keyboard sending electronic signals to a processor that manipulates other parts of my computer that sends signals to my monitor so that characters are being displayed on my screen is not important, as long as it works and doesn't get in the way of solving the problem of getting a few of my thoughts written down.
In conclusion, the roles of "what" and "how" in problem solving are: first ask "what" needs to be done (designing your algorithm), then determine a proper level of abstraction, and finally select the proper tools to use when determining "how" to implement the algorithm. When approaching the implementation there will be many sub-problems to consider, but a tool set that is close to the desired level of abstraction, should provide you the building blocks you need to solve the problem at hand.