Wednesday, April 21, 2010

A funny thing happened on my way to learning Linden Scripting Language…

The other day the talented and creative Jo Ellsmere (Second Life chair and tree creator extraordinaire) told me she was beginning to explore writing scripts. She knew I had dabbled around in them and was of a similar non programming bent as she. We IM’d back and forth yakking about it and played with the Loop Rezzer script she was exploring. In the end I laughed and said I’ll throw together a quick list of resources and paste it to you in a note card. In then end… this is what she got… :)

A long post chronicling my first stumbling thru the world of programming. Something fun I intend to continue… so many paths to walk. But perhaps this will be of use to folks looking for resources related to learning to write scripts for Second Life. Follow the links … and good luck.

I know you’ve found the LSL wiki.

There are MANY SL Building resources out there… here is one nice compendium from the Yaiol Imitation of Life blog. (S.N.O.W.* alert). Mind you there is a LOT more than just scripting help here… in fact scripting links are about 3/4s down the page. Some are in French… most if not all have English equivalents listed.
(*S.N.O.W. = Shiny New Object Warning = tangent = possible distractions ahead = “No really I’m just addicted to the sensation of learning… but yeah I could be a bit more focused”)

But back to the matter at hand.
In my attempts to learn to script… I quickly discovered that scripters were programmers who used weird language that use familiar words in unusual ways. Words such as: Statement, State & Function.
They wrote odd looking sentences like:
scriptnum = llList2Integer(llParseString2List(llGetScriptName(
),["mainanim "],[]),0); ...

I learned the words Statement, State and Function sort of have similar meanings to the same words used in a different context. For example; I made a statement in the state of Oregon regarding the function of programmers. I understand that sentence, but in the context of programming that I did not understand those terms.

So I set about defining the context and delineating just what the background was that I needed to understand better to move from being able to change a few parameters in a script to being able to create original or even task specific scripts. I quickly realized I should have paid more attention in math classes in high school. The logical context for the terminology used in scripting is of course mathematical.

So bearing in mind that State of my knowledge regarding scripting here is the sequence I stumbled thru as I learned more.
  •  I tried understanding some particle emitters and ‘make’ sit poses. This led me to the LSL wiki. I started to collect scripts and open them up.
  • I Got excited about the cool things they did and read the section on scripting in the Official Second Life Guide by Michael Rymaszewski, et al - on the Wiley press.
  • I then began exploring some in world scripting resources such as the Scripting College found in the Yaiol Imitation of Life blog post above.
  • Eventually I picked up a copy of the Wiley Press book titled: Scripting Your World, by Dana Moore, et al.
  • Next I got confused… mind you the book is good… it was that my understanding of basic programming concepts was not good.
  • Next was Beginning Programming book put out by the Wrox imprint of the Wiley press, by Adrian Kingsley-Hughes and Kathie Kingsley-Hughes. Not bad, but a bit dense for me… or was it I who was still a bit dense?
  • I also realized I could watch some college classes via iTunes and YouTube and started to do that. Search Stanford and MIT YouTube programming classes. I actually worked thru the Karel The Robot Java project that was part of the CS 61 class. Names and numbers change so search YouTube and the college sites for links.
  • Next was a very helpful (in the big picture sense) book put out by the Pragmatic Programmers press called, Pragmatic Thinking & Learning: Refactor Your Wetware by Andy Hunt. I can’t recommend this book enough… (S.N.O.W. alert) if you are not a math type, not a programmer type and are a more creative artist type you MUST read this book. It really helped, by tying recent advances in Cognitive and Neuroscience to practical applications in everyday life. How our brain works and how we think and how we problem solve, etc. To quote the back page: "Whether you’re a deep thinker, programmer, manager, knowledge worker or techno geek (or just happen to have a human brain you’d like to crank up), Pragmatic Thinking & Learning will help."
  • Then I got a bit more on track…and picked up a copy of Programming for the Absolute Beginner: No experience required by Jerry Lee Ford, Jr. on Thomson press. Another fun book. You get to make some cool simple games written in BASIC language.
  • Then I became distracted again and got a copy of Introductory Computer Mathematics, 2nd Ed, by Nigel P. Cook. Published by Pearson Education (I got it at ‘s technical book store here in Portland). (S.N.O.W. alert) Do not be afraid of this book… it was actually quite fun … essentially a work book that teaches basic math concepts with computer and electronics examples. You really begin at the beginning… talking about Fractions and Decimals. Go for it … it was fun to work that part of my brain again.
So… what is the upshot of all this… I am still not a scripter or programmer… but I can at least ask questions they will understand, and I can read scripts more easily now. Use them more intelligently. And perhaps one day will actually be able to create some on my own.

Other tools I used were specialized Editors for easy programming syntax, etc… there are many (see links below and the Yaoil Imitation of Life blog at top of this post). I also found the free Microsoft developer programming tools… the studio express editions, for programming in Visual Basic, Visual C#, and Visual C++. They were fun with a number of tutorials that are easy to understand. In fact a whole section aimed at kids (which helped me, given my kid level understanding of some of the concepts).
In the end… so much to know… so little time… but lots of fun… and besides it is GOOD for your brain to challenge it… trust me you will live longer.

No comments:

Post a Comment