How to become a better programmer? I have summarized 7 suggestions, I hope to help you!

A few people asked me a question at the React conference-how to become a better programmer. People see me as a very experienced programmer, so it's worth listening to my advice. I think I can share my "mode of thinking" in programming over the years.

 

Let me remind you again that these are just a few suggestions to improve your skills. Ultimately, you need to figure out what is suitable for you.

Find people who can inspire you, but don’t worship them

In the past many years, I have admired many people and paid attention to new technologies through them. I believe that they are correct, and I have studied what they did and learned a lot.

These people tend to be very efficient, talented, and inspiring. You have to do everything possible to find them, let them inspire and guide you.

However, don't worship them. If you just look at the posts on twitter, you will find them out of reach. However, if you approach their real work, you will find that you are no different from them. It's just trying everywhere, we are all just experimenting.

Finally, don't trust them blindly. If you have different opinions, ask them to participate and learn from the process of collision of opinions.

Some of my most fruitful conversations happened this way. Once, my Emacs configuration was a mess. I don't know why, my OCaml autocompletion can't be used anymore (it was broken for more than a month). I don't have anything to automate, and sometimes I have to look for the required commands in the shell history. To fix the problem, I started writing ugliest code. I wrote things as global objects and didn't understand what I did until the end.

The most experienced programmers have been cracking and delving into it; the most important thing is that you can complete tasks and achieve goals.

Don't belittle your work

Programmers Xiaobai often think that their work is of little value because they are novices. Or you may be an experienced programmer, but working in a new field will make you feel uncomfortable. But in my opinion, the best ideas often come from new programmers, who can see improvements in existing technologies, but those with solidified thinking cannot.

In any case, your work is worthwhile. In the worst case, even if your idea is unsuccessful, the community can learn from it why this method does not work.

(A hint to the community: It depends on how we do it and make it easy for newcomers to get involved.)

Don't stop working because you are afraid of being left behind

New technologies come out every day. If you don’t touch technology overnight, you may feel you can’t keep up with the world. This is not true. In fact, if you often let go of your work, you will do better because you will have new ideas.

I find that when I'm not working, I always have new ideas.

In fact, most of the content posted on the Internet every day is "old wine in new bottles", and truly revolutionary technology only appears every few years. On this issue, you can watch this video-Hammock Driven Development.

Ignore fluff

Objectively speaking, one of the main ways you can make faster progress is to ignore the "fluff" that does not improve your skills. In other words, "use time wisely." There is a limited amount of time in a day, and you need to spend your time delving into deeper things. Over time, you will find yourself making great progress.

So what is "fluff"? It depends on your own circumstances. However, I can give you some examples of what I consider to be "fluff": language syntax, library APIs, and configuration build tools. For example, learning a new ES7 JS syntax does not make you a better programmer, it is like learning how a compiler works. Likewise, it doesn't make much sense to adopt a new library that implements the same idea but uses a new API. Of course, these things are important, but I suggest you spend more time learning deeper concepts. These concepts can benefit you a lot throughout your life.

I have a question for you: do you spend a lot of time making the code look beautiful? If so, I suggest you don't pay too much attention to such things. In any case, your code will change a lot over time.

It is best to focus on the core problem you are trying to solve, such as carefully considering your abstraction layer. After you finish all these tasks, you can take a moment to improve the code. This also applies to the DRY principle (Don't Repeat Yourself, don't write repeated code). But don't worry so much, just copy and paste at will.

In-depth study of past research results

If you have a new idea, you will feel very excited and can't help but want to sit down and act immediately. However, you should not do this, you should do some rough research first to understand how the predecessors solved it. When encountering a similar situation, take a few days to study it first, which will eventually completely change the way we solve problems.

Learning to read academic papers is a very valuable skill. I don't know anything about denotational and operational semantics, so I can't read many papers. However, many papers use codes rather than mathematical formulas to explain the problem, so it is not too difficult to read. Over the past 30 years, a large amount of knowledge has been published through papers. If you are good at obtaining this information, you will soon become a thought leader.

Prettier is a good example. I know what I want, but I don't know how to achieve it. After doing some research, I found this paper, and in a few days, I will know how to do it. I completed the main work within a week. If I ignore the research results of others, it will take me longer.

If you are looking for papers, Papers We Love on GitHub is a recommendation.

To participate in some big projects

Experience is more precious than anything. Not everyone has the opportunity to try, but if you have time, you can try to do some big projects. You don’t even need to finish them. Just try to write something like a compiler, which can teach you a lot in the first few weeks.

To be honest, I hate the feeling that I don't know how to solve complex problems. This is painful. Before approaching the solution, I must do a lot of research and study. After having such a painful experience, I can always get promoted and become a better programmer.

Start by learning a new language. This is the most effective way to help you get rid of current habits and look at problems from a new perspective.

For me, when I was a young programmer, the best thing I did was to learn Scheme. This is a very simple language, it will force you to do everything in a functional way, and really understand the basic principles of code work. I spent several years on Scheme and I still benefit today. And, my view of code has fundamentally changed.

Six things to do

I recommend doing a few things, which have had a major impact on my career as a programmer. Moreover, many of them still affect me in subtle ways and help me analyze new ideas. In order to be a good programmer, you don't need to do exactly the same thing, you can learn many other things to improve yourself.

1. Learn the C language-if you haven't learned it, just learn some basics. Try to think about why everyone complains about it, this thing is very valuable.

2. Write a compiler-this may make you very uncomfortable, you can take a look at the super tiny compiler project.

3. Learn macros-please refer to Scheme, Lisp or Clojure (scripts). Macros will really change your view of code.

4. SICP-SICP is an old book, I think it is still very valuable to this day (some people may not agree with this view). As long as you have little programming knowledge, it can guide you to achieve a meta-circular evaluator and compiler. Another book that I like very much and has done in-depth research on compilers is Lisp In Small Pieces. If you are interested in Python, you can add our learning exchange group: 649,825,285, and receive a set of learning materials and video courses for free~

5. Understand Continuations: Continuations is a low-level control flow mechanism. Scheme is the only language that implements it. Although you will never use them in a production environment, they will change your perception of control flow. I wrote a blog post that tried to explain them.

6. If possible, try to use a new language: No matter what you do, you should really explore other languages. I recommend any of the following: Clojure, Rust, Elm, OCaml/Reason, Go, or Scheme. They all have their own characteristics that can drive you to learn a new way of thinking.

Guess you like

Origin blog.csdn.net/weixin_45820912/article/details/108666575