+ 1

Ways of thinking to solve a programming problem

I have been practicing programming about 4 months now but I feel like I am not getting it. I'm not smart when it comes to school or books honestly I sometimes think I'm dumb. But I do love learning programming and I want to master it even though I'm very bad at it. My question is when you are stuck at a problem you cannot fix how do you deal with it? what kind of questions do you ask yourself and what steps do you go through? How do you improve your logical thinking? Thank You.

22nd Mar 2017, 12:29 AM
sean
6 RĂ©ponses
+ 8
Read about algorithm design...preferably from a book..also, YouTube will help.
22nd Mar 2017, 4:34 AM
StillSoul‌‌‌‌‌‌‌‌‌‌‌‌‌‍
StillSoul‌‌‌‌‌‌‌‌‌‌‌‌‌‍ - avatar
+ 6
When I have a bug in my program i try to locate the code using prints, and read each line following the steps the computer should take to see if it makes sense. If all else fails, debugger comes in handy. When it comes to approaching a problem always think of a solution before going into it. What will be needed? What will the code look like? Then you can come to think: is there a more optimal solution? Upon which you can then start actually coding. Some say its also (underrated) very helpful to DRAW a diagram of whats supposed to happen, and what links to what in the program. The logical thinking will likely come naturally if you stay focused on the task and have the knowledge to solve the problem. I recommend you check out projectEuler and try some of their problems, its great practice and fun! :P
22nd Mar 2017, 1:53 AM
Rrestoring faith
Rrestoring faith - avatar
+ 3
thank you
25th Mar 2017, 6:28 AM
Umut Dalkılıç
Umut Dalkılıç - avatar
0
thank you, that was helpful I will try it out!
22nd Mar 2017, 2:13 AM
sean
0
Algorithm design, code simple programs, practice, google, and coffee
22nd Mar 2017, 5:36 AM
Abdelkader Ait Assou
Abdelkader Ait Assou - avatar
0
Rrestoring faith, YOU ARE FKING AMAZING DUDE !!!
23rd Mar 2017, 10:11 AM
Gabriel Popa
Gabriel Popa - avatar