Programmer's dream space

Source: Internet
Author: User
Tags throw exception

Programmer's dream space

Author: alexzhan, Author: alexzhan12@gmail.com

More and more think that "dream space" is for programmers. So how do I map a dream to programming? Is it recursion? Is it a loop? Or a simple function call?

For a person entering a dream, it is recursion, and a layer-by-layer push pops up. For many people entering the dream, it is a function call, this is because people in a certain level of dream work together with others in a deeper dream. To be more precise, the person entering the dream is a global variable set in the program, and the person virtualized in the dream is a local variable, while a program generally does not have only one global variable, so the dream is not a recursive operation but a function call. Every virtual dream is a function that can be called (entered) at any time by any other dream. variables (persons) that enter this function (dream) are usually returned, it is the parameter returned by the function. When this variable is returned, it is not without any change as a person. For example, the idea is injected into Ariadne in the dream, then, when Ariadne is returned as a variable, it is processed. In programming, it is best for a function to return a parameter, either the final value obtained after direct processing, or the obtained flag variable, but no parameter is returned, that is, the void type, corresponding to a movie: A person entering this dream can return, not return, and always stay in the dream.

Why is it slower to enter a dream than the previous dream (or perhaps the reality? Perhaps we can understand this: if we look at the real world as the main function, we generally do not like to write too long code in a main line, then we want to write a function to call the function. After writing the function, we can directly write a function call statement in this process. The specific process is completed by the function, by default, we allow this function to complete logic functions over a long period of time. Of course, the shorter the processing time, the better.

When you enter a dream, you will choose who will enter the dream. The selected person corresponds to a major variable in the program. If this person is killed in the dream, there is a problem with the main variables in this function, and it does not meet the requirements of this function (dream) for this variable (person. Throw exception and return to the upper-layer dream (function ).

The person who designed the dream is the programmer who compiled the program. This person can also enter the dream he designed, and the programmer must continue to look deep into his own program, because he wants to find various bugs. if this programmer does not come out in a dream, we can understand that this programmer has a problem or the program written by this programmer has a problem. Therefore, choosing a good dreamer (programmer) is crucial, so he will return to Paris to find his teacher (father too? (Not too clear) ask for a very smart student and train her into a good dreamer. As a dreamer, data production has good conditions, but there is a fatal drawback: it is always impossible to discard the bad scenes in your past, in your life, or in your dreams, and these scenarios will often appear in new dreams. Correspondingly, if a programmer always follows the programs he has written in the past, those code segments do not show problems or problems when they have been written in the past, however, new requirements do not meet the requirements, or new programs always use their past programming ideas. Maybe those ideas are not suitable for new situations. Therefore, it is very important for a programmer to break his inertial thinking and review problems carefully even if they are similar to what they have encountered before. Break the regular and divergent thinking, so that a programmer can make great strides.

Author: alexzhan, author Email: alexzhan12@gmail.com, welcome to exchange

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.