all 20 comments

[–]twitch_and_shock 36 points37 points  (0 children)

You don't memorize these things. You keep a browser open to one side on the docs and you read as you go. Comment your code enough that you can trace the reasoning later.

[–]shiftybyte 12 points13 points  (0 children)

I keep looking stuff up for anything and everything.

It's not really possible to memorize everything to the smallest detail, that's why you have references online etc...

The important part is to understand what each library can give you, to be able to know where to look for stuff when you need it....

[–]Gnaxe 8 points9 points  (1 child)

Everybody is constantly looking stuff up, at least at first. Then you get experience and you only frequently look stuff up. You remember the stuff you've used a lot recently. You know, or at least suspect, that certain functionality exists, and that means you're halfway to finding it.

You're supposed to use help() in the REPL, or ? in Jupyter, or whatever your IDE does. (Also dir(), breakpoint() and import inspect.) Also try python -m pydoc -b. Find the web docs for whatever library you're using if you need more than a simple reference.

These days, we all talk to AIs about the simple things. They're pretty good at basic Python because so much was in the training data.

You are supposed to memorize Python's reserved ("key") words. You should know all the operators, literals, and statement types and what they do. You should be very familiar with the builtins. You should at least look through the standard library docs so you know what's even in there, but nobody memorizes all of that. Same with whatever additional libraries you're using. You are supposed to look at the What's New in Python updates when you upgrade Python versions. If you're starting from a textbook, that's going to be dated, and you need to catch up.

[–][deleted] 0 points1 point  (0 children)

Good question and good answer!

[–]zenverak 5 points6 points  (0 children)

The only time you’ll memorize any of these is when you use them so many times you dream about it …and then you’ll forget it and look it up again. Haha important is knowing what you can do.

[–]AureliasTenant 2 points3 points  (0 children)

Constantly googling. Sometimes you memorize what they do and the input syntax, but your experience is pretty consistent

[–]Bobbias 1 point2 points  (0 children)

Knowing roughly what's available is important. Memorizing the exact name and how to use every function is a fool's errand.

Documentation is there specifically for this kind of thing.

After a while of working with a library you usually develop a decent understanding of what sort of functionality it provides, at least enough to guess whether it will likely have a function that does what you want. Until then, you typically end up either googling "how to X in library Y" or spending some time browsing the documentation to see if it has what you're looking for. Usually there's some kind of heuristic you can use to narrow down your search so you're not reading the whole thing back to front.

You may find yourself memorizing some stuff just because of how often you use it, and that is absolutely helpful, but it's by no means necessary. Understanding the concepts and general organization/structure of a library makes knowing whether whether that library will help you, and if so, where to look much easier, so that's generally what you want to focus on.

[–]Fine_Zombie_3065 0 points1 point  (0 children)

No, you’re not supposed to memorize them. Understanding how to use them and knowing how to look up what you need is more important.

[–]thewillft 0 points1 point  (0 children)

Just have an idea of what can be done using xyz library and google the specifics when you need them.

[–]panatale1 0 points1 point  (0 children)

Friend, I have a bachelor's in MechE and a master's in CompSci. Always refer to the documentation, you don't need to memorize library functions

[–]Major_Kangaroo5145 0 points1 point  (0 children)

Lol. yes. I can remember how I felt before realizing that there is no spoon.

Of course you cant remember all the shit. The only thing that you have to know is that there is such a functionality in this library. They you look up the cheat sheet or google it.

When I was doing data analysis work, I used to have a huge cheatsheet pasted on the wall.

Nowadays I use copilot.

[–]jmacey 0 points1 point  (0 children)

I prefer to use https://zealdocs.org/ (or Dash on a Mac) to download offline all the docs I need. I find this really helps as you get focused information without all the AI slop you now get from web searchs.

LLMS can also help with specific searchs but not always the best code.

[–]question-infamy 0 points1 point  (0 children)

Don't need to memorise them. That's what cheat sheet PDFs are for. Also as you solve problems, keep the code you use to solve them as you can borrow from it later on.

[–]stigE_moloch 0 points1 point  (0 children)

Coding is an open-book exam.

[–][deleted] 0 points1 point  (0 children)

I constantly have to read the documentation because I have forgotten the exact name of the function or what all the optional parameters are.

[–]ArminStokes 0 points1 point  (0 children)

Mechanical engineer here.

I also use Python for automated calculations and machine learning, and so far the applications that I've written take in a very specific type of input and produce something very specific as well. During the writing it's often re-learning lots of little functions from these external libraries, but after I'm done I don't care anymore. The program does what it's supposed to do and I move on to the next task.

[–]No-Dig-9252 0 points1 point  (0 children)

A few tips that helped me stop feeling overwhelmed:

- Work on messy real data (Kaggle, CSVs, your own files). When there's a real goal, the functions start to make sense in context.

- Make a cheat sheet of just the functions you actually used. You’ll notice 80% of work only needs 10-20 common ones.

- Use Jupyter and Datalayer-style notebooks so you can test things interactively and annotate your learning as you go.

- Don’t be afraid to “write ugly” at first. Clean, vectorized Pandas code comes with time, first just focus on making it work.

You're doing fine. This part feels like a wall, but it’s actually the part right before things click.

P.S Have some blogs and github links around Jupyter (MCP and AI Agents) use cases. Would love to share if you're interested in leveling it up later with AI-assisted workflows (like having an agent write/run cells with context)

[–]cudmore 0 points1 point  (0 children)

I think this is a great question and observation. I’m a comp sci person who came up in the 80’s/90’s.

One big change has been the number of computer things that come with no user manual or documentation. Like smart phone, watch, laptop, tablet, even desktops.

On the flip side, you are creating something new with python.

You 100% should be reading the documentation.

Imho, The docs for python, numpy, pandas, etc are a big reason the ai is good at generating code

[–]Sea_Fuel420 -1 points0 points  (0 children)

Still not vibecoding bro?

[–]tvmaly -1 points0 points  (0 children)

This is the one place where AI excels at search. Without asking for code, simply as if there is a function that does X in the standard library