Protecting References

References

Maintaining References

The challenge

A major source crashes in software is the unseen broken references.

For example, let us suppose I call a function foo somewhere in my code.

It can happen that I am working on the same code months later and delete that function, forgetting all about the reference I had made to it.

Subsequently, my code crashes because of the call to foo.

In programming, this kind of bug often surfaces as a so-called Null pointer error

Automatic protection of references

Logiak automatically keeps track of all the references you establish as you are building your App, and prevents any of those references getting broken.

So you may find that you go to delete something and you can’t. Why? It will be because Logiak knows that you still have a reference to that something, and it will usually be able to tell you where that reference is.

Example from Process

Look at an example here.

In this video you will see there are two input questions, asking values for weight and height from the user.

Then we introduce an Update variable action, and the expression we enter makes use of both weight and height.

Elements become undeletable when referenced

As soon as this action is added, the trash icons disappear from beside the two input questions: you can’t delete them just now, because otherwise the Update Variable Action would lack a value it needs and would crash.

But you don’t need to worry about the crashing because Logiak has made it impossible to make that mistake - you can’t delete either of the two input questions as long as they are used.

Then the video shows that as soon as the Update variable action is deleted, the two input questions once again become deletable.

Automatic protection of references

Showing references - so you can delete them if you want

When something is not deletable, Logiak will also tell you why not - i.e. where is this thing being used at the moment?

Then, if you delete the sources of those references, the element will become itself deletable.

Where is this thing being used?