When faced with coding a task, defining the problem creates most of the solution.
After all, if you cannot define the problem, then can you ever really find its solution?