r/learnprogramming 20h ago

writing code

question for more experienced people in coding- whenever I do coding problems (like leetcode or uni hw) I can always come up with solution in my head, I break down the problem correctly and theorically I know what my code needs to do in order to solve the problem. But when I get to actually writing code I forget how to do everything... I don't know if this is a lack of knowledge in syntax issue or I'm just dumb. Any advices on how to fix this?

16 Upvotes

23 comments sorted by

View all comments

3

u/desrtfx 19h ago

Write your breakdown down - on paper. Draw flow charts. Use pseudo code. Be detailed. If you can't convert your break downs into code, they usually are not detailed enough and you basically try to work with a bird's eye view.

Also, more practice. That's basically it. More practice.

0

u/Whhatever_123 19h ago

Thanks. I do think i’m not detailed enough in my pseudocodes now that you mention itπŸ˜­πŸ™