READABLE

From ThoughtBridges
Revision as of 02:10, 6 April 2017 by Kris (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Readable Scripts

Metapattern Code: READABLE

For Graphics Designers

The first measure of readability of a book or magazine is the content.

Well written, concise content is more readable than rambling drivel.

Nearly as important as the content is the layout and formatting.

Good layout and formatting entices the reader to continue reading, and helps the eye stay on the trail of the content.

If a script carries the READABLE metapattern code, it means that the software developer has paid attention to make the script code readable.

You’re invited to read the whole script, and not just the documentation or header comments.

The script’s ExtendScript code is meant to be self-explanatory, and the script should rate high on the ‘pokeable’-scale.

However, just like with layout, the ‘look and feel’ of readable scripts will vary greatly between different software developers. The main idea is that the script is easy to follow, and is formatted using consistent rules, while leaving the actual styling up to the personal taste of the software developer. As a script reader, you need to be aware that when the computer executes a script, it will be ‘jumping’ all over the script. Typically, it will start by executing some function, and this initial function might be found somewhere in the middle or near the end of the script. If you try to follow the logic of a script, you’ll find yourself jumping backwards and forwards through the script code in order to see how various steps in the script are built up out of smaller steps. If the MAIN metapattern is applied, this initial function is called Main(), and then the script will branch off into more specific operations. If the ALPHABETIZE metapattern is applied all the functions are listed in alphabetical order, making it a bit easier to find them. If you have a text editor with script support (like TextWrangler or Notepad++) you can also use a popup menu to quickly jump from one function to the next. See the Appendix - ‘Reading and understanding a script’ for more info.

For Software Developers

Once your script is complete, make sure you save it with CRLF line endings.

To avoid the line ending changing during the download process, it is best to store your script in an archive file of sorts.

ZIP archives are best supported - they can be used both on Mac and on Windows.

By storing your file into a ZIP archive, the line endings will not be disrupted by the download process.

Detailed description of the metapattern

The script file uses carriage return + line feed line endings (Windows line endings).

Related metapatterns

 ZIP
 REGULAR_TABS