当前位置:网站首页>If you want to learn programming well, don't recite the code!
If you want to learn programming well, don't recite the code!
2022-06-24 06:37:00 【Programmer fish skin】
Share my programming “ Don't forget ” More than a dozen methods
Hello everyone , I'm fish skin .
Recently, the most frequently received problem of private letters is : I can't remember the code when I learn programming , Always forget what to do ?
For example, this little partner , I've been learning programming for a month , Ask me how to memorize the code :
Actually , My own memory is very, very poor , That's why I abandoned the code when choosing a major .
I learned at the beginning C In language programming , Also knock once and forget once , A lot of pain . But I don't want to give up , So force yourself to remember the code , Gradually, learning programming has become memorizing words . But it took a lot of time , I finally memorized the words , But I still can't write code , This makes me gradually doubt life .
Later, in the communication with predecessors , I find it normal not to remember the code , It's better to say that people who can remember code are not normal ( Too smart 、 have a good memory ).
therefore , I changed my way of learning programming , No more memorizing code , It improves the efficiency of learning programming .
Let's share my programming today “ Don't forget ” Dafa .
Fish skin programming does not forget the Dharma
It's divided into four parts : First share some general memory methods , Then there is the memory method for learning programming , It also gives the solution after forgetting the code , And something you have to remember .
Outline of this article :
General memory method
The following methods , It can help us form a good habit of memory , More than programming , Applicable to the study of all knowledge .
Make up a story
Relatively boring code and theory , We prefer to read stories . Try to make up the knowledge points into interesting stories , Or associated with someone or something , Be able to impress .
For example, when I share my programming experience with you , Will mention my brother, little Abba , Just to deepen everyone's impression , When I see the panda head, I think bug, What is the “ Once upon a time there was a horse called code ”, And some articles and videos using storytelling Technology , Can play a role in strengthening memory .
Interest strengthening
For what you are interested in , Our memory will be easier .
For example, I used to play games , I can't remember the mathematical formula , But it can accurately remember the monster's blood damage and equipment explosion rate .
So I want to remember more easily , It's best to cultivate your interest in this matter , Or learn in a more interesting way , For example, reading stories mentioned above 、 Look at the diagram 、 Watch a short video to share knowledge .
Use your senses
We need to use our brains when we remember , You can also make good use of your senses , For example, with some body movements .
On this point , You don't have to , Everyone has their own habits and small movements . For example, some people like to draw with their hands , Some people like to touch their chin , For example, I like to scratch my head when endorsing , Sometimes I scratch my hair off , Look at this hair , I feel that I remember knowledge better . I'm really bald , It's getting stronger .
In addition to the senses , What the human brain has experienced , The question I've thought about , Experienced emotions and emotions , Practiced movements , Can become the content of our memory , Help us relate memory fragments .
understand
You can't memorize things by rote , Think about , To understand , This is really heard from childhood , Not much .
systematic
When we are studying , It's best to learn and remember according to the system , Instead of looking around 、 Look west .
You can put bits and pieces of knowledge into an outline 、 Learning route 、 Mind maps and so on , In order 、 Remember every minute .
Old readers should find , Now I often put a mind map at the beginning of my knowledge sharing articles , Is to help you quickly understand the structure of the article , So as to deepen the impression .
Remember time
In general , Every morning and night before going to bed , Is the best time to remember .
One of the habits I developed from childhood is : Every day before going to bed, I will lie in bed and recall what I have done today , It does have the effect of strengthening memory .
Besides , Exam week or before the interview , I will save the review content as a document on my mobile phone , Open it before going to bed WPS Office Or some document voice reading software , Let the audio accompany me to sleep . Before getting up the next morning , You can turn on the audio first , Close your eyes , When you hear the knowledge points, think back in your mind , It really works !
Recall regularly
I wonder if you have heard of the forgetting curve ( Ebbinghaus curve ), That is to say, our forgetting in learning is regular , And the speed of forgetting is fast first and then slow .
Observe the curve , We found that , Many short-term memories disappear quickly . So we can't Just remember, not remember , Strike while the iron is hot , After learning knowledge, grasp the application , And follow the curve , Review every once in a while , In order to retain the knowledge learned .
Programming memory method
The above methods can help us remember knowledge better , The following methods focus more on helping us learn programming , Increase of efficiency .
Selective memory
First , For learning programming , Never memorize the code !
Originally, I can't finish learning programming knowledge in my life , If you recite the code, you won't finish it in your next life .
When learning programming , We should be : Remember what , What can you do , Not how to do it .
for instance , Now let's design an elevator dispatching system . You just need to have heard of something called Elevator scheduling algorithm , And it can realize the orderly dispatching of elevators , You don't have to remember how to write code . When it's time to do , Just search for the specific implementation of the algorithm .
Another example , Now there are so many class libraries in the front end , Suppose you make a web page animation effect , Then you just need to know Animate.css Libraries can implement , Just check the document when you use it , You don't need to put every class of it 、 Write down every usage . Don't forget , Code updates quickly , Even if there's something you can remember , But it also has timeliness .
Especially for beginners of programming , Don't memorize the code , You just need to know what a function can do , When I want to complete a function, I can think of it ( You can even find ) That's all right. .
in addition , When brushing algorithm problems, many students can't understand them and directly memorize them by rote , In fact, there is no problem with the memory algorithm , But you don't have to remember a piece of code , It should be a kind of topic Problem solving routine .
note
When learning programming , Be sure to take more notes , Whether it's reading 、 Read articles or videos .
But notice , Notes are not everything !
Some students are afraid of forgetting what the teacher said in the video , Directly knock down the teacher's original words sentence by sentence , A video pauses dozens of times . It seems that there is a lot in the notes , But what really works 、 You can remember very little , And it's a waste of time , Don't have to .
Don't forget to , The notes are Show yourself , To help yourself review . When I take notes , The point is to remember ideas 、 Record process 、 Remember the key nodes .
For example, when I watch a front-end project practical tutorial , I will record the teacher's idea of designing the system 、 And the key operation steps of the system , And after watching the video, follow the steps in your notes to recall 、 To operate , Instead of writing down every line of code written by the teacher . Another is to record the details emphasized by the teacher , Especially some pits .
Another advantage of taking notes is to record your learning process and progress , Although it will take some time , But the cost performance is very high .
How to write code
Want to learn programming well , Be sure to write more code and practice more . Many students play theory very 6、 Watch videos so much and fast , But I still can't write code after watching the video 、 No idea , Probably because there are fewer knocks , It's all on paper .
Like when I first learned programming , Just read but not write , At last, I didn't see .
later , I modified the rhythm of my study , Generally, when watching video to learn technology : Let's look at the theory first , Understand what a technology does 、 What's the function ; Then watch the actual combat , Follow the teacher to watch an episode and write an episode , And after watching a set of videos , Be sure to do another project by yourself according to your notes , Make comprehensive use of the key technologies mentioned in the video .
Don't think writing a project is a waste of time , Want to learn programming well , We must do more projects , Can help you better understand technology 、 Deepen the impression .
in addition , by way of practice , It can help you understand many boring theories . For example, we had a course on the principle of computer composition , It's basically all theory , A little knowledge in class 、 Feel sleepy , I can't remember .
Until the teacher took us to the laboratory , Use the development box to practice , Light up the circuit small lamp through wiring , Implement instruction set operation , It really helped me remember the knowledge in class .
Kata practice
I came into contact with a programmer cultivation book Kata , The official explanation is : Kata means “ shape ”, That is, the move routine , You must practice according to the shape .
Simply speaking , It's daily practice .
Want to learn programming well , Write some code every day , Do some training . For example, students at the front end can use... Every day JS To implement a small function , Friends who learn from the back end can write a few pieces every day SQL sentence , To consolidate SQL grammar . Besides , Now programmers attach great importance to basic algorithms and data structures , Want to learn these , We should also brush every day 1 - 3 Problem , You'll know how important it is after you stick to it .
Step on the pit
Compared with happiness , It's easier for us to remember pain . So when learning programming , Be sure to write more code , Especially meet more Bug, Solve more Bug. The more painful the fall , The higher you fly .
For example, I once experienced an online accident , Service downtime due to unreleased resources , Direct impact on cash income ! So to this day , I always remember to release resources , Don't roll over again .
In addition to inadvertently writing Bug Outside , I will Active test pit . When writing code, deliberately try some possible operations , For example, change the type of function parameter from A Change it to B, Then analyze the influence on the function , In many cases , There will be unexpected gains , Maybe I found a well-known framework Bug Well ?
incentive
Like the interests mentioned above , If writing programs can give us motivation and positive feedback , We'd rather 、 Take the initiative to complete it .
For me, , Projects that you take the initiative to do are easier to remember , For example, I can still think of the technologies used in the national innovation and entrepreneurship projects I took the initiative to do in my freshman year 、 What are the shortcomings? ; But I can't remember what functions the graduation project of image processing was required to do in my senior year .
external force
In addition to the initiative , Stress can also help us improve our programming learning efficiency , To deepen the memory .
For example, during my internship at Tencent , There was a tight time online for a week , That week, I basically worked every day until the early morning , So I was particularly impressed .
Share
Some knowledge you think you will , But there's no way to say it , Just don't understand , This will soon be forgotten , You'll suffer a lot during the interview !
So it's best to write your own code 、 Share what you have learned with others , It can greatly deepen the understanding and impression of knowledge , It can also help you find your shortcomings .
There are many ways to share , Like writing documents 、 Blogging 、 Talk to the little yellow duck 、 Participate in the speech 、 Recording video, etc .
Like when I first started learning programming for more than half a year , I set up my own personal blog , Record what you have learned on it . Now let's look at , Although it was really bad at that time ! But it also paves the way for me to share knowledge now .
I really enjoy the process of learning knowledge and exporting it , Continuous learning , Continuous output . Say a funny thing , When I was in college, I rode my small electric car to take my roommate to class , I'll talk to him about technology . Sharing can really inspire you to make progress , And help more people !
Conclusion of the second round
This is also a point that many students ignore , Learned a technology 、 After doing a project , Just throw them away like a bomb . Actually , You learned it yourself 、 The knowledge that has been practiced is a treasure worth cherishing .
When I was at school , Every time I finish a project , Will start memories , Since I wanted to do this project 、 To the thinking at that time 、 Implementation process 、 Encountered pits, etc , And also analyze what you do well or not well , Plus some insights , Organize and summarize into a blog post .
Empathy , After learning a skill , I will also summarize the key knowledge points of this technology into a blog .
Now work , I still keep the good habit of summarizing , I can write a daily newspaper 、 weekly 、 Monthly report 、 Annual report, etc . Now look back , It is also a great achievement , Who else remembers what he did a year ago ?
Forget what to do ?
I know many students pursue perfection , Want to remember everything , Afraid to forget important knowledge in the future .
In fact, for learning programming , It's normal to forget , And it's not terrible at all !
I suggest you simply remember less , Don't put too much burden on your memory , Even if you forget , We also have the following ways to solve .
The accumulation of
First , We must pay attention to accumulation , Sort out what you've done .
Like I'll sort out the code I've written , So when you need it , Go straight , then CV( Copy and paste ) Dafa is good .
I will sort out the articles I have written 、 Read good articles 、 Good sentences 、 Good expression , Build your own corpus 、 Material library , Use and search , It saves a lot of memory .
I'll also tidy up the pits I've stepped on 、 It's written bug, And sort out the solutions together , Even if you encounter the same problem next time , It can also solve .
Use search and documentation
Forget how to write a piece of code 、 No idea 、 Or have a problem , Then search the Internet ; Forget the characteristics of a framework 、 The parameters of the function 、 usage , Then just look at the official website document of the framework .
Do you want someone else to help you search ?
Write more notes and documents
There is a stem in the program circle : A programmer scolded a piece of code for being particularly spicy , It turned out that I wrote it myself .
This is something that happens to every programmer :
- I can't understand the code I wrote
- I don't know the code I wrote
In order to prevent such sand carving Events , We should annotate the code appropriately , Like me, I often put some design ideas 、 Design document link 、 The author and so on :
/*
* function : Three even
* Ideas : Please refer to the document xx.cn
* author : Dog fish skin
*/
function sanLian() {
console.log(' Thank you Sanlian ')
}You can also properly review your bad code , Maybe there's some optimization inspiration ?
Except for the notes , Be sure to write documents for projects , Put the project background 、 Selection process 、 Design thinking 、 The implementation scheme is clearly written . It can not only help you summarize your work , It can also give guidance and help to participants in other projects .
It's best to record what the product said , Prevent future product change needs .
Have to recite ?
Last , Although it is said that learning programming does not rely on code , But when you look for a job , Some interview sites must be remembered . But on the back 、 Don't recite the test site as rigidly as reciting the text , Or add your own understanding , practice .
For example, classic interview questions :MySQL How to optimize performance ?
Rote is certainly ok , But if you have time , It's better to practice it yourself MySQL The means of optimization , And record the effect of optimization , For example, the performance is improved by a few percent, and so on , So you can naturally remember , When you talk to the interviewer, you have more confidence .
That's what we're sharing , I hope you can form good habits , Knock more and practice more , Stop forcing yourself to memorize code !
Finally, I'll send you some more Help me get to the big factory offer Learning materials :
ran , leave 6T Resources for !
How I started from scratch through self-study , Get Tencent 、 Byte and other big factories offer Of , You can read this article , No more confusion !
I studied computer for four years , Mutual encouragement !
I'm fish skin , give the thumbs-up It's still a request , I wish you all the best 、 Make a fortune 、 Universiade .
边栏推荐
- EEG microstate as a continuous phenomenon
- How to open a hidden file
- 10 year old drivers who have been engaged in software testing tell you what type of software is suitable for automation
- Configure PHP development environment in MAC environment: apache+php+mysql
- Station B collapsed. Let's talk to the injured programmers
- Vscode1.58 version update record Previous + related article summary
- 【二叉树】——二叉树中序遍历
- The gadgets developed by freshmen are popular. Netizen: my food is good
- Easycvr development environment startup program reports an error import cycle not allowed solution
- Tencent cloud VPC machine, no image when installing monitoring components
猜你喜欢

A cigarette of time to talk with you about how novices transform from functional testing to advanced automated testing

leetcode:剑指 Offer 26:判断t1中是否含有t2的全部拓扑结构

C语言学生管理系统——可检查用户输入合法性,双向带头循环链表
Oracle case: ohasd crash on AIX

【二叉数学习】—— 树的介绍

云上本地化运营,东非第一大电商平台Kilimall的出海经
![跳跃游戏II[贪心练习]](/img/e4/f59bb1f5137495ea357462100e2b38.png)
跳跃游戏II[贪心练习]

【二叉树】——二叉树中序遍历

【JUC系列】Executor框架之CompletionFuture

基于三维GIS系统的智慧水库管理应用
随机推荐
Easy car Interviewer: talk about MySQL memory structure, index, cluster and underlying principle!
EEG microstate as a continuous phenomenon
Actual combat | how to deploy flask project using wechat cloud hosting
How does go limit the flow of services?
WordPress pill applet build applet from zero to one [install and configure WordPress site]
In Tencent, my trial period summary
Royal treasure: an analysis of SQL algebra optimization
Enter the software test pit!!! Software testing tools commonly used by software testers software recommendations
leetcode:剑指 Offer 26:判断t1中是否含有t2的全部拓扑结构
Nature Neuroscience: challenges and future directions of functional brain tissue characterization
What is the difference between level 1, level 2 and level 3 domain names? How to register domain names
Produce kubeconfig with permission control
Attack and defense enlightenment: chromium component risk analysis and convergence
leetcode:84. 柱状图中最大的矩形
Excellent tech sharing | research and application of Tencent excellent map in weak surveillance target location
What I regret most when I learn programming!
10 year old drivers who have been engaged in software testing tell you what type of software is suitable for automation
目标5000万日活,Pwnk欲打造下一代年轻人的“迪士尼乐园”
记录--关于JSP前台传参数到后台出现乱码的问题
The new version of Tencent Youtu ncnn is suitable for domestic CPUs, and the maximum speed is increased by 70 times