Chapter 7 Bug-free programs
Looking at the full screen of code, Zou Xiaodong couldn't help but shout: "Damn, this is what you wrote." ”
"Sigh less, hurry up and get to work!" Wu Hao patted him and urged.
Zou Xiaodong grabbed his arm, and then looked at him with an incredulous expression and said, "Who are you, where is Wu Hao?" ”
"Fuck off!" Wu Hao couldn't help but roll his eyes when he heard this, pulled his arm away from his hand and said, "Stop playing, hurry up and work, we have limited time." ”
"No, you didn't write it. I don't believe it, this code is not at all on a level than what you wrote before. At this level, it is much better than the engineer of Qiandu who came to the school last time to give a demonstration. Zou Xiaodong said incredulously.
"Especially this paragraph,or (Iterator its = strs.iterator......"
Looking at Zou Xiaodong's surprised look, he couldn't help but interrupt: "There are many things you don't know, you will know slowly in the future." ”
"Really?" General Zou Xiaodong was suspicious.
Wu Hao slapped this guy on the back of the head, and said angrily: "When did I lie to you." ”
Zou Xiaodong shook his head and said: "This is maybe, for example, we went to our sophomore year to welcome new students, and we met a beautiful schoolgirl, and you asked someone to go to dinner and lied to me......
"Boss, come and see this." Yang Fan shouted at him.
"Boss?" Wu Hao was a little stunned.
"yes, I don't call you anything, boss." Yang Fan asked at him.
Wu Hao rubbed his nose and said, "Whatever you want, what's the matter." ”
"This is the drone I designed, and the list of related parts, you can take a look." Yang Fan handed him the drawing in his hand.
"Based on your needs, I have referred to some of the array drones currently on the market, so I think the relatively stable and easy-to-control quadcopter drone is our best choice."
Yang Fan showed him a schematic diagram of the drone's design drawn in the picture and said: "You see, these are the four axes for mounting the motor and the propeller. The middle position is used to carry the flight control system, batteries, and other payloads. ”
"What size can this drone do." Wu Hao looked at the design and asked.
Yang Fan shook his head and said: "This is not necessarily, the size span of this quadcopter drone is very large." The large ones can be five or six meters in diameter and can carry people. The small one is said to be the size of a thumb now, and is used by the Mi Army for battlefield reconnaissance.
Of course, it depends on what we are using. If it's just flying, it's very small. But if you want to carry a load and control the air for a long time, it is relatively large. As far as our current use is concerned, I think a small drone with a diameter of about 10 to 15 centimeters is more suitable. ”
"And how much does it cost to make this drone?" Wu Hao thought for a moment and asked.
Yang Fan looked at the list of parts and then replied to him: "This is not necessarily, it depends on the quality of our parts."
Generally speaking, we need at least three or four hundred to assemble such a fist-sized drone ourselves. ”
"What if you buy it?" Wu Hao asked.
Yang Fan thought for a moment, and then said to him: "If you buy it, it will be cheap." A fist-sized drone like a certain treasure, with a camera and remote control, is only two or three hundred, and it is doing relatively well. ”
Seeing Wu Hao's puzzled affection, Yang Fan introduced with a smile: "It's still a matter of production cost, the quantity produced by people is large, and the natural cost will be reduced." And people take parts directly from the manufacturer, and the price must be much cheaper. ”
"Two or three hundred, then can we buy these drones and come back for modification." Wu Hao thought for a moment and asked.
"Retrofit?"
Yang Fan thought for a moment, then nodded at him and said, "Yes, yes, but we don't know what about these drones." We need to buy some samples of different brands to come back and have a look, and then choose one that suits us.
We need a large number, at least one or two hundred. Such orders can be ordered directly from their factory, and they can also be produced according to our requirements. For example, remove the camera, do not use the remote control, etc. ”
"Okay, I'll leave it to you. You pick some samples and come back to experiment to see if they can meet our needs. In terms of funds, you go directly to Wang Qian, and I will sign it when the time comes. Wu Hao nodded and said.
"Roger!" Yang Fan made a gesture and then got busy himself.
Watching Yang Fan continue to work, Wu Hao smiled and continued to work, there is still a lot of work waiting for him.
This set of UAV swarm array control system is divided into several subsystems. And the framework of these subsystems needs to be built by him, and with Zou Xiaodong's ability, he can only refine and improve them.
Of course, this is not a direct dictation, but a compilation and summary of the relevant information in the brain according to the needs. and make appropriate deletions and modifications so that they can be adapted to their needs.
"Haozi, you are looking at the two units of this positioning error measure and three-dimensional normal distribution, I don't know where to start." Zou Xiaodong shouted at him.
"I'll see." Wu Hao slid the swivel chair to Zou Xiaodong's side and looked at the computer screen carefully.
"Here, you have a bug here, just fix this." Wu Hao pointed to the code on the computer screen and said.
Zou Xiaodong was a little discouraged and said: "I said, it always feels wrong, it turns out that there is a bug again, when the program I wrote has no bugs, it would be good." ”
"It's beautiful to think, how can anyone who writes a program be bug-free, even God can't do it." Wu Hao joked with a smile.
"I just want to... No, Haozi, you wrote so much code, why didn't I find the bud in it. Zou Xiaodong suddenly came back to his senses and said.
Forehead...... Wu Hao was stunned for a moment, he couldn't say that these things were ready-made in his mind, he just needed to carry them. Even if you make your own revisions and edits, it's like a college student doing a third-grade question, how can it be easy to make mistakes.
"Why not, it's a lot. Some of them I've changed myself, and some of them you haven't noticed yet. When I went back to testing, all the bugs appeared. ”
When he was talking about it, Wu Hao couldn't help but sweat in his heart. It seems that I have to pay attention to it in the future, and it is necessary to have more errors in the program code I write.
"It's also said that some bugs can't be found until the final test. Even if it's tested, it may not be able to find out, otherwise how can W soft have so many patches. ”
While the two were talking, Zhang Jun walked out with a large number of boxed lunches, and then said happily to everyone: "Come, come, everyone has eaten, and you all choose what you like." ”
"Fatty, what are you doing so happily, is there any happy event?" Zou Xiaodong quipped at Zhang Dong.
If it was usual, Zhang Jun would fight back, but today's Zhang Jun didn't seem to care, but took out the lunch box from the bag and said excitedly to a few people: "I'll tell you, our company registration has been approved." ”
"Really?"