Parnas’ Principles

Dwayne Phillips
2 min readMay 25, 2020

--

by Dwayne Phillips

We review some fundamental concepts of programming and building things using any other technique.

Now and then in conversations with well-learned and well-accomplished persons, I find that they lack in some of the basics I had the privilege to learn many years ago. It seems that we either forget these or never have the benefit of learning them.

Here are the two main principles of David Parnas (there are many sources online and elsewhere of these):

  1. The developer of a software component must provide the intended user with all the information needed to make effective use of the services provided by the component, and should provide no other information.
  2. The implementer of a software component must be provided with all the information necessary to carry out the given responsibilities assigned to the component, and should be provided with no other information.

Number 1: I built some thing that you can use. I tell you how to use it and nothing else. If I tell you the inner workings, well, we could all find ourselves in all sorts of trouble. Think not? See, for example, hacking into systems that were not supposed to be hackable.

Number 2: When I am building a thing that you can use, I must be told all the things it is supposed to do and nothing else. If I know all the details of the rest of the world and how all others in the world might want to use this and everything else, well, we could all find ourselves in all sorts of trouble.

But I want to know more! Good for you. Curiosity and learning are wonderful things when applied appropriately. It is unfortunate that in learning, sometimes we all fail to learn when to stop learning. Some persons misuse what they learn.

End of short review. I encourage further digging if these are new to you or you forgot them long ago and just remembered them.

--

--

Dwayne Phillips
Dwayne Phillips

Written by Dwayne Phillips

Engineer, computing, consulting, writing, teaching, and a few other things in an effort to make us all better and smarter.

No responses yet