Using programs to solve problems: Imitation versus insight