I am very weak in logical thinking and all programming languages. To overcome and improve my skills, what can I do? What is the solution procedure-wise?

You can become very strong in programming if you practice few of these following things:

a) for-loop

b) logical operators

c) conditional statements.

The interest and confidence

Actual confidence in programming comes by developing the skill of logic building.Please visit the given post to explore more about it:

How can I improve my programming skills?

I think most programmers cannot share their thinking styles with non-programmers — as evidenced by the many “Just try harder” answers here. :D

The key to programming is to think as if you’re building a house. The problem with this is, most of today’s population doesn’t know how to build a house.

And instead of purchasing the bricks, you’re making them from minerals you dig out of the ground, one by one. After you’ve poured out thousands of bricks, you have to let them harden for a week. Then you have to use more cement and cement them into place for your house. You have to keep in mind the desig

I think most programmers cannot share their thinking styles with non-programmers — as evidenced by the many “Just try harder” answers here. :D

The key to programming is to think as if you’re building a house. The problem with this is, most of today’s population doesn’t know how to build a house.

And instead of purchasing the bricks, you’re making them from minerals you dig out of the ground, one by one. After you’ve poured out thousands of bricks, you have to let them harden for a week. Then you have to use more cement and cement them into place for your house. You have to keep in mind the design you want, and plan the brick laying accordingly.

Programming is much the same way. When you were pouring the bricks, you weren’t thinking of the house plans. You were thinking about how to make the best bricks possible. When programming, you don’t need to think of the entire program while working on a single function. Instead, make your functions, THEN lay them together to form the planned way you want your software to look. You have to have a vision of how your software should work at this point, just as you have a vision of how your house is going to look after the bricks harden and need to be laid down.

At any time, you can change your design plan because you’ll have the tools you need at this point. First focus on what tools you need. Then bend them to your very will.

More than the code, it is the algorithm that matters. Take a break from perfecting actual code and learn the different approaches to solving a problem. Start with the following list of problem types:

Greedy algorithms: Type of solutions that optimize a short term goal. Consider the problem of finding the shortest path from one node to all others. An idea that comes to mind is to choose the shortest edge from the initial node and continue until all nodes are reached. This is the foundation of the famous Dijkstra Algorithm.

Divide & Conquer: Type of solution divides the problem into equal sized su

More than the code, it is the algorithm that matters. Take a break from perfecting actual code and learn the different approaches to solving a problem. Start with the following list of problem types:

Greedy algorithms: Type of solutions that optimize a short term goal. Consider the problem of finding the shortest path from one node to all others. An idea that comes to mind is to choose the shortest edge from the initial node and continue until all nodes are reached. This is the foundation of the famous Dijkstra Algorithm.

Divide & Conquer: Type of solution divides the problem into equal sized subproblems so they become easier to solve. A famous instance of this solution type is binary search. The problem involves trying to find a number in a list of n sorted numbers. Instead of checking each element which incurs an O(n) runtime, we check the middle element to see if it is higher/lower than the element we are looking for. If higher, then we can discard the first half of the elements, if lower, we discard the last half. The problem is thus divided into halve for every step, leading to an improved runtime O(logn).

Dynamic Programming: This type of solution is exhaustive as it checks all possibilities. The crux involves the construction of recurrence relation to express a large problem in terms of it’s subproblems. The famous Knapsack Problem has such a dynamic programming solution. I’ve written in detail about this in Ajay Halthor's answer to How can you develop a dynamic programming algorithm? Check it out for more info.

Network Flow: Solves problems in a way that closely models a Supply/demand chain. We construct a flow graph with the entities as nodes and constraints of the problem as edge weights. The flow though the graph is used to determine an optimal solution, if any. Very useful to solve graph problems.

If you have time, go in this order: Greedy, then Divide and Conquor, then Dynamic Programming, and finally Network flow. However, if you are running short on time, jump to dynamic programming. In the world of competitive programming, you come across a lot of problems with DP solutions. Furthermore, software engineering job interviews with bombard (love this word) you with such questions, so it is useful in more ways than one.

A2A

Let me try to explain with simple example— Task is to find student whose rank is first and last in class. Before you write code, follow these steps. These will help you in resolving your problem.

  • Understand what you want to do carefully and define correct problem definition.

we can define our problem as “Find Max and Min Marks from list”

  • Break down main task into smaller tasks

Task looks easier when you devide it into smaller tasks. Here, You can break down it as--

  1. Read all student’s names and marks.
  2. Sort Students by marks in descending order
  3. Print name of student with first rank as first record f

A2A

Let me try to explain with simple example— Task is to find student whose rank is first and last in class. Before you write code, follow these steps. These will help you in resolving your problem.

  • Understand what you want to do carefully and define correct problem definition.

we can define our problem as “Find Max and Min Marks from list”

  • Break down main task into smaller tasks

Task looks easier when you devide it into smaller tasks. Here, You can break down it as--

  1. Read all student’s names and marks.
  2. Sort Students by marks in descending order
  3. Print name of student with first rank as first record from list
  4. Print name of student with last rank as last record from list

Go further and break down these task again into smaller tasks.

For Ex: Read all student’s names and marks can be break down as follow:

  1. Define data-structure or variables to hold all student’s names and marks.
  2. Define input method for reading data.
  3. Get input and validate.
  4. Add input to defined database (variable or database)
  • Always look for alternative.

There is always another way to do it. Before you proceed, check if there is any alternative way of solving problem and select simplest and easiest alternative.

For example in our case, we can solve it other way as follow :

1) Read student’s name and marks

2) Save it into database.

3) Fetch student with Max value of mark from database using database query, print as first rank

4)Fetch student with min value of mark from database using database query, print as last rank

  • Analyze

re-think on what you have decided and consider all possibilities to ensure 100% correctness.

Now, as you have list of small task, star coding. Start with simplest task.

Apply above for any programm you want write. If you still find it difficult, For few days, forget about programming and start solving logical puzzles. once you feel you are comfortable with it, come back to programming.

Luminous Learning

Starter Puzzles

Once you feel more than comfortable with solving these puzzles, come back to programming and try to follow these instructions.

Above All-- as mentioned in every answer to this question- Practice!! Any technique will not work without practice.

in photography, there’s the saying that the best camera is the one you have with you. knowing nothing about your environment, the fact that you’re writing a question on the internet means that you have access to a functioning javascript environment: the one that you’re writing this internet question on. what you should do is right-click on your question and click “inspect.” it’ll bring up the developer console, with your question highlighted. you can see that your question looks like this:

  1. <span class="rendered_qtext">What do I do when I'm muddled up between choosing the programming language to

in photography, there’s the saying that the best camera is the one you have with you. knowing nothing about your environment, the fact that you’re writing a question on the internet means that you have access to a functioning javascript environment: the one that you’re writing this internet question on. what you should do is right-click on your question and click “inspect.” it’ll bring up the developer console, with your question highlighted. you can see that your question looks like this:

  1. <span class="rendered_qtext">What do I do when I'm muddled up between choosing the programming language to start with?</span>

one of the tabs is called console (if it’s not visible, click on the three vertical dots and find it). you can type in or paste in any javascript, which allows you to interact with the web page you’re on, or just run code, like run some snippet that does something, or some algorithm that you find online. nothing that you type in there can do any harm to your computer, and you can screw up the web page as much as you want, and then if you hit refresh, it’ll all be ok.

now in the console tab, (this works on chrome, not sure about other browsers) if you type $0, it gives you a reference to the currently selected HTML element (the one from above). if you type $0.innerText, it gives you the text of that element, in other words, it’ll give you the text of your question. if you change that text, then you’ll see it change in the web page. so now paste the following into the console:

  1. $0.innerText = "What do I do when I'm muddled up between choosing the programming language to start with? I should hit Cmd+Option+i and start typing some javascript."

javascript may not be the best or easiest language to learn, but it is always “there.” while you’re looking around the internet for how to start with other languages or what to download or what version to use or how to set up your environment, javascript is still “there,” and it works, as shown by the fact that you’re able to view web pages, and ask questions on the internet. so now read your modified question for the answer to what to do when you’re muddled up between choosing the programming language to start with

Tip 1: Learn the language ‘C’ ~You might be an expert .NET, Java or PHP developer, but I would recommend that you MUST learn ‘C. We all know why ‘C’ is the most powerful programming language, but I am not recommending learning ‘C’ to you because of its power in programming.‘C’ offers you a structured style of
programming. You have one file with the main() method and the execution
begins from there and the execution flow proceeds as you have directed it to.The main advantage in ‘C’ is that it allows you to play around with memory directly. This I believe is very important if you need to under

Tip 1: Learn the language ‘C’ ~You might be an expert .NET, Java or PHP developer, but I would recommend that you MUST learn ‘C. We all know why ‘C’ is the most powerful programming language, but I am not recommending learning ‘C’ to you because of its power in programming.‘C’ offers you a structured style of
programming. You have one file with the main() method and the execution
begins from there and the execution flow proceeds as you have directed it to.The main advantage in ‘C’ is that it allows you to play around with memory directly. This I believe is very important if you need to understand how data is passed from one memory block to another. The reason is that you start to visualize in your minds eye how data moves in your program.The next step is to develop programs that will help you improve your logic.

Tip 2: Develop programs that test your mind skills ~Ever heard of the Fibonacci series?Ever built a program that will allow the user to type his/her name and allow to bounce off that name on the screen from one corner to another like a ball?Ever thought of creating a library for a Menu Bar system?All these are examples of programs that you can develop to improve your mind and programming skills.I remember the time I was at college and I would spends nights after nights to build my own library for screen interface for menu bars,
windows, text fields, etc. In a UNIX box I would use the ncurses library and build it. I would then try and replicate the same in Windows using the conio.h file and some assembly code.Try to develop as many programs as possible in ‘C’, this will help you improve your programming logic.Following are some programs that I can help you with:Write a program (WAP) to find the max, min, average and total of numbers entered by the userWAP to accept a string from the user and find the number of vowels and the vowels that got repeated the most.WAP to accept an array of numbers and sort the same using Bubble Sort Algorithm.WAP to accept a string from the user and print all its permutations and combinations.WAP to accept to accept a number from the user and test if it is a Fibonacci number or not.I can go on and on with such questions.

Tip 3: Locate code and try to understand why it was written that way ~Use
the internet or college library to locate code written by another
developer. Try to understand why it was written that way and understand
it completely. Once you have understood why it was written they way it
is written, check to see if you could improve that logic.The main objective of this exercise is to get your brain thinking.
Tip 4: Solve logic puzzles ~Check
your local newspaper. One section of your newspaper will be filled with
series of logic puzzles and riddles. Try solving them. Don’t get
disheartened if you can’t solve them or take a long time to solve them.
Remember that you are in the learning and improving stage. Things will
be slow, but you will make progress.Your brain will be trained to think
differently with every puzzle that you try to solve. This is because now
you know a new method of solving. You could apply the same thinking
pattern to your programs as well.As a standard prescription, I would
prescribe solving Suduku puzzles. Will help you improve your logic,
concentration and skills of grouping and organizing.

Tip 5: Help other people build logic ~Once
you start feeling confident about yourself and your logic capabilities,
you should immediately start helping people. Subscribe to a forum and
start helping people there. The benefit of helping people on forums is
that you get to learn new problems that people face. This immensely adds
to your knowledge. Just imagine the power you would have once you start
to learn problems faced by other people and how you or someone else
resolved it.I have seen friends following this advice but shying at
the last moment. Why? Because they don’t want to be ridiculed in the
forum. Don’t be scared of other people ridiculing you. Look at it as a
learning experience. People who ridicule you would be the one’s with
more experience… and learning from people who are experienced is no harm
at all.

Actually,

Most of the "professional programming" doesn't need much of math apart from basic arithmetic and some coordinate geometry knowledge.
It is only the useless learning system which requires a good knowledge of maths. In most of the books there are questions of finding complex mathematical solutions but these thing never ever come in use in programming done in most IT firms.

You don't need maths skills to be a good developer but you do need them to be a great one.
Here is a great article about this thing -
http://www.skorks.com/2010/03/yo...


So, it means I have to be good at maths for be

Actually,

Most of the "professional programming" doesn't need much of math apart from basic arithmetic and some coordinate geometry knowledge.
It is only the useless learning system which requires a good knowledge of maths. In most of the books there are questions of finding complex mathematical solutions but these thing never ever come in use in programming done in most IT firms.

You don't need maths skills to be a good developer but you do need them to be a great one.
Here is a great article about this thing -
http://www.skorks.com/2010/03/yo...


So, it means I have to be good at maths for becoming a great developer, but how much? Actually not much.
Link to know how much math you need to know -
http://inventwithpython.com/blog...

The math taught in school has almost no use in programming. There are many things taught to us that would even not be useful in other fields.
Some years ago I had the same question. So, I began surfing all over the Internet to find something useful. This was the time I came to know about this fantastic channel - Coding Maths.



Here is the link - https://www.youtube.com/user/cod...


But hey, it's very important to practice. Just reading the above mentioned articles and watching these coding maths videos won't make you an expert.
I won't say that Practice makes a man perfect but I will say that
Right practice makes a man perfect.
School math is good for just marks. The best approach will be learning algorithms, watching these coding maths videos and practicing.


Hope it helps.


Let’s be in touch, follow me here on Quora, turn on the notifications for me and ask me about Android, Windows, Phones, Tablets, Hardware, Programming, Game Development and Tech.


Image - I am very thankful to whoever provided this image. This image doesn't belong to me. I am not the owner of this image . All rights of this image are reserved with their owner.

Logical skill is all about doing a thing, in the correct way and in the least possible time.

It is not like someone tells you the key points of being a logical person, and the very next day you be one. It is a very long and patient way you have to cover. There is never an end, it’s always a start. It is life, you commit a mistake and move on. There is nothing you can achieve by repenting for the mistakes you have committed. So, try to know the root cause of your failure, keep it in mind and move on with a lesson learnt. Over the months, years and decades it helps you being a logical person, bec

Logical skill is all about doing a thing, in the correct way and in the least possible time.

It is not like someone tells you the key points of being a logical person, and the very next day you be one. It is a very long and patient way you have to cover. There is never an end, it’s always a start. It is life, you commit a mistake and move on. There is nothing you can achieve by repenting for the mistakes you have committed. So, try to know the root cause of your failure, keep it in mind and move on with a lesson learnt. Over the months, years and decades it helps you being a logical person, because you have the things tested and you take decisions based on your experiences and the mistakes committed in life.

Now, about Logical thinking in Programming Skills

For example, let us assume you are a beginner in Java programming. Pick a problem, go through it and try to understand the requirement, do a good analysis in your mind about the ways you can write your program, and start writing it. You don’t need to improve your logical skills, because it ripens your logic, and with time you will see your logical skills enhanced. But, to achieve that, you would have to spend a good amount of time and as many problems you deal with, it increases over time.

There is no short-cut.

In short, Practice is the key.

You know what is the best part about coding - there is nothing like bad coders. There are only good coders and rest all fall in the category of beginners.

You don't have weak logical thinking skills, you just lack practice. I too had this problem in the beginning, logic wouldn't strike instantly and it is not supposed to until you practice enough.

So don't let your heart down just keep on writing programs and soon you will have to choose better logic from plethora of logics transpiring in your mind and that too soon after reading the question.

You are looking at this the wrong way - the art of logical thinking is taking large problem domains and breaking them down into smaller , more manageable problems.

If you can do this you will never have to take on a huge, insurmountable problem.

As for what you can do to improve said skills, practice makes perfect.

Absolutely! Programming is all about solving a problem in a specific and logical way through code. I absolutely recommend learning programming (you can try out ByteDev) and discrete math.