The GD Coding Typo Dictionary (TM)

Started by
37 comments, last by fastcall22 13 years ago
Let's admit it, we all make them. However, some are more amusing than others.

For instance, I keep typing bugger instead of buffer. and PoopState instead of PopState. Also, I rather often type in an entirely unrelated and wrong word - for instance, last night I wrote lever instead of class. A while back I remember I was speed-coding and bleeding typos like a dyslexic Eskimo and I misspelt random as something like rdnadmod. The hardest part when something like that happens is winning that inner struggle and making the correct choice of deleting the entire word and re-typing it instead of trying to unmangle it one letter at a time, using cut and paste for single letters, because it just seems so right when you're coding like a mofo.

I love typos - it's always great to see the compiler pop up a warning that VK_SHIFT is spelt with an f.

Now share your golden puppies!
Advertisement
I very rarely make typos when I code, so I don't have any that spring to mind. Typing existing member names only requires a few keystrokes before IntelliSense kicks in. Additionally, I can't code so fast that I outpace my brain; usually the code I'm writing takes some thought and isn't blindly hacking away like you're some sort of glorified scribe or secretary on crack. Furthermore, mistyping a character causes an immediate backspace and continuation, and if I happen to mess up more than one letter a Ctrl+Backspace deletes the word and I just retype it again.

On a tangential note, your poll demonstrates quite aptly why polls in technical forums are not only pointless but downright annoying in the extreme.
Mike Popoloski | Journal | SlimDX
"instead of trying to unmangle it one letter at a time, using cut and paste for single letters"

:D


Anyway: FASLE

EDIT: that smiley is a gay
Anyway: FASLE

Fasle, all the time, GODDAM FASLE!

Also somewhen I spend a few minutes to figure out the difference between DoQuickload() and DoQuickIoad(). And that happened to me only because of......
"instead of trying to unmangle it one letter at a time, using cut and paste for single letters"
"count" often gets typo'd to see you next tuesday...

Anyway: FASLE

Fasle, all the time, GODDAM FASLE!
I had the honour to peek into a legacy codebase recently:

#define FALSE (unsigned)-1
#define FASLE (unsigned)-1
#define AFLSE (unsigned)-1
#define FLASE (unsigned)-1
#define FALES (unsigned)-1

And yes, there were matching definitions for true. Sadly, the permutations of FILE_NOT_FOUND were nowhere to be seen...

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

I used to get the false thing a lot until I realized it's such a stupid return value (and yes, in my experience return values are the primary source of falsehood) and set up my own return value framework, which looks something like this:


#define WS_E_NOERROR 0x0
#define WS_E_UNKNOWN_ERROR 0x1
#define WS_E_UNDEFINED_ERROR 0x2
#define WS_E_NO_OBJECT 0x3
#define WS_E_INVALIDSTATE 0x4
#define WS_E_UNDERFLOW 0x5
#define WS_E_OVERFLOW 0x6
#define WS_E_NOTIMPLEMENTED 0x7
#define WS_E_INVALIDARGUMENT 0x8
#define WS_E_INDEXOUTOFBOUNDS 0x9
#define WS_E_INSUFFICIENTMEMORY 0xa
#define WS_E_INVALIDCERTIFICATE 0xb
#define WS_E_INVALIDTYPE 0xc
#define WS_E_NOTSUPPORTED 0xd
#define WS_E_UNAVAILABLE 0xe
#define WS_E_INVALIDVERSION 0xf
#define WS_E_INTERNALERROR 0x10
#define WS_E_INVALIDOBJECT 0x11
#define WS_E_FILENOTFOUND 0x12
#define WS_E_UNRECOGNIZEDFORMAT 0x13
#define WS_E_INVALIDFORMAT 0x14
#define WS_E_DISKERROR 0x15

#define WS_E_NULL 0x16

static const wchar_t* WSEString[] = {
L"No error",
L"Unknown error",
L"Undefined error",
L"No object",
L"Invalid state",
L"Underflow",
L"Overflow",
L"Not implemented",
L"Invalid argument",
L"Index out of bounds",
L"Insufficient memory",
L"Null error",
L"Invalid type",
L"Not supported",
L"Unavailable",
L"Invalid version"
L"Internal error",
L"Invalid object",
L"File not found",
L"Format not recognized",
L"Invalid format",
L"Disk or I/O error",
};


Returning false is like walking out on a date smiling like a clown - it gives pretty much to zero feedback. On the other hand, each time I type in "WS" or "WS_" autocomplete alerady knows I probably mean WS_E_NOERROR and I won't need to feel sorry about it having to suggest a five-letter word a baby could spell (and I couldn't) over a 15-letter monstrosity with underscores.
Ahahha, this is fun:
http://www.google.com/codesearch?hl=en&lr=&q=fasle&sbtn=Search

Ahahha, this is fun: http://www.google.co...sle&sbtn=Search

I would be less worried if several of those weren't in the Android kernel drivers...

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]


'Hodgman' said:

Ahahha, this is fun: http://www.google.co…sle&sbtn=Search

I would be less worried if several of those weren't in the Android kernel drivers…


That was pretty... scary.

This topic is closed to new replies.

Advertisement