Go deep!

hanpari profile image Pavel Morava ・3 min read

Go deep, my friend

I admire veteran programmers who claim they coded and forgot tens of programming languages. Then, I encountered one of them, saw his code, and learned what was their secret.

Do you want to know?

It is quite simple, really. If they started, for instance, with C, they do program everything like C; if they started with Java, everything turned into Java in their head, no matter the cost or idioms. Especially Javists, trying to write some Python code, must suffer from great pain.

Let's hail their tedious and admirable dedication to convert few Python lines of code into megalomaniac structure of hundreds of classes, each one located in separated file. Such a thorny path triggers salty tears in my watery eyes, as they have to manage it without static typing, which could relieve hugely their laborious and unnecessary undertaking.

Seriously, just imagining their frustration cripples me with sincere horror. No wonder they consider Python endlessly flawed; Python is a terrible language to write Java with. I am not joking; the old C# would have been a better choice for such business.

Still, if you know C somehow, you can easily jump in all related languages like C++, Java, C#, Python, PHP, and so on. The resulting code generally evokes, if correctly intended, the stairs with endless ifs, fors, whiles, and all other instruments of procedural programming; in the worst case, you may admire old-fashioned usage of global variables, which states change in each declared function.

I am not kidding you. I saw C-like Python code having almost no return statement. When I tried to notify the author about what I had misjudged as the beginner's mistakes, he proudly informed me had been programming for more than twenty years and what is the big deal, anyway.

I am not even able to reproduce such code but it went like this:

    global_variable = 0

    def function1(x):
        global_variable += x

    def function2(y):
        global_variable /= y

    def final_function(z):
        return function1(z) + function2(z) - global_variable

After that encounter, my respect for seasoned veterans dropped a little. Is it possible to do anything for more than twenty years and learn virtually nothing?

No need to answer; I saw too much evidence confirming such an assumption that I've stopped making a correlation between time and expertize.

To oppose one popular myth, I do not believe that programming languages are mere tools you can drop or pick at your will. They deeply affect how do you think of problems. To switch between them while presenting shallow knowledge of ten programming ecosystem like a huge advantage should remind you a proverb: Jack of all trades, master of none.

For a moment, just imagine a foreigner who tries on basic level speak your native language. It is quite irritating experience, isn't it? And no matter, how hard he tries or how smart he actually is, you as a native speaker feel superior to him.

Now, what about globetrotter, who spent whole life travelling around the world, never having a chance to learn one language properly? He is doomed to get underestimated each time he opens his mouth.

To avoid that, be sure you know at least one programming language through and through, or strive to achieve it. Pick any modern mainstream language, be it C#, Java, Python, (or not mainstream like Rust, Typescript, Kotlin, F#) and explore it like terra incognita, mapping every tiny unfamiliar piece of land.

Each of them offers many points of view how to scrutinize them. There is a perspective of paradigm (functional, OOP, imperative, meta-programming, introspection, interoperability), runtime (bytecode and innards), ecosystem (packaging system, build system, etc.), testing, tooling, and so many others I cannot think of right now.

As you can see by now, the area of programming language consists of unknown land of considerable size. By digging deep you learn patterns of how programming languages work and you will have no bigger trouble to switch between them since you will be familiar with jargons of all possible counties.

Or, if you don't feel like going so deep, you can read my free serial novel Sovereign.


Editor guide