Chapter 41 Codes and novels come to the same end
Shao Mingying (pencil leg): [I went to Beijing on October 1st and booked a two-day tour service.]
Liu Cheng was silent for a moment: "Can you just sleep?"
Shao Mingying did not reply, Liu Cheng stretched his waist and stood up to wash.
This woman just dares to talk.
Qi Mingxing was very fast. The next day, a three-person negotiation team came to Kuway Information, and the negotiations did not last long.
The core issues, especially in targeted open source, have been communicated very clearly through intermediaries.
The two parties quickly signed a specific project cooperation contract.
The government and enterprise departments have an extremely urgent need for unified threat management, and Liu Cheng is not surprised.
Since Liu Cheng’s Diary Treasure was launched, there have been countless products that followed the trend, but the quality is uneven, and Liu Cheng’s Diary Treasure is unique.
This is always the case in the market, and for those who are foresight, the reward is always the most abundant.
Just like Qihoo's security guards took the lead in free, killing all sides and quickly occupying market share. After that, countless Ansoft factories followed suit and launched their own free Ansoft, but the entire market has been chewed by Qihoo.
"Mr. Liu, according to the contract, I hope to bring the source code of Dizhibao to the Information Security Evaluation Center as soon as possible."
"We will put forward our needs for security within five days of receiving the source code. When the project is officially launched, our agreement payment will be transferred to the company's accounts in full."
"I wish us a happy cooperation." The middle-aged man in a suit did not despise Liu Cheng because he was young.
Liu Cheng stretched out his hand and shook it hard: "I wish us a happy cooperation."
Open source does not mean free. Microsoft's security plan source code protocol will target open source for the source code of office software.
Liu Cheng breathed a breath. The people who Qimingxing were completely different from Qihoo, and they were even a bit old-fashioned. Their offer had almost no room for negotiation, and their bottom line would be shown at the beginning.
This style is a bit tempted by Liu Cheng. Everyone is skilled, so it would be great to be straightforward.
I have the skills, you have money and customers, and we hit it off.
Qihoo's sip, then she wanted to swallow it all, and not only climbed along the pole, but also had the fact that the competition agreement was blocked by people's neck. She was really insatiable.
But this is the style of the market, the market is really cruel.
[Receive red envelopes after reading books] Follow the public account [Book Friends Base Camp], and you can get a maximum of 888 cash red envelopes after reading books!
He had thought of achieving financial freedom with just one vote, which was a bit whimsical.
"Liu Gong, my notebook." Wang Yongfeng breathed a sigh of relief when he saw Qi Mingxing's people leaving.
These people have a strong aura, and he was a little worried about it. He didn't know how his boss talked and laughed in this aura.
Liu Cheng came to Wang Yongfeng's computer, pointed to a code he wrote and said, "Look at this place, you have nine nestings. After a while, you will be confused when you look at it yourself."
He said that there was a code that opened another piece of Log Ba, saying: "Look at my paragraph, I have many nested branches, but this is not written at once, but a new branch is opened every time a new function is added."
"For each branch addition, I don't feel the need to refactor the entire piece of code, because I just wanted to finish what I wanted to do as fast as possible, so the quality of the code became lower and lower."
"Last night, I refactored this code and turned 320 lines into 100 lines. In this way, I don't worry that the engineers of Qimingxing were dizzy and saved a lot of resources."
Wang Yongfeng looked at the two pieces of code, nodded and said, "The difference is really big, but the functions are the same. So how should we refactor the code?"
Liu Cheng took the water cup handed over by Liu Yinuo and said, "Usually, three branches can be reconstructed into a judgment (switch). If the judgment branches are larger than 10, you should consider writing a table (config) to drive it, and specifically writing a function and writing a roadmap (mapping) according to the configuration."
"If the mapping logic is complex and the frequency of use is high, I will write a database rule engine to call it."
Wang Yongfeng was still a little confused. Liu Cheng personally demonstrated it and said hesitantly: "It's just like this, refactoring the code is a thankless job, but it is also a must-do."
"So amazing!" Wang Yongfeng blinked his eyes and said in amazement.
Liu Cheng signaled that this was nothing and said with a smile: "Most of them are like this. I once took over a thirty-layer if else set if else module, which almost broke me up."
"When I was reviewing and reviewing this module, I found that the first programmer only wrote one layer. Later, every time a requirement was added, the logic branch expanded to more than 30 layers, and no one was willing to refactor it."
"If the refactoring is wrong, you have to take the blame."
"I advised myself at that time that when it comes to programming, the most important thing is to be open-minded. I added a layer, tested, submitted, and got off work."
Wang Yongfeng asked curiously: "What's next?"
Liu Cheng said with memories: "Later, when this module was started, it would be executed 1.96 billion times, and it took six minutes to open the module, and no one knew what the problem was."
"1.96 billion times?" Wang Yongfeng patted his forehead.
Liu Cheng stood up and said with a smile: "It is a submodule of online game services. You know, 1.96 billion useless operations have been staged over and over again on the user's CPU. That scene, tsk."
"What happened later?" Wang Yongfeng asked with his eyes wide open.
Liu Cheng said with a smile: "Later, I made a secret change. What else can I do? If the company discovers it, wouldn't I be fired?"
There are many experiences on the road of life, all of which are bumpy and bumpy. After crossing through it, I suddenly realized that I shouldn’t have made such mistakes at the beginning.
Since then, the large and small modules that Liu Cheng has used will be reconstructed over and over again using the methods explained by his master. It is not scary to take the blame, and irreversible mistakes are the most terrible.
"Liu Gong, you are so powerful and you still have the time to fall in love." Wang Yongfeng said very distressedly: "I can't even learn it. I've used up all the time every day, but it's still not enough."
Liu Cheng stood up and said with a smile: "Who made me gifted?"
"By the way, you should not pursue any simplified and concise code now, but do the project steadily. A programmer should not be worried about the CTO."
"Do the standardized things well within the specified time and consider these when you lead the project yourself."
Wang Yongfeng nodded vigorously and said, "I understand."
"Master!" Shen Jiayi looked at Liu Cheng with grievance.
She came to Kuway with a pack of snacks, and saw Wang Yongfeng being instructed, and was very envious!
Liu Cheng put down the water cup and said with a smile: "When did it come?"
"He has been here long ago." Shen Jiayi was still aggrieved. She, a real disciple, didn't treat her like this step by step.
Liu Cheng's request for her is always:
Give full play to your subjective initiative;
Before asking this question, I went through my mind;
Can you search online by yourself? Such a big baidu is there?
Don't understand yet? Why did you accept such a fool apprentice?
Similar to this.
Liu Yinuo said with a fog on his head: "What are you talking about?"
Liu Cheng thought about it and said, "What I said just now is like refactoring the code, just like the outline, general outline, volume outline, detailed outline, and overhaul of the main text in a novel, just as troublesome."
"The simplicity and simplicity of the code are like a novel in which the pace is faster and the language is not long-winded, and for him, it is a bit demanding."
Liu Yinuo doesn't understand the code, but she understands the novel, modifying the outline, and then modifying the main text, and finally relinking the previous and subsequent texts, which is indeed a very hard job.
It is indeed extremely hard to refactor the code every day!
"When I just learned to leave, I thought about running. I told him not to think about the meaning of simplifying the code. If you convert it into the novel world, you should tell a good story first."
Liu Yinuo nodded and said with a smile: "Your novel is long-winded, and many people say it's not concise enough."
"Okay, I'll strive to be less literary and tell stories well." Liu Cheng nodded helplessly.
"Master, let's go for a meal." Shen Jiayi pulled Liu Cheng's clothes and said with anticipation.
"Save it."
"I don't."
Liu Cheng looked at Shen Jiayi in confusion. What's wrong with this girl?
He asked tentatively, "Is there anything wrong?"
Chapter completed!