Search This Blog

Loading...

Recent Comments

Blog Archive

1/1/10

The Law of Do-Undo TrapDoor

Doing is always easier than undoing.

Install a software, then uninstall it. Will everything be the same as before the installation? Most likely not. Some registry entries will likely be left behind, out of malice or sloppiness. And the same is true for environmental parameters.
That is why Windows becomes very slow after several months of use. I know, there are many registry cleaners. The very fact there are so many of them, just proves my point. But worse, none of them really work satisfactorily. You still need to manually do a regedit. Windows registry is really one of the worst inventions.

These days, you write something on the internet, and the search engine robots will pick it up and store it in their databases. It is easy to have a presence on the net. At first you feel proud that you can be found on the net, but after a while you feel that the information about you is inaccurate or incorrect. Then you discover that it is almost impossible to edit or delete your presence. Even old URL links that are now broken are still in the databases of search engines.
Again, it is easy to join Facebook, but even if you delete your account, some information is still kept about you (it is actually against privacy laws).

The law of do-undo trapdoor does not apply to the IT field only, it applies everywhere in our lives.
When you say something, it is "history", nothing can undo what you have said. Words travel faster than wind and rain and the fastest arrow..

Omar Khayyam said:
"The Moving Finger writes; and, having writ, Moves on: nor all your Piety nor Wit Shall lure it back to cancel half a Line, Nor all your Tears wash out a Word of it -- "

Destroying is easier than making. One can kill another, but can anyone bring the dead back to life?

Producing industrial products is much easier than "unproducing" them: industries left behind enormous industrial waste and environmental pollution.
 

Do-undo trapdoor is a one way door, easy to enter, but difficult to exit.
And so it is with Karma. Bad Karma is easy to generate.

There are instances when you can do without needing to worry about undoing. This happens when you love (or something similar) and expect nothing in return.
This is good Karma, it is "action in inaction" or Wu Wei.

4/23/09

An Exercise in Stopping Thought

It is necessary to sometimes stop thinking, or quieten the mind. I find there are parallels of this in Taoism, Zen, Jiddu Krishnamurti and in some forms of prayers.
Krishnamurti was once asked by a scientist:
"How can I be a scientist," I asked him, and still follow your advice of stopping thought and attaining freedom from the known? ... He answered: "First you are an human being, then you are a scientist. First you have to become free, and this freedom cannot be achieved through thought. It is achieved through meditation - the understanding of the totality of life, in which every form of fragmentation has ceased. Once I had reached the understanding of life as a whole, he told me, I would be able to specialize and work as a scientist without any problems."
In this connection, I find the passage from Theo Fischer's book "Laß dich vom Tao leben" very interesting.
Attention, which excludes nothing, correcting nothing, embellishing nothing, ist the key to all transformations

True attention excludes nothing. In this attention, there is no concentration on particular objects, no filtering of what to perceive or what not to perceive. It means, that without special efforts, I am conscious of all happenings, external as well as internal.

You can easily feel the interconnectedness of man and cosmos if you do a small exercise:

Stop thinking for a couple of seconds. Like holding your breath. And during this thinking pause, pay attention to the surrounding. You will notice right away, that when thinking stops, the separating process also stops. There is a direct relation to the outer world.

You suddenly feel the bond to your possessions disappearing, even to your bank account, house and partner, for a few moments, the rigid and clinging relations are not there. You will no longer feel the chasm between oneself and the surrounding.

Your personality disappears for a few seconds into the background, and for a brief moment, there is no feeling of separation from the outer world. There is no difference between inner and outer during the exercise. And if you try this often, your brain will anticipate, that it is so much easier to live – and even to think.

This is not the usual kind meditation. There is no concentration, no reflection, no labeling, no insight, instead we try to absorb all at once. I am not sure it can be called meditation.

The above is an example that religions, if their metaphysics, beliefs, organizations and rituals are stripped off, then the core has much in common with one another.

10/26/08

Python Visualization of the Financial Crisis

I came across Reginald Smith's “Epidemiology” of the Credit Crisis (DRAFT) via Vitorino Ramos' Chemoton blog. A picture is worth a thousand words, a movie even more.

By the way Chemoton is very interesting, it talks about Artificial Intelligence, Artificial Life, Complexity, Evolutionary Computation, Economy, Finance, Swarms, etc, all topics I am interested in.

Reginald Smith's visualization is obtained by constructing a minimal spanning tree using Python Graph and animate using Graphiz and Pydot modules.

Data used are S&P 500 and NASDAQ-100 stocks, between Aug 1, 2007 and October 10, 2008.
The nodes are the stocks. The links are basically correlation coefficients between 2 stocks, modified to make it satisfy a distance metric. A log function of the closing prices is taken before the correlation is calculated.

Color codes used: green means return greater than -10%, yellow means return between -10% and -25%, and red means return greater than -25%. The return is the cumulative return since Aug 1, 2007.

Here are 4 snapshots taken on Aug 9 1007, Nov 12 2007, March 14 2008 when Bear Stearns collapsed, and Oct 10 2008 (all images from the original paper).




Smith cautions that correlation links are statistical and not causal links.
It might be interesting to see a similar visualization for World Financial Market as the crisis has spread geographically.
When the bottom is reached, we could have a visualization of the recovery process. This could be a long wait.
Finally, using copulas instead of traditional correlation coefficients would be more accurate, but the computing task would be huge.

10/22/08

The Paradox of Choice in Open Source Software

Professor Barry Schwartz, the author of The Paradox of Choice: How More is Less, in a talk at Google, showed, surprisingly to many of us, that our sacred assumptions, assumptions used in the following syllogism, can be false. These assumptions and syllogism are the:

  1. more freedom => more welfare
  2. more choice => more freedom
  3. Hence more choice => more welfare

This was discussed in more detail in his book.

In essence, more choice can lead to worse decision making due to the increase complexity and resulting regret. In fact, people are often paralyzed and would not make any decision at all, if faced with too many choices. If they do make a decision in such situation, the decision is often made based on non-rational reasons and superstitions, and the result is far from optimal.

Schwartz gave many examples of this situation. Examples from daily life are the explosion of choices in a supermarket: 175 salad dressings, 250 kinds of cereal, 360 types of shampoo, gel and mousse.

Schwartz used studies to support his findings, and also makes use of behavioral economics as in Kahneman Tversky's prospect theory.

Of course some choice is better than no choice, but when the number of choices in increased, more is less. The discussion of its implications are very interesting, it includes why people who have everything are less happy. Beyond subsistence, increasing abundance does not increase happiness.

The above situation is applicable to the software industry.
I will look at an example of open source software. Proprietary software has its own advantages and disadvantages, which are not discussed here.

Consider Schwartz's example of making a stereo system from components: there are approximately 6,512,000 ways to do it.

Now consider a software for a Python based application framework.
We have frameworks like Turbo Gears, Django, Pylon and more.
Each of them uses other open source components (the following are just a few of the components, not a complete list):

  • Databases: SQLite, MySQL, Postgress, etc
  • ORM: SQLObject, SQLAlchemy, etc
  • Javascript libraries: Prototype, Scriptaculous, Mochikit, Yui, Dojo, jQuery, etc
  • Templating systems: Kid, Mako, etc
  • Widget libraries: TocsaWidgets, Tk, etc
  • Utilities: WSGI, JSON, XML, Genshi, virtualenv, paster, Cheetah, CherryPy, etc

The combinations are many, and confusing. Nobody can make a reasonable good combination without knowing most of the components.
And worse yet, the end-user who just want to use the software to write programs for his domain, will have a hard time installing the software with all their dependencies.

Another example is Open Object, which seems to be very good, but the installation is very difficult even for an IT person.
Many years ago, I had the same experience with building software using Java components.

I think leadership means giving people enough choices, but not too many. The leader must decide (even if the decision is not optimal) upon one combination of components which can produce quality software and ease of use, not leave the decisions to the user. The whole should then be packaged and branded.
I am not advocating proprietary software, but there are things we can learn from it.

Open source software need leaders.
Ultimately, open source software leader will make users happier.

Related:

9/7/08

Some Good Things To Run in Chrome

With the many-fold increase in JavaScript performance in Chrome, here are some interesting applications which you can try. Some of these are not really compute intensive, and there would be little difference with other browsers.


Mathematics.
Tutor is a JavaScript application written by Moshe Sniedovich from the University of Melbourne.
It deals with various operations research algorithms, such as simplex method, dynamic programming. You can enter data directly on the screen and run the algorithm interactively.

Math Authoring
AcsiMath is a math authoring system written in JavaScript. It was reviewed here

A personal wiki
Tiddlywiki is a standalone wiki written in JavaScript

JavaScript toolkit libraries
Toolkit libraries such as Dojo, Yahoo Yui, Prototype, Mochikit, Jquery, and others are collection of scripts for various tasks, including AJAX and COMET. Google's GWT also belongs here, although it can run with either Java or JavaScript.

Visualization
Processing.js is John Resig's port of Processing, a software to make beautiful presentations and visualizations.
See examples here

Web Framework
JavaScript can now be used as a complete web framework application.
Apple's SproutCore was perhaps one of earliest frameworks, if we exclude rewrites of other frameworks such as Ruby on Rails in
JavaScript.

See the demos here
Google applications
Google applications will obviously run faster (sometimes much faster) in Chrome, try Google Maps, YouTube and Gmail

The effort to make a faster and faster JavaScript engine is now hot topic, see about JavaScript JIT here

Of course, the JavaScript engine can also run without the browser, Webkit source can be downloaded and compiled using a C compiler.

The other end is the server client. Here JavaScript has also make inroads with the idea of a server side JavaScript. Jaxer is the new AJAX server by Aptana for the task. To be fair, Microsoft JScript already has server side JScript, which is Microsoft's version of JavaScript.

More on JavaScript: