6 strange little habits unique to programmers

  
My friend is a programmer, in the usual spare time, like to develop some small things. I live with him, so I can often find some of his strange little habits. If you are also a programmer, or you are studying computer related majors, then you should be able to understand how these strange little habits are raised. Into, or you have some of these habits. The following are some weird little habits unique to Xiaobian programmers: 0. The number of programmers will start from 0. For example: When the programmer quarrels, he will say: “ I count three times, you will not shut up, I will You are welcome! Zero! One! Two!” Or the list number will start from 0. Because: array[0] is the first element of the array. Comment: The development of this habit is a tough The process. How many times the cross-border, how many times the number of loops error makes us deeply remember to start from 0. 1. The programmer answers the selective question with affirmation and negative. Example: Ask “ Do you want to drink coffee or drink? Tea?& rdquo; Programmer Answer: & ldquo; um. & rdquo; Because: When conditions or | | If there is a clause whose value is true, then the whole statement is true. Comment: This habit is exaggerated, but it is indeed a common problem of the programmer's way of thinking, using computer processing logic to deal with human problems. Of course, such an answer is obviously present. Programming is wrong, because he incorrectly returned a Boolean value for this problem. Although highly suspected that no one cares about the outcome of this answer, give an answer. If it is really in the world of the program, the waiter will Give priority to giving you coffee. If there is no coffee, you will end up with tea. 2. Programmers generally have or have had a semicolon-end syndrome; for example: these lines; because: most programs, especially Most programmers' enlightenment programming language C language is terminated with a semicolon; Comment: It is customary to end with a semicolon before the line break. This is a programmer's exclusive bad habit. Remember that the last reason for compiling the newspaper is always the same. Less of that little ";" & rdquo;? This is the cause of this bad habit. It is said that the end of the semicolon is allusion, because the semicolon on the keyboard is exactly in the position of the right thumb. The number has a unique geographical advantage. Of course, there are programming languages ​​that do not need the end of the semicolon (such as Ruby and Python), just used it will be particularly entangled because there is no semicolon ending. 3. Programmer's "language" The concept is different from ordinary people. Example: Q: "What languages ​​do you have?" Ordinary people: "I will speak Chinese and English, and a little French." Programmer: “ I will C language, C++ and Java, there will be a little bit of Ruby. & rdquo; Because: There is no native language or foreign language in the world of programmers, only programming languages. Comment: Seriously, the grammar of programming languages ​​is easier than foreign languages. Programs written in a language, how many programs you can understand. Program languages ​​have no national boundaries, and are the best bridge for programmers from all over the world. 4. Programmers think that thousands (k) == 1024. Example: Programmer Conversion Table : 1km == 1024m, 1kg == 1024g. Because: The cause is very twisted, the computer is a binary world -> 1024 is 2 to the 10th power -> English is used to mean the word kilo - kilo translation into Chinese ”千”, such as kilometers, kilograms. Comments: Maybe in general Will think that 500, 1000 is a very whole number, but programmers will think that 512, 1024 is a very whole number. Don't be surprised, if 128, 256, 512 this form looks not enough, help you convert to binary: 10000000, 100000000, 1000000000…5. Programmer used == to indicate equality. Example: See 5. Cause: In the programming language, “=” is an assignment, “==” is used to determine whether the two are Equal. Comment: The difference between single and double is the required course for the program, and it is also the test point for the teacher to test. If you write a single in the judgment condition of the C language if statement, the compiler can pass, but the result is often wrong, enough A newbie has been checking for a while. Of course, most of the current languages ​​take this into account, preventing such mis-writing, but the differences between single and double have been deepened into the hearts of every programmer. 6. Programmer use ” //”Represents”Please ignore this line of text&. . Example: Restaurant. Programmer A: “ I eat fish-flavored rice with rice, what do you eat?"Programmer B: “Kung Pao Chicken Ding Guyai.& rdquo; Programmer A wrote in the menu: Fish-flavored pork rice rice 1 Palace chicken cover 1 programmer B: “ I still want beef noodles! & rdquo; programmer A correction menu: fish-flavored pork rice 1 //Kung Pao chicken rice bowl 1 beef noodle 1 due to: used in the program ” //” Add a comment to the code, the program will ignore the code line at the beginning of the program run. Comment: If you are left out with a group of programmers, you can complain about it & nbsp; Are you commented out? & rdquo; I believe that programmers who have always been known for their sense of humor and love will pay attention to you. This is a group of people who will be eager to grab the keyboard if you are slow to use the computer. Using a variety of shortcuts, if they see the mess in the hotel's computer, they immediately clean up, they will tell the children that the three primary colors of the computer are red, green and blue instead of red, yellow and blue. They describe the size and distance. I prefer to use the pixel as a unit. I want to watch a movie with my girlfriend and see the sparse people in the movie theater. I want to do defragmentation & hellip; this is not their cuteness! This article comes from [System Home] Www.xp85.com
Copyright © Windows knowledge All Rights Reserved