Do not take evil for it-it must start #.

Source: Internet
Author: User

Do not take evil for it.

Should we try our best to avoid those hidden dangers?

-- It must start #.


I have to start with my # (for readers who don't understand it. It is said that I was accidentally recommended by csdn since I published that article, so it is doomed to be extraordinary in this article. What is extraordinary? Let me talk about it one by one.

 


After the last article was published, the teacher talked about variable naming during programming that weekend. As a programmer, this should be common sense-it can only be named with letters, numbers, and underscores and cannot be repeated with reserved words. This means that the # in the programming process cannot be used. But can I name the folder?

 


I was taken as a typical example by the teacher in that article, and I also felt confused, because Microsoft's folder in vs2008 also has a folder named. But after the teacher talked to us once, I knew it. Although the teacher has taken me as a typical example, I am afraid that others will not be able to understand it. I will repeat it here.

 


First of all, people who use computers can use "#" to name folders. I wrote a "#" number easily. After I understood the error, my idea was that vs2008 did not properly process the "#" symbol when loading the control you used, however, as far as my knowledge level is concerned, I cannot make factual judgments, so it stops at the conjecture stage. In addition, I did not think this is a drawback of my own work, a very serious defect.

 


Before talking to me, I would like to make a metaphor:

 


If you walk on the road and find a hole in front of you (not small), do you go around or climb directly from the pit. (Note: the depth of the pit is unknown, and there is no way to it) I think you will not be stupid enough to climb from the pit (because life is precious !)

 


If you see a hole in front of it, but it has been covered with several pieces of wood, will you go over it? (As you can imagine, there is no joke about life ...)


But is it mapped to the software?

 

 


The teacher told me this: "Yes, you '#' can be used to name folders, but you know that you cannot use this name during programming! You also know why you can't use it, but why don't you use other names to name the file, using sharp, why can I use any other letter instead of a character that you cannot use during programming.

 

 

If you use this character, there may be no errors, but if you use another letter to name it, will it certainly not? Why not block anything that may cause errors? If you are a banking system, it will be immeasurable to the extent that such a mistake will cause a disaster. Therefore, you must strictly require yourself to eliminate any potential mistakes. Do not be evil !"

 


After the teacher finishes speaking, I suddenly understand that do not take evil for it. This is something you need to pay attention to all the time around you. It's not that you do not make mistakes, but you should try to avoid any chance of making mistakes, that is, you should standardize yourself as much as possible. I think this can be said that I saw an article on the Internet a few days ago about how to standardize software development. In fact, I know this problem, but I am ignoring it.

 


In some cases, you should not think that it is very small. If you do not think that it is very small, you should let it go. Remember!

 


An excellent software is inseparable from a rigorous and standardized development.

 


Do not take evil for it. I think this should be the motto of software developers! Are you right?

 

 

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.