Tuesday, April 22, 2014

Programming Languages Are Useful But Not Perfect

*
A friend back in college enjoyed solving math problems. He once told me about a lengthy assignment his class was given. He solved all the problems and was certain that all the solutions were correct. He got the highest mark in class, but not the full mark. He quickly went through the pages and spotted the professor's remark on the side of one page. It said (translated): "It's not what you think". And there was a line under a phrase that my friend wrote, that said something like: "If so and so information about x is available, y can be measured with absolute precision". He did not ask the professor for an explanation. He understood that, in college, saying 'absolute precision' can get you less marks.

His fascination with math and logic was great. Even after college, in his spare time, he would read books about math and logic, including books about the philosophy of math. What caught my attention was that he said that, in his twenties, the biggest shock was losing a parent, and the next biggest shock was realizing that mathematics was not absolutely solid.

The shock was probably inevitable since my friend was like many people who would see math as the last solid ground that eventually can explain everything.

The subject was occupying so much of his thinking for few days. Then, one night, in a dream, he saw himself standing on what first appeared to be a solid ground, that slowly started to become sort of thinner or flimsier, it became so thin that he felt it is like an eggshell that can be cracked with little stress and he felt the need to be very careful, but it did crack anyway and then it disappeared altogether, and there was no surface whatsoever to stand on or any solid thing in sight, and he found himself as if falling into what seemed like outer space. He was rolling aimlessly, in total emptiness and utter silence. He couldn't see himself or anything else. Maybe it sounds like an experience that some sci-fi movies would suggest not to be a positive one, yet for him, in that dream, he found overwhelming peace and serenity and felt what might be described as extreme closeness to God. Next morning he woke up fresh and relaxed. Textbooks are there and whatever appearing forms of math and logic are there. He still likes math and logic, but now he is fine with the limits.

 

*
As I understand, the first glimpse about Programming Languages emerged out of intense discussions in the early 20th century trying to find solid foundations for mathematics and logic. From what I understand, the arguments that did not result in finding that much sought after solid foundation of math, gave us instead the first clues of how modern programming languages would be shaped. The original effort was substantial and it did not reach its goal, yet it was an unintentional byproduct of that effort that was such a great discovery.

Programming might be seen as an exact science. But, looking closely, it appears that that is not the case. There are limits. Bugs, regardless of how careful the design is, are something that no software can be claimed to be free of. Software licenses are full of clauses about the limits of warranties. Users of software are just expected to accept the software "as is". More generally, I wonder if it is just not possible to get rid of "bugs", in any rational effort, regardless of time or place.

It does not look like things will change much in the future. And maybe that makes one wonder if machines will ever be smarter than human beings. Machines are better at handling repetitive, well defined and sufficiently specified tasks, but can they really do anything more than that? Human beings who make machines and program them are imperfect, Logic is imperfect, theoretical models are imperfect. And in each case, it does not appear to be an imperfection that can be overcome one day, it is inherent, it is part of "how things are" in this world. And there does not seem to be anything the poor machines can do about that :) .

 

*
As I understand the modern scientific view, it seems that a view about something is as "solid" as the "assumptions" about it. However, it does not seem to be possible to totally get rid of subjectivity (in assumptions and views based on them), not even in Mathematics and Logic.

I guess fascination with Mathematics and Logic is normal, but it might be prudent not to see them as something "absolutely solid". Sensing the existence of 'Perfection' is real and unmistakable. Scientists are constantly looking for signs of order behind phenomena, and hopes of finding a theory of everything one day, might just be a clear picture of that. The religious view is that perfection is indeed underlying existence, but figuring it out or to fully know it, is beyond human capability. As I understand, this too is generally understood these days.

 

*
Of course, the immense usefulness and the breath taking beauty are still there in Math, Logic and Programming languages. There is no doubt about it. It’s perfection that is not there. But, maybe that is ok.

A realistic view is never a bad thing. And even if an idealistic view seems far from being materialized in our world, it remains a driving force behind attempts to do our best to improve our lives, while we try to reach the goal of "how things should be". The two views need not be mutually exclusive , rather, I think they can be seen as complementary.

Sensing the existence of perfection, high aspirations and dreaming big appear to be as necessary and important as realizing that there are limits to what practically can be achieved at any point of time and space in our world.