When I program, I try to program the very best I can, and make sure to fix any problems before they every happen.
What exactly do you mean by programming "Robustly"?
I believe that it generally refers to writing code that is as "sturdy" as possible by using the best programming practices... Not necessarily fixing problems, but programming from the ground up in a way that will not allow any to even arise...
An example is with the usr "debate"... Yes, usr will work in many cases, and if one is lucky, one could get away with using it, and never seeing any problems... However, it is not 100% foolproof, and there are better alternatives, so one's code would be more robust without it...
Actualy, it is common that the 'robust' code ends up with the useless statements that do currently unessecary safety checks, but of course not always with if statements.
Those are examples of brittle code, not robust. Although "useless if() statements" probably doesn't belong in that list. And goto does have rare uses, so that should really be rephrased.
The usr thing is actually something not to be avoided, but to be understood. It has to be used sometimes, like in verbs, but should be stayed away from if you don't know what you want it to do.
The usr thing is actually something not to be avoided, but to be understood. It has to be used sometimes, like in verbs, but should be stayed away from if you don't know what you want it to do.
Verbs don't necessarily need usr; if you're using set src, then you actually do need it, but oftentimes even then the best use of it is simply to pass it along to a proc that doesn't directly use usr. But otherwise, src is going to equal usr anyhow, and src is much more predictable (although it's still often a good idea to move your actual functionality to a proc that can be called on anything, and just use the verb to call the proc with src).
The usr thing is actually something not to be avoided, but to be understood. It has to be used sometimes, like in verbs, but should be stayed away from if you don't know what you want it to do.
Putting usr in a verb is not usr abuse; it belongs there. Likewise there's no problem with putting it in certain pseudo-verbs like atom/Click() or mob/Stat(). Putting usr in a regular proc is usr abuse.
I personally mostly use src everywhere unless the specific function need usr, like in atom/Click() (which I rarely use because of client/Click() =P). I do this generally because verbs are just procs which are called by clicking/typing the verb. I also generally don't use that <code>set src</code> settings in verbs because I prefer interacting with stuff from the mob class and the object class being the argument rather than vice versa.
Robust code = Code that won't just fall apart and give you odd bugs if you screw up a proc call or something like that, but fails predictably and in a way that makes tracing those screw ups easy. Generally modular, and generally suffers from far less Heisenbugs then code that isn't robust.
Heisenbug = A bug that you can't seem to reproduce, and that turns up randomly for no aparrent reason.
Robust code = Code that won't just fall apart and give you odd bugs if you screw up a proc call or something like that, but fails predictably and in a way that makes tracing those screw ups easy. Generally modular, and generally suffers from far less Heisenbugs then code that isn't robust.
Heisenbug = A bug that you can't seem to reproduce, and that turns up randomly for no aparrent reason.
Robust code also suffers less Hindenbugs. Oh the humanity!
What about objects and turfs with verbs attached to them? For something to happen to the player, or to display data to the player, you need to use usr because src is the atom containing the verb.