At my previous work and here also, I and coworkers had an internal subject [AskAmit] for sharing shitty code (which we find around or even discover in inherited projects) among us.
This continued in the current company - like for example this one (not exact reproduction, but still) in Java (trully existing code at my present company
) – test if a boolean variable is true or false:
Code:
if (boolean_var.toString.length() == 4) | |
{ | |
// True, do the True actions | |
} | |
else If (boolean_var.toString.length() == 5) | |
{ | |
// False, do the False actions | |
} | |
else | |
{ | |
// Ummm, raise processor fault? | |
} |
The [AskAmit] name was coming from Sun’s JMF (Java Media Foundation) incredible naive line at those times (2002) that made the framework buggy enough (though it was a good concept):
jmf-2_1_1e-scsl-src/src/share/com/sun/media/util/Registry.java
if (file.length() == 0) { // TODO: Ask AMITH if you need this
Seems like [AskAmit] kind-of groups grow everywhere, so it reached to a critical level called GovnoKod (ShittyCode) – highly recommended reading not to step on the shitty paths of programming
Excerpts: - Enjoy!
———————————————————————
Си / Говнокод #1829
Code:
#define TRUE FALSE //Happy debugging >:P |
———————————————————————
Си / Говнокод #1317
Code:
if(true) | |
{ | |
//Code | |
} | |
else | |
{ | |
//Commented, not compiling. ^_^ | |
}; |
———————————————————————
Си / Говнокод #405
Code:
++i--; |
———————————————————————
Assembler / Говнокод #453
Code:
mov ebx, eax | |
mov eax, ebx |
———————————————————————
Assembler / Говнокод #414
Code:
... | |
jmp 0x0437 | |
jmp 0x0437 | |
... |
———————————————————————
A deep dive into brain's curiosities
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
| << < | Current | > >> | ||||
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |