Two Fundamental Principles of Coding – Test-Driven Development & Cycle of Observation


Basic Coding Principles:

Well, if you put together three or four programmers in a room and ask them about their coding rules. Then you will definitely find two common principles in the discussion. The first principle would be Test-Driven Development (TDD) and another would be Cycle of Observation. Both these methods are used by developers once in a while. So, if you want to be a successful programmer, then you need to follow these two holy rules of coding.

Test-Driven Development is an approach where one writes the test first before writing the code. This approach is highly practical and used in numerous software designs. As everyone wants to get authentic software after working on designing codes for so long. That’s why normally programmers opt this approach where they write a test to check the authenticity of codes, before actually writing them.

The cycle of Observation or also called as Observation Decision Action Cycle (ODA). This cycle is very efficient with debugging or testing, but when we talk to many senior developers you find that this idea is actually a fundamental basis of their whole development workflow. They want to see something that will help them make decisions about their code. The practically whole software development system relies on this fundament workflow chain:

Observation → Decision → Action → Observation → Decision → Action → etc.

Yep, the whole software cycle revolves around Observation- Decision – Action. Don’t trust me for that practically every software development follows the same route. Then let me share one example with you all.

Practical Example of ODA Cycle

This is a very basic example of ODA cycle which can be seen in any software designing cycle.  

→Observation: You see a problem with the system.

→Decision: You decide to solve the problem.

→Action: You write up a test for it.

→Observation: You look at the test and check whether API is good or not.

→Decision: If API isn’t good, you will make the decision to change it.

→Action: You will rewrite the test and so on cycle will move on until you are satisfied with the results.

Observation is the key factor

Well, if you carefully observe the whole ODA cycle mentioned above, then you will find out one very interesting fact. Fact that observation is the main key element in the equation and other two elements are relevant to it. As you see in the equation when you observe the problem only then you can make a decision and can take action upon it. Without observation, other two elements can’t be achieved. So, observation is a key element which further relies on three keys:

  1. Speed.

    The speed in which developer receives the information to observe. The fast speed is very important for prompt decision making.

  2. Complete information.

    The information delivered to the developer to observe should be complete and no facts were hidden in the information. Only if the information is completely accurate observation can be drawn from it.  

  3. Accuracy.

    The information has to be totally accurate and authentic for best observation. As faulty information can impact the whole cycle.

So, this is the fundamental principle of software lifecycle and being an aspiring software developer, you need to nail it.

About the author

Arpit Agarwal

I am a freelancer content writer, web developer and Video editor who loves to write technical stuff and on the other hand makes awesome videos as well. I like to make people happy with my writing and also try to make sure, you come back to read more.

By Arpit Agarwal

Most common tags

%d bloggers like this: