What is self-documenting code and can it replace well documented code? [closed]

Well, since this is about comments and code, let’s look at some actual code. Compare this typical code: float a, b, c; a=9.81; b=5; c= .5*a*(b^2); To this self-documenting code, which shows what is being done: const float gravitationalForce = 9.81; float timeInSeconds = 5; float displacement = (1 / 2) * gravitationalForce * (timeInSeconds … Read more