Chapter 3. Lingo Coding and Debugging Tips

Lingo Coding Tips

Programming is often an iterative process. You need not write perfect code that does everything the first time you run it. Start simple, and test each step along the way. Before you know it, you will be building real Lingo programs.

Many of the tips and techniques discussed throughout this book won’t mean anything to you until you’ve programmed for a while. (Refer to "Entering and Compiling Scripts“” in Chapter 1, How Lingo Thinks). Revisit the earlier chapters after completing a project. What would you do differently the next time? Try to practice the following Lingo techniques:

Plan Ahead

Plan your design and layout of the presentation and the Lingo you’ll need. A formal design helps both beginners and experienced Linguists spot problems and opportunities.

Be organized. If your Lingo code starts messy and scattered, it will only get worse. Well-structured code gets easier, not harder, to debug toward the end of a project.

Develop and maintain a library of utility Lingo routines (this book is a good start). Store them in externally linked casts for easy inclusion in other projects.

Don’t confuse analysis with implementation. The mechanics of Lingo are sometimes easier than figuring out what Lingo you need to write. See "Envisioning Your Lingo" later in this chapter.

Structure your Score and Cast so that it makes your Lingo easier to write as described in Chapter 1, How Director Works, in Director in a Nutshell.

Use comments ...

Get Lingo in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.