konsa.blogg.se

Ti nspire student software document editor
Ti nspire student software document editor










The important thing here is to be consistent in how variables are named. There are many different styles used by programmers in terms of variable naming. Where possible, iterate using numerical indices using the ‘ipairs’ function rather than keys using the ‘pairs’ function.

ti nspire student software document editor

Additionally, table iterations can be a source of performance issues if not done thoughtfully. As an example of data reorganization, using the following data structure. Where possible, instead of creating many tables, reorganize the data to avoid table creation or reuse the Lua tables. This is especially true in routines which are meant to operate quickly such as event and particularly paint handlers. It is best to avoid creating large numbers of tables. Unfortunately, it is also an expensive operation with a lot going on behind the scenes. Table creation is a deceptively simple operation in the Lua programming language. For further information about ways to minimize the garbage collection in Lua, see the following article. This can be done by determining if a variable is really necessary and removing it if not, reusing objects instead of repeatedly creating new ones, and using local variables. To reduce the amount of garbage collection, avoid creating lots of unnecessary objects. However, garbage collection can be an expensive operation and cause a poor experience to the user. This means that as a programmer, you don’t need to worry about managing the creation and release of memory.

ti nspire student software document editor

That is, when Lua determines that a variable is no longer being used, it is free to reclaim the memory used by the variable. As a side benefit, local variable access is much quicker than global variable access so your scripts will operate faster using them rather than global variables. Global variables can be accessed throughout the script, making accidental use and naming collisions more likely and making the script harder to maintain and debug.

ti nspire student software document editor

If a variable can be declared as a local, do so. Help the user know when they are progressing through continuous feedback on their actions. Make sure controls which operate the same look the same and are placed the same. Also, this will translate better to constrained platforms. Show only what is needed when it is neededĭon’t overwhelm the user with choices.Keep the user in control of the experience. Use notifications rather than dialogs when possible. Ensure that images look good and are sized appropriately for all platforms.

ti nspire student software document editor

Images can more quickly and powerfully convey meaning than words. Short phrases translate across platforms better and users are more likely to read them in the entirety rather than skim or skip. Users with any level of understanding of the Lua programming language will find this style guide’s list of dos and don'ts extremely helpful.












Ti nspire student software document editor