Forcing bugs - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Other (
https://sampforum.blast.hk/forumdisplay.php?fid=7)
+--- Forum: Everything and Nothing (
https://sampforum.blast.hk/forumdisplay.php?fid=23)
+--- Thread: Forcing bugs (
/showthread.php?tid=441670)
Forcing bugs -
Face9000 - 03.06.2013
Ok, with this thread i can sound a strange person but...i'm the only one who forces a bug to happen when writing commands or functions just to see if they're written in good way? I remember someone saying "If your code is without bugs, then isn't valid".
I personally force bugs to happen when writing basic admin commands or when coding an anticheat. For anticheat, i add as example, a Ban(playerid); when checking for speedhack after 2/5 warnings (example) instead of reporting them to online admins, just to see at which number of warning it will ban.
Re: Forcing bugs -
playbox12 - 03.06.2013
I'm not really sure what you mean by forcing bugs to happen.
I think you mean debugging, which is good practice. From your example why would you ban the player if you can just send a message.
Re: Forcing bugs -
Face9000 - 03.06.2013
Quote:
Originally Posted by playbox12
I'm not really sure what you mean by forcing bugs to happen.
I think you mean debugging, which is good practice. From your example why would you ban the player if you can just send a message.
|
No, no, i don't mean debugging, but FORCING a bug to happen. (ex: forcing a command to execute in wrong way)
Re: Forcing bugs -
Vince - 03.06.2013
Yeah, I guess. You need to be able to catch every possible exception. Sometimes I even put assert() statements in code that should not - under any circumstances - be reached.