Is it okay to Google while coding?

You’re in the process of learning a lot of libraries like pandas, scikit-learn, numpy, etc. You also don’t seem to retain a lot of what you learn. Whenever you sit down to write a piece of code, you need to Google for small examples that could help you write code. Is doing this okay?

The short answer is, yes. You should not beat yourself up for not remembering something that can be easily looked up.

For example, let’s say you want to load a CSV file as a dataframe in pandas. You really can’t recall how to do that, so you Google for it. It lands you right on pandas’ documentation. You look at an example, instantly adapt it to your situation, and then move on.

When you read the pandas documentation page giving you the example, you instantly understood what the code was doing. You understood what you need to import, which function needs to be called, and what important parameter that function takes. A person who doesn’t know Python can still memorize, but he won’t be able to apply it in a useful manner.

Even before Googling, you probably knew that the read CSV function has to know the filename, or whether the file has headers or not, etc. The only information lacking would be the exact syntax. The reason you might find syntax hard to remember is because it’s entirely arbitrary. A syntax is just someone’s choice, there is no logic in it to “understand.” Focus on the concept, not how it is represented.

A computer can remember everything, but can understand very little. You can either remember a lot and understand very little, or understand a lot while not having to remember things that you can just look up.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Site Footer

Sliding Sidebar