Skip to main content

Naming scripts

One common practice in software to make code easily readable is to write self-documenting code. In Studio, naming scripts appropriately is one way to achieve this. It helps you identify what a script does on a high level simply by looking at the name instead of having to go through the script.

Tip

When naming folder and scripts, choose names that indicate the tasks performed by the scripts and the ATL they contain.

  • Use self-describing prefixes for script names to help identify what a script does.

    • For example, you can use the word “get” before names of data-access scripts. getEntityName would be a good name for a script that gets the name of an entity from the data.

    • Use “format” before names of scripts that format numbers or strings, begin with the prefix format (e.g. formatDate).

  • Use title case for scripts that generate paragraphs or sections within the narrative.

    • For example, call your narrative-generator scripts Introduction, DriverSummary, OffsetSummary and so on, to distinguish them from data-access scripts such as getEntityName.