I digress. This post is a simple one. As anyone would, when I came back to BYOND after my short lived hiatus, I looked over all my demos simply curious as to how they looked.
Upon the review, I decided to rework my demo Ease Drop (noting that it should be renamed but wont). I re-scripted the entire system and basically made it completely better.
If memory serves me, this is how the original looked:
mob/verb/Say(t as text)
view(src)<<"[src] says: [t]"
for(var/mob/m in world)
if(m.hearer==1)
m<<"[src] says to view: [t]"
while, the rework looks like this:
mob/verb/say(msg as text)
var/VIEW=view(usr)
VIEW<<"[src] says: [msg]"
adminListeners-VIEW<<"[src] says to view: [msg]"
(I still somewhat wonder if even the new system could be improved upon)
I'm not sure about the rest of BYOND, but over the years my belief has evolved into one where the more loops you have the more times you should be slapped. Of course, not all loops can be avoided. However, if there is a means to do something without a loop, do it.
Now, the Ease Drop demo was one, and now I've reworked another entirely(Button Combos). While there was no major programming practice issues with Button Combos, it did lack quality and was very out-dated (made before BYOND beta, so the script document was used for macros).
I must admit that I'm enjoying the re-creation of old-creations. I'm thinking one day each of the many demos I've created will be re-scripted. However, it took "years" for me to start reworking so who knows?
As for now, I figure the two are a good start. I would like to suggest that everyone on BYOND take a look at any demo/library they've made two years ago or later. If you are anything like me(which you probably aren't), then you have learned much more about the language and good practice, and should apply them to your old releases. It is essential to remember that all new comers and even some who have been here a little use the demos presented to learn the language, and even mimic the techniques.
In closing, I'd like to say that I apologize for the rant. I just felt like making a post ;p.
Or.. that wants to learn through Libraries.