View Single Post
08-18-08, 08:00 PM   #11
kerrang
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Oct 2006
Posts: 109
It's returning nil tho - which is FALSE - and I still think that makes no sense - it's a RANGE TEST - it WON'T FAIL.

All I can really take from this is that you people are extremely forgiving of what, in commercial IT, would be code of a quality which would get you sacked - which I guess is commendable, but I'm way too old and wizened for **** like this

I'm no 'net nerd' who criticises people's coding style - believes there are right and wrong ways to write things and that it's my job to educate everyone on this issue - quite the opposite in fact, I find such people intensely irritating.

An API, however, is supposed to offer a consistent and logical interface to your engine/system/whatever - there are some fairly "set in stone" rules about how you create and maintain APIs to ensure you don't break existing code - and there are some common sense rules when you're designing functions like this to avoid people having to guess that seemingly 'true' situations will, in fact, return false because they didn't use one of 20 other functions first.

I have this vision - at this point - of a bunch of bearded hippy types in an office strewn with action figures and Boris Vallejo 'art' - one of them is yelling "Why the hell does IsSpellInRange failing for Lightning Shield" - to which some guy in glasses hidden behind 4 monitors in the far corner intones "because you're testing an obviously self-casting spell which has no range".

At this point, were I the questioner - I'd throw said action figures at the "API Nerd" until he begged me to stop - and then I'd sabotage his chair - and set his litter bin on fire - and spraypaint his glasses and so on and so on...