How to build a program to solve a certain problem ?