Showcase Fridays
19th February 2025

Your Scripts Deserve Some Structure

This week has been full of inconsistencies for me, both at work and in life. It's got me thinking about how we find stability and reliability. Especially with our computational tools that are incredibly flexible.

Since there are countless ways to accomplish the same thing, it can make scripts hard to read because you don't know what to expect. This is especially true for large scripts. Even a relatively “simple” model like the Winton Guest House, the script can look very messy very quickly.

One way to tame this chaos is to provide some structure around our scripts. Structure that creates a common language that makes our work more accessible. This structure comes in the form of templates.

But templating something as complex as Grasshopper or Dynamo raises all sorts of questions:

  • How do we meaningfully categorize and name groups of components?
  • What's the right scope for a group, is it 5 components or 50?
  • How do we handle components that don't fit neatly into our existing categories?

The answer, I believe, depends on you and your team. As wonderful as a universal computational design standard sounds, I don't think we'll ever get there, nor do I think we need one.

Instead, we should create templates based on what we need, not based on what everyone thinks we need. Templates as a whole can dramatically improve readability, and the very process of organizing scripts brings clarity to our approach. Take a look at the previous script but now with my template applied to it.

So, If you're looking to start developing your own template, I recommend reading Graphic Standards for Dynamo. It’s a short article that helped kickstart the movement towards a more organized, color-coded Dynamo scripts back in 2016.

To give you more examples of templates, I’ve also added my own on Scripository:

My templates are far from the best but it’s good enough for what I need it for. It provides consistency and a reliable way to understand the scripts. I've also broken down their features, including components that display external plugins and components that automatically color groups based on nicknames.

The goal is not organization for organization sake, but to make scripts feel welcoming, readable and familiar to others.

Thanks for reading. I'll see you next Friday!