Jump to content

  • Log In with Google      Sign In   
  • Create Account


The GD Coding Typo Dictionary (TM)


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
38 replies to this topic

Poll: The GD Coding Typo Dictionary (TM) (65 member(s) have cast votes)

Which code completion solution are you using?

  1. IDE native (41 votes [63.08%] - View)

    Percentage of vote: 63.08%

  2. VisualAssist (13 votes [20.00%] - View)

    Percentage of vote: 20.00%

  3. Other (3 votes [4.62%] - View)

    Percentage of vote: 4.62%

  4. We don't need no stinking code completion (8 votes [12.31%] - View)

    Percentage of vote: 12.31%

Badgers == win

  1. Yes (41 votes [63.08%] - View)

    Percentage of vote: 63.08%

  2. Yes (24 votes [36.92%] - View)

    Percentage of vote: 36.92%

Vote Guests cannot vote

#1 irreversible   Crossbones+   -  Reputation: 1315

Posted 26 January 2011 - 02:26 PM

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!

Sponsor:

#2 Mike.Popoloski   Crossbones+   -  Reputation: 2899

Posted 26 January 2011 - 02:47 PM

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

#3 szecs   Members   -  Reputation: 2119

Posted 26 January 2011 - 03:06 PM

"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

#4 mind in a box   Members   -  Reputation: 573

Posted 26 January 2011 - 03:51 PM

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"



#5 EricRRichards   Members   -  Reputation: 105

Posted 26 January 2011 - 05:00 PM

"count" often gets typo'd to see you next tuesday...

#6 swiftcoder   Senior Moderators   -  Reputation: 9880

Posted 26 January 2011 - 05:19 PM

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 - Software Engineer @Amazon - [swiftcoding]


#7 irreversible   Crossbones+   -  Reputation: 1315

Posted 26 January 2011 - 06:21 PM

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.

#8 Hodgman   Moderators   -  Reputation: 29672

Posted 26 January 2011 - 10:24 PM

Ahahha, this is fun:
http://www.google.com/codesearch?hl=en&lr=&q=fasle&sbtn=Search

#9 swiftcoder   Senior Moderators   -  Reputation: 9880

Posted 26 January 2011 - 10:27 PM

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...

#10 dragonhawk360   Members   -  Reputation: 126

Posted 26 January 2011 - 11:27 PM


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.

#11 KulSeran   Members   -  Reputation: 2498

Posted 27 January 2011 - 12:11 AM

Also somewhen I spend a few minutes to figure out the difference between DoQuickload() and DoQuickIoad(). And that happened to me only because of......

Looks like someone needs a better font. (after a copy paste to my editor, the difference stood out quite well)

stupid fasle, and
#incldue or was that #inculde ?
maybe i should make a new #defien macro?

#12 szecs   Members   -  Reputation: 2119

Posted 27 January 2011 - 01:13 AM

Hey! I'm starting to think that maybe I AM a programmer. That FASLE thing is a nice hit.

#13 way2lazy2care   Members   -  Reputation: 782

Posted 27 January 2011 - 07:57 AM

I find I type almost flawlessly until I have to type in all caps. Then it just starts getting ridiculous.

#14 mind in a box   Members   -  Reputation: 573

Posted 27 January 2011 - 10:25 AM


Also somewhen I spend a few minutes to figure out the difference between DoQuickload() and DoQuickIoad(). And that happened to me only because of......

Looks like someone needs a better font. (after a copy paste to my editor, the difference stood out quite well)


I thought exactly the same after that happened and switched to another font, so I should be good now ;)

#15 -Datriot-   Members   -  Reputation: 103

Posted 27 January 2011 - 03:09 PM

I don't really make those kind of mistakes often, since I usually know when I've made a typo straight away, and rectify it using backspaces. However, I always seem to write destory instead of destroy. Maybe I should type destroy over and over again until I always get it right.

Oh, and I also refuse to vote in the poll, since that means I have to answer the second question.

#16 swiftcoder   Senior Moderators   -  Reputation: 9880

Posted 27 January 2011 - 03:24 PM

However, I always seem to write destory instead of destroy. Maybe I should type destroy over and over again until I always get it right.

You know how when you say a word over and over again, it starts to sound strange and you get confused about the pronunciation? Same goes for repeatedly typing the same word over and over. By this time tomorrow, you will be typing 'tesrody'...

Tristam MacDonald - Software Engineer @Amazon - [swiftcoding]


#17 leiavoia   Members   -  Reputation: 960

Posted 28 January 2011 - 01:22 AM

I find that if syntax highlighting is on, typos like FASLE don't properly highlight and it tips me off pretty quick that something is wrong.

#18 szecs   Members   -  Reputation: 2119

Posted 28 January 2011 - 03:32 AM

FALSE is a define, not a keyword (at least in C). So it's not highlighted.

#19 Noggs   Members   -  Reputation: 141

Posted 28 January 2011 - 10:31 PM

Add a little spice to your headers

#define FASLE (true)


#20 Hollower   Members   -  Reputation: 672

Posted 30 January 2011 - 02:31 AM

for the Python folks: what is it about those 4 keys




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS