An unorthodox introduction to Mathematica!

Before getting into details of what is Mathematica, and why I am writing this post, I should remind about the very interesting lecture by Richard Feynman one of my older posts (here). One of the important message of that lecture was the fact that, naming the so called computer is misleading, as actually no computation is done. Today computers are basically a Fast Filing System. Every software is composed of few definitions for data (string, integer, double, etc) and a set of rules on how to do certain operation. However, nothing internally is making a meaning of those data or the rules. The task of computer is to break down every other programs to the set of those internal rules and data, and finally outputs the result.

Internally all the signs (such as summation, multiplication, devision, etc) has no meaning, and they are just a symbol which imply a rule for data which might come before and after this symbol. This fact is greatly appreciated in one of the earliest programming language, LISP, basically the second oldest language after FORTRAN.

At this point, I should also mention a few words about functional vs imperative programming. Basically, many current programming are imperative programming in a sense that the state of variables changes during the evaluation. However in a pure functional program, nothing is changed and everything is calculated as set of function acting on each other. It is long discussion on what is what, and how is done, and you can see more details here. The bottom line is a more natural (i.e., closest to the real mathematical world) way of programming is the functional way, again such as LISP. Of course, there is always a discussion on being *natural* matters or being *effective*, and so on!

It is so unfortunate that most of current programming languages such as (Java, C/C++, Python, etc) are imperative rather than functional, and most of us are not used to the idea of writing nested functions rather than defining ever-changing intermediate states.

Putting everything together, the best approach which utilize the main capability of “computers” is the language where everything is just a symbol (there is no difference between data and code) and every program is set of nested functions acting on these symbols and finally DISPLAYing the output  in a one way or the other. To make this last point more clear, consider an image, for example, image of a flower. In practice it is wide spectrum of colors DISPLAYED at the pixel of our monitors. These colors are basically numbers which determines the combinations of different primitive colors. So, an image of a flower is no different than expanding a function in terms of some basis.

So the ultimate software which is inline with the internal design of computers is a symbolic functional programming. Mathematica if it is not the only, is the best programming language which is based on those first principles. I should make myself clear, I never claim that Mathematica is implemented the best way possible. What I am trying to achieve here is the fact that Symbolic Functional programming is the best possible way, and Mathematica is in that direction.

One last thing is interesting about Mathematica is the fact that is kind of “Evolutionary programming”. Basically, everyday new functions are added to the main body of the program, and the best one, in terms of speed and quality survives, where the rest of them just fade away. Mathematica is not only a mathematical software, rather and old (and the best) programming paradigm which is rare to find these days.

 

I am back!

After 9 months of silence, I am back again to my weblog. It is hard to explain why I was not around in one post, since past few months were full of ups and downs at least for me. To be short, after many years being in academia, either as a student or researcher, I started a position as a R&D in one of my favorite topics on the intersection of mathematics and computation while working with real world examples, i.e., as a machine learning data scientist. That by itself is a good reason to be away for a few months. However, in my case this was not the only thing.

The other thing that I have realized is the fact that, after being away for a few months, it is hard to come back, as there are many things to say and you basically don’t know where to start. To choose one particular out of many, I just quickly write about why I partially left academia, at least for the moment.

First of all, it is almost clear to everyone who is already engaged in academic activities that the whole subject of “academic interest” does no longer exist. By academic interest, I do not mean a useless scenario that people came up these days to publish a few more papers. No, I really mean to spend time and energy on something for the sake of curiosity. I can’t say that there is no one doing that, but I can certainly say that the new generation of scientists, are either businessmen or engineers. (Nothing wrong is with being businessman/engineer, just they should practically be different from scientists, and now they merged somehow. )

Second, again those who have been involved in academic setting are realizing that, for many reasons, creativity is kind of discouraged. Most of the times finding a more creative solution is not desired. During these many years, I came across many important subjects worth studying, which were dismissed because they considered HARD to do in a few months or seemed irrelevant.

Thirdly, computer science in north america has cast a shadow on many professions, and academia is not excluded. Hence, everybody tries to codify some mathematical problems and in the best case scenario bring it close to experiments. I should say that, I do not discourage this activity, the point is theoretical studies should be different from computational studies, but theory almost cease to exist these days. Finally, not to mention the fact that, academic fields are tightly narrowed these days that even in one particular fields, it is very hard to move around. Part of it is due to the fast growth of science, but it is mostly due to the crowdedness of the environment!  Indeed, this list goes on, but I guess these are the main reasons.

Putting altogether, I realized for people like me who are interested in wide breadth of research on different aspects of life, data science seems a way to go. I reserve the right for me to change the above statement as time goes on!