As a data scientist, how much syntax should I memorize?

Alexander Egorenkov
Responses to Data Science Students
3 min readApr 19, 2017

This is a dangerous question. On one hand, we will learn exactly the syntax we need to know through practice. This is because we will see the most common syntax most frequently. On the other hand, taking some time to memorize syntax can help us feel more fluent in less time. Why do we even need to memorize syntax?

Think like the pros

More experienced developers can design a solution without knowing the target syntax. Although, they’ll still do a better job if they know the language. How is that possible?

First, we skim the documentation of the target language to get a sense of how the language is designed. Syntax doesn’t happen at random. Language features are carefully designed. There are also common patterns in the documentation that get used repeatedly and should be used in our code. Hint: Most of the visible design choices in a language are for the developer’s benefit, not the computer’s. Any extra useless looking symbols are usually there to help you think.

Then, we create a solution through psuedo-code and comments. This forces us to think through the full functionality required and issues we need to handle.

Finally, we read the documentation top to bottom and fill in the missing details, syntax, etc.

I skipped a lot of the intuition and experience needed to make that approach effective, but the general idea is there. It’s like writing in a foreign language that we are awful in. We sketch out our main ideas on paper and then pull out the dictionary and phrase book.

The result is more organized and efficient than the usual beginner instinct. Typically, beginners write a line, look at google, write another line, look at google, etc. This localized approach doesn’t train the most valuable skill you can have as a developer, building working organized solutions to real problems.

Generally, we don’t want to memorize syntax, we want to learn to design good solutions and fix errors and syntax in bulk. The real question is “How do I retrieve information more quickly”?

A full approach would have us:

  • memorize the most common syntax
  • make good use of cheat-sheets
  • understand how our documentation is organized
  • make liberal use of google
  • work through small details in bulk
  • ask for help when it makes sense
  • strategize what code to write first

Ok, but when should I learn syntax?

Fine, there are good reasons to learn syntax.

  • We need to know the most common syntax to save time.
  • We need to know syntax to read complicated code.
  • We need to know syntax to communicate with other developers in real-time.

Save time with syntax

Memorizing a page of the most common syntax in a library has never hurt me. Memorizing a cheat-sheet on learnxinyminutes has never hurt me either. Reading the first 3 pages of FAQs on stackoverflow for a library is good too. I would stop there and let everything else come through practice and understanding.

Unlock new ideas with syntax

Sometimes code is dense enough that we can’t really understand it unless we know how all the syntax works. In these cases, we might want to make an extra effort to memorize the most frequently used patterns in that code base.

Communicate with syntax

In most cases, we can communicate with developers through normal language or through psuedo-code. We should make sure we are presentable in interviews and can pair-program with little issue.

Syntax and even the choice of a programming language rank low on the list of priorities for a project. Make sure you look at the whole picture.

If you think this will help someone, please recommend and share, click the💚 below to share the knowledge.

--

--