From amateur programmers to professional programmers -- Zhuhai Kingsoft internship 1

Source: Internet
Author: User

"Program quality is the most important thing ."

 

"Each function must have a return value because every function may fail ." -- At the beginning, I felt that Bos was being casually talked about or wrong. Later, Bos repeatedly stressed the importance of doing so in large projects. After returning, I started to add lresult, process_error, exit0, and other statements before writing the function entity, so that a blank function that does nothing can use nearly ten rows, and then write it for a while, more and more people get to understand Bos, and feel that it is really useful for building strong programs. It seems that they are more and more interested in function error code. Another is that when you use a script to perform unit test in batches, functions without return values are useless. For example, a giant like WPS that has millions of lines of code, if there is no powerful test program, then ......

 

"80% of the time for writing a program is debugging. I can understand this before, but it does not take any action. Now I am paying attention to writing my own code for debugging convenience. I always need to use a variety of methods to debug my own code. The other is debugging tools and techniques that require further learning. I used to rely on cout, but now it doesn't seem to work. Bos reviews several lines of Sb code during debugging, competing for memory tracking, register tracking, and stack tracing. It is also well-developed and implements the assembly code step by step, one byte and one byte keep an eye on the program memory ...... Well, professional programmers ...... There is another saying: "All programs must be debugged in one step to observe the Data Stream." -- a word that is not heard is not worth thinking about. But let's just calm down and think about what is too much for a product with such high quality requirements? All possible methods must be used to ensure the quality of the program, which is only a simple method.

 

"Never define uninitialized variables"-from now on, all variables I have defined must be initialized, not only C ++, but also flex and Java.

 

"To Write small and short functions, long functions have a greater potential risk."-This is also a beautiful way to ensure program quality. Personally, I really like short functions, which are quite comfortable and less likely to make mistakes.

 

"Unqualified code bosses won't let you checkin"

 

"Test functions: UnitTest, of course, integration test, daily build" -- another sentence is "The unit test case must be found by the programmer ", because the tester will probably regard this function as a black box. This may be different from what I mentioned in the book, but it should be something that is actually happening in Kingsoft.

 

"Flexibility is costly"-as your customer said, a program with fixed parameters requires 0.2 million. If the written parameters are variable, it requires 0.4 million.

 

"The program needs to have a self-detection function"-this is another effort for DEGUB.

 

"My function can receive any invalid parameters. My function will not affect the outside world ." -- No matter how hard you are, I won't take it off, unless it is your code.

 

"High Cohesion, low coupling"

 

"JAVA and C ++ programmers are different. The former focuses more on the business, regardless of the underlying implementation, the latter is the answer to the question-the phrase "programming language is not important" is still floating in my mind, but I still feel the same with BOS, JAVA and C ++ adapt to different people's personalities. JAVA is okay, especially when it comes to the Script language, there is always a bad feeling at the bottom of my heart, it seems to be a sense of sureness, or not. Anyway, unlike in C ++, I can focus on moving one BYTE in the memory, and I can control everything. I think this is a kind of trust. Why is it so natural and comfortable when I stay with my parents at home, but I don't feel that way when I stay with a so-called "friend, this is Trust. A language that is too advanced is placed at the foot, and I cannot trust it. I am also afraid of its constraints on it. How good is freedom. The difference between a language and a person's character is at least now I feel it ......

 

"Tricks and tricks"-write I = I * 4 as I = I <2 which is often a kind of tricks and tricks in Kingsoft. It gives you a code with a certain skill that makes others think you are very advanced: in fact, this is a spam code. Good code should be easy-to-understand. If you reference it, "I am not degrading you. Good code is code that you can understand at a Glance ". Show off and advanced self-work may cause a huge price for your program. Baidu's definition:

Qíj ~yín Qi yuno

[Explanation]: Refers to novel techniques and works.

[From]: "the book under the oath": "To entertain a lady ."

 

Bos-since the beginning of 1990s, WPS should be developed. It should be just a large undergraduate student. There is not much theory in the mouth, and it is said that only those programmers have a hard time in their careers.

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.