⇐ MY QUORA-INDEX QUORA - my answered Questions

QUORA - my answered Questions

Q015: For some reason, the solutions to some programming problems are never obvious to me, no matter how hard I try to proffer a solution. Why is this?

May be this is totally oversimplified but there are three items. Your problem, the implementation environment and the problem solution.

Your implementation environment is like a jigsaw and your solution is the finished image. First you order your puzzle pieces (that means you have to know how your language work, which functions / classes you have and how you make a runnable piece of code). Hope you have a very small and simple language (Scheme, Forth) than play around with your puzzle pieces until you have a feeling what you can achieve. Add numbers, print strings, print strings multiple times, multiply numbers while printing strings multiple times either in recursion or in a loop. As an more advanced task sort and filter your items. Than look how the picture you want should look like and try to split your problem into smaller pieces.

I think it is very important to have an interactive command line to immediately try out and get the response of your thoughts.

Then put you small solutions together, like Lego and immediately try it out in your interactive command line.

Don't bother on 'elegant' solutions now. Don't bother with performance issues either. The only way to become better is to practice, read others code and talk to others, like you did now on Quora - and never give up :-)