December 19, 2022
Estimated Post Reading Time ~

How to solve problems in programming?

How to solve problems in programming? 🔓
• Read the problem completely twice
You need to make sure you completely understand the problem.
Do not worry about wasting time here because the better you understand the problem, the easier it will be to solve it.

• Solve the problem manually
It's very important to solve the problem manually first, so that you know what you are going to automate, otherwise you are just slinging code around.

• Optimize the manual solution
It's well worth the effort to try and optimize the actual solution or simplify it when it is still in the most easily malleable state.
What you want to do here is figure out if there is another way you can solve the problem easier.

• Write pseudo-code or comments
Take your time if you are a beginner or struggle with problems.
Capture all the steps and now either put them into the editor as comments or write them as pseudo-code that you can translate to actual code.

• Replace comments with real code
This step should be effortless at this point. If you have done all the other steps, this step involves no problem-solving.
All we do here is take each comment and convert it into an actual line of code.

• Optimize the actual code - Refactor it
Sometimes this step isn't necessary, but it's worth looking at your code and figuring out if you can cut out a few lines or do something more straightforward.


📌 JavaScript Developers
What resources do you use? to learn, improve, debug…
YouTube tutorials
Udemy courses
Freecodecamp
JavaScript 30
MDN
W3schools

#webdev
6 platforms where you can practice and elevate your coding skills to another level:
✅ coderbyte .com
✅ webdevelopermentor .com
✅ hackerrank .com
✅ frontendmentor .io
✅ codechef .com
✅ exercism .org


By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.