This is the principle of economy of mechanism.
When you started programming,
I suspect that your programming instructor
told you about the KISS principle in some form.
KISS stands for Keep It Simple Silly.
Although very often a much stronger pejorative is
applied to that last
S. But we'll just say Keep It Simple Silly.
That's what economy of mechanism says.
If you look at the next slide,
it simply says everything
should be as simple as possible.
Don't add complexity.
Sometimes it seems like adding
complexity will make it more secure.
It might make it harder for an attacker
to figure out what's going on,
but it will make it harder for anyone
else to figure out what's going on too.
Also very often complexity does not add security,
it simply adds confusion,
and you want to be able to be sure that people can read
that code and analyze it and find problems you missed.
Also if something does go wrong,
you have to fix it if your program is
simple or simple reasonably simple.
Fix is probably going to be fairly straightforward.
If it's hideously complex,
you'll have a much more difficult time tracking
down exactly what to change to fix it.
This also applies to interfaces and interactions.
Interfaces as you'll see in the next module,
should be very simple, very clear,
and easy for the programmer to
understand and not make mistakes with.
Same with interactions, they should be
unambiguous and they should be handled properly.