About AskAmit

About AskAmit

10/06/09 | by zveriu | Categories: In real life, Software, AskAmit

About AskAmit

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 :D) – 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. ^_^
};

Способ комментирования… O_o

———————————————————————

Си / Говнокод #405

Code:

++i--;

Операция “подергивание”

———————————————————————

Assembler / Говнокод #453

Code:

mov ebx, eax
mov eax, ebx

Такое борландовский кодогенератор иногда выдаёт

———————————————————————

Assembler / Говнокод #414

Code:

...
jmp 0x0437
jmp 0x0437
...

На всякий случай, наверное если первый не сработает :)

———————————————————————

1 commentPermalink

Comments, Pingbacks:

Comment from: samuel sapp [Visitor] Email
This information is very useful for me .thank you!
PermalinkPermalink 01/10/10 @ 23:07

Leave a comment:

Your email address will not be displayed on this site.
Your URL will be displayed.

Allowed XHTML tags: <p, ul, ol, li, dl, dt, dd, address, blockquote, ins, del, span, bdo, br, em, strong, dfn, code, samp, kdb, var, cite, abbr, acronym, q, sub, sup, tt, i, b, big, small>
(Line breaks become <br />)
(Set cookies for name, email and url)
(Allow users to contact you through a message form (your email will NOT be displayed.))
This is a captcha-picture. It is used to prevent mass-access by robots.
Please enter the characters from the image above. (case insensitive)

Ads

Cognitive and Scientific Brainology

A deep dive into brain's curiosities

May 2013
Sun Mon Tue Wed Thu Fri Sat
 << <   > >>
      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  

Categories

Misc

XML Feeds

What is RSS?

powered by b2evolution free blog software