Three steps before writing an iOS Shortcut

Three steps before writing an iOS Shortcut
June 28, 2020 Comments Off on Three steps before writing an iOS Shortcut iOS 13, Shortcuts Mike Kirkham-Jones
The Pyramids in Egypt, the colosseum in Rome, the Mayan palaces in Mexico. All of them thousands of years old and each one sharing the same three steps before building; Design, Design, and Design.

It saddens me to see a shortcut that has not been planned out before its creation.

Take a look at the diagram below. It shows my Mind Map of what I want to produce and how I need to achieve it. 

When starting to work on a new project, whether it is painting the bathroom, building a treehouse, or writing an iOS Shortcut, we all want to jump straight into the “doing”. And that’s ok — it’s what gets the job done after all. But sometimes it might be good idea to slam on the breaks and start with some designing.

…we are all in this to improve productivity.  

I use MindNode to design my Shortcuts because it allows me to think multidimensionally, while designing the current solution I can also be designing for the next solutions by thinking modular.

I must admit that I am a programmer at heart and I am one of those persons who likes to jump into the code straight away. Also I used to hate all the bureaucracy that software design can introduce to the work at its worst. “Release my creativity!”, I would often shout when I felt constricted by design. Over the years I have learned and enjoy the challenges of good design. I taught myself Object Oriented Design which opened up to me endless programming possibilities. 

OK, so writing Shortcuts is not like programming in Java but we can still apply design principles that will make ours and other people’s lives much easier, and, after all, at the end of the day we are all in this to improve productivity. 

Principles of design

When thinking about designing a shortcut think of the following principles:

  • Modularity
  • Performance
  • Usability
  • Deployment

Modularity

You should be able to split your software into smaller pieces with maybe maximum of 5–10 interfaces. These interfaced “groups” I call Blackbox components. The main idea of the blackbox is to provide a single purpose that can be reused in later shortcuts.  

When you have a modular solution, it’s easy to change or even remove things if needed and even share the design work between multiple people. I often change the apps I use for newer, more appropriate apps. Having modularity also increases maintainability by making it easier to find necessary information to edit from the right blackbox component.

Performance

Good software design can be used to easily pinpoint performance bottlenecks in your shortcut — especially if the design is done to the level of that granularity. This means the design should tell how your system works internally and how it uses resources such as external apps, database connections and other things that might make a hit to the performance.

Usability

Generating a design document for the shortcuts community from the shortcut design is a good idea. It provides them an overview how the shortcut they are about to take, works. 

The design also works as a great starting point for new-comers. Instead of making them look through all the source you can just point them to the design where they find all information they’ll need to get started.

Deployment

Design should also provide information what the shortcut deliverables are and where they need to be placed in the deployment. This information is very important as they need to know where to look for your library files reside. It makes it easier to spot right away if the latest update is missing some crucial parts by simply taking a look at your design.

Improvement for the Longterm

Now that I have pointed out some design principles and why the design is important it’s time to think what it takes. Doing a great design takes discipline and commitment. Sometimes it takes repetition to get the design right. And that’s ok, iterations will strengthen the build as well as the design. It just takes time and some hard work but eventually it will pay off and reduce all kinds of issues and time in the longterm. If you don’t believe me, try it out with your next shortcut project. 

Next time …

The first from my YouTube channel, designing a shortcut and the basics of Shortcuts including a look at LaunchCuts.

Tags
About The Author