r/AskProgrammers • u/astronautfromuranus • 6h ago
How can I become good at problem solving?
After getting a task Some programmers just starting writing the code while writing the code they understands all the logic behind that...how can i achieve that level of skill?
0
Upvotes
4
u/JoeStrout 6h ago
Write lots of code. It's a skill, like playing the violin. You get better at it through practice. There is no shortcut, except to try to frequently work on things just a little bit beyond your skill level.
1
u/StephenHawkinguss 6h ago
First resolve your own problems
1
u/etherealflaim 6h ago
Problem solving and coding off the cuff are different skills. You'll have to practice both. The former is all about figuring out how your particular brain can decompose a problem into manageable steps and finding a value system for selecting an approach or finding resources that can help you solve each one. The latter is about finding ways to start with code you are very sure you will need while at the same time letting your brain do the problem solving on the fly. They are related, but different, and can be used together.
1
u/pixel293 5h ago
I feel you can only get so good at a skill by reading or watching other people do it. At some point YOU have to do it, over and over. You have to fail then figure out how to do it correctly. Eventually you get good at that skill. Programming is no different. You will find after doing it for years and years, that you run into the same kinds of problems you have already solved before, so "finding" the solution becomes easier and easier...or more boring and you start looking for harder problems to solve.
1
u/Life-Aid-4626 1h ago
Do it. Then do it again, using what you did before. What problems does your prior code not handle clearly and easily? How could it have been better?
Don't just do the same thing multiple times from a clean sheet. No code exists in a vacuum