A good place to start is with the manual. Chapter 11, then 16 and forward talk about how programming works. Smilebasic.com has an online reference with all of the commands that you can browse as you need it.