ajax ... nettuts

Being able to “solve a problem” and being able to “write a program to solve a problem” are not the same things.

What is the difference?

When we solve a problem, we need to think like ourselves.

When we write a program to solve a program, we need to think like computers.

In other words, while writing a program, you need to transfer your thinking process to the computer.

For example, many of us can play chess very well. But it wouldn’t be possible for the best among us to write a program that plays real, intelligent, chess.

Good programming goes one step beyond problem-solving: You don’t just need the ability to solve a problem, but you need to know the exact thought process that led you to solve the problem.

Without this skill, programming is just a confusing, zigzag path of trials-and-errors and hence, ends up being stressful, long-drawn activity.

If you could learn to develop a systematic and optimal thought-process and be able to apply that easily, you would be able to write programs with 10 times more complexity at 1/10th the effort and time required.

For example, we all have played the 15-puzzle (Fifteen_puzzle) some time or the other. It is a very simple puzzle and most of us can solve it within minutes.

Now, try writing a program to solve the 15-puzzle, and you will notice the difference between “solving a problem” and “writing a program to solve a problem”.

What does it take to learn how to “write a program to solve a problem”?

Thinking with Clarity.
Thinking systematically.
Thinking with a purpose.
Good problem-solving skills are what we are talking about.
The ability to crack ANY problem in an absolutely systematic, step-by-step fashion.
The ability to take small, incremental, but confident steps.

This tutorial will show you how a systematic thinking can help you write the most complicated programs with absolute ease, within minutes.

This is done through a case-study. In the next section, a programming problem is defined in detail.

Do give the problem sufficient try before looking at the further sections.

However, make sure you take appropriate help from the sections so that we remain on track.

The tutorial is designed you help you think through the problem systematically, ask the right questions, and take small, incremental but confident steps to writing the complete working program of the given problem within minutes.