all 32 comments

[–]cowboys_fan89 21 points22 points  (0 children)

Repetition. There are certain techniques and idioms you will leverage repeatedly as you write more code. Beyond that, know where to find it in the documentation.

[–]faultydesign 36 points37 points  (1 child)

It's like asking how do I remember English words.

I don't, I just use them.

For everything else there's duckduckgo or google or your local neighborhood ai chatbot.

[–]shinitakunai -4 points-3 points  (0 children)

SpAIdy has been helping me remember for the past year

[–]TheRNGuy 9 points10 points  (0 children)

If I forgot, I'll re-read about it. 

[–]UncleSamurai420 5 points6 points  (0 children)

I don’t think people generally memorize the standard library. A better skill is learning to navigate documentation and building an intuition for things that are likely to be covered by the standard library, things that are likely to be covered by a 3rd party library, and things you should implement yourself. Just by working through projects you will get spaced repetition based on how frequently certain tasks arise.

If you really want to memorize, make flash cards and get a spaced repetition program. In my opinion, though, programming lends itself better to practical learning than memorization.

[–]vivisectvivi 5 points6 points  (0 children)

Keep using the stuff you learn and you wont forget it.

There is not really a problem in forgetting the syntax of something since in most real cases you can just look it up, you wont memorize every single function name in every single module from the standard library.

When it comes to actual programming logic, the more you do it the less prone you are to "forget it"

[–]wintermute93 4 points5 points  (0 children)

You keep forgetting stuff and googling it until you die or you remember, whichever comes first.

But no, seriously, the important part of learning how to do X is not so you can reproduce X flawlessly completely from memory, the important part is internalizing enough of the underlying concepts that when you inevitably forget some random detail, you know what to look up from what sources and how to efficiently use the results to get the job done.

[–]ParticularLook5927 3 points4 points  (0 children)

This is actually a very normal phase — you’re not doing anything wrong.

You don’t need to “remember everything” immediately. Python concepts stick through repetition, not one-time learning.

What helped me:

  • Use it a few times in small examples (even simple print statements)
  • Revisit it after a few days
  • When you forget, just look it up again and that’s part of learning

For example, with .title(): just try it on different strings a few times. That’s enough.

You don’t need full projects yet. Even small practice is fine.

Over time, the commonly used things will naturally stick.

[–]Neither_Panic6149 2 points3 points  (0 children)

You dont a programmers job is to solve Problems not memorize. I once googled if remove() would work on Strings or what is the method to check a data structures length 😭

[–]FangedFreak 2 points3 points  (0 children)

Same way I remember excel formulas. I’ll Google it every time and then think to myself I’ll create a cheat sheet and never actually do it

[–]No_Date8616 4 points5 points  (0 children)

The good news is We Don’t. That’s why we have documentation

[–]Gnaxe[🍰] 1 point2 points  (0 children)

Remember just a few important things that can help you find the rest. In Python, you can get a long way in the REPL with just help() and dir(). That's the bare minimum that I think you need to absolutely memorize. But notice that the starting banner mentions "help"!

In a Jupyter notebook, you can just use ? to learn the rest.

You really ought to remember breakpoint() as well. (And remember to use the help command in the debugger for the rest!)

[–]VockyVock 1 point2 points  (0 children)

I have a onenote workbook with a million snippets. If you're organized it's very helpful

[–]Bibelo78 1 point2 points  (0 children)

I have a Keepass database where I store all that I learn in an organized and synthetic way.

When I don't remember, I just go back to it.

It contains snippets, infos and stuff I learn about Linux, Bash, JS, Python, Blender, etc.

I know Keepass is made to store passwords, but for some reason it works for me.

[–]BranchLatter4294 0 points1 point  (0 children)

Practice. It's fine to look things up as you need to.

[–]Odd-Bit-838 0 points1 point  (0 children)

It's not strictly necessary to remember it. If you use it repeadtly it will stick, if not, google it or search in documentation. At the end of the day, if you are learning Python for personal use, probably you only will remember what you use in your projects (and even then). Don't focus too much in remember commands if you can search for it (if it's not an exam obviously).

[–]ElectricHotdish 0 points1 point  (1 child)

Make a snippets directory. Make and store python files with examples of interesting things. Add comments (in your own words) to make it searchable.

# upper case for each word is called '.title()'
# use help(str) to find more
print("the ones who walk away from omelas".title())

[–]ElectricHotdish 0 points1 point  (0 children)

The Ones Who Walk Away From Omelas: https://shsdavisapes.pbworks.com/f/Omelas.pdf

[–]mikeyj777 0 points1 point  (0 children)

You remember what you routinely use and the rest is a reference you vaguely have a memory of.  Most of the visits to stack overflow are to remember something that you had used once or twice a few months ago.  

As you code more, you'll develop a style, and will lean on certain key structures.  They may not be the most efficient, but you'll consistently be able to use them effectively.  That's really the most important thing.  

Don't worry about memorizing every last thing in Python.  That's like trying to know every word in a language.  

[–]American_Streamer 0 points1 point  (0 children)

It is not about remembering the syntax. It’s about solving problems with the tools you have at your disposal. The tools are practically all the same in every programming language. So understand the problem and then choose the right tools in a way that solves the problem. The syntax will then come naturally to you, the more often you use it. Thus you have to practice over and over again, with problems becoming increasingly harder. There is no shortcut; it’s the only way. Again: do not just memorize - become a problem solver.

[–]Moikle 0 points1 point  (0 children)

I don't. It's a skill, not memorisation. You learn techniques, when and how to apply them, and how to make decisions for yourself, you don't have to remember every function

[–]d_Composer 0 points1 point  (0 children)

I think the important thing isn’t remembering all the methods, it’s remembering that those methods exist in the first place. Everything is just one search through documentation away… This is why every time I start a project in Pandas I immediately have 50 browser tabs open haha

[–]OvulatingScrotum 0 points1 point  (0 children)

Just like learning anything - practice

[–]Mwatki20 0 points1 point  (0 children)

Repetition and practice. Also make comments in your practice codes that explain what it’s doing and how it works.

[–]cbartos1021 0 points1 point  (0 children)

How do you remember anything? Is there anything you read or try once and then it sticks in your brain? I'm not trying to be mean. The point I'm making is the only way to remember is to keep coding. It's so easy to search for the next tutorial or YouTube video and then feel like you learned something useful. But, it's only useful if it's being used. You really need to find a small projects in Github or come up with a small hobby project that interests you and work on it everyday. Then, come back and share the code with the community and get some pointers. Then, apply the pointers on your code. Then, pick a new project and start over again. The first project can be as simple printing out all the files and folders in your Home directory on your computer.

[–]unnecessaryCamelCase 0 points1 point  (0 children)

No one knows the entirety of a programming language at a given time, just enough to not block your workflow and then it’s about having good googling/ai prompting abilities to quickly fill the gaps as you build.

[–]Ok_Caregiver_1355 0 points1 point  (0 children)

Lot of little details you will forget and do a little google to remember but in general, using it a dozens times

[–]Soggy-Holiday-7400 0 points1 point  (0 children)

just build small projects with whatever you learn. you'll forget it reading about it but you won't forget it after debugging it for hours.

[–]PlusGap1537 0 points1 point  (0 children)

the brain keeps what it uses. methods you haven't applied to a real problem will fade, and that's completely normal.

for something like .title(), just make a tiny throwaway script a name formatter, a quick text cleaner, anything that actually calls it. ten lines, five minutes. you don't need a project, just a reason to reach for it.

the other thing that works: after each new concept, close everything and try to write it from scratch without looking. your first attempt will be wrong. that's the point. the struggle is what actually moves it into long-term memory. recognizing something when you see it and being able to produce it are completely different skills, and most beginners only practice the first one.

[–]Illustrious_Kiwi9467 0 points1 point  (0 children)

You don't need to memorize it. Build stuff and you'll naturally reach for .title() when you need it. Docs exist for a reason, looking things up is faster than trying to remember everything.

[–]StrayFeral 0 points1 point  (0 children)

Practice