Fluency in Programming

Hello, good day.
I’ve been contemplating forever about what I’m about to write:
So, like natural language, some are fluent and some aren’t. And one can tell if one is not fluent in a language by the concatenation of the different parts of speech, and in the usage of idiomatic expressions-if there be any.

Is this so obvious in programming?
I may know the programming structure needed to write a program that sums two numbers, starting from basic mathematics, and translating it to either JS, or C. If I have spent more time in JS, and know for certain the code for it, and produce the program, in C, it may become an issue, as there are loops that must be crossed in understanding that you would have to import an header file that brings in the “buttons to the calculator” so to speak.

I mean, I hear programmers say idiomatic style is modern or “better”, even though the code runs as it was intended.
I, in curiousity, ask, what makes it better, is it based on the unseen part of the compilation/interpretation of the code by the internals of the host, does idiomatic code somehow make programs run faster, is it just for aesthetic sake. I have asked about this from thinks for 3 nano seconds I believe Lohr, or atk/atp (will confirm). It was clear-somehow. However the question persists and I know I do not yet understand the idea of fluency in programming.

For example, in English, we may use “cannot” or “can’t” as we deem fit, albeit, the word-given-speech by a speaker may connote several meanings.

Is there a limitation in this in fluency, as it has to do with programming languages, such that we must be absolute explicit according to these idiomatic, design style, best practice, production ready styles already acknowledged by the large populace of “fluent” programmers so to speak.

I am not simply asking “who is a fluent programmer”. I know for sure, a fluent programmer cannot be one who remembers syntax for producing solution to a specific problem , as a natural language speaker’s fluency is, in communication (without non-verbal cues)

I hope you understand my thoughts as I intend.
Kindly, if you don’t mind, relate this to JS and C.

Idiomatic code tends to be simple, readable, maintainable and less prone to bugs or edge cases.

Code which isn’t idiomatic tends to be less efficient and more bug prone.

1 Like

Thanks.

When is one recognized by another as a “fluent” programmer in JS or C? Is it based on idiomatic code, or on the ability to spin up programs brilliantly, irrespective of how the code looks?

Would you say that a fluent programmer is one who writes idiomatic code, or one who writes good and secure programs?

Is this a case of “it depends”, or is there a rock solid unspoken rule about fluency?

A fluent programmer can express the same solution to a problem in various ways in the language and can express themselves clearly, or not, if desired. The important thing in this case, is the “if desired”, as they can do this purposefully.

A person that is not fluent may be able to communicate something clearly or cryptically but often does so without the ability to immediately express themselves in another way, they may not even recognize the difference until they see it.

Picasso painted with idiomatic style so that you can identify his paintings, while others may attempt to duplicate that idiom. So “idiomatic” only means in a specific style, and may be in relation to the author, rather than the language, or medium, itself.

1 Like

Thank you, this is insightful.

The many times I’ve seen, many of these “idiomatic” codes are usually shorter in length than the traditional version, or “beginner” version; verbosity difference.
It leads to me ask: Is idiomatic code leaning towards writing the shortest code possible for a solution, albeit maintainable?

In other words, quickly adapting the updates of a programming language and removing the deprecated aspects.
Would that be too simplified?

Everything (and anything) written is “idiomatic” as it has a style. So until the idiom being sought after is defined, that term is, in my opinion, heavily misused and meaningless on it’s own.

So the answer to your question is “yes” since the anchor of that question is “idiomatic”. But that gives no clarity, while being correct in its statement.

Knowing what is deprecated does not necessarily indicate fluency, only that you are able to read deprecation notices.

Fluency might be defined as: “having a command of the language to the point where you can both understand and use subtlety in the language to communicate”.

1 Like

Insightful. Thank you very much.
I have to come back and read these comments.
I’m seeing things better.

I wouldn’t say idiomatic code is necessarily the shortest code. However, I would say in general that idiomatic code accomplishes the goal in a single manner and doesn’t include anything which isn’t needed (in addition to any aforementioned properties). Often this is shorter code, but not always.

1 Like

In such abstract terms, this is a somewhat philosophical question. The definition of “idiomatic” follows that of “idiom”, which of course requires defining “language” and its uses in full generality.

Once we have defined every term, we should also define “value”, ie, we should discover, or invent, some metric that can be used to scale things (language expressions, in this case), so that one can be said to be superior or inferior to the other.

Only after all that we can assert that idiomatic is better, or worse, than efficient or secure or whatever other “value” we choose to compare against it.

As all of this is debatable, it is likely that any eventual “truth” found would be of the dialectic sort. Which is to say, hardly any truth at all and more “opinion held in common by a group of individuals which are considered to have opinions that matter”.

Having said all that, most people I know worry about idiomatic code only insofar as it means marketable code. Code that distinguishes you from other people in the market and, hence, improve your ability to get paid, or get paid a higher amount.

1 Like

Thanks for that. For sure, teams have idioms, in so far that their code may be identified by the styles used and agreed upon. Not necessarily objectively “better” but better in terms of when you see that code you know what to expect. “Dialect” is a very good way to see this.

Code Golf has the idioms of being “short” and there is also a “game” of coding where code is obfuscated which also sometimes is shorter, but has a different “idiom” and so both are considered “idiomatic” as mentioned. Without defining the idioms that you are after, the communication of “idiomatic” becomes very blurry indeed.

3 Likes

Thank you @IsaacG @oxe-b @kotp .

I see things differently now.