Sunday, March 27, 2011

Few words about database

When I was young there were no special packages to design software. If I had to solve equation or analyze statistics, I searched in the books to find algorithm. Even application was complicated, it usually did not require following support. The most complicated application was for correlation analysis. I supported it about 5 years, not like programmer, but like expert in the statistics.

Something changed when we started to use databases. Of course, database keeps data that changes all time, and this requires procedures to preserve these data. However there is something else. When we start database design we see specific structure of data. During of data accumulation we may see some pattern that was hidden from us initially. And this is task of programmer to help user to discover this pattern.

Assume you work in hospital and your task is put data about patient into database. Monthly you create report which includes charts of changes blood pressure and heartbeat. From chart you can see correlation between blood pressure and heartbeat. Scince that time you together with user begin to study if this correlation is strong, does it depend on patient or disorder, is it possible to use this correlation for forecast. Certainly, this research is impossible until you do not accumulate data in the database.

Watson Wins in Jeopardy

Watson is the powerful software that wins human in Jeopardy. It is hard to tell is it this software more complicated than Deep Blue. This epizode reminded me another story that happend some time ago.

It happens when I was in university. At that time small Kiev team created very powerful computer. The name of computer was MIR-2. From one hand it was abreviation of Russian words 'computer for ingeneer calculations'. From other hand somebody could translate it like peace or world. But computer was good not only for ingeneer. It was good for scientist also. This computer had language Analytic. Somebody using Analytic was able to reduce complicated analytical expression, even calculate derivative or integral. Unfortunately the production of this computer was suddenly terminated.

At the time when I was near to graduate university the last copy of this computer in Odessa was in university. To verify some ideas for diploma project it was important for me to calculate gravitational fields. Because this involves a lot of calculations I got permition to use MIR-2. Everything was fine. However the last calculation was for Friedman cosmology. Suddenly I got the answer that scalar curvature is 0. Initially I was happy. Then I thought how it is possible. I made calculation manually and saw that answer is wrong. I started to debug application. At certain time I saw the expression about 8000 symbols long. After command reduce half of expression disappeared and second half was equal 0.

At that time there was nobody who I was able to report bug.

However the problem is more deep. Any error that we meet in software is our human error. Somebody can use the software that finds solution of differential equation as analytical expression. This is certainly important tool. At the same time it assumes that user may not have any idea how to solve such differential equation. User just enters differential equation and gets answer to use it somewhere else. What happens if software has bug? How user may verify that answer is wrong?

Let us start

This is interesting question. What is common between programmer and philosopher? To answer this question let me answer another question. Is it main task of programmer design screens, coding of algorithm, establishing of interface? Or is there something else?
There is no direct answer. In this blog I will tell some stories that show that programming is more wide and more interesting.