Difference between revisions of "SL Cert - Basic Scripting"

From Second Life Wiki
Jump to navigation Jump to search
(Reformatted most of the document.)
Line 4: Line 4:
==Overview==
==Overview==


Criteria required for persons to become certified in basic scripting.
This list of requirements is part of the [[SL Certification | Second Life Certification]] project. It is an effort to create a list of specific skills  required for persons to become certified in basic scripting.


==Audience==
==Audience==
Line 16: Line 16:
==Criteria for testing to basic level==
==Criteria for testing to basic level==


'''Rationale for scripting''' Demonstrate an understanding of what scripts are, their limitations and why they are used in second life.
In the basic skill sets a person should demonstrate a mastery of common programming tasks. The following categories provide the basic categories.


'''Script creation''' Show ability to create scripts in both primitives and inventory. Be able to transfer one to the other, set them to running or not and set relevant permissions for them.
=== Broad Overview and Most Basic Skills  ===


'''Commenting and Clarity''' Understand the benefits of keeping code legible, using the same style of writing throughout and commenting code where necessary.
* Rationale for scripting
* Script creation
* Commenting and Clarity  
* Mono vs. LSL2


'''Variables, Types and Constants''' Be able to recognise differant types of variable and how they can be used to store different types of information. Understand that constants are in essence a "fixed" variable.
A person should provide a basic understanding of the potential and the limitations of scripts. The person should be able to demonstrate how to create a script both within an object rezzed in world or in their inventory. The person should  know the difference between mono and LSL2 and the implications when a script is created within inventory as opposed to an object's inventory. A person should demonstrate a basic understanding of the construction of structured code and consistent commenting style.


'''Functions and Parameters''' Recognise functions from their 'll' format and be able to explain why there is a necessity for so many different functions. Understand what a parameter is and why some functions do not need them yet still require brackets.


'''States''' Understand what a state is and be able to explain why the default state is compulsory. Recognise that a script program essentially has no ending.
=== Data Types ===


'''Events''' Understand what events are and how they can be used to capture input. Demonstrate this by scripting an object that says "I was clicked by (avatars name)" in public chat when touched.
* Types
* Operators
* Global vs. Local Variables
* Typecasting


'''Global and Local Variables''' Recognise the difference between the two and why using a naming system can be helpful to avoid confusion as script complexity grows.


'''Typecasting''' Understand the need to be able to convert one variable type into another by typecasting.


'''Operators''' Understand how these can be used to manipulate variables and demonstrate this by creating an object that displays the number of times it has been touched in public chat.
A person should be able to identify the basic data types, integer, float, string, key, list, vector and rotation. The person should know the basic operations and what they mean in context. For example, division with integers is different compared to division with floats. The person should understand that some operations are overloaded and have different meanings when combined with different types. For example, if v1 and v2 are vectors then v1*v2 is the dot product, but if v1 is a vector and r is a rotation then v1*r will rotate the vector.  


'''Conditionals''' Show an understanding of the if(condition) and use this understanding to create an object that counts the number of times it has been touched by its owner and display this information in public chat.
The person should demonstrate the concept of the "scope" of a variable. There is a difference if it is defined outside of an event or function. Also, the person should demonstrate an understanding that a global variable can be ignored if it is also defined locally.
 
Finally, the person should demonstrate how to "convert" one variable into another and what happens. For example, a float is trunctated when cast as an integer.
 
 
=== Control Structures ===
 
* Loop Constructs
* Conditionals  
 
 
A person should demonstrate an understanding of the different looping constructs using for, while, and do-whole loops and understand when one loop construct might be favored over another in a given context. The person should also demonstrate an understanding of the "if" statement and be able to use compound if statements.
 
 
=== Events and Functions ===
 
* Events
* Functions
* States
 
 
A person should demonstrate the basic idea of an event and how a script might react in various circumstances. For example, the person should have a basic understanding of the three touch events and how they differ. At the basic level the broad categories of events that should be mastered include collision, touch, land collision, state entry/exit, timer, and attach events.
 
The person should demonstrate an understanding of the use and creation of their own functions. This includes understanding the difference between null functions and functions that return a specific data type. The person should know the difference between a user defined function and the set of functions available within the build in library.
 
Finally, the person should demonstrate an understanding of the use of states. They should understand the default state, how to define new states, and move between different states. The person should have a firm understanding of the control flow as a script moves between different states.

Revision as of 10:33, 6 November 2009

Overview

This list of requirements is part of the Second Life Certification project. It is an effort to create a list of specific skills required for persons to become certified in basic scripting.

Audience

Persons who wish to demonstrate competence in basic LSL scripting.

Prerequisites

Some experience and familiarity of the second life graphical user interface and controls is necessary. Also some experience of building within second life would be an advantage. Six months secondlife experience recommended.

Criteria for testing to basic level

In the basic skill sets a person should demonstrate a mastery of common programming tasks. The following categories provide the basic categories.

Broad Overview and Most Basic Skills

  • Rationale for scripting
  • Script creation
  • Commenting and Clarity
  • Mono vs. LSL2

A person should provide a basic understanding of the potential and the limitations of scripts. The person should be able to demonstrate how to create a script both within an object rezzed in world or in their inventory. The person should know the difference between mono and LSL2 and the implications when a script is created within inventory as opposed to an object's inventory. A person should demonstrate a basic understanding of the construction of structured code and consistent commenting style.


Data Types

  • Types
  • Operators
  • Global vs. Local Variables
  • Typecasting


A person should be able to identify the basic data types, integer, float, string, key, list, vector and rotation. The person should know the basic operations and what they mean in context. For example, division with integers is different compared to division with floats. The person should understand that some operations are overloaded and have different meanings when combined with different types. For example, if v1 and v2 are vectors then v1*v2 is the dot product, but if v1 is a vector and r is a rotation then v1*r will rotate the vector.

The person should demonstrate the concept of the "scope" of a variable. There is a difference if it is defined outside of an event or function. Also, the person should demonstrate an understanding that a global variable can be ignored if it is also defined locally.

Finally, the person should demonstrate how to "convert" one variable into another and what happens. For example, a float is trunctated when cast as an integer.


Control Structures

  • Loop Constructs
  • Conditionals


A person should demonstrate an understanding of the different looping constructs using for, while, and do-whole loops and understand when one loop construct might be favored over another in a given context. The person should also demonstrate an understanding of the "if" statement and be able to use compound if statements.


Events and Functions

  • Events
  • Functions
  • States


A person should demonstrate the basic idea of an event and how a script might react in various circumstances. For example, the person should have a basic understanding of the three touch events and how they differ. At the basic level the broad categories of events that should be mastered include collision, touch, land collision, state entry/exit, timer, and attach events.

The person should demonstrate an understanding of the use and creation of their own functions. This includes understanding the difference between null functions and functions that return a specific data type. The person should know the difference between a user defined function and the set of functions available within the build in library.

Finally, the person should demonstrate an understanding of the use of states. They should understand the default state, how to define new states, and move between different states. The person should have a firm understanding of the control flow as a script moves between different states.