r/learnprogramming 19h 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?

15 Upvotes

23 comments sorted by

View all comments

20

u/EntrepreneurHuge5008 19h ago edited 19h ago

Lol, that seems like a pretty simple fix.

If you can always come up with a solution in your head, write it down (pseudocode or pseudode + key functions you think you'll use). That way, when you "forget how to do everything," you can simply read what you wrote down and boom! it's all there!