Comment by rottc0dd

5 years ago

But, I do not know if this metric is quite 'complete'. Because, I am very sure, wrapping concepts in mind is more difficult than understanding the code.

I am not saying the code cannot be made better or more clear. But, it also depends on who you are writing to. Somebody who is not familiar with certain style of programming cannot easily read the code of certain level of complexity.

When I was hacking away my first big program, I could not write functions. Or find reading functions easy. The whole thing was a big wall of glorified assembly sewn together by labels. I am not sure why I was like that then, but I found concepts 'functions' and recursion or any other conceptual stuff really hard. My code was, in its own twisted way, 'most simple' and utterly unreadable.

I find the same sort of difficulties while reading some FP snippets. I confess it was a very short affair, but I had some difficulty reading it and even when I understood, I could not just write or think code in the same style.

There are ways to make your code better, your intentions clear but 'can be understood by a first year CS freshman' is bit abstract criterion.

It is kind of like, vocabulary and prose. You can make your prose clear. But, people have to work on the vocabulary on their own.

> The best code is no code at all.

This is completely agreeable.

Edit : Changed some poor word choices. Added an analogy.