
I'm fairly new to SL and LSL.
This is a long post, but I have a lot I want to say. I hope I won't offend anyone for being too wordy.
I've reading some posts in the scripting forums.
I've seen a lot of really good stuff, by some really talented and good hearted people.
Thanks to those who contribute some really stellar stuff.
I'm not going to name names .. I'm NOT trying to single any particular person or people out.
But, I am on the attack! hehe lol
My intention is not to make anyone mad. But I am sure that I'll more than ruffle a few feathers and
probably make everybody mad at me anyway

These are a few of the various posts I have seen that concern / disturb me:
... If you strip out the comments there's like... 5 lines of code in there ...
... Could you please post it as 5 lines of code without all the comments? ...
... Comment-less version.
... For reasons of brevity, I have removed the comments ...
To all of you who wrote those or similar posts ....
SPANK! SPANK! SLAP! SCRATCH! CLAW! HISS! KICK! SMASH! STOMP! ETC.!
and ... that's just for starters! lol
What are you thinking when you post crap like that?
Duh... The first thing anyone learns in any programming language
(traditional "Hello World" excluded) is how to create comments.
So what does that mean?
Not to be harsh... BUT..., Anyone, even those with dim brains, with little
or no programming experience, can strip comments out of code and repost it.
So what have you accomplished there? Hmmm? Oh... I see. Yes! You, were able to
save the individual who is too PHUCKING ("Could you please post it as 5 lines of
code without all the comments? "

SHAME! SHAME! SHAME! SHAME! SHAME! ON YOU!
Not only do you discredit all of the other really good posters but you
encourage more people to post the same crap that you just did!
When you reply with a version that's stripped of comments you are not only
wasting everyones time, but you are also wasting space on the forum and
providing absolutely no, zero, nada, zip, diddly intellectual gain!
Any moron can strip comments. The only thing you folks are doing is serving
your own self serving purpose! Cause the only people you are edifying is
yourself (gee look at me I have 9 million posts - to bad most of them are
worthless pieces ofshit) and you edify anyone else at your level of LSL programming
skill and above. That's it!
Those of you who are too PHUCKING lazy to take the comments out yourself?
Why not IM the orignal poster to send you a comment-less version. Or else,
get a new life somewhere... maybe you could go to ah .. ummm.... "Third Life"
the avitar-less, speech-less, object-less, script-less, comment-less,
action-less game. You should feel right at home there.
OK... enough ranting and raving
MY UNDERSTADING IS:
THAT THIS IS SUPPOSED TO BE A LEARNING FORUM.
There should not be any reasons or cause for brevity, or anything else that
limits the use of comments in this forum! No one should feel like they bothering
someone if they put too many comments in (cept for the doofuss's that don't like em)
In fact all posts should be bloated with comments and instruction!
Many of you 'experts' seem to forget there are new people coming to SL every day.
Some with no programming experience at all... others having massive amounts
of programming experience .. just not LSL.
So let's just take me for example... I have massive amounts of programming experience
in Assembler (VAX, PC, WE3200), C, Objective C, Pascal, Ada, Fortran, Visual Basic, PHP,
Unix Shell, State Programming, a little Swish Script, some Flash .fla and lots of others)
all of this on various (Apple, Cray, Digital Equipment, Intel/Microsfot, Next, Silicon Graphics,
Sun Solaris, Auxpex and many more) platforms. I've slung a lot of code, probably as much as
any three or four of you folks combined. But that doesn't mean a darn thing when you are just
coming on board to a new development environment. The advantage I do have is I know how to program.
I still have to learn the envrionment, and grasp the subtle nuances of the languange and its
shortcomings and strengths.
Ok, so what does that mean for me? Well for starters, I am brand new to LSL. I understand the
C-like syntax so the decision, looping, function calling/creating, variable declarations
(local , global), etc are not a problem. Casting or using operators is not a problem.
States are not a problem. So many things are familiar yet there is a lot that is
unfamiliar to me. Some things that are not so clear.
The following is a heavily commented example in C with LSL/C++ style comments
CODE
// starting a line with "//" is a comment that will be ignored by the computer
// when it is processing the code or script.
// when this example program is run it will print out "The sum = 6"
// it is an illustration of how to create a global variable, a global function,
// a local variable and use them while processing the code/script.
// most statments end with a ";" semi colon
// some statements don't but we'll explain that if the occasion arises
int sum; // this declares a variable that is an integer
// It is a global variable which means it can
// be used by any function in the entire code / script..
// Another way to say it is that the variable is
// to the entire script or code.
// the reason it is global is because it is
// declared outside of a function. In this
// case it is declared outside of both the add()
// function that will be declared in the next
// programming statement and the main()
// function. Variables that are declared inside
// the { } curly braces of a function are called
// local variables to that particular function.
// Next we create a global function declared as type int.
// This means that the function returns a value that is an integer value.
// In this case the sum of two integer parameters passed to it.
// One parameter is a value assigned to a variable, the other
// parameter is a numeric value that is simply entered.
// This program accepts no external input so all of the
// values are assigned by the programmer.
// we don't put a semi-colon here because the language syntax dictates that when you are
// creating a function you don't use a semi-colon.
// You do however use a semi-colon in most circumstances to call the function.
int add(int a, int b) // declare a function that has to parameter arguments of type int
{ //each function has a beginning brace and an ending brace
return (a+b); // return the sum of the passed variables
}
main() // This is the start of the program.
{
int x; // this declares a Local integer variable x,
// this variable's scope or visibility is limited only to the main() function.
x = 3; // assigns the new value of x to be equal to the number 3.
sum = add(x,3); // the new value of sum will be the result of what
// is returned from the add function
// the add function could have been called
// using just numbers like sum = add(3,4);
// or with just variables. sum = add(num1,num2)
// we use printf to display the value of sum.
// What is enclosed in quotes will be printed out.
// The %d is a place holder for an integer parameter
// The '\n' means that after the value of "sum" is printed start a new line
printf("The sum = %d\n",sum);
}// end of program
The example is heavily commented, but, for someone who knows another language that is
NOT C, or if they are just beginning to program, he/she will have a little more
understanding of what they are looking at.
Here's why I like comments. There are a lot of questions I have that are not explained
very well in the Linden documentation and very rarely to any great extent in the forums.
Just one example... The permissions stuff is a little confusing to me. I was at an SL club
the other day. In order to dance I had to touch some object. I pressed this gadget to
start the dance animation. After I pressed the thing, a blue Yes/No dialog box came up and asked
if I wanted to give permission to dance.
So, how is that different then when I sit on an object that animates me to lie down on a bed.
I never got asked if it could animate me for that. Why is that? How come the bed didn't ask
me if it was ok to lie down?
What about pushing? You don't need permissions to create a gadget that will
push another avatar into the next century lol so for me there's still some confusion.
I understand the basic principle of permissions in that there's a variable that has bits set
(OR'd together) that indicate what permissions are available. But, I have not found any really
good documentation that describes how, why,when these are set when they have to be used or not
be used. I've seen lots of code examples, but very little explaining the WHY.
How do you know when and why and how the permissions are going to work for any given situation?
This is a place where comments would be real helpful when those kinds of functions are being used
to explain not only what but also why. Why sometimes you have to ask for permissions and sometimes
you can just push someone 100m meters if they get too close to a radar/sensor gadget.
I built one of those. (need to put in the code fix so it will quit pushing me. lol)
None of this LSL stuff would be the least bit tricky if the Lindens had a little more code examples
and some better documentation (like the legal ranges that variables can have in their function calls.
Ever look at the llParticleSystem function? It tells you that PSYS_SRC_BURST_SPEED_MAX is a float
and that's it! I like to know what the ranges of the different parameters are. Knowing those, you
almost visualize after a few test runs what you are going to get and what to not use so you don't bomb.
For those of you who wish to continue with the crappy comment-less junk posts that are of little
value to a true learning forum then I suggest you create a comment-less, advanced, privileged,
not-very-enlightening-for-very-many super advanced forum for yourselves.
Then the 2 to 3 of you "super" wizards can get together and post comment-less code to your hearts content.
For those wonderful people who are kind enough to take the time to post examples that are heavily
commented, creating superb informative examples, sharing your expertise for the benefit of all.
I am sure I am not alone whe I say I can't thank you enough. You have my undying respect and gratitude.
Please continue doing as you are doing and for me, I'll say, you can never have enough coments. lol
Oh and please ... completely ignore those worthless (comment-less wonders) who do absolutely
nothing with respect to furthering the scripting craft as a whole. Just tell them if they want
comment-less code go to the comment-less scripting forum.
With all that being said:
Here's my challange to improve the overall quality of this forum.
If you are going to take the time to share some knowledge that you have worked hard to get and feel
good about sharing, then why not post a heavily commented, well crafted, informative post:
- that describes what it is you are doing ,
- why it is done a particluar way ,
- or if it can be done another way,
- and several clear and consise examples that give a step by step approach of
how to implement the code ... A recipe ... something along the lines of:
OK first you create object A and place it so and so
Then you create object B and put this script in it.
Next you start it by ... etc.
- that indicates why, or where you would use what you are illustrating
if it's not obvious.
Teaching is the absolute best form of learning there is. Don't assume that a potential reader knows
anything at all. You really have to know your stuff very deeply in order to explain it to someone that
has little or no understanding of what it is you are tyring to explain.
Don't fall into the trap thinking that if you are explaing something in a kindergarten way that you are
being condesending. The gurus will look past the post if they already understand it or they may find
something new, something they have forgotten within it. The more detail you can put, the more
understandable you make it the better it will be received by all.
Think about what you want to present. The intended audience, if it's advanced say so and go with it.
That does not mean you should put any less comments in it. But imagine how well received your post
would be if you could take a NOOB and explain channels well enough for them to create say three little
balls that communicated with each other and the owner in a tidy package that had all the information
and step by step how to's to pull that off. The hall of fame is just around the corner. lol
Why I feel this is so important? Unfortunately, I only get about 5 to 15 hours of SL play time each week.
Very little of that is devoted to scripting because I am interacting with people (my friends) and
still learning about the SL world. There's a lot to see and do here.
So when I search the forums for some solutions to things that I am working on I really appreciate it
when I find an answer that is clear and understandable so that I don't have to spend hours digging and
searching. It just makes my experience that much more enjoyable in that the few hours I have are quatlity
hours which makes me appreciate the efforts of anyone who takes the time to post all the more.
Years ago I was consumed with programming, it was all I lived for. I couldn't get enough and if I
was in that frame of mind now, I would spend all of my time in SL scripting, but that's not as important
to me as it used to be. So I'm grateful to those who do have the scripting bug and are willing to share.
Soon, I hope to connect some more dots on this LSL and contribute some specific stuff myself.
I'm currently putting together the materials for a beginning non-language specific course for programming,
the concepts of variables, problem solving, structure, iteration, decisions, states, program flow and
logic can be applied to any language including LSL. I hope I can swing enough time and energy to get that project off the ground and finished.
Many regards,
wizzie
