by Attummm · 2y ago · 0 comments
But since your example made a choice, we are now one level deeper and more concrete than before. The what/goal has in this level become to run a 5K, and the how/method is how you will train to achieve that goal.
"How" and "what" can be very conceptual, especially at a high level, and just like the 5 Whys technique, it could take a few levels to become concrete. Top-down programming is often taught by separating the "how" and the "what." For example:
customer = get_customer(id=id)
The "what" is getting the customer.
The "how" is not revealed, yet its intent is clear. Within the function get_customer we could have another 'what' for example run_query Top-down programming will often first skip the "how" and focus only on the "what" by writing the functions, methods, and classes later on.
https://en.m.wikipedia.org/wiki/Bottom%E2%80%93up_and_top%E2...
I think objective is a better term. These range from high level (increase happiness) to very concrete such as physical movement. Basically we are solving optimization problems.