程序员在吐槽程序时,通常会采用一些幽默、自嘲或者创意的方式来表达他们的不满或者无奈。以下是一些程序员吐槽程序的做法:
在注释里优雅地吐槽
对待女孩子:
```c
// So sorry, I only fix computers for my girlfriend. If she asks you to fix it again, you can elegantly invite her to dinner~
```
对待男性:
```c
// Hahaha, just kidding!
// 1. "Sorry, I've never used WINDOWS."
// 2. Tell them you're a programmer, not a tech support: "I only know 0s and 1s, I'm not a network admin! I can fix exceptions, not errors, and I definitely can't fix a 404!"
// 3. "I can't." – If the problem is too difficult or you really can't think of a solution quickly (like driver issues), you can say, "Why can't I? I didn't graduate from Blue翔!"
// 4. "I'm too busy these days." – A handy excuse for rejecting any request.
// 5. "Try looking up the problem online first. You can try to see if there's a similar issue." – To refuse handouts, you'll become a private售后.
// 6. "Give me the contact info of someone else who can fix it." – Dump the mess on someone else, I don't care!
// 7. "Hardware issues should go to after-sales." – Because hardware is not my problem.
通过代码注释和命名:
- 搞笑的注释:
```
// I'm a Java programmer with 5 years of experience, now a online education instructor.
// I founded a study group of 2000 people learning Java, and I stream daily on the group.
```
- 有创意的拼写错误:
```
// SetPintleOpening, SetPintalClosing (instead of SetPivotOpening, SetPivotClosing)
```
- 抽象和缩写:
```
// ProcessData, DoIt, GetData (抽象到跟什么都没说一样)
// WTF, RTFSC (using拼音缩写)
```
- 随机大写字母:
```
// gEtnuMbER.. (instead of something meaningful)
```
- 重用命名:
```
// Using the same variable name in nested blocks can be effective.
```
- 使用重音字母:
```
// int ínt (instead of int)
```
- 使用下划线:
```
// Using underscores in variable names.
```
- 使用不同的语言:
```
// Mixing English, German, or Chinese Pinyin in variable names.
```
- 使用字符命名:
```
// Using symbols like slash, asterix, comma in variable names.
```
- 使用无关的单词:
```
// Using unrelated words like god, superman, iloveu in variable names.
```
- 混淆l和1:
```
// Intentionally confusing l (el) and 1 (one).
```
- 伪装欺诈:
```
// For example, mixing code with comments to make it harder to read.
// for(j=0; j
// total += array[j+0];
// total += array[j+1];
// total += array[j+2];
// /* Main body of total += array[j+3];
// * loop is unrolled
// * total += array[j+4];
// * for greater speed.
// */