Model interpretation or code generation?
Blog 3 of many

Model interpretation or code generation?

16 years ago, I saw it for the first time: You draw and specify what "your reality" looks like in a model… and you’re done.

Done? Yes, done.

No need to press a button and wait for the generator to go "rrr-rrr-rrr" and spit out many lines of (moderate) code?

Nope, with this model, you’re done. You’re model IS the application. Well done!

Because that’s what model interpretation is. For some platforms, it is one of their key features: the platform interprets your model and runs this interpretation as an application.

No code is generated. At all.

Isn’t that amazing?

Oh, absolutely! Many knowledge-oriented developers, business engineers and knowledge analysts think it’s fantastic: you don’t need to (know how to) code to build applications.

They build extremely complex applications, where lots of laws and regulations are translated into functioning software that can handle (for example) complicated requests with precision.

All without creating a single line of code

For years, I’ve told and shown people in courses and blogs how great it is to work with (predefined) blocks/elements/components. Those components have all sorts of built-in functionality and are often configurable too.

The benefits are enormous. Not just at the start of a project (you can have something up and running very quickly), but also – especially! – when implementing changes. Working with a model is so much more pleasant and efficient than working with code.

And as far as I’m concerned, that is still true today.

However...

I see that model interpretation is sometimes perceived as a disadvantage.

Every now and then I read that it is really important to be able to check, review and validate code. Possibly with or by peer programmers. And platforms that cannot provide this, are lacking functionality.

And what about platforms that generate pseudo-code, or generate code that isn’t shared with developers? Oh, those are the worst. I’ve heard comments like this in training sessions. Stuff like: “Sure, this model interpretation thing is fun, but I want to be able to see the code. Gimme the code!” When I ask why, the answer is something along the way of: "Just because".

From a marketing perspective, I think it's rather clever: Software vendors that generate code tell others that the very thing that has made them strong all these years, is actually a huge weakness. Say it often enough, and you might almost start to believe it...

But is validating code really better than validating a model?

Code is just an illusion too, isn’t it? It is a layer on top of something else. You wouldn’t turn your code into Assembly language (younger readers: Google it!) in order to validate it, right? Or, better yet, transform that Assembly code to validate that it’s producing the correct 1’s and 0’s in machine language? And if you really want to go all the way: validate whether all binary 1's are actually translated to 5 volts on a transistor and each 0 translated to 0 volts?

Code is just a layer on top of Assembly, which is a layer on top of Machine language, which is a layer on top of ones and zeros, which is a representation of 0 volts and 5 volts. At least, that’s what I was taught in the early ’90s when I studied computer science. Maybe things are a little different now, but that is roughly how computers work…

The point I’m trying to make is this:

A model is also just a layer

A model that generates code is just differently presented code. It is a layer (on top of code) in which developers do their work and validate it. This model-layer is "their reality". Just as code is "the reality" for a programmer.

A model that is interpretable, is also a layer. But not differently represented code. It is a layer with business concepts, much closer to subject matter experts, closer to the end user. And easier to build, read and maintain by a larger audience than just the programmer.

So is it necessary to be able to transform your model into code? No. Only for programmers to show it to other programmers. Not for subject matter experts to validate it.

Is it necessary that subject matter experts and end users understand your model? Yes. But remember, they are not programmers, they just want to validate the model.


~ The layered cake image is from Freepik. I hope this image of layers will attract more readers than a business model, many lines of code or an onion.

~ Stay tuned for more on validating models and documentation.

Rob van Rooijen

Solution Architect at Be Informed

2 个月

Well said Menno

回复
Xander Uiterlinden

Lead Software Architect bij Eijsink

2 个月

I'd like to see a model as the spoken words in a particular language. With code generation model transformation is applied to transform the model to another language allowing to refine it (adding details) at a lower abstraction level, eventually resulting in a representation in some executable language. That makes the model at the highest abstraction level not just differently presented code. I do get the layering analogy for model to model transformations. I don't get get the layering analogy for model interpretation, can you enlighten me? With code generation detailing is done through the transformation chain. For interpreted models, you still need the detailing, which typically results in additional complementary models in which e.g. deployment parameters are specified. Where lasangna is a nice methaphor for the code generation flow, maybe ravioli fits the model interpretation scenario better? In any case, a good enough model at business domain abstraction level should not leak any details on how it will eventually lead to application behaviour, whether that is achieved by code generation or model interpretation.

回复
Rik Schepens

Platform Innovation Lead & Studentenco?rdinator bij Blueriq

2 个月

Nice read! Couldn't agree more. Fun fact: There is a code compiler for C (which turns the code into assembly) that has been mathematically proven to always be correct.

要查看或添加评论,请登录

Menno Gulpers的更多文章

  • Dagen H

    Dagen H

    ‘Dagen H’ is the name for September 3, 1967. It is the day that Sweden started driving on the right side of the road.

    1 条评论
  • Circular reasoning in kitchen appliances

    Circular reasoning in kitchen appliances

    The other day our oven broke down. Well, not completely.

    2 条评论
  • The magic marker

    The magic marker

    Last month I went back to school for one afternoon. To my daughter Annika's school to be precise, because it was…

  • Some things change, some things stay the same

    Some things change, some things stay the same

    My book "89 blogs (not) about Blueriq" was published almost a year ago and I haven't written a blog since. It started…

    4 条评论
  • Nee, dit is niet blog 90

    Nee, dit is niet blog 90

    Wees geduldig (ik doe even alsof ik fans heb), er komt vast weer een nieuwe blog. Maar dit artikel gaat over iets heel…

  • Wie het laatst lacht...

    Wie het laatst lacht...

    Ik had het al aangekondigd: na 89 blogs (niet) over Blueriq stop ik ermee. Ik ga er een boek van maken.

    2 条评论
  • Let there be light...

    Let there be light...

    Het zinnetje "Let there be light" heeft in deze blog vier verschillende betekenissen, geen enkele religieus overigens…

  • Wat was nieuw in Blueriq 15?

    Wat was nieuw in Blueriq 15?

    Blueriq 16 komt eraan, tijd om terug te kijken naar de versie ervoor, net zoals ik dat elk jaar gedaan heb: Nieuw in…

  • 9 woorden, 9 betekenissen

    9 woorden, 9 betekenissen

    In deel 10 van deze reeks heb ik dit plaatje al eens laten zien, met twee verschillen: Andere systemen waarmee…

  • Complexiteit verdwijnt niet als sneeuw voor de zon

    Complexiteit verdwijnt niet als sneeuw voor de zon

    Ken je dit fabeltje? "Zet een platform (zoals Blueriq) in en de complexiteit verdwijnt als sneeuw voor de zon." Nee…

社区洞察

其他会员也浏览了