agnostic software design - Printable Version +- Xonotic Forums (https://forums.xonotic.org) +-- Forum: Community (https://forums.xonotic.org/forumdisplay.php?fid=6) +--- Forum: Off Topic (https://forums.xonotic.org/forumdisplay.php?fid=15) +--- Thread: agnostic software design (/showthread.php?tid=4088) |
agnostic software design - tZork - 04-22-2013 yes, no, good, bad? what's your take on it. RE: agnostic software design - machine! - 04-23-2013 It's not on Wikipedia, what is it? :x RE: agnostic software design - zykure - 04-23-2013 tZork probably means something like this, for software obviously: http://searchconsumerization.techtarget.com/definition/device-agnostic-device-agnosticism Hey tZork, is this supposed to be a riddle or something? RE: agnostic software design - tZork - 04-23-2013 i thought the term would be self explanatory enough, oh well and no, no riddle. agnostic means (more or less) "without knowledge". the idea being to write code as general as possible - as if you had no idea what a particular subroutine or module would be used for. many do this to a lesser extent already with things like libraries and other "reusable" code. this concept would take it (large) step further. It may seem like a strange and stupid idea at first, but consider this: a agnostic approach to implementing, say a health pickup in xonotic, would not only support health pickups, but rather a very large range of game items. so while each piece of code is a more lengthy ordeal, it's also much more likely to be able to handle far more than the original requirement thus reducing the overall complexity and size of a codebase while giving it greater ability. well thats the theory anyway RE: agnostic software design - machine! - 04-23-2013 Okey, so is C agnostic, since it's not platform dependent, or is that another thing? And also, your example with Health pickup seems strange, why not implement simply a pickup system into the codebase, then adding items that can be picked up using that system, and then adding Health, or is it what you meant? RE: agnostic software design - Mr. Bougo - 04-23-2013 C is not inherently platform independant. You can't just take something coded in C and compile it for another platform and expect it to work. RE: agnostic software design - frostwyrm333 - 04-23-2013 AFAIK, this is ancient problem in computing, you can't have performance, instant portability, compatibility all in one. I guess that python, java, web stuff and flash is something like that. RE: agnostic software design - machine! - 04-23-2013 (04-23-2013, 04:27 PM)Mr. Bougo Wrote: C is not inherently platform independant. You can't just take something coded in C and compile it for another platform and expect it to work. Of course not, I meant in a broader sense. C can theoratically compile on any platform, even though in practice there will also be code to do for the other OS syscall and maybe port over libraries etc. RE: agnostic software design - tZork - 04-23-2013 (04-23-2013, 08:43 AM)machine! Wrote: Okey, so is C agnostic, since it's not platform dependent, or is that another thing?Completely unrelated, and theres such thing as a platform independent language (even if sun is doing their best to lie abt that ; ) Platform agnosticism it about running any random code on as many devices as possible. Agnostic software design is a programming philosophy. (04-23-2013, 08:43 AM)machine! Wrote: And also, your example with Health pickup seems strange, why not implement simply a pickup system into the codebase, then adding items that can be picked up using that system, and then adding Health, or is it what you meant? I should perhaps have made up a example not so close to xonotic.. anyway, the reason would be that, with the traditional approach you would likely be looking at one function per item. thats fine for a few health pickups, a few guns etc. now add a few more pickups. suddenly you have to for some reason change how the pickups spawn. unfortunately that was not until there was another 500 of them added, quite a few with a snag or awkward code branching of one form or another that makes automizing the code change very precarious at best. With a agnostic design there is one at least few functions/modules handling all items making any change to that subsystem a less painful ordeal. obviously writing it to begin with gets far more painful, and in this case would likely mean making it data driven by sth like reading entities.def to figure out what's what and how its supposed to work. The "true agnostic program" would be capable of anything in one function with the programmer never having a clue what it would be used for.. that may take awhile to work out though Personally i never seen any code written this way, sure i've read and written some fairly generalized code now and then but nothing at that level. I'm curious if anyone here has and if so, did it work out or it is just a pipedream? Like merlijn likes to say "assumptions is the mother of all screw ups" code that assumes as little as possible should ergo be less screw-up-o-genic.. maybe RE: agnostic software design - hutty - 05-02-2013 im not a super experienced programmer or something .... but from what I found is there has to be a balance ... having code that is too agnostic is confusing ... but having code that is too specific is cluttered .... where that balancing point is ... im not sure |