In the past, I always thought that I was very talented in learning programming, so I looked at everything with pride and did not like to sit down and read books. I always thought it was a waste of time, but since I read a Tsinghua book, I don't think so anymore.
After reading this book, I realized that I did it myself.ProgramMany of the problems encountered during this period can be solved in the simplest way. For example, we can discard the previous methodology about screen refresh. You can think about it another way. Isn't screen refresh changing the display status? So why don't we do this?
This is hard to understand. Let's take an example!
Refresh in the Windows interface: (Note: Sorry, who told me that we are a cainiao? I can't post any pictures in my hand. So let's use a language to describe it, I hope my language skills are excellent)
There are two textbox types: textbox1 and textbox2, which are numbers and textbox3, which are used to output the calculated results. Click "show" button and textbox3 to output the corresponding results, click "clear" button. textbox1, textbox2, and textbox3 are empty.
If such a question is given to me, it will be very complicated to think about. Using the method called by the teacher to refresh the screen requires a lot of calls, let me be the first two in English. So every time I try to avoid using the refresh function. But the method in the book is very simple.CodeYes:
Textbox3.text = calculation result;
The "clear" code is only:
Textbox1.text = "";
Textbox2.text = "";
Textbox3.text = "";
Do you have a sense of happiness? Yes, it's that simple. If you change your mind, the problem will be as simple as calling you to scream. Don't be limited to what the teacher says, don't be limited to what books teach, and change your perspective to get out of the cage of thinking, the sky outside is very broad!
I don't have to worry about refresh any more, because refreshing is too easy!