The first person ever to have used Malayalam in JavaScript Code

Malayalam is the language of Kerala, the southernmost state in India. Compared to the major languages of the world, only a minority of people speaks it. But Malayalam has a rich and colorful heritage.  Kerala state government is even trying to make it the language for official communications. English was used hitherto.

Typing in Malayalam was cumbersome. There was not even an unified keyboard layout. Things have vastly improved in the last couple of decades. The last ten-or-twenty years saw more improvements than in the last century taken altogether.

But running JavaScript in Malayalam? It is not possible in its entirety. Not just in Malayalam, but not in any other language other than English. Because web browsers like Chrome and Firefox has to interpret it. JavaScript syntax is written and interpreted in English.

As it turned out, I found that the Array method forEach() accepts any argument for its callback function. Basically, what the forEach() method does is that it iterates over every item in the list.

Out of curiosity, I decided to pass an argument written in Malayalam for this.

One problem here is that the computer does not understand Malayalam. So when encountering foreign languages, what programmers do is that they convert it into their Unicode equivalent.

I typed out Malayalam and converted into its Unicode equivalent. I then used it as the argument for the callback function here.

See it for yourself. The interpreter parses it just as fine.

Malayalam in JavaScript

Owing to the complexity of this method, and the experimental nature of the project, I presume I might be the first person ever to do this.

Typing Malayalam into JavaScript code.

I know nobody ain’t gonna give a s* about it.


The problems of studying when knowledge is aplenty

To learn something new, traditionally people used to rely on books. It is said that books are the collective wisdom of men who have lived in all the generations throughout the history of mankind. So when a man of humble origins wanted to have ‘success’ in life, he would typically refer to books to gain knowledge in those areas he wanted to learn and master. Those were older days.

Look at this day. It seems that God has heard all the prayers pertaining to information and learning, and knowledge is freely available. It is available in quantities that would have made the older generations guilty of possessing.

But to become learned, availability of information is only one factor. It is only a piece of the puzzle. I have already written an earlier blog which stresses the importance of experience to learn anything. Experience comes with practice. And to practice in this information–guzzling, data-driven, well-connected world you have to ignore all those information coming in. There lies the paradox. It is a great challenge that only a trained mind can tackle.

Let me explain. If you sit with the internet to learn something, after a few minutes you will start to get distracted. Firstly, it will be an innocuous link. Something that promises to teach you more of something you want to learn. You click on that, and you land on another page. And whether or not you get more information, the internet is luring you with even more data.

Get swayed by this temptation, and after sometime you don’t gain anything for all those pages visited. The gain-to-noise ratio is too small.

Let me talk about computer programming. To learn anything of value you have to whack your brain. You have to focus hard. And the process is so hard that I personally get discouraged and distracted after a few moments. Adding to that, with the information overload, you are tempted to skim the surface rather than resort to hard work.

I do not know what to do. To browse and skim the surface is a lot of fun, but it does not add value to the learning process. It is just a waste of valuable time. Better use the internet and the information-superhighway to get access to the materials you want to learn. After that, shut out. Block everything. It is time for the old-fashioned way of burning brain-glucose by taking the strain and feeling the pain.

And self discipline can help here a lot. It is more beneficial for learning than having all the bandwidth available.

Make my day!

It is 6.00 a.m. in the morning. The sun is starting to light up the room through the window. I comfortably lie on my bed just out of a dream. I twist and turn to sleep again because there is no work today.

Anyone reading this would assume that today would be a holiday, but actually everyday is a holiday for me right now. I quit my job last month and finding another one has not been successful yet.

Being single, and being jobless is a very bad idea. Apart from the fact that I find it really hard to pay my bills, I am overwhelmed by the feeling of loneliness. I have no one to talk with.

Today, after scrambling out from bed, I started to research on the subject of strategy: Military Strategy- Alexander the Great vs Darius. It was 300,000 of Darius’ Persian Army vs 45,000 of Alexander’s Macedonians.

In those days, (and still today), being superior in numbers is often the deciding factor. In a regular battle, the larger army would slaughter the smaller one. But this battle was different. Alexander outsmarted, outmaneuvered and outran (through the flanks) an army five times about his size! Hundreds of thousands of Persians were butchered that day and their bodies lay on the ground waiting for the raptorial birds to prey on.

Strategy is a good subject. It is especially good for reading on a holiday or on a long journey. But reading it on a day like this will not hold me in good stead in my quest to find my next job.

I thought about it for a while. What value can I give for a potential employer? I do graphic design. I write. I do DTP. I design websites. I would be of potential help to some ad agency.

Or if nothing works out, I can do medical transcription. I was a professional medical transcriptionist some time ago, albeit for shorter durations.

Days like these are bad for certain reasons. Apart from no-pay, there is the problem of wasted time. It is a valuable resource that I can’t redeem if not used properly.

So what do I do? I make a list of on-job skills that I want to get better at. I plan for my each day the night before. I work on my skills that I want to improve. I make it quantifiable.  And I review it every night before I go to bed. I ask, “What improvements did I make?” “What can be done differently to make an even better advance?” “Did I waste my time doing things that did not make any difference?”

I am single, and periods like this will recur. I feel it prudent to acknowledge it. This way I will be better prepared every time it happens.

TV and social media is destroying humanity. It is not like you would think.

Kerala is a small southern Indian state by the Arabian sea. As late as 20 years ago, people had at least three dialects that correspond to the three regions – south, middle, and parts of Kerala north-of-the-town-of-Thrissur. People native to these areas used to speak with slight variation in pronunciation and stress.

Malayalam is not a stress-time language. Still, with the idiosyncrasies in stress and pronunciation there was clearly more than one dialect. Not anymore.  Due to the spread of TV, and the popularity of Malayalam channels, everybody now speaks a standard  version of Malayalam.

Consider the people of France, Spain and Italy. They all spoke the same language – Latin. People of these countries used to speak the same language with their characteristic variations. Gradually, these three dialects evolved into three distinctive languages ­- French, Spanish, and Italian.

What if they had TV and electronic media during those early days? Latin would have stayed the same. Arguably, these countries collectively would have had little or no cultural improvement.

If everybody craved for the same things, the world would not function normally. People have varied interests. That is how it was and always been. Some people like to sing while other people like to play a musical instrument. Some love apples while some others love pineapples.

The problem is that people are influenced by what they see and hear. Not just TV. There is internet and social media on everybody’s pocket thanks to the mobile phone.

There is this story of The Babel Tower from The Old Testament.

People turned arrogant and they started building a tower intending to reach up to heaven. God foiled them by confusing their languages. Since nobody understood each-other no more, their attempt was thwarted.

For me this is vital: For humanity to survive, there has to be originality within societies. Among civilizations.

If we need uniqueness in arts and culture, I do not think we are living in the right age. Thanks to TV and the social media. And it is high time we thought about the consequences.

The Joy of Writing (and Running) simple scripts on a web page

For me, the one quality that separates the good ones from the bad is continuous learning. I would suggest that everyone learn something new continually for the rest of their lives. The results can be outstanding.

One example I can show is the venerable Raju Narayana Swamy. An alumnus of my school and college, he had acquired the habit of going deep on a subject early in his life. When he topped the SSLC exam in the state, he reportedly had books on Differential Calculus in his study at home – a subject other students would start to learn only from the next year. He topped literally every exam he has written in his life including the Civil Services (he was No.1 in India). It seems that he has a habit of continually acquiring degrees.  Last time I checked out, it was a few years ago, this brilliant civil servant had just earned a degree in Cyber Law.

I have a tip for learning. Always add to what you already know. Do not bother too much about what you do not know. If you know how to drive a car, try to learn to drive a 6-wheeled truck. If you know basic cooking, try to learn to do specialty dishes. If you do public speaking in your family gatherings, try to speak in the town hall.

Going by that analogy, I am learning to write simple scripts in JavaScript. When the web started out, there were other languages that could be used, like, VB Script and Java to manipulate the DOM. What is DOM?  For the uninitiated, I would say that DOM is the various elements on a web page. DOM stands for Document Object Model.

Currently, JavaScript is the de facto programming language of the web.

I can attach a ‘hook’ to the body element.

<body id=”hook” > </body>

I create a button and add the onclick event handler.

<button onclick= “changeColor ()” > Change Color </button>

I define the function here. (inside script tags)

function changeColor () {

document.getElementById(“hook”).style.backgroundColor =”yellow”;


I see a button named ‘Change Color’ on the screen. And when I click on that, the function is called, and the background color of the web page is changed to yellow.

A lot of people might consider me crazy for writing this.

This is even crazier. Look at the image below.

News Headlines

I did not not use any JavaScript for this. I simply used Inspect Element (Cntl + Shift +I for Chrome on Windows). I then selected one of the news headlines and manually changed it. The above image is the screenshot of the web page.

This is much simpler than it meets the eye.

The fence eats the crop

A slew of charitable institutions had popped up in the Kerala Catholic Church along with the rise of the Charismatic Movement, which I find nothing but Evangelical Protestantism in disguise. Mostly they are so empty-hearted that people who are in charge of such institutions run it like a business like a shop or office. No matter what happens, someone will open it in the morning, every light and fan will turn on like scheduled, and will close for the day in the evening. It is okay for a business, but for a charitable institution this can be ridiculous.

For example, I have known a place where HIV +ve people will get money for medicines. Suppose a person who is not HIV infected goes there and asks for help. They are unable to give any significant help, because funds are not allocated for any  purpose other than HIV medications. The most they can do is direct him to other places.

There is an institution called the Jail Ministry. Their mission includes preaching in jails and rehabilitation of prisoners. But in practice, the clergymen who run it are either criminals or have turned into criminals after starting this ministry.

I had once entrusted all my household articles with them in the place where ex-criminals were rehabilitated. When I came back after a few months, though everyone had known that I had not kept any valuables like cash or jewellery there, I realized that my paraphernalia had been scoured for valuables.

A table still had all my certificates with the key in my hands. I used to live in a men’s dorm at that time. Someone might have accessed my keys from there and I found out that my table’s lock has been cleanly and squarely opened, and all my papers including my educational certificates were stolen from this place that was almost five miles (12 kilometers) from where I lived at that time.

How did someone with access to the keys just enter this place? With the help of the authorities of course, and these authorities are Catholic priests. And the hierarchy can be mapped up to the very people who founded and run the ministry.

I am no Bill Gates. And every year I would think of finishing my graduation. I can’t do it because my certificates are lost. Getting duplicates of SSLC Book and PDC certificate is so cumbersome that I shirk when I think of it.

I do not know what  should I do to get my certificates back?  I would like to complete graduation and I am contemplating legal action.

In Finland, they have a saying which translates into English, The goat guarding the cabbage patch.  Like a fox guarding a henhouse. For me, the Jail Ministry is like the fence which eats into the crop which it promises to guard.

Where the philosophy is inherently flawed

Being born and raised in a traditional Catholic household, I am often worried about the direction where the world is going now. When India embraced capitalism in the 1990s and changed from a socialist economy to a capitalist economy, the aftermath of certain reforms were so radical – since a socialist economy has strong similarity to Catholicism (if not the same).

In capitalism, wealth or capital is of paramount importance although capital is not just money. People are supposed to do a job, earn money, and amass wealth which then can be used to buy goods and services. It supposedly promotes enterprise and hard work. But on the flip side, as I see in the United States, there are a large number of destitute parents, unemployed people, almsmen, homeless people, drug addicts, sex-traders, transgenders and people who are in bondage and slavery.

People like LGBT, transgenders, and the people who support them are  – some knowingly – mostly unknowingly– revolting against the one who created us. God created us with a particular sex. Man is not allowed to tamper with it. Period.

When the leader leads the followers follow. I doubt whether capitalism is playing the proverbial Pied Piper of Hamelin here. India and other third-world nations who embraced capitalism will follow suit. There will be a lot of unfortunate people here interlaced with a few ‘poster boys’ who are being hailed as the success stories of capitalism.

The problem of capitalism– taking a word from their own dictionary ­– is of the mindset. It is flawed because it is devoid of one important ingredient – Love.

Since the whole idea of capitalism is about wealth, other, more important values in life takes a back seat: virtues like humility,  kindness, abstinence, chastity, patience , liberality, and diligence. The degradation in values is not that happens mindfully. As William James, the father of modern psychology, observed –  amassing wealth and the ways-of-a-saint are quite the opposite.

I can personally vouch that my only sister is alive today because I felt compassionate enough to give her all my reserve money, an insignificant amount, so that she could go to the hospital –  and subsequently she was diagnosed with a major illness. What if I had gone the capitalist way and clung-on to my savings – which ironically I was saving for my sister also?

Retirement fund, wealth creation, savings etcetera are inherently flawed ideas. In our society our parents did not have any retirement fund just because children looked after them after retirement. We took care of our parents – for generations. Gladly too – It is our privilege.  And we do it in the generations to come.