In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
I often encounter such a scene: teacher, I have a basic python or java, but still do not know how to write code? Teacher, I have a code foundation, simple do not need to learn, I want to learn advanced. Teacher, I have the foundation of programming, but I can't understand the code. With questions like this, I think you must have these inner OS.
In the face of such a scene and such questions, I also asked a lot of children's shoes, and the answers I got were actually sad. There is nothing like saying some code is too difficult not to understand; this code is not written in detail so that I can not understand it; what I have a programming foundation is that the code you write is too bad. And so on, attributing the problem to him. The sad part should be understood by reasonable people.
All right, let's get back to business. On questions like this, let me talk about my ideas and learning skills here. Please forgive me if there is something wrong. I am also a person forced by low, so it is inevitable that there is something wrong. I like to praise it and turn it around. I just don't like to laugh at it and abandon it.
1, to learn automated testing, or some code, the core is to learn ideas, the idea of implementing a framework or function, without which you would be useless in 77 programming languages. So what is the idea here? Take Chestnut, for example, you want to complete a case that reads the user name and password from excel and logs in. How do you design it? this is the idea.
Most of the children's shoes I see, including the students I bring, start with writing code. In fact, this is the most taboo. The first step is to conceive logic and code structure, and the last step is to write code, putting the cart before the horse. Can you write it?
2, the so-called I have a coding basis, in most of the people I met, can be interpreted as I learned to program, but now forget, I can hello world, this is not a foundation, just a concept of coding. This is the most fundamental reason why you can't write and understand.
The above points out your problems, so let's take a look at how to deal with them. Here I would like to say one more word: people who can sincerely point out problems to you should be grateful (though harsh). Improving your own shortcomings more and complaining less about other people's bad is the quickest way to make you a great god.
Learn the basic paths of automated testing or programming:
Rule 1: cognition (including concept, meaning, etc.) > familiarity with a programming language (python or java) > continuous practice from simple and fixed examples (running is the most important, understanding is the least important) > develop your own problem-solving ideas (the process of understanding) > organize a more complex framework > keep summarizing
Rule 2: imitate > run > understand > convert to your own
1. I won't say much about the cognition of automated testing. I have already talked about it in detail in my new book, "Xiaoqiang Software testing Crazy handouts".
2, familiar with a programming language, pay attention to my words are familiar, not to know, not to understand, not to hello world, but you can skillfully write a simple demo, master the general programming, debugging methods. As for everyone's entanglement to learn python or java, it doesn't matter, it doesn't matter, you can learn which one you like, those who have the basis of java will learn java, and those who don't will be faster to learn python. Programming languages are all the same in nature, except that there are differences in grammar and ideas.
3. Don't dislike simple examples. How many people keep saying that I have a code foundation, but learn it completely. Use a word to describe it: high vision, low skill. To learn the code, you have to imitate it first, make it run, and then understand it. Many children's shoes need to understand as soon as they come up, why, the code didn't run up to understand each wool, why a p (sorry, can't help swearing, , forgive my capriciousness)
This is the same as you learn to drive, imitate, practice, slowly understand the principles of the car, what kind of gas, why there are protuberances in the middle of the back row and so on. I often tell my students that the most taboo thing in learning is to get caught up in details and blindly pursue understanding at the beginning. Because a lot of so-called understanding requires you to have enough knowledge, experience and experience to do it!
4. Going back to the landing question asked above, let's talk about the core idea. Get this problem is not to achieve writing code, but to achieve his ideas and composition, this process does not involve specific details, regardless of whether it can be really implemented. Let's take a look at this process:
A, the problem of splitting. This question can be divided into python reading excel (also considering how excel is designed to make it easier to read), how to store the read data, and how to put the stored data on the corresponding user name and password.
B, gradually realize. Take selenium as an example, first identify the user name and password elements and write dead data, at least to ensure that the code can run. Don't come up and wonder how my user name can be realized if there are several. If you write a dead user name, you don't even run the code and think so much dry wool.
C. Realize python to read excel data and save it
D. Replace the corresponding user name and password by reading the saved data
E, improve the code to add exception handling mechanism. Don't start thinking about what to do if you make a mistake, what to do if the username and password are wrong, and why the basic idea of testing has been lost at a critical time. Do functional testing we all know that the first positive, then negative ah, how to write the code to forget it.
F, run well, understand, can be slowly optimized, such as adding unittest, htmlreport, etc.
Throughout the above process, a lot of the code is fixed, for example, the usage format of unittest is fixed, remember how to use it first, then use it. Many people always learn from others to see the source code, you have a certain foundation ah, otherwise it is even worse to look at the source code.
Finally, learning is a process, a step, just like building a car, don't jump to study, there are only a few children's shoes that can skip grades, after all, step by step, the more you learn, the more efficient you will find. Sometimes we think it's really not what we think it is. Just drive with you, you have to let the car run before you can think about how to change lanes safely, how to overtake safely, how to park sideways.
PS: there are some things that are difficult to express in words, but also depend on people's understanding. Thank you for your hardship.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.