I've been studying C++ for two years, then started Java two months ago. My performance in C++ wasn't good at all although I study hard. I thought that the problem is in not understanding the language concepts but when I started a new language with the intention of building up the concepts from scratsh, I discovered the REAL problem.

The problem isn't with knowing the syntax or understanding the language. My problem is when I'm faced with a program to solve, first, I don't know from where to start & how to think in solving it.

That's a HUGE problem...
Any suggestions for books to read, what to learn to help me think correctly when designing programs.

Thanks in advance :)

The ability to programmatically think and to find a solution to a problem are not the same. You can find a solution using different aproach which is not by programming. In programming, you may need to apply maths to solve a problem; however, many problems do not require maths in order to find a solution.

For example, you are living in a town, and you want to go from your house to your school. There are multiple roads/routes that can get to your school and they all are within walking distance. How do you find a route to get to school? You could ask someone to show you how to get there. You could ask your parents to drive you there for a few times. You could use a map to find a route. You could randomly walk around your house and the area until you stumble on your school. Do you see the point?

Teaching one to think programmatically is not easy. Human brain is very mysterious. Showing one how to do it is easier. A picture is worth more than a thousand words.

My advice is to keep practicing on programming. You should try to deal with small program which may be very specific or trivia, such as computing square root value using different approaches (algorithms). Build it up from fundamental. This works as a building block that you won't see much value in each block, but you will be able to recall and use them to solve different problems in different way in the future. Don't get discouraged if you can't solve it (program). Step back and try another approach or problem. You will learn from one and may get you to solve others later.

Edited 4 Years Ago by Taywin

Have a look into Requirements Engineering on places like Google Scholar . This will help you look at systems from more of a technical view. Once you;ve managed to understand how to think from the point of view of data movement you will find it a bit easier to start programming.

Another good thing to look at is Systems Architecture as this will help you map out what the system has to do in an easy to understand manner and break each part of the system down.

My final piece of advice is to program with pen and paper first. So rather than going straight into programming, instead write out what you want to system to do etc. Then how do you expect to do this. This method will help you sit down and actually think about the software.

Hi friend, See this is not a mojor or serious problem, look if you know C++ then its not a huge problem to write code in Jva.
Although both language having same concept(OOP), but their syntax are really different.
But logic is same, only Java has some extra features, wheather C++ doesn't.
I am suggestin you try to Start off with "Java For Dummies" available in various stores and online also.
Best of Luck.

AS i have suggested book for java,it's really good book with all concepts in java.
If you don't know C++, then also you can code in java after referring this or any other books suggested by arijith.
just go through it.

I think people are misunderstanding. The OP does not have problems with coding or syntax, but it is the concept of how to start programming. It is similar to someone who understands and can solve for y in y = x+8, but does not know how to even compose the equation from a word problem.

By the way, C++ is NOT an OO language, but you could program it in OO style. OO language programmer does not need to care for pointers and, in general concept, the language does NOT really have (visible) pointers to programmers. In C++, you must deal with it or your program will create memory leak.

An obvious way to get a touch on problem solving is to practice. I had that kind of problem too, the ways in which I solve problems were inconsistent. But when I solved more and more problems I developed a consistent way of solving problems. So now whenever I get a problem I try to :

  1. Read the whole problem statement carefully, and identify the objective of the
    problem (don't make assumptions before you understand it correctly and don't rush).

  2. Get into the details of the statements, analyze, observe, simplify and see if it's
    possible to do the current step again (your knowledge on the area of the problem can help you a lot in this step).

  3. Identify the processes and variables to be used to solve the problem(simplified from the above step) and think of a good implementation for them.

It's better to plan everything beforehand. The advantage is that, you'll have a clear idea about the structure(and design) of your program and you can code much faster. Otherwise, you'll probably have to go back and declare more variables at the time you're about to use it, and you'll have to think about what to do next at each stage, making you slow down. But these kind of steps will come naturally when you practice a lot.

Have fun. :)

I really appreciate all your HELPFUL BENEFICIAL tips & advices. This is very supporting and motivating. THANK YOU ALL.

This question has already been answered. Start a new discussion instead.