A sense of fashion: Modeling style

Chances are if you have read 5 or 6 of these posts you could identify another of my posts based on the style (1) of writing. In the same way you can often identify who created a model based on how things are composed.(2) Modeling guidelines are the equivalent to the office dress code of professional attire, (3) intended to act as a baseline while still allowing individual variation as needed. A good modeling style allows users to quickly understand the functional components of your model.

Ah the 80’s and the Parachute Pants

Enter the MAAB

The MAAB Style Guidelines are the “basic tuxedo” for the Simulink / Stateflow / MATLAB modeling. If you follow them you will be welcome at any party. (4) (5)

The next level of modeling style is the use of modeling patterns.(6) This is where your organization defines its style. Modeling patterns cover common operations or algorithms unique to your project. These can be saved as library blocks or documented as a best practice.

What isn’t style?

The dividing line between style guideline and implementation can be understood with one question:

Does conformance to the style guideline impact the functional correctness of the algorithm?

I highlight the word correctness for an important reason. There are times when style guidelines will result in slightly less efficient implementations e.g., you trade off understand-ability and maintainability for efficiency; and this is okay.(6) However, if the guidelines impacts the correctness of the algorithm then it should be noted and ignored.


  1. I like to think of the style as a hybrid of Terry Pratchett footnotes, Mark Twain wry humor, and Theodore Sturgeon “twist endings” (with his empathy). The pacing is of my own design.
  2. This extends beyond individuals; my first job had very formal requirements on indentation, formatting of C code. The approach I learned then influences my coding “style” to this day. I can also recognize people who went through the same training program just by looking at their code.
  3. As of this writing, with many people working from home, the concept of a dress code has changed somewhat, such as the “professional attire + hidden cozy slippers.”
  4. In this case “party” means your co-workers; follow them and then they have a consistent way of understanding what you are modeling.
  5. Like a tuxedo, the MAAB guidelines are what are on the “outside” they do not dictate what your algorithm is and how it functions.
  6. In reality this happens only infrequently; most of the style guidelines were written with efficiency and clarity in mind.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.