Limitations of programming ideas

Source: Internet
Author: User

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!

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.