00, write it first

Recently, some readers reported that it was difficult to learn programming and wanted to give up. They asked whether there really were people who were not suitable for programming. I combine my own recent learning experience and thinking with some of the insights I have recently gained from torturing data structures and algorithms.

Wei Zheng, a minister of the Tang Dynasty, wrote in his “Ten Reflections on Emperor Taizong”, “The one who starts well is abundant, and the one who ends well is few”. If there are many people doing something at the same time, there are many people who are good at starting it, but few who can do it well.

It’s a classic saying, and it’s also appropriate to describe the process of learning to program. Before you become an expert or even a scientist, difficulties will always be with you. It is easy to imagine how many people give up.

In this article, there are 10 practical and useful tips for all programmers.

01. Dual split screen

If you can afford it, I would really recommend a dual screen.

In most cases, it’s best to have two side-by-side panels when learning to program — one for your Jupyter Notebook or VScode; The other is Google Chrome. The IDE is used to programmatically compile and run to see code results, and the browser is used to view documentation, CSDN, Zhihu or Stack Overflow and some tutorial blogs, etc. As you get used to it, as you get better at it, you can’t escape the feeling of being focused on your work, and it’s very convenient.

PS: If you want to use shortcuts to switch between split and full screen, check out the following two giFs:

  • Windows:

  • Mac:


02. Silence your phone

For so many years, after nine years of compulsory education and the baptism of postgraduate entrance examination, I think a decisive factor for success is [focus].

The more focused and focused you are, the faster and better you will learn.


03. Learn only one

Although more and more information is available on the Internet, more and more paid courses, more and more blogs, more and more specialties, the most obvious of which is [artificial intelligence].

Don’t try to teach more than one subject at a time, like two or three, so it’s not just a half or a third of the time, but a fifth or even a tenth of the time, and efficiency is affected because the brain retains memories. Similarly, don’t get distracted by shiny, tempting things that aren’t relevant to what you’re learning. If you’re really interested, go somewhere and save a URL, like a bookmark in Chrome,


Learn to communicate

As you learn to program, you try to shut yourself down and do everything yourself, and guess what?

Not very efficient.

When working with others, weaknesses in personal programs are exposed, so you learn to write more effective code because someone is spying on you. You might be extremely uncomfortable at first, but as a programmer, someone is always reviewing your code, so get used to it.


Energy management

In fact, if you’ve been around for a while, you know that being a programmer is definitely a physical job, so it goes without saying how important it is to sleep and maintain your physical strength.

Another quick story, Professor Dinesh has a habit that he has maintained for decades, which is to sleep (on average) just over 4 hours a day, so to speak, intellectually, physically, habitually… In terms of physical competition, foreigners are obviously stronger, but Chinese people still pay less attention to it. Anyway, I have a deep experience. In strengthening, it is also good to jump rope every day.


06. Sample code

In today’s era of resource abundance, there’s a lot of code to go around. GitHub or blog, or book source code, is full of stuff.

Go and type the sample code yourself, remember that a good memory is worse than a bad pen.


Review the old and learn the new

I believe your first thought should be the famous Ebbinghaus memory curve.

Studies show that if you don’t study hard, you can only remember the remaining 21%, so repeating it every once in a while is much more effective than rote memorization.


08. Use shortcut keys

People who use keyboard shortcuts are actually more productive than others, like powerpoint.

Pycharm:

Jupyter notebook:


09. Language Foundation

Understand a programming language, such as python or C++, well before using official or personally written libraries.


10. Code error

Most of the time, as a programmer, you’re looking for bugs in your project, or you can’t move forward.

  • Like if there was a code typo
  • Is it an old version resource

If not, you can simply copy the error message and use Baidu or Google, or blog forums to search for your error and filter the resources on the Web to see what works.

Of course, there are some low-level errors, mainly caused by unfamiliar, such as C++ semicolons, Python indentation.

If lucky enough to help you, please help me a [praise], to a [attention]! I would appreciate an encouragement along the way.


If you want more resources, please follow @I’m Guan Xiaoliang, MAX~

Reply [benefits] to get the gift I prepared for you, including C++, four major components of programming, NLP, deep learning and so on.

The algorithm and data structure information can be obtained by replying to [Data structure]

For more articles (paragraphs), please follow the wechat public account “Programmer Guan Xiaoliang” ~