Non-life-a rookie programmer's 5-year career road section 5th

Source: Internet
Author: User
Non-Life-A cainiaoProgramMember's 5-year career road 5th
Author: Flowers 8 Tianya it: http://cache.tianya.cn/publicforum/content/itinfo/1/77229.shtml

Date: 21:03:27
8 -- document
When Dong Yanming returned from outside, the weather was very hot. He was warmly welcomed by Dr. Wu. Dr. Wu took out ten yuan and said, "Dong, buy ice cream, no one else buys ice cream when you leave ......"
Dong Yanming was in tears. After all, he had his own position. He bought the ice cream, and Dr Wu immediately arranged for him to write a product user manual, so that he could hear the news of his new company.
Dong Yanming has been in the company for a year. To be honest, he hasn't done anything except writing product use documents. What he wrote for Liu Dalong cannot be counted. After all, it is to marry others. Later, Dong Yanming saw a huge data department in Huawei and finally realized that Dr. Wu must want to train him as an excellent document talent, this will allow him to spend so much time writing documents and then pick up the documents. However, at that time, Dong Yanming did not know that Dr. Wu's painstaking efforts were miserable every day.
One day, Dr. Wu shared a document with Dong Yanming, "Dong, Please study this document ."
Dong Yanming looked at the switch user manual. He flipped it over and confused: "boss, do you want me to do this ?"
Dr. Wu said, "let's look at the format of the document, the word, the layout ......" Dr. Wu said that he was very excited and almost had to call the festival.
Dong Yanming had been turning over for a long time and still had no essentials. He thought that the words were too mediocre, and he didn't even have an idiom. He repeatedly said that, isn't it so crazy? Forget it. You can't read it.
After several days, Gong Ming and Dong Yanming also mentioned Huawei's documents. However, the difference is that he mentioned design documents.
"What design document ?"
Dong Yanming has never heard of the concept of design documents, but Sang Jun can have heard of it. He outsourced Japanese design documents for the whole day. He explained, "it's a design case book ......"
"Two cookies! China will destroy your pig's hands. Every day, we will count on our customs and close our customs to help the Japanese rich and powerful troops ......", Yan Mingming is still not used to talking about our company. He always wants to put "we shut down" in his mouth. "We have started to learn Huawei, so I am eager to learn it !! Now we have started programming from the document. I have read the internal design document of Huawei. That format, that layout, that word ......"
Dong Yanming is familiar with his ears, but he still does not understand what design documents are. Sang Jun explained to him again: "That is, if someone else has prepared for you how to compile, all of them have been written in Japanese. You can change Japanese to programming symbols. It's like if, people will write it, If you just write it ......"
Dong Yanming seemed to understand, but raised another question: "All the people who write the document have written to that level. Code It's not faster. Isn't that just taking off your pants and farting ?"
James knocked on the table and said, "You two know a fart. It is a step-by-step demonstration of the programmer's wisdom! Start from Market Research and Implement customer requirements one by one step. You two have no software engineering courses in college. That document is one after another. It was simple at first, and later detailed, as if it was a requirement design ...... No matter what it is, there is almost such a name. The last step you come into contact with is detailed design. Huawei and I ......"
Dong Yanming interrupted Yan to clearly describe his relationship with Huawei, and earnestly asked Yan Mingming, "How long will it take for you to write your documents? Have you written the code long ago ?"
When talking about the language, Sang Jun asked: "I can write a program to implement the functions you want, and I will use it for you, how do you handle it. Oh, by the way, it's just for myself. I wrote the document for myself. Isn't that cool ?"
Yan Mingming was talking again, and his face was flushed, just like Kong Yiji. "This document is different from your document ...... Our programmer's things are unclear to B ......"
In, Dong Yanming developed the review document in accordance with the process in the Huawei leadership team. The review document was well-known and he liked to comment out the document on others. "A piece of shit, please refer to the training requirements for rewriting ."
In, Xiaoming worked as a QA Engineer in beisoft and stared at other people's document writing time every day. He often suggested that the PM prolong the document writing time.
In, Sang Jun went to Japan to work. In the waterfall development process, he could not remember that he had microwords about this process development.

Date: 9:48:38
9 -- thread
Dr. Wu has arranged work for Dong Yanming for more than half a year. During the past six months, Dong Yanming will soon become a miscellaneous.
Dr. Wu asked him to write a voice chat program. The function description is completely oral. "Dong, I want to use a voice chat program ?...... What is the function of voice chat ....... You open the microphone and say hello. I have heard yeah. You can also hear it, and then I will talk about it ...... What design ideas do you need ?...... That is, you first write a recording program, then store it, and then transmit it to the peer end using socket, and then play it automatically ......."
Socket again? Dong Yanming is happy. What will he do.
He took a mic from Dr. Wu and went back to his seat to open "VC Programming 100 examples". The result was that there was no recording program. He suddenly began to hair-from the last socket incident, the book was regarded as a bible by him, but when the lambs lost, they found that there was no direction in the Bible, this means that no beacon can be seen when the sea is sailing.
He opened "VC ++ technology insider" for a long time and found no relevant examples in it. He opened "C ++ primer" in a bid, but he certainly did not, he threw away the book and thought, "there is no useful example in these two books. Why is it so expensive ?? By the way, I don't know if there are 1000 or 10000 programming examples in the bookstore to sell ?" Then he came up with a very serious idea-programming is an art to buy this example book and compile it as long as it can be typed, how can I continue to train my undergraduate students?
Dong Yanming entered the "Recording Program" search on Google and found out an introduction webpage of "API-based recorder program. He did not care about what the API was, but entered a string of wavexxxx functions according to the code, after the input is complete, there is a compilation error. He feels that he has modified a few places by mistake and finally made the compilation pass. He recorded a piece of music for himself and played it for a moment. It was a success and he could not believe it. He remembers what APIs does socket seem to have. Isn't it necessary to write the functions in order to use all APIs? He was so excited that he wanted to open the window and yell and ask someone to share it. He found a big secret!
In the end, this secret was not shared with others, but he was not clear about what the API was. Master Dong studied the recording software and found a problem: the software can only be recorded on the hard disk, that is, he wants to say that it is impossible to listen, you can only listen to a file after the file is received and then played at the same time by the other party.
He shared this concern with Dr. Wu. Dr. Wu's glasses almost slipped to the ground. "You didn't joke with me. I have finished talking about it. Can you hear it when you click it? Isn't it a report machine? I want instant calls, and I don't want you to call me !!"
Dong Yanming returned to his seat, busy searching online. After he tried keyword searches such as recording and program, recording and transfer, recording and socket, he finally thought of voice chat. Source code This keyword solves the embarrassment of the reporter. In fact, the solution is also very simple, that is, when the buffer is full, it triggers the socket thread for transmission, and the other party receives the playback, saving the storage space. Master Dong was amazed at the design. He verified the design several times and quickly sent it to Dr. Wu for examination if the conversation was smooth.
Dr. Wu thought it was okay after using multiple threads for a minute. Because of Dong Yanming's personal qualities, he was reluctant to accept his requirements. However, he found that the CPU usage of the program ran to 100%. He asked Dong Yanming what was going on. Dong Yanming smiled and said, "Is this machine too slow ?"
Dr. Wu gave him a white look and looked at the code. Then he added a statement sleep (1) in the two threads that he accepted and sent, and the problem was solved. Once again, Dong Yanming was excited like a lightning strike. This is the power of changing from decay to magic. Simply adding two letters can solve a big problem. Once again, he grabbed the Chair handrails to suppress his impulse to shout "amazing.
In fact, there is still a small bug in this application. However, because this program was not used in the end by Dr. Wu, this bug was not found, and Dong Yanming felt a little lucky. BUG: The program runs for a period of time and the error dialog box pops up. You must restart the program to continue using it. At that time, Dong Yanming thought countless ways to solve the problem, this includes a classic idea of exceptions-that is, the program restarts automatically every one minute.
After a year, Dong Yanming finally learned why, that is, the repeated use of the cache zone is the same as the last socket problem.
Two years later, Dong Yanming also learned that Dr. Wu's sleep addition was somewhat arbitrary. He should sleep when the transfer is complete and the buffer zone is not full, and then be triggered to wake up when the buffer zone is full, sleep is performed each time a message is sent, which affects the performance.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.