Er, that's what I get for posting when tired... that wasn't quite the right example, it does need to be a two condition check (which can be a wtf I suppose).
robelsner
@robelsner
Best posts made by robelsner
Latest posts made by robelsner
-
RE: My ASSERT is better than your ASSERT!
-
RE: My ASSERT is better than your ASSERT!
Finally... You get a bigger e-penis for figuring out the RealWTF. The fact that if you don't enclose your macro for checking, the ! operator is added to the first portion only.
ASSERT(x==y) -> if (!x == y)
or a lot of code (and what I do)
ASSERT(0 == someArgument);
in this case becomes !0 == someArgument
-
RE: My ASSERT is better than your ASSERT!
@shepd said:
That might be too specific. I can only think of one situation where this would be true: Echostar based boxes (can't remember the name of the OS on those things... ARGH!), since the same OS has
-
My ASSERT is better than your ASSERT!
Found in some code:
<font size="2" face="Arial">#define ASSERT(x) if (!x) { printf("Dipshit! <%s:%d>\n", __FILE__, __LINE__); exit(0); }</font>
EDIT: I guess I can elaborate a little bit... this code is used on millions of consumer level devices for satellite TV.
-
RE: Where to learn coding quality and best-practices
@stratos said:
For personal projects i don't bother with revision control, <snip>
Seriously? I'm sorry to hear that. If you practice good version control at home, it will naturally extend to your workplace, and then you will avoid any "oops" moments.
-
RE: Bad words
Nothing is better than Sarah Palin in a kitchen with Dave's voice saying "I will stab you in your va jay jay"
-
Don't maximize your browser!
I was curious what the parcel browser via map function did in my county. But when I first opened the page (in FireFox) it failed with "Parcel not found; detail map cannot be generated. Please click on the LAST VIEW button to redisplay map" ... immediately after I opened the link.
Assuming that the site was not FF capable, I opened up IE6 (which opens by default non-maximized) and the URL worked fine. When I clicked maximize, it breaks.
WTF?