As a programmer, the most common thing is to type code. However, this is the most honest way we and the outside world perceive us. In the process of coding, we may encounter and solve some problems, accumulate experience and experience, some people choose to record in natural language, form a blog, but most people do not do this kind of record.

This article will explore why programmers should try to document their problems, experiences, and insights, and why we need to do it in the form of a public blog.

First of all, I would like to make a brief self-introduction. I am an Android developer. I started to try to write technical blog after being instructed by CAI Xueyong, then the chief evangelist of Innovation Works, on weibo in college. I started writing some simple summaries at CSDN and eventually started to maintain an independent blog called Tech Little Black Room. The blog has been maintained for over 4 years. Focuses on writing technical articles on Java and Android, has a lot of attention on developer headlines and rare earth nuggets, and has done several topics on DroidCon and GDG.

Without further ado, let’s take a look at why I think programmers should try blogging.

Records and notes

In the history of human development, language often precedes the appearance of writing. A simple example is that in ancient Japan, people only had language, that is, they could only hear and speak, but they lacked words to map to language. The biggest problem of this period was the inability to use words to record much information. The problem was not solved until the reform of China, which introduced Chinese characters from the Sui and Tang dynasties.

The reason for the above paragraph is that if we make an analogy, we will find that this is similar to writing a summary of an article. When we solve a problem or acquire an experience, if we do not write it down, we are no better than ancient people who had language but no writing. Progress is when your information is recorded.

To take a closer reality check:

One day, for example, I worked on a problem for three hours and took no notes afterwards.

A few months later, the same problem would come up and I would spend half an hour or an hour on it again.

If I had taken proper notes, I could have solved the problem in 10 minutes.

To use a more technical analogy:

The memory in the brain is like a cache, never knowing when it will be forgotten. The recorded text lasts as long as it is written to a hard disk.

Deeply understand and master the embodiment of technology

If we want to write and share articles, we have to do our best. We have to study our explanations thoroughly and write our articles carefully.

Let’s take a simple example. A common implementation of Android for accessing data is SharedPreferences. There are a lot of people who think:

  • Isn’t it used when accessing many similar configurations?
  • It’s easy to use. There’s nothing to write about.

This kind of answer is usually only from the perspective of usage. In fact, a SharedPreference has a great knowledge:

  • SharedPreference implements the mapping between memory and external memory.
  • It provides synchronous COMMIT and asynchronous apply to save data. Why provide both? Synchronization blocks the thread. Is there a problem with asynchronous writing in the wrong order?
  • Why can’t speak registerOnSharedPreferenceChangeListener Javadoc hold strong reference to the listener?

When you subjectively want to write a good article, you will diverge to think of the problem, to study the source code of this thing, and combined with their own problems or experience, to try to write this article.

As you write one, two, three, five, seven, eight, and ninety, your body of knowledge will gradually improve, and of course each of these essays should include an in-depth understanding of the techniques involved.

Find better solutions and deficiencies

When you swap two apples each has one, but when you swap two ideas each has two ideas

When we write an article, post it on a blog, and be seen by others, we are more likely to get better or worse feedback from others.

For example, when I was writing my Raspberry PI Guide, I mentioned the TF card as an SD card, and I got this corrected shortly after. This corrects my misperception.

In mySome Thoughts on Android LogI got a lot of better feedback in the comments, like

Therefore, writing a blog benefits not only others, but also yourself.

Technology should be open

If I write to share, others will, then my competitiveness declined?

In programming, there is hardly such a narrow “teach apprentice, starve master” situation. On the contrary, the more people share, the more open they are to technology, the more they gain and achieve.

The source code can be developed and the technology should be open.

Other benefits

  • Personal fame enhancement
  • Knowledge to liquidate
  • To apply for a job
  • Make a habit of sticking to it

First of all, blogging can be regarded as a form of enhancing one’s reputation. By sharing knowledge and experience, and helping others, your reputation and brand will be created and expanded.

Third, once you’re famous enough, you’ll get web ads, (paid) speaking engagements, video recordings, book deals, etc.

In addition, when applying for a job, if you add blog content to your resume, it tends to have a higher acceptance rate, because it may give the impression that you are good at summarizing and researching the problem deeply.

If you keep blogging for a long time, it will help you develop good habits, and over time you will become more patient and more in control of yourself.

How can I write if I don’t have time

Programmers can be one of the most overworked professions. What 996? Size weeks. Work alone takes up most of the time, the rest of the time, is to spend with my family, with my girlfriend. Where is the time to blog?

All this is true, of course.

However, you can still make time, after all, “time is like water in sponge, as long as you are willing to squeeze, there is always some”. Besides, this time is not wasted, but used to improve themselves, help themselves and others, is a great thing.

As a personal example, the time I can find is

  • It takes about an hour to get up early in the morning before going to work.
  • It takes about 1.5 hours to get home from work in the evening.
  • On weekends, it’s about eight hours.

Individuals tend to build up by getting up early and squeezing the hours out of the morning.

Why should blog rather than cloud note

In fact, there are a lot of people who take notes, and they usually take notes in Youdao Notes or Evernote. I think the reasons are as follows

  • Record in the notes, more for their own view, unable to carry out in-depth understanding and research
  • Unable to share with the majority of peers, is not conducive to finding their own view of the problem and more insights
  • Benefits such as knowledge realization and reputation enhancement are not available
  • Only an open blog can solve these problems

Above is my opinion that every programmer should try to write a blog. In addition, I will answer “How to write a good technical article” in Zhihu Live.

This Live will explain:

  • What are the benefits of writing good technical articles?
  • What makes a technical article “good”?
  • How to write good technical articles?
  • How to write technical articles with high quality and high productivity?

And answer these questions:

  • How to accumulate material and feeling better in daily life.
  • Blogging takes a lot of work. How do you stick to it for a long time?
  • How to make the article attractive?
  • How to solve the conflict between blogging and working time
  • Blog for a long time, but no one read, how to do

If you’re interested, if you have a question you’d like to ask, please join us.

Participate in the address: www.zhihu.com/lives/79677…

In the end, I hope more programmers can pick up pens and write blogs. Let’s make a difference.