Memorizing code

Hello, I am worried that I am not retaining much of the information in my course , python. I’m getting all of the steps correct but I end up forgetting what I did after a while. I figure that if I say the code I’m running and its role, I might understand it and remember the information better. I don’t want to keep answering questions if I don’t understand what I’m typing. Thanks in advance for the reply :smile:

1 Like

Memorizing code isn’t really helpful

Should i be able to tell someone what a selected area of code means just by reading it? And if so, what do I need to do to step back and re-learn the materials? I know that sounds funny but that’s where I struggle the most.

‘just by reading it’ is a big ask. Code is complicated. You didn’t learn to read English overnight. It will take lots of practice to read code, and even then, some code takes work to read.

1 Like

HI @drew4 !

Welcome to the forum!

That is completely normal when you are first learning how to code.
This comes up all of the time on the forum.

When you are first learning, it is common to forget a lot of stuff because you are still really new to all of this.
You just have to give it time and tons of practice

The better way is to build more projects and tackle more problems.

As mentioned earlier, the goal is not to memorize code.
The real goal is to solve problems. You just happen to solve problem with code.

You just haven’t written enough code.
We were all there once.

The more you write, the more projects you build, the more problems you solve, the more you will remember concepts and ideas.

Then as you start learning more programming languages and revisiting others, you will occasionally forget some things here and there. That is what documentation is for.

Just focus on the core concepts and build tons of stuff.

When I was learning, I would build small projects along side the curriculum.
That really helped me.

These don’t need to be large.
Just small little toy projects like a a guessing game, collatz sequnce, conways game of life, etc.
Just build tons of stuff
Then once you feel comfortable with the basics build more complex things.

Hope that helps

1 Like

I found it took about a year for me to learn how to find and remember what I needed.

I did start by memorising tags, however a lot of the memorisation wasn’t very useful because I didn’t really understand how things worked.

I’m not learning python, but have hopped around in other languages.

I’ve found following along, even if you don’t understand it and you forget it all, does give you that first exposure.
Once you get past that first struggle you can expand out. Look for other projects that use that thing, read documentation, play around with the code even if it doesn’t end up working at first. Look at other peoples projects that use that thing.

If you want to work though a curriculum slowly to better understand what your doing.
You can enter new concepts/functions into a search engine to get more exposure to it. Many reference websites will embed editors for you to play around with the code.
Reading other peoples code also helps, I find going one line at a time easier, tho its unlikely you’ll understand much at the beginning, it does help to give you some familiarity.

Trusting the process when your not seeing any progress is not an easy thing to do.
Its normal to feel your not learning anything, even when you are.
Completing tasks/projects, even if your not completely sure how you did it does get you closer to understanding how they work.
Its not so much memorising things that helps, but the experience of overcoming your struggle.

For example, I cant tell you off the top of my head, how to load an image into a canvas and wait for it to load the image before calling it in JavaScript…
Tho I’ve done this a few times in my own projects, I don’t really remember the functions.
But if I start writing a project that needs this, I’ll often remember the ‘next step’.

And if I cant remember how to do the ‘next step’ I know where I found the answer last time, what to search for, which documentation/reference websites I need, and if all else fails, how to isolate the code for the part I’m stuck on to ask a question in the forums.

It can take a long time to feel like your getting somewhere :confused:

That really helps out a lot. Thanks everyone for the help. I really appreciate it🙏


Came across your post and just want to share about “memorizing code” since I’ve done it.

It’s a common frustration when learning coding (google it and take a look) to forget things.

I know lots of developers think memorizing syntax or documentation isn’t really helpful, however I have in fact memorized large chunks of Python documentation, and I (very respectfully) disagree.

Now, I’m not encouraging anyone to follow in my footsteps if they feel it’s a waste of their time. However, if there are concepts or things you keep forgetting and subsequently looking up, I find it quite helpful to use mnemonic devices every now and then so that I don’t have to keep searching for the same answers over and over.

For the newbie interested in experimenting with mnemonics for something like this, there are a lot of good resources out there to get started.[1]

I have an online journal that probably isn’t very helpful for a beginner, but I have been documenting my journey of memorizing documentation, syntax, networking concepts, etc., since I can’t find other folks also doing it.

Just like learning any new skill, regardless of how you go about it, we have to experiment and play and revisit things because we forget or don’t totally understand. Like everyone here agrees, you’re on the right track (and I hope things are coming together since you posted this a month ago!).

Just wanted to chime in because if anyone is really curious about “memorizing” some of the things they keep forgetting, I’ve actually done that, and want to share that for me it has been quite helpful and worth trying!

Kind regards,

  1. Try Googling “mnemonic techniques” or “art of memory”. ↩︎

The literal purpose of documentation is so that you don’t have to memorize it. You’re likely to remember things you do a lot but I wouldn’t spend time and effort on memorization. I’d put that effort into more practice with actual code instead.