Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Good programmers love to write.

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

01. Notes are also writing

As far as I know, good programmers love writing (not just blogging in a narrow sense). If you can name some exceptions, please let me know.

Why would you say that?

A good programmer wants to share a piece of open source code, and if other programmers don't understand it, he will be frustrated unless he doesn't want others to understand it, but I don't think it's necessary to open source.

In order for other programmers to understand his code and reuse it, he not only has to define appropriate variables and methods, but also has to write some highly readable comments. It looks like this:

Public static int compare (double D1, double D2) {/ / Cannot use doubleToRawLongBits because of possibility of NaNs. Long thisBits = Double.doubleToLongBits (D1); long anotherBits = Double.doubleToLongBits (D2); return (thisBits = = anotherBits? 0: / / Values are equal (thisBits < anotherBits?-1: / / (- 0.0,0.0) or (! NaN, NaN) 1)); / / (0.0,-0.0) or (NaN,! NaN)} copy the code

Without those comments, the code looks like a headache. I don't know if you agree with me.

You might argue: do programmers become programmers for the sake of writing? But you seem to overlook the premise that I'm talking about good programmers. If you don't want to improve your writing, please let go of this article. It won't help you in any way.

If you want to improve your writing, we can have a good chat.

There are no shortcuts to effective writing, and I guarantee that even if you read the secret of Learning to write in 21 days, it won't improve in a short period of time. Writing takes time, just like you grow from a born child to a beautiful and handsome aspiring young man-some people may back down quietly when they see this sentence, but the underlying meaning of my sentence is that it is not difficult to write, as long as you insist on it, it's just a matter of letting nature take its course.

I'm sure that as long as you organize a few lines carefully when posting on moments, commenting at the bottom of the article, and writing code comments, you will find that your writing level is very different in less than a year and a half. But if you want to go further, you have to keep going.

02. Comment is also writing

I once received a letter from a reader thanking me for encouraging him to embark on the "road of no return" in writing. Haha, the content of the letter is about this, we might as well take a look at it.

Second brother, I don't know if you will be surprised when you receive this letter, but when I think of your surprised expression, I think it's very funny.

At first, you didn't know how difficult it was for me to write, so hard that I thought you were lying to me-after all, not everyone is fit to write.

At that time, you advised me not to lose heart and let me try to comment at the bottom of the article instead of sitting in front of the computer holding back two or three thousand words-- don't say, this is really a good way.

In the new media era, everyone has to read countless articles every day, including moments, Subscription account, knowledge Planet, blog Park, Nuggets, CSDN and so on, and I am no exception. Although there are a lot of likes in some high-quality articles, there are very few comments that really pay attention to them.

Now that I have been read, and sometimes I really want to express my views, I am eager to write a paragraph of my own comments. So I set myself to comment on 5 articles a day, with no less than 10 words and no more than 100 words. If you only write comments such as "666, come on, awesome", it is obvious that your writing ability will not be improved and will not attract the author's attention; if you write too much, the comments will not be concise and clear enough, and the reader's patience will decline.

After holding on for half a year, I noticed that the quality of my comments was steadily improving. Sometimes when I encounter the activities of commenting and delivering books at the bottom of the article, I often win the lottery, which gives me a great motivation. If I am not chosen, I will read other people's comments, and then study the reasons, I will think: maybe I am not interesting enough? Maybe I didn't write enough to the point?

You once said that your persistence in blogging has greatly improved your writing ability. I want to tell you that writing comments has the same effect on me.

Later, I am no longer limited to comments, I will also answer questions on Zhihu, which not only improves my writing ability, but also invisibly exercises my expression ability, which makes me feel extremely happy.

Finally, I would like to say again, second brother, thank you.

After reading this letter, are you eager to comment at the bottom of this article? If you are willing to do so, that's right!

03. How to persist in writing

Excellent programmers know that writing can improve themselves well, including technical ability and expression ability, but at the same time, writing is also a very slow process, which takes a long time to accumulate before it can be effective.

It's like fitness, it has many benefits, but it's not that easy to do.

There are a lot of people around me who want to keep fit. They feel that they will be useless if they don't exercise, but often many people pay for a card and still can't stick to it. I have also been to the gym and have seen a lot of women with perfect curves and men with inverted triangles who think their perseverance is too strong.

So how can we stick to writing?

1) do small things

To be honest, I haven't had a gym card because I find it hard not to stick to it in the gym. It's not a limit to myself, it's self-knowledge. So what do I do?

I ride my bike to and from work every day, except for rainy days and some exceptions. Because of this, my mother kept nagging me: "isn't it stupid of you to ride a bike without driving on such a hot day, son?"

I replied, "I have to exercise, Mom, or I'll get fat in middle age soon."

My mother said impatiently, "look how thin you used to be, just over 100 jin. How nice it is to be fat now!"

Hearing this, I can only laugh at my mother's stupidity in my heart. If I am too fat, I will not be handsome.

You see, even the little thing of riding a bike can be disturbed by others, let alone writing? But as long as I stick to cycling, the rhythm of my insistence on sharing two articles a week will not be so easy to interrupt.

You can also start with small things, such as writing comments at the bottom of the article, or even posting moments and comments a little more attentively than usual.

2) huddle together for warmth

Writing doesn't give authors much reward, especially for people who are just starting out to write (let alone write reviews and code comments). "inertia" is common to everyone, and many people will wander between writing and not writing, and then stop writing. It is suggested that you find some authors of the same level, encourage them every three or five times, and report to the group to keep warm.

I will pay attention to some friends of the same level on the way of writing. Whenever I can't write, I will talk to them and my frustration will be cured immediately. Another advantage of grouping is that when you see that they read more articles than you do, you can also learn from them and learn from their learning experience.

3) reader-driven

When you take a certain amount of time to finish an article and share it eagerly, you will soon receive some comments, whether praise or criticism. You'll find it interesting-there are still readers who are willing to take the trouble to read my article.

I previously posted a topic on V2EX called "what do you do when you are restless?" and one reader couldn't get used to it. He thought that the topics I posted were always very negative (although I didn't think so), so he listed all my previous topics and asked more people to comment. I couldn't help laughing when I saw his comments, so I replied to him happily, "good heart, man!"

Sometimes, I really feel that my article is not good, but there are still many readers who comment enthusiastically and feel deeply inspired. Wow, you felt so good at that time (really)! Can't wait to write the next one.

04. Final advice

Writing is a clich é.

But many programmers like to equate writing with blogging. In fact, this definition is a little narrow, and it is easy to keep out some people who want to write. In my opinion, writing includes many aspects: comments, questions, answers, chat, posting moments, technical documents, code comments, and so on.

Finally, let me quote a celebrity's exposition of the importance of writing:

If you're going to pick one out of a bunch of people to do a job, pick the one with the best article. It doesn't matter whether he has done marketing, sales, design, programming or any other work. The writing talent of this kind of person is worth hiring. This is because the advantage of a good writer lies not only in writing. Clear grammar means clear thinking. Good writers know how to communicate with others. They make things easy to understand, they are good at thinking of others, and they know how to focus on key points and cut down details, which are the characteristics of qualified candidates.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report