• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
irreversible

The GD Coding Typo Dictionary (TM)


38 posts in this topic

Let's admit it, we all make them. However, some are more amusing than others.

For instance, I keep typing [i]bugger [/i]instead of [i]buffer[/i]. and [i]PoopState[/i] instead of [i]PopState[/i]. Also, I rather often type in an entirely unrelated and wrong word - for instance, last night I wrote [b]lever[/b] instead of [b]class[/b]. A while back I remember I was speed-coding and bleeding typos like a dyslexic Eskimo and I misspelt [i]random [/i]as something like [i]rdnadmod[/i]. 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, [i]because it just seems so right when you're coding like a mofo[/i].

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!
0

Share this post


Link to post
Share on other sites
"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
1

Share this post


Link to post
Share on other sites
[quote]Anyway: FASLE [/quote]

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......
[quote]"instead of trying to unmangle it one letter at a time, using cut and paste for single letters"[/quote]
0

Share this post


Link to post
Share on other sites
[quote name='mind in a box' timestamp='1296078689' post='4765294']
[quote]Anyway: FASLE[/quote]
Fasle, all the time, GODDAM FASLE![/quote]
I had the honour to peek into a legacy codebase recently:

[code]#define FALSE (unsigned)-1
#define FASLE (unsigned)-1
#define AFLSE (unsigned)-1
#define FLASE (unsigned)-1
#define FALES (unsigned)-1[/code]
And yes, there were matching definitions for true. Sadly, the permutations of FILE_NOT_FOUND were nowhere to be seen...
0

Share this post


Link to post
Share on other sites
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:

[code]
#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",
};
[/code]

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

Share this post


Link to post
Share on other sites
[quote name='Hodgman' timestamp='1296102254' post='4765446']
Ahahha, this is fun: [url="http://www.google.com/codesearch?hl=en&lr=&q=fasle&sbtn=Search"]http://www.google.co...sle&sbtn=Search[/url][/quote]
I would be less worried if several of those weren't in the Android kernel drivers...
1

Share this post


Link to post
Share on other sites
[quote name='swiftcoder' timestamp='1296102428' post='4765447']
[quote name='Hodgman' timestamp='1296102254' post='4765446']
Ahahha, this is fun: [url="http://www.google.com/codesearch?hl=en&lr=&q=fasle&sbtn=Search"]http://www.google.co...sle&sbtn=Search[/url][/quote]
I would be less worried if several of those weren't in the Android kernel drivers...
[/quote]

That was pretty... scary.
0

Share this post


Link to post
Share on other sites
[quote name='mind in a box' timestamp='1296078689' post='4765294']
Also somewhen I spend a few minutes to figure out the difference between DoQuickload() and DoQuickIoad(). And that happened to me only because of......
[/quote]
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?
0

Share this post


Link to post
Share on other sites
[quote name='KulSeran' timestamp='1296108663' post='4765474']
[quote name='mind in a box' timestamp='1296078689' post='4765294']
Also somewhen I spend a few minutes to figure out the difference between DoQuickload() and DoQuickIoad(). And that happened to me only because of......
[/quote]
Looks like someone needs a better font. (after a copy paste to my editor, the difference stood out quite well)
[/quote]

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

Share this post


Link to post
Share on other sites
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.
1

Share this post


Link to post
Share on other sites
[quote name='-Datriot-' timestamp='1296162564' post='4765842']
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.[/quote]
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'...
0

Share this post


Link to post
Share on other sites
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.
0

Share this post


Link to post
Share on other sites
for the Python folks: [url="http://www.google.com/codesearch?hl=en&lr=&q=%5B%5E%5Cw%5Dsefl%7Cslef%5B%5E%5Cw%5D+lang%3Apython&sbtn=Search"]what is it about those 4 keys[/url]
0

Share this post


Link to post
Share on other sites
[quote name='Noggs' timestamp='1296275512' post='4766497']
Add a little spice to your headers

[code]#define FASLE (true)[/code]
[/quote]

Genius. +1 from me
0

Share this post


Link to post
Share on other sites
I always giggle when I have to declare an [url="http://msdn.microsoft.com/en-us/library/bb775507(VS.85).aspx"]INITCOMMONCONTROLSEX[/url] structure. I love common controls, but I don't really want to initialise sex with them.
0

Share this post


Link to post
Share on other sites
I've been the entire last hour looking for this bug. To make it worst finding it didn't solve the problem cause it happened that I copy-pasted the if clause in several places that I also had to modify once I realized my stupidity.
[code]

if (this_shouldnt_be_called_all_the_time);
dont_do_this_all_the_time();

[/code]
0

Share this post


Link to post
Share on other sites
[quote name='owl' timestamp='1296387835' post='4766982']
I've been the entire last hour looking for this bug. To make it worst finding it didn't solve the problem cause it happened that I copy-pasted the if clause in several places that I also had to modify once I realized my stupidity.
[code]

if (this_shouldnt_be_called_all_the_time);
dont_do_this_all_the_time();

[/code]
[/quote]

Shouldn't the compiler pop a warning on something like this? Eg, "C7273 - Hey, silly - you didn't REALLY mean that semi, didya?"
0

Share this post


Link to post
Share on other sites
[quote name='irreversible' timestamp='1296390735' post='4766988']
[quote name='owl' timestamp='1296387835' post='4766982']
I've been the entire last hour looking for this bug. To make it worst finding it didn't solve the problem cause it happened that I copy-pasted the if clause in several places that I also had to modify once I realized my stupidity.
[code]

if (this_shouldnt_be_called_all_the_time);
dont_do_this_all_the_time();

[/code]
[/quote]

Shouldn't the compiler pop a warning on something like this? Eg, "C7273 - Hey, silly - you didn't REALLY mean that semi, didya?"
[/quote]

Apparently not. At least not gcc with ansi compatible warnings enabled.
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0