Archive for March, 2006

Remember…

Friday, March 31st, 2006

…that today is the first of April — April Fools’ Day. So if anyone says something that is shocking, outra­geous, weird, crazy or silly, simply respond with something twice as strange as the original, and watch the look on the face of the prankster.

[This was a public service message supporting the cause of March Fools’ Day.]

Java And C

Friday, March 31st, 2006

After having programmed in both Java and C for sometime, I’ve realised that while Java is far easier to code, program­ming in C is more satis­fying — at the end of the day, it feels as if I’ve actually got some work done.

One inter­esting aspect of writing C code is trying to maximize function­ality with a minimum amount of code. On a site like TopCoder, C (actually C++) programs to solve compli­cated problems are often incred­ibly small.

Geek Greed

Thursday, March 30th, 2006

In all these years of devel­op­ment of computer technology, some theorems have emerged gradu­ally. For starters, it turns out that there’s no such thing as -

  • Too much RAM
  • Too much storage
  • Too much bandwidth

So if you want to gift something to a geek on his birthday, try one of those.

The perfor­mance of a computer depends on a lot of factors — not just the speed of the processor, as many believe. If the flow of data within the system is consid­ered, certain charac­ter­is­tics of the archi­tec­ture can be identi­fied as bottle­necks, slowing down the whole system and degrading performance.

Sometime in the future, we’ll probably have non-volatile high-speed high-capacity random access memory that elimi­nates the need for a hard-disk. As far as storage-space is concerned, better algorithms are constantly being devel­oped to compress the same data into less bits. Simul­ta­ne­ously, the hardware cost is also dropping, making it cost-efficient to purchase hard-disks of higher capacities./p>

Deciding when to buy a new computer is a diffi­cult issue. The day after you get one, the prices will probably fall, making you wish you had waited for one more day.

Staying Current

Tuesday, March 28th, 2006

I’ve noticed that there are very few areas of study in which an under­grad­uate student can actually read, under­stand and partic­i­pate in current devel­op­ments in the chosen field of research. This is rather unfor­tu­nate — this is what is gener­ally consid­ered the bane of special­i­sa­tion. Isaac Newton might have observed a falling apple and gained immea­sur­able fame, but today, we have no such luck. Many years of effort are required simply to master every­thing that has been previ­ously done by others, and many more are required to make any original contribution.

Newton wasn’t a very good example here, of course — he was a genius and he was pretty much crazy about his work. You know what they say about the thin line between genius and insanity. The point here is that his concepts of force and gravity are simple enough for sixth-graders to under­stand, which is not something we can say about the work of scien­tists and researchers today.

War

Monday, March 27th, 2006

The greatest warrior wins without fighting.

Sun Tzu

Why do nations go to war? The best way to win a war is to avoid it, because no matter who emerges victo­rious, lives are lost on both sides, property is destroyed, the economy is in a shambles. This is the same principle that Dale Carnegie advised his readers to follow when they felt like arguing — don’t.

There is nothing cowardly about avoiding conflict. Polit­ical battles are part of a large and complex game, a game that can be won if played properly. The trick is to find the right currency to negotiate with other nations so that each of them remains an ally. Demon­stra­tions of military power go a long way in letting others know that your country demands and deserves respect, but to actually go to war is meaningless.

Random Access Memory

Sunday, March 26th, 2006

I think this is a question that somebody will be able to answer to a reason­able degree of accuracy even today: what is the memory capacity of the human brain? We can recall a lot of things in our environ­ment in different forms, so it seems like there’s a lot of inbuilt memory, but much of what we remember is inaccu­rate and in a condensed form. So taking this into consid­er­a­tion, how much — in bytes — can we really store in our brains?

I think I read about this somewhere…but I can’t remember!

Update 2006-03-27 10:14: This article on a woman with a perfect memory is interesting.

How Do You Define The Perfect Day?

Saturday, March 25th, 2006

Many people feel happier on some days, and less so on others. How would you person­ally define your ‘perfect’ day? And no, I don’t thinking staying in bed all day quali­fies as one.

There might be external factors that affect our moods and feelings. Maybe the position of the planets, or events occur­ring elsewhere, have an impact on our lives. If they do, we have a method of finding out. Each day, we can have a poll in which partic­i­pants can rate their day. In general, if the average rating on any day deviates consid­er­ably from the overall mean, and the same day corre­sponds to a ‘signif­i­cant’ event, then we have some evidence supporting our hypothesis.

We should, at the same time, be wary of the tempta­tion to be preju­diced in our analysis. Most ‘studies’ are simply a matter of inter­preting the data in a desir­able way.

False Information

Friday, March 24th, 2006

The Internet is known as the “Infor­ma­tion Highway” for obvious reasons. The quality of infor­ma­tion, however, varies a lot. Some of the material on the Internet is very good, and some is of poor quality. A careful Internet user can easily make out the quality of the infor­ma­tion that he or she is accessing.

If, instead, some individual or group inten­tion­ally posts false infor­ma­tion of high quality, and makes it seem absolutely trust­worthy, then it becomes far more diffi­cult to sift through the wealth of data avail­able and decide what is true and what isn’t. Such a problem has occurred in a limited sense on Wikipedia, but the way its system works has so far prevented unman­age­able problems.

Perhaps this could be a form of IT terrorism. With networking technology becoming an integral part of human life, the Internet commu­nity should find ways and means of preventing the problem before it assumes a larger form.

Of Golem, God and Norbert Wiener

Thursday, March 23rd, 2006

Norbert Wiener’s God and Golem, Inc. is a discus­sion that almost touches upon the confronta­tion between science and religion. The reason it doesn’t quite manage this is because it is restricted to the field of cyber­netics — the science of commu­ni­ca­tion and control — and the resulting exposi­tion deals with the relation between man and machine, which is no longer as relevant as it was around fifty years ago.

Wiener’s argument is an aggre­ga­tion of ideas that deal with three major aspects of machines -

  • Machines that learn
  • Machines that reproduce
  • Co-ordination of man and machine

Learning, says Wiener, is something that makes sense only when applied to a problem that cannot be completely under­stood in a reason­able amount of time. Take a game of chess, for instance. If combi­na­to­rial explo­sion did not prevent us from predicting every possible set of moves, we would be uncon­quer­able as opponents, and there would be no scope for learning from past games. If the omnipo­tent God were to play a game of chess with a mere man, what chance would the mortal have? None, because every move of his would have been precal­cu­lated and the result would have been inevitable. What then is the purpose of the game? It is nothing but a charade, and for the purposes of discus­sion, it is of little use. It is there­fore neces­sary to avoid the notion of infini­ties such as omniscience.

Machines learn. There are computers that play chess, and do a lot many other things efficiently. These machines can lose a game once, yet avoid doing so again; this is the process of feedback associ­ated with learning. But, quite contrary to this spirit, he questions the idea that machines can be given exclu­sive decision-making authority, arguing that humans are the sole judges of what is right, and no amount of learning can fully under­stand this. True, a machine remains a machine, and morality is defined by its associ­a­tion with the human factor, but to shy away from speaking of man and machine in the same breath is unnec­es­sary in this era. We live in a world of technology, and technology is synony­mous with machines; the protest of religion against mecha­niza­tion is not fatal for the pioneer.

The process of repro­duc­tion in machines is curious, because Wiener sees it as dupli­ca­tion with varia­tion. Not only is the dupli­ca­tion a neces­sity, but so is the varia­tion, although there may be varia­tions within the varia­tions. Indeed, this is phylo­ge­netic or racial learning, if we assume that varia­tions improve our opera­tional abili­ties. Again, we have the ethical question before us — does man dare play the role of God? God made man in His image, and he made the machine in his, thereby displaying his arrogance and defiance towards the Divine. I don’t believe this view is supported by many other cultures — Hinduism speaks of God as the eternal Self, immutable, formless and blissful — so I don’t think it lends itself to deeper analysis. And even if it did, ethics is an issue that can only be judged by its times; it evolves the way language does — wrong usages are accepted once the novelty wears off.

Finally, there is the issue of co-ordination or inter­facing between man and machine. Modern technology can replace parts of the body with mechan­ical devices that serve the purpose, and technology of the future will be capable of doing more. Do what you best, says Wiener, and let the machine what it can do best. Wiener prefers to consider humans superior to machines, appar­ently, although there is a reason for not doing so. Superi­ority, or the lack thereof, is neces­sarily a human perspec­tive rather than an absolute notion, so opinion is a factor that counts. But from a purely Darwinian point-of-view, the survival of the fittest can be under­stood as the fight for survival of the individual rather than a race. If the help of machines will ensure victory, then that is the route to be taken. If machines learn to defeat the humans and take their place as the dominant race, then that is what we call evolu­tion, because learning is indeed the crux of the evolu­tionary process.

In summary, Wiener sees a world built upon a large number of simple rules, a problem that can be solved with appro­priate program­ming, but I doubt if things could be that easy. I see the rules of the game as something akin to Mandelbrot’s fractals, non-linear, inter­de­pen­dent, ever-changing and haunt­ingly myste­rious in its intricacy.

Quick Notes

Wednesday, March 22nd, 2006

For power-users, one of the strengths of the GNU/Linux operating system is its extreme customiz­ability. With some knowl­edge of program­ming or scripting, and an aware­ness of the inter­nals of the OS, it’s possible to get any kind of task automated. More than the fact that there are a large number of tools avail­able, it’s the way these tools work together seamlessly that is truly appealing. Moreover, many tools are built from bottom-up — the GUI is added as an after­thought. While this may not be good selling-point when it comes to desktop operating systems, it works extremely well with command-line appli­ca­tions such as scripts, which focus on getting the job done. Indeed, the fact that most scripts work in the background with minimal user-interaction is proof of their efficiency.

For example -

In our hostel, it was announced that snail-mail recip­i­ents would be notified via a hostel website. To avoid having to visit the site regularly, I could simply add a cron job that would -

  • Download the appro­priate RSS feed [wget]
  • Search for my name in the list [grep]
  • Notify me by email if there is an occur­rence of my name [mail]

Another inter­esting possi­bility for KDE users (or perhaps others) is a Quick Notes kind of appli­ca­tion. Rather than purchase or download an appli­ca­tion for making notes and saving them, you could simply add an appli­ca­tion button to one of your main menus that executes the following command -

kwrite “/path/Note — ‘date‘”

This will launch the kwrite text-editor, where you can type your notes. The filename is “Note — ” followed by the current date and time. If the file is saved, a new file is created at the location /path/, other­wise it is discarded. Since the file is identi­fied by the current time, each click will create a new note.

To access these notes easily, you could add a Quick Browser item (pointing to “/path/”) to your KDE toolbar.