AI Entities in the Future and the Concepts of Life and Soul

In the future, or even now, these are the entities related to AI: Computer A computer is an oracle computer (knowledge) operating on input/o...

07 April, 2025

No Such Thing as a Perfect Format for Source Code

Some people think there can be a perfect format for source code, but Dan doesn't think so.

Since childhood, started learning programming, Dan faced this issue in his mind, how to format the levelling of conditions in 'if' clause perfectly, but he found out that there's no such thing.

Consider this complex 'if' clause condition:
if ((A.Name==B.Name)&&(A.age>B.age||A.age==B.age))

People with a fixed mindset will put spaces everywhere, similar to this:
if (( A.Name == B.Name ) && ( A.age > B.age || A.age == B.age ))

But Dan thinks it should be situation-based, the point is to make the code clear and easier to read, not rules, he would put it like this, looks better when avoid some spaces for grouping:
if ((A.Name==B.Name) && (A.age>B.age || A.age==B.age))

Dan's way is better with the 3 conditions clearly seen. So there are 2 types of people: Rule-based people, Tactical people😏

No comments:

Post a Comment