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

#21 AndyEsser   GDNet+   -  Reputation: 394

Posted 30 January 2011 - 04:36 AM

Add a little spice to your headers

#define FASLE (true)


Genius. +1 from me

#22 Aardvajk   Crossbones+   -  Reputation: 11176

Posted 30 January 2011 - 04:44 AM

I always giggle when I have to declare an INITCOMMONCONTROLSEX structure. I love common controls, but I don't really want to initialise sex with them.

#23 owl   Banned   -  Reputation: 376

Posted 30 January 2011 - 05:43 AM

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.

	if (this_shouldnt_be_called_all_the_time);
                dont_do_this_all_the_time();


I like the Walrus best.

#24 irreversible   Crossbones+   -  Reputation: 2322

Posted 30 January 2011 - 06:32 AM

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.


	if (this_shouldnt_be_called_all_the_time);
                dont_do_this_all_the_time();


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

#25 owl   Banned   -  Reputation: 376

Posted 30 January 2011 - 07:01 AM

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.


	if (this_shouldnt_be_called_all_the_time);
                dont_do_this_all_the_time();


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


Apparently not. At least not gcc with ansi compatible warnings enabled.
I like the Walrus best.

#26 swiftcoder   Senior Moderators   -  Reputation: 17460

Posted 30 January 2011 - 08:01 AM

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

The real WTF is that you are using -ansi in 2011. I hope you were using -pedantic -Wall as well?

Tristam MacDonald - Software Engineer @ Amazon - [swiftcoding] [GitHub]


#27 owl   Banned   -  Reputation: 376

Posted 30 January 2011 - 08:05 AM

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

The real WTF is that you are using -ansi in 2011. I hope you were using -pedantic -Wall as well?


I'm not following what's the problem with ansi. I do quite well with it.
I like the Walrus best.

#28 swiftcoder   Senior Moderators   -  Reputation: 17460

Posted 30 January 2011 - 08:11 AM

I'm not following what's the problem with ansi. I do quite well with it.

Given that it was superseded by C99, some 12 years ago., I fell it is a bit like beating a dead horse. Then again, big business managed to do that to COBOL for 20 years, so you are in good company :P

Tristam MacDonald - Software Engineer @ Amazon - [swiftcoding] [GitHub]


#29 owl   Banned   -  Reputation: 376

Posted 30 January 2011 - 08:17 AM

I'm not following what's the problem with ansi. I do quite well with it.

Given that it was superseded by C99, some 12 years ago., I fell it is a bit like beating a dead horse. Then again, big business managed to do that to COBOL for 20 years, so you are in good company :P


heh, you know what. You're right. I'm using just -Wall.Posted Image
I like the Walrus best.

#30 cstony   Members   -  Reputation: 438

Posted 04 February 2011 - 09:15 AM

This pearl catches me out every once in a while.
if(x = y)
{
   .....
}


#31 swiftcoder   Senior Moderators   -  Reputation: 17460

Posted 04 February 2011 - 09:25 AM

This pearl catches me out every once in a while.

if(x = y)
{
   .....
}

You need to turn compiler warnings on. GCC certainly warns about this with -Wall, and I assume every other compiler can too...

Tristam MacDonald - Software Engineer @ Amazon - [swiftcoding] [GitHub]


#32 CJWard   Members   -  Reputation: 147

Posted 04 February 2011 - 02:02 PM

Mispelt Blacksmith with Blackshit yesterday, the keys aren't even near eachother.

#33 senpegasus   Members   -  Reputation: 228

Posted 04 April 2011 - 09:21 AM

You also can find a lot of "pubic" ( ̄▽ ̄)ノ

#34 swiftcoder   Senior Moderators   -  Reputation: 17460

Posted 04 April 2011 - 09:30 AM

You also can find a lot of "pubic" ( ̄▽ ̄)ノ

I am honestly a little worried about all those .sql files which seem to *intentionally* include the word 'pubic'...

Tristam MacDonald - Software Engineer @ Amazon - [swiftcoding] [GitHub]


#35 way2lazy2care   Members   -  Reputation: 782

Posted 04 April 2011 - 10:34 AM

Mispelt Blacksmith with Blackshit yesterday, the keys aren't even near eachother.


racist.

#36 etodd   Members   -  Reputation: 2827

Posted 04 April 2011 - 04:24 PM

posiiton. Every dang time.

#37 Koobazaur   Members   -  Reputation: 785

Posted 05 April 2011 - 04:38 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_SNIPPET

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.


Even in this case, you assume there's only x amount of predefined errors, and those are vague. WS_E_OVERFLOW? Overflow of WHAT?
I much rather prefer the function that generates the error reporting it - in the log! That's what log is for after all. And once there is a (detailed) log entry of what went wrong the designer/coder can look at, returning true/false is good enough. After all, when my gameplay code tries to create a projectile but fails to load its mesh, it really doesn't care if it's because the mesh was not found, or the buffer has overflown.

And when I'm doing a lot of nesting/recursion, I'll just wrap the whole thing in try/catch and just have them throw an exception (with a message), catch it, print it to the log, and then return false or something.

posiiton. Every dang time.


That's why I use "location" :P
Comrade, Listen! The Glorious Commonwealth's first Airship has been compromised! Who is the saboteur? Who can be saved? Uncover what the passengers are hiding and write the grisly conclusion of its final hours in an open-ended, player-driven adventure. Dziekujemy! -- Karaski: What Goes Up...

#38 brx   Members   -  Reputation: 720

Posted 08 April 2011 - 03:42 AM

cosnt instead of const. Can't count how many times I've done this. Yes, highlighting helps here, but I usually do not look, scroll right away or switch files....

#39 fastcall22   Crossbones+   -  Reputation: 8840

Posted 08 April 2011 - 03:45 PM

nirnakuze => normalize
(nira na ku ze => 國家產業復興法納區澤 => "National Industrial Recovery Act is satisfied, Au Chak"?)

My right hand is rebellious and doesn't afraid of Home Row.
gzip: H4sIAAAAAAAEAG1QTUvEMBC991e8nvaiFfYoS7yo sLCo6MnjtJ1ugmkiyWRL/72z3T1YEQIJ8z4zA2Xp yPvt1qBpGrRFIJZkk9FyRyUzHCbKIHgn4hnZOrm1 TD0mG0HCCs+QGDGWziKXI6Wm2n++GYwUVH2mrGEE PnGCVQ8K8+JYfXA6URDEQfMZh5h6g5eoAlWJdeEI bbH2qYZf7XMUfw8f/Q0oMeZYNL9/WHF0uFEshvMr XYujd9SycFb+F18QcSOvlJauZ8ejqevdnV7/d550 e0t6prmunh73Bu+vz4c/XUeOQXfJgvKNkhf95U8/ Dtgmy5IBAAA=




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