Logo

Aavarana by S. L. Bhyrappa

1 day ago | Niranjan Sarade: InLoveWithNature

Recently I read a Marathi translated version of a novel called 'Aavarana(2007)'. The book has been originally written in Kannada by the bestselling novelist Professor S.L.Bhyrappa and translated in Marathi by Uma Kulkarni. The novel portrays the relationship between Hinduism and Islam - in the past and in the present, with two stories going on a parallel track.

The term 'Aavarana' is used in Vedantic literature to denote that aspect of nescience (Avidya) that obscures all things. It is the 'Avidya' that hides the real truth behind its covers. Prof. SL Bhyrappa chose the same name to his novel because he wanted to highlight the current so called Secular and Social faces in India who are trying to hide the real truth with the help of political support.

The book is very informative as the author has actually referred to many books himself before writing this novel. This list can be found at the end of the book nicely included as a part of the story. The incidents that he has narrated by means of a story are based on these references. The author has made very clear that the relationships between communities should be based on a strong foundation of truth rather than systemic misinformation. To be frank, today's education about the Indian history lacks the truth.

One should definitely read this book and have an introspection about what we have been taught since childhood and what is the actual truth. Certainly, no one should feel against Islam or any other religion, that is not the book's intent as clearly stated by the author. The intent is to understand that no relationship can stand successful if it is not based on a strong foundation of truth. Because truth will never die!

Wah! Guru

9 days ago | Niranjan Sarade: InLoveWithNature

Last Sunday, I watched an excellent Marathi drama called 'Wah! Guru'. My favorite actor Dilip Prabhawalkar performed excellent in casting the character of Professor Sapre. The drama is based on Mitch Albom's best-selling novel 'Tuesdays with Morrie - an old man, a young man, and life's greatest lesson'.

It is a story of courage and optimism of Professor Sapre who is diagnosed with the terminal illness of Motor Neuron Disease (MND), a very rare disease due to which the patient loses his muscular control and finally succumbs to it. But Prof. Sapre asks himself - Do I wither up, or do I make the best of my time left?

He makes Death as his final project. Since everyone is going to die, his death can be taught in personal class, that's what he thinks. He starts teaching the bridge between life and death to one of his students by narrating small inspirational stories. And the student actually benefits from his teachings, his positive attitude.

I liked this dialog - 'When you're in bed, you're dead!'
And also this conversation between the student and the professor:-

Student : "Why should we care or think about death now as it approaches towards end of our life ?"
Professor : "My thinking is opposite. The life ends when death approaches us. And hence we need to think of Death every day."

The ebook is available @TuesdaysWithMorrie

So, please watch this wonderful drama or read the book if you haven't already ! Needless to say that my next plan is to read this book ! :-)

Making Gedit look like Textmate for Ubuntu

11 days ago | Niranjan Sarade: InLoveWithNature

Textmate is the most popular editor tool available exclusively only for Mac OS. Developers love it due to its simplicity, lightweightness and excellent feature set availability. While working on Ubuntu (11.10 64-bit), we have the default gedit editor available which is also very good. However, if we want to have some Textmate like features with gedit, we can follow these simple steps to make gedit look like Textmate:-

(1) Installing extra gedit plugins :-

$ sudo apt-get install gedit-plugins

(2) Installing Textmate 'Monaco' font

Download from http://www.gringod.com/wp-upload/software/Fonts/Monaco_Linux.ttf and execute below commands:



(3) Installing syntax color scheme darkmate.xml

Download the darkmate.xml file from http://grigio.org/files/darkmate.xml

From gedit, go to Edit -> Preferences -> Font & Colors. Then click Add button and locate the download file(darkmate.xml). Also select the Monaco font.



(4) Activating installed plugins from gedit -> Edit -> Preferences -> Plugins



From this pane,we can enable following plugins as per our requirements :-
-Bracket Completion
-Code Comment
-File Browser Panel
-Snippets
-Word Completion, etc.

With these settings, your gedit now looks like Textmate :-




If you want to avoid the above steps, then we have also another option called Gmate. GMate is a collection of plugins, themes/styles and other improvements to get TextMate-like features in Gedit. The package will add some themes and plugins you can enable/disable from the Gedit preferences. To install GMate in Ubuntu, use the following commands:



In the upcoming posts, we will also try some other text editors available for Linux Ubuntu.

Recording tests with JMeter

20 days ago | Niranjan Sarade: InLoveWithNature

We had a requirement of load/performance testing in one of my earlier projects. Instead of using commercial and expensive Silk performer, we gave a try to open source Apache JMeter and it worked really well for the purpose that we were looking for.

The Apache JMeter is an open source software, a 100% pure Java application designed to load test functional behavior and measure performance.

There is an excellent step by step guide available @JMeter proxy Step-by-step for how to record tests with JMeter. The guide explains the steps for creating a test plan with JMeter's proxy. The proxy records the requests sent to the server.

There are different kind of Listeners available for viewing load test results like Aggregate Report, Aggregate Graph, Summary Report, View Results Tree, Monitor Results, etc. Sharing one sample output of Aggregate Report :-



While setting up the load tests, we also need to take care of some config elements for more accurate results like HTTP Cookie Manager, HTTP Authorization Manager,HTTP Cache Manager, HTTP Request Defaults,HTTP Header Manager, etc.

I could not go through all the elements of test plan in depth due to time constraint, but one can go through these documentation links for stepping into more technical details :-

- JMeter User Manual
- Elements of a Test Plan
- Component Reference

Installing VM(with Ubuntu + RVM + Ruby + Rails) on my Windows 7 system

21 days ago | Niranjan Sarade: InLoveWithNature

I wanted to give a try on my Windows 7 system to create and run Virtual Machine with Ubuntu OS. As my colleague Manohar rightly pointed out the reason @Ruby on Rails Development Platform in Enterprise behind this, I followed the instructions to install VMWare and Ubuntu on my Windows 7 laptop.

A. Download and Install VMWare Player which is free for personal non-commercial use.

B. Download 64-bit ISO of Ubuntu.

C. Create a New Virtual Machine for Ubuntu 64-bit using VMware Player. The steps are simple. It takes default 512 MB of RAM but I allocated 2 GB of RAM. It took me around 1 and half hour to install all the necessary files for ubuntu. So have a patience!

My host system configuration :-
Processor: Intel Core Dual i5 CPU, RAM: 6GB, 64-bit Operating System, Windows 7 Home Premium

Some issues that I faced and the corresponding resolution :-

(1) With Ubuntu 32-bit(recommended) ISO file download, the VMWare could not identify the 64-bit Ubuntu OS. So I downloaded 64-bit ISO file for Ubuntu 11.10 verison. With this file, the VMWare was able to detect 64-bit Ubuntu OS correctly.

(2) When I went ahead with the installation, I got 2 warnings/errors :-





To run virtualization software and virtual machines, hardware virtualization technology should be enabled. I enabled Virtualization Technology (VT) in motherboard BIOS settings which is disabled by default and then restarted my machine. This resolved my issue and Ubuntu(64-bit) was then successfully installed on my VM.

I followed the steps mentioned @Ubuntu, Ruby, RVM, Rails, and You to install RVM, Ruby 1.9.3, Rails 3.1.3 and mysql2. The steps are self explanatory and straight forward to follow. Thanks to Ryan Bigg for this !

Now I am ready to try out some ruby/rails development on Ubuntu @ my home pc :-)

Snaps from Sudhagad fort

21 days ago | Niranjan Sarade: InLoveWithNature

My wife and I recently visited Sudhagad fort near Pali. Sharing few snaps captured from Sudhagad fort. (Sunset view is my favorite! :-)

Tailbaila view from top :-




Sunset view :-








Enjoy the nature beauty ! :-)

Security Check Fever

23 days ago | Niranjan Sarade: InLoveWithNature

Terrorist attack is not new to Mumbai, rather I should say to India. After the Mumbai terrorist attack in year 2008 in which around 200 people were openly killed by Pakistani terrorists, the security measure concern was again raised as usual as it has been for every such terrorist attack in past. Security was again made tight in every government as well as private organizations, public places, etc.

However, this Security check Fever unfortunately did not last for long. We Mumbaikars tend to forget things fast as we are so called very busy people tied to the running clock. Thousands of candles were lighted protesting the so called Coward Terrorist Act and our security chain started to become weak once again.

The organization that I work in is India's one of the largest business process outsourcing service organizations. My organization was no exception to this temporary security fever. Initially, the security was made very tight. But since past couple of years, what I have observed is :-

1) Security guards most of the times only pat on the bag/sack to check whether a person is carrying any weighted thing.
2) They just ask people whether you are carrying any laptops/media or not.
3) In one of the office buildings there is no metal detector entrance gate or even no metal detector equipments.
4) The bag is usually not opened properly and checked.
5) The I-card at the very entrance is usually not verified with the person's face carrying the I-card.
6) The decklids of cars are only opened and checked. Security guards don't realize that the things can be carried away or brought inside from inside the car as well. From the bags inside the car or from under the seats for example.
7) Under Car Inspection mirrors are rarely used.
8) Person's shirt/trousers pockets are never checked at all.

I do not want to add more items to this list. The issue is when are we going to learn from History ? After all, the attacker has no different face to identify.
I would not be surprised if any terrorist attack strikes again in any part of Mumbai. And the only responsible people for letting this attack successful would be we, ourselves. So please be cautious and tighten our security measures !
Vande Mataram !

Kashmir photos

about 1 month ago | Niranjan Sarade: InLoveWithNature

I along with my family went to Kashmir tour in the last week of December 2011. The nature beauty truly mesmerized our minds. Sharing some snaps of the paradise on the earth.







Other side of our Indian History

2 months ago | Niranjan Sarade: InLoveWithNature

Sharing Last Speech by Nathuram Godse :-

JANUARY 30th, 1949 - The Mahatma was assassinated by a man called Naturam Godse. After he shot him, instead of running away, he stood his ground and surrounded. He said, "No one should think that Gandhi was killed by a madman"

One of the best speeches of All time, which is compared to Socrates's speech in his trial. The Judge was astonished by his speech and commented that if India had followed the Jury system of giving judgments, Godse would have been adjudicated as "Not Guilty" by the Jury, cause after the speech, the whole audience was in tears.

This is the speech given by Nathuram Godse in the court in his last trial for the murder of Mahatma Gandhi.

"Born in a devotional Brahmin family, I instinctively came to revere Hindu religion, Hindu history and Hindu culture. I had, therefore, been intensely proud of Hinduism as a whole. As I grew up I developed a tendency to free thinking unfettered by any superstitious allegiance to any isms, political or religious. That is why I worked actively for the eradication of untouchability and the caste system based on birth alone. I openly joined anti-caste movements and maintained that all Hindus were of equal status as to rights, social and religious and should be considered high or low on merit alone and not through the accident of birth in a particular caste or profession. I used publicly to take part in organized anti-caste dinners in which thousands of Hindus, Brahmins, Kshatriyas, Vaisyas, Chamars and Bhangis participated. We broke the caste rules and dined in the company of each other.

I have read the speeches and writings of Dadabhai Nairoji, Vivekanand, Gokhale, Tilak, along with the books of ancient and modern history of India and some prominent countries like England, France, America and' Russia. Moreover I studied the tenets of Socialism and Marxism. But above all I studied very closely whatever Veer Savarkar and Gandhiji had written and spoken, as to my mind these two ideologies have contributed more to the moulding of the thought and action of the Indian people during the last thirty years or so, than any other single factor has done.

All this reading and thinking led me to believe it was my first duty to serve Hindudom and Hindus both as a patriot and as a world citizen. To secure the freedom and to safeguard the just interests of some thirty crores (300 million) of Hindus would automatically constitute the freedom and the well being of all India, one fifth of human race. This conviction led me naturally to devote myself to the Hindu Sanghtanist ideology and programme, which alone, I came to believe, could win and preserve the national independence of Hindustan, my Motherland, and enable her to render true service to humanity as well.

Since the year 1920, that is, after the demise of Lokamanya Tilak, Gandhiji's influence in the Congress first increased and then became supreme. His activities for public awakening were phenomenal in their intensity and were reinforced by the slogan of truth and non-violence, which he paraded ostentatiously before the country. No sensible or enlightened person could object to those slogans. In fact there is nothing new or original in them. They are implicit in every constitutional public movement. But it is nothing but a mere dream if you imagine that the bulk of mankind is, or can ever become, capable of scrupulous adherence to these lofty principles in its normal life from day to day. In fact, honour, duty and love of one's own kith and kin and country might often compel us to disregard non-violence and to use force. I could never conceive that an armed resistance to an aggression is unjust. I would consider it a religious and moral duty to resist and, if possible, to overpower such an enemy by use of force. [In the Ramayana] Rama killed Ravana in a tumultuous fight and relieved Sita. [In the Mahabharata], Krishna killed Kansa to end his wickedness; and Arjuna had to fight and slay quite a number of his friends and relations including the revered Bhishma because the latter was on the side of the aggressor. It is my firm belief that in dubbing Rama, Krishna and Arjuna as guilty of violence, the Mahatma betrayed a total ignorance of the springs of human action.

In more recent history, it was the heroic fight put up by Chhatrapati Shivaji that first checked and eventually destroyed the Muslim tyranny in India. It was absolutely essentially for Shivaji to overpower and kill an aggressive Afzal Khan, failing which he would have lost his own life. In condemning history's towering warriors like Shivaji, Rana Pratap and Guru Gobind Singh as misguided patriots, Gandhiji has merely exposed his self-conceit. He was, paradoxical, as it may appear, a violent pacifist who brought untold calamities on the country in the name of truth and non-violence, while Rana Pratap, Shivaji and the Guru will remain enshrined in the hearts of their countrymen forever for the freedom they brought to them.

The accumulating provocation of thirty-two years, culminating in his last pro-Muslim fast, at last goaded me to the conclusion that the existence of Gandhi should be brought to an end immediately. Gandhi had done very well in South Africa to uphold the rights and well being of the Indian community there. But when he finally returned to India he developed a subjective mentality under which he alone was to be the final judge of what was right or wrong. If the country wanted his leadership, it had to accept his infallibility; if it did not, he would stand aloof from the Congress and carry on his own way. Against such an attitude there can be no halfway house. Either Congress had to surrender its will to his and had to be content with playing second fiddle to all his eccentricity, whimsicality, metaphysics and primitive vision, or it had to carry on without him. He alone was the Judge of everyone and everything; he was the master brain guiding the civil disobedience movement; no other could know the technique of that movement. He alone knew when to begin and when to withdraw it. The movement might succeed or fail, it might bring untold disaster and political reverses but that could make no difference to the Mahatma's infallibility. 'A Satyagrahi can never fail' was his formula for declaring his own infallibility and nobody except himself knew what a Satyagrahi is.

Thus, the Mahatma became the judge and jury in his own cause. These childish insanities and obstinacies, coupled with a most severe austerity of life, ceaseless work and lofty character made Gandhi formidable and irresistible. Many people thought that his politics were irrational but they had either to withdraw from the Congress or place their intelligence at his feet to do with, as he liked. In a position of such absolute irresponsibility Gandhi was guilty of blunder after blunder, failure after failure, disaster after disaster.

Gandhi's pro-Muslim policy is blatantly in his perverse attitude on the question of the national language of India. It is quite obvious that Hindi has the most prior claim to be accepted as the premier language. In the beginning of his career in India, Gandhi gave a great impetus to Hindi but as he found that the Muslims did not like it, he became a champion of what is called Hindustani. Everybody in India knows that there is no language called Hindustani; it has no grammar; it has no vocabulary. It is a mere dialect; it is spoken, but not written. It is a bastard tongue and crossbreed between Hindi and Urdu, and not even the Mahatma's sophistry could make it popular. But in his desire to please the Muslims he insisted that Hindustani alone should be the national language of India. His blind followers, of course, supported him and the so-called hybrid language began to be used. The charm and purity of the Hindi language was to be prostituted to please the Muslims. All his experiments were at the expense of the Hindus.

From August 1946 onwards the private armies of the Muslim League began a massacre of the Hindus. The then Viceroy, Lord Wavell, though distressed at what was happening, would not use his powers under the Government of India Act of 1935 to prevent the rape, murder and arson. The Hindu blood began to flow from Bengal to Karachi with some retaliation by the Hindus. The Interim Government formed in September was sabotaged by its Muslim League members right from its inception, but the more they became disloyal and treasonable to the government of which they were a part, the greater was Gandhi's infatuation for them. Lord Wavell had to resign as he could not bring about a settlement and he was succeeded by Lord Mountbatten. King Log was followed by King Stork.

The Congress, which had boasted of its nationalism and socialism, secretly accepted Pakistan literally at the point of the bayonet and abjectly surrendered to Jinnah. India was vivisected and one-third of the Indian territory became foreign land to us from August 15, 1947. Lord Mountbatten came to be described in Congress circles as the greatest Viceroy and Governor-General this country ever had. The official date for handing over power was fixed for June 30, 1948, but Mountbatten with his ruthless surgery gave us a gift of vivisected India ten months in advance. This is what Gandhi had achieved after thirty years of undisputed dictatorship and this is what Congress party calls 'freedom' and 'peaceful transfer of power'. The Hindu-Muslim unity bubble was finally burst and a theocratic state was established with the consent of Nehru and his crowd and they have called 'freedom won by them with sacrifice' - whose sacrifice? When top leaders of Congress, with the consent of Gandhi, divided and tore the country - which we consider a deity of worship - my mind was filled with direful anger.

One of the conditions imposed by Gandhi for his breaking of the fast unto death related to the mosques in Delhi occupied by the Hindu refugees. But when Hindus in Pakistan were subjected to violent attacks he did not so much as utter a single word to protest and censure the Pakistan Government or the Muslims concerned. Gandhi was shrewd enough to know that while undertaking a fast unto death, had he imposed for its break some condition on the Muslims in Pakistan, there would have been found hardly any Muslims who could have shown some grief if the fast had ended in his death. It was for this reason that he purposely avoided imposing any condition on the Muslims. He was fully aware of from the experience that Jinnah was not at all perturbed or influenced by his fast and the Muslim League hardly attached any value to the inner voice of Gandhi.

Gandhi is being referred to as the Father of the Nation. But if that is so, he had failed his paternal duty inasmuch as he has acted very treacherously to the nation by his consenting to the partitioning of it. I stoutly maintain that Gandhi has failed in his duty. He has proved to be the Father of Pakistan. His inner-voice, his spiritual power and his doctrine of non-violence of which so much is made of, all crumbled before Jinnah's iron will and proved to be powerless.

Briefly speaking, I thought to myself and foresaw I shall be totally ruined, and the only thing I could expect from the people would be nothing but hatred and that I shall have lost all my honour, even more valuable than my life, if I were to kill Gandhiji. But at the same time I felt that the Indian politics in the absence of Gandhiji would surely be proved practical, able to retaliate, and would be powerful with armed forces. No doubt, my own future would be totally ruined, but the nation would be saved from the inroads of Pakistan. People may even call me and dub me as devoid of any sense or foolish, but the nation would be free to follow the course founded on the reason which I consider to be necessary for sound nation-building. After having fully considered the question, I took the final decision in the matter, but I did not speak about it to anyone whatsoever. I took courage in both my hands and I did fire the shots at Gandhiji on 30th January 1948, on the prayer-grounds of Birla House.

I do say that my shots were fired at the person whose policy and action had brought rack and ruin and destruction to millions of Hindus. There was no legal machinery by which such an offender could be brought to book and for this reason I fired those fatal shots.

I bear no ill will towards anyone individually but I do say that I had no respect for the present government owing to their policy, which was unfairly favourable towards the Muslims. But at the same time I could clearly see that the policy was entirely due to the presence of Gandhi. I have to say with great regret that Prime Minister Nehru quite forgets that his preachings and deeds are at times at variances with each other when he talks about India as a secular state in season and out of season, because it is significant to note that Nehru has played a leading role in the establishment of the theocratic state of Pakistan, and his job was made easier by Gandhi's persistent policy of appeasement towards the Muslims.

I now stand before the court to accept the full share of my responsibility for what I have done and the judge would, of course, pass against me such orders of sentence as may be considered proper. But I would like to add that I do not desire any mercy to be shown to me, nor do I wish that anyone else should beg for mercy on my behalf. My confidence about the moral side of my action has not been shaken even by the criticism levelled against it on all sides. I have no doubt that honest writers of history will weigh my act and find the true value thereof some day in future."

Steve Jobs

2 months ago | Niranjan Sarade: InLoveWithNature

I recently read one Marathi book - 'Steve Jobs:Ek Zapatlela Tantradnya (A Passionate Technologist)' written by Achyut Godbole and Atul Kahate. It's a brief biography of Steve Jobs - about his passion, life, attitude, innovations, revolutions and dreams.

The authors have referred to some of the books including 'Steve Jobs: The Exclusive Biography' by Walter Isaacson for writing his biography in brief while touching some important aspects.

I would like to mention one incident which I liked the most from this book. While Steve was viewing one printed circuit board of the earlier apple computer, he found that few circuit lines were not as straight as they should have been. So he immediately asked the engineers to change its design for making it perfect. His thinking was - 'Internal design beauty is as important as external design. We should strive for perfection.'

From his quotes -
'Design is the fundamental soul of a man-made creation that ends up expressing itself in successive outer layers of the product or service. The iMac is not just the color or translucence or the shape of the shell. The essence of the iMac is to be the finest possible consumer computer in which each element plays together.'

Really a lot of things to learn from him ! Hats off to you Steve !

Inverted Waterfall chart with Highcharts

3 months ago | Niranjan Sarade: InLoveWithNature

Pushed inverted waterfall chart implementation with Highcharts to Github @inverted-waterfall-chart

e.g. Zero Gap, i.e. Planned Savings = Actual Savings


Positive Gap, i.e. Actual Savings > Planned Savings


Negative Gap, i.e. Actual Savings < Planned Savings

Poems

4 months ago | Niranjan Sarade: InLoveWithNature

This is the collection of some of my poems written in my mother tongue - Marathi language :-

http://dhundamanasi.wordpress.com/about/
http://dhundamanasi.wordpress.com/

Enjoy ... :-)

Good to know about Indian coins

5 months ago | Niranjan Sarade: InLoveWithNature

I read this information about Indian coins in one Consumer magazine.
Indian coins are mainly produced in four cities:- Delhi,Mumbai, Hyderabad and Kolkata. The production in city puts an identification mark under the year of issue. Coins produced in:
1. Delhi - have a dot
2. Mumbai - have a diamond
3. Hyderabad - have a star
4. Kolkata - nothing beneath the year.

http://www.oceanofweb.com/interesting/facts-indian-coins.html

Alluring nature and Indian village farms

7 months ago | Niranjan Sarade: InLoveWithNature

The rain is in full swing here and my friends of Shivashourya trekkers, Mumbai recently had a Panhalgad to Pavankhind - Vishalgad 2011 Padabhraman activity trek. They also visited waterfall in Marleshwar on their return journey. The trek was as usual fantastic. Unfortunately I was not able to join them due to some reasons. However, they sent the photographs to me. The photos reminded me of my last year visit (Paalakhi mohim) to the same place. I am sharing some beautiful nature snaps that my friends shared with me.







I remember one very good quote from John Muir about the nature - "Climb the mountains and get their good tidings. Nature's peace will flow into you as sunshine flows into trees. The winds will blow their own freshness into you, and the storms their energy, while cares will drop off like autumn leaves !"

Contributing to ScaffoldHub.org

7 months ago | Niranjan Sarade: InLoveWithNature

Few months back, my colleague Pat Shaughnessy launched ScaffoldHub.org. It is a collection of Rails scaffold generators contributed by members of the Rails community.

The basic idea behind this website is to take rails standard scaffolding one step farther; it’s a gallery of different variations on the simple CRUD app that the standard Rails scaffold generator produces. Each of these is called a "scaffold."

Each scaffold might use a certain JQuery plugin (e.g. autocomplete or date picker) or Rails gem (e.g. Paperclip or Will Paginate). This is a great way to get a jump start on learning how to use that particular plugin or gem with Rails. In seconds you see something working in your app, and then you can take a look at the generated scaffolding code in detail to see how it works and adapt it to your needs.

Thanks Pat for building this site ! Pat has also written a nice blog about how to contribute a scaffold @contributing-a-new-scaffold-to-scaffoldhub

I contributed 3 scaffolds to Scaffoldhub.org. Initially, it took me some time to contribute my first scaffold to this site, however for rest of my scaffolds, it was really quick as I already knew the steps.

Here are my 3 scaffolds that you may want to try :-
(1) ClearableTextField - Standard Rails scaffolding with JQuery Clearable Text Field plugin. It shows up a cross icon to clear value when user inputs something in a form field and the icon disappears when you clear the field.

(2) WheelColorPicker - JQuery Wheel Color Picker scaffold adds color picker functionality to HTML form inputs in the round color wheel fashion. The Wheel Color Picker dialog appears as user focuses the input.

(3) Cleditor - The cleditor scaffold is based on CLEditor jQuery plugin which provides a lightweight, full featured, cross browser HTML editor that can be easily added into any web site.

Something good to read !

8 months ago | Niranjan Sarade: InLoveWithNature

After a long time, I got a chance to read two wonderful books - 'The old man and his God' and 'Wise and Otherwise'. The books are written by Sudha Murthy. She has shared her own real life experiences in such a beautiful narrative way that they touch your heart. The most important thing behind narrating these incidences is to pass on a specific message to the reader so that he/she can think over it, can relate the stories to his/her own life experiences and last but not the least can act upon it.

The stories such as freedom of speech, the journey, two faces of poverty, the grateful tenant, an old man's ageless wisdom, forgetting our own history, a bond betrayed on rakhi day, light as many candles as possible, bahut kuch hota hain, Salaam Namaste, crisis of confidence, etc. teach us many things. I am sharing some good thoughts from this book.

----
This is the reply that an old man from Kalahandi forest gave to Sudha Murthy when she showed him some Indian currency :
"This is just a piece of paper. For this paper, people fight, go away from our ancestral land,leave our forest and go to cities. Have we not led a complete life without the piece of paper? Our ancestors did. We are children of God, settled here happily without this paper. This is God's land. Nobody owns this land. No river is created by us. No mountain is made by us. The wind does not listen to us. The rain does not ask our permission. These are gifts of God. How can we 'sell' or 'buy' land, I do not understand. When nothing is yours, then how can you make such transactions?"
The writer ends this chapter with following question: Who is more civilized- this wise old man in the forest or those of us with our fingers on the pulse of the Internet?

----
Everybody should know his/her own capacity and strength. One should also know one's limitations. It is more difficult to recognize our weaknesses than our strengths. Don't aim for the sky. Keep your feet firmly on the ground and work around you. There is so much misery and gloom, but it is better to light a single candle than to remain in darkness. Try to light as many candles as possible.

----
Education means more than scoring good marks in exams or receiving certificates. Life is an exam where the syllabus is unknown and question papers are not set. Nor are there model answer papers. There are various types of questions that can come from any direction, but one should not run away. Education and financial independence are tools that can help us face difficulties, but confidence must be developed throughout life.

----
Each patient is precious. If a patient dies, it is just one more hospital death for the doctor. But for the unfortunate family, it is a permanent loss.

There are a lot of good messages like above ones in these two books. I am sure I have lit a small candle of interest into your minds, and you are certainly going to read these books if you haven't already. Happy reading ! :-)

LogFileTailer - simple sinatra app

10 months ago | Niranjan Sarade: InLoveWithNature

It is never too late to contribute. Following on my year 2009 post - sinatra - web application framework in ruby, I recently pushed that code to github @http://github.com/NiranjanSarade/LogFileTailer

Converting Unix newlines (LF) to Windows newlines (CR\LF)

11 months ago | Niranjan Sarade: InLoveWithNature

In one of my earlier projects, I faced an issue with newline characters in csv file. The csv file generated on a unix system was uploaded to Windows system through sftp. However, the program on the Windows server was not able to parse the file properly as the csv file contained Unix newlines (LF) instead of Windows newlines (CR\LF) at the end of each line.

The problem is UNIX/Linux uses a Line Feed character (\n) as a line terminator while Windows uses Carriage Return\Line Feed pairs (\r\n).

For those who want to know what is the exact difference between CR, LF and EOL characters, here is a brief description :-

The Carriage Return (CR) character (0x0D, \r) moves the cursor to the beginning of the line without advancing to the next line. This character is used as a new line character in Commodore and Early Macintosh operating systems (OS-9 and earlier).

The Line Feed (LF) character (0x0A, \n) moves the cursor down to the next line without returning to the beginning of the line. This character is used as a new line character in UNIX based systems (Linux, Mac OSX, etc)

The End of Line (EOL) character (0x0D0A, \r\n) is actually two ASCII characters and is a combination of the CR and LF characters. It moves the cursor both down to the next line and to the beginning of that line. This character is used as a new line character in most other non-Unix operating systems including Microsoft Windows, Symbian OS and others.

I was able to resolve this issue with 'Sed' (Stream Editor). (http://www.grymoire.com/Unix/Sed.html)


The command matches the regexp pattern ($ - ending position of line or the position just before a string-ending newline) and replaces it with '\r' (Carriage Return). So the end result would be conversion from '\n' to '\r\n' which will support windows new line format.

Setting up Oracle XE locally for your Rails app

11 months ago | Niranjan Sarade: InLoveWithNature

I recently pushed 'database_initializer.rb' to github @http://github.com/NiranjanSarade/oracle_xe_database_initializer. Please check its README for more information.

This can be used to set up your schema and other database objects in your local Oracle XE database. The script assumes that you have following set up on your machine :-

1. Oracle client
2. activerecord-oracle_enhanced-adapter gem
3. Oracle XE (http://www.oracle.com/technetwork/database/express-edition/downloads/index.html)

Approach for Oracle view unit testing with Rspec

11 months ago | Niranjan Sarade: InLoveWithNature

A View in Oracle and in other database systems is simply the representation of a SQL statement (select query). It provides access to a subset of columns from one or more tables.

In a rails migration, when you incorporate a view definition which represents data from multiple tables with multiple joins and multiple conditions, how will you ensure that the view is fetching the data that it is supposed to fetch? How will you test the view logic?

And here, Unit Testing plays a very important role. Today, I am going to tell you the simple approach that we can follow for unit testing the view definition with Rspec.

First, with rails convention, you will create the model class (which maps to the view name) extending ActiveRecord::Base.
You will then set up the test data as you generally set for testing other model methods. (You can use factory_girl or simple model methods)
The purpose is to unit test each and every column data of the view according to the joins and the conditions. It all depends on the view logic that you have written according to your business requirement. The view definition can include decode statements, group by/ order by clauses, oracle aggregator functions e.g. sum, max, etc., function calls from the view sql, if-else logic to name a few.

With this, you have all the unit level requirement specs ready for your view which you can validate by running your Rspecs. Simple but succinct ! Isn't it ?

Installing windows platform specific gem libxml-ruby with Bundler

11 months ago | Niranjan Sarade: InLoveWithNature

I was facing some issue in installing 'libxml-ruby' gem on my windows machine with bundler. The entry in the Gemfile was :-

gem 'libxml-ruby', '1.1.3', :require => 'libxml'

This works perfect on unix machines, but fails on windows machine (which is my local development platform) during building native libraries.

The DevKit has already been set up on my machine. So I tried doing gem install first :-


So, I mentioned the platform while doing gem install and it worked as below :-

D:\>gem install libxml-ruby -v=1.1.3 --platform x86-mswin32-60
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
Successfully installed libxml-ruby-1.1.3-x86-mswin32-60
1 gem installed
Installing ri documentation for libxml-ruby-1.1.3-x86-mswin32-60...
Installing RDoc documentation for libxml-ruby-1.1.3-x86-mswin32-60...
D:\>


However, with bundle install, it gave the same error on the windows machine : ERROR: Failed to build gem native extension.
I tried specifying Gemfile :platforms option - 'mswin', 'mingw' for Windows platform, but it did not work.

Finally, the :path parameter rescued me out of the pain. With :path parameter, you can specify that a gem is located in a particular location on the file system. The ':path' option requires that the directory in question either contains a '.gemspec' for the gem, or that you specify an explicit version that bundler should use. So the bundler uses the gem from the source specified in the path and it resolved my issue with installing libxml-ruby gem with bundler on windows machine. The steps that I followed :-

(1) Download the libxml-ruby-1.1.3-x86-mswin32-60.gem gem from http://rubyforge.org/frs/?group_id=494 and do gem install
OR
gem install libxml-ruby -v=1.1.3 --platform x86-mswin32-60

(2)From app_root>gem unpack libxml-ruby-1.1.3-x86-mswin32-60

(3) Gemfile.lock :-

gem 'libxml-ruby-1.1.3-x86-mswin32-60', '1.1.3', :require => 'libxml', :path => 'vendor/gems/libxml-ruby-1.1.3-x86-mswin32-60'

(4) Now, when you execute bundle install, it will bundle the gem from the source specified in the :path -

Using libxml-ruby-1.1.3-x86-mswin32-60 (1.1.3) from source at vendor/gems/libxml-ruby-1.1.3-x86-mswin32-60

Moving on to Bundler to manage my Rails 2.3.9 app's gem dependencies

11 months ago | Niranjan Sarade: InLoveWithNature

Recently I faced some gem dependency issues on one of our servers where we have a good amount of rails applications. (more Rails 2.3.x apps as compared to a couple of Rails 3.0.x apps). (This was a cruise box used by all apps to execute rspecs and generate metric_fu reports after you commit your code - Continuous Integration concept :-)

My app was using Rails 2.3.9, and due to some reason, I did not get a chance earlier to move my application to use Bundler for managing all the gem dependencies. Finally, I made it :-)

I followed 2 links :-
http://gembundler.com/
http://gouravtiwari.blogspot.com/2011/03/bundler-with-rails-222.html

Since then, I have not faced any gem dependency issues on any of the boxes.
So what are you waiting for ? If you haven't done it till date, do it now ... or you will spend (waste?) time in resolving weird gem dependency issues ... :-)

A good learning for me !

Avoid oracle sequence during ActiveRecord model record insert

12 months ago | Niranjan Sarade: InLoveWithNature

I was writing rspecs for one ActiveRecord model in my project and was connecting to different schema in which the corresponding mapping table was defined. The schema object (tables) definition was a legacy code, what I meant to say is I used the already existing object definition from that schema which was not using oracle sequence. There was no primary key for that table as well.

I was setting up the data for that table in my rspec using ActiveRecord insert.

e.g. AnotherSchema::TableObject.create(:ts => 123, :proj_code => "ABC", ...)

But, in Rails, when you try to insert the record with ActiveRecord Model, it always looks for a sequence, either a default one (Table_Object_seq) or explicitly defined one with set_sequence_name in the Model class.

So, it threw error as expected :-
OCIError: ORA-02289: sequence does not exist: select "Table_Object_seq
".nextval id from dual

I could have defined a sequence on this table only in the test database, but I googled around for a way to avoid oracle sequence in a model and I got this link :-
http://www.dixis.com/?p=127

I followed the suggestion and it worked for me :-)

What I did was :-

Monkeypatching OracleEnhanced Adapter's next_sequence_value method :-


and adding set_sequence_name to the Model class :-

set_sequence_name 'autogenerated'

It avoided the default oracle sequence look up while inserting new records with Rails ActiveRecord methods which solved my problem.

Fantastic photography

12 months ago | Niranjan Sarade: InLoveWithNature

Sharing few fantastic photographs that my wife forwarded to me ... Enjoy !











Speech by Shankar Abhyakar on Veer Savarkar

about 1 year ago | Niranjan Sarade: InLoveWithNature

Few days ago, I listened to a great speech series (in Marathi language) given by Vidyavachaspati Shankar Abhyankar on Swatantryaveer Vinayak Damodar Savarkar. (http://www.savarkar.org/en/audio)

I have always admired greatness of Savarkar. He was a fearless freedom fighter, social reformer, writer, dramatist, poet, historian, political leader and philosopher to name a few. After listening to the speech, my respect about him got multiplied by thousand times. A good amount of information about Veer Savarkar and some of his books are made available at http://www.savarkar.org/ in both Marathi and English languages. Please read and get inspired !

Vande Mataram !

Do you really need a Code Beautifier ?

about 1 year ago | Niranjan Sarade: InLoveWithNature

A food of thought! As a good developer, do you really need a Code Beautifier?

This thought came to my mind when I was reviewing my friend's code which was not properly intended for whatever reason and appeared to me as if scribbled on a paper. Soon I got frustrated comprehending the code with my brain muscles stretching out beyond their limits. When I asked the reason behind improper indentation, I got an answer (rather a question) - Do we have a good code beautifier which would properly intend the code without human intervention? That was an unexpected answer to me. There are certainly a lot of paid and open source code beautifier tools available, but do we really need them when we write a code?

Why can't we make it a good practice to properly intend the code when we write? Almost all IDEs provide good facility to have proper indentation and formatting. Why am I emphasizing so much on this? In my opinion, a good readable and logically structured code is necessary not merely for outlook. It actually reflects your mind - your attitude, discipline and neatness. This also brings a very important aspect when you are collaborating amongst your development team.

Yes, when you download a third party code and if that code is not properly formatted, then the code beautifier tools play a good role in making the code clean and readable. The code beautifiers are meant for existing ugly code faces, they are not meant for fresh development!

The ultimate message is - whenever you are creating something, be it a code or anything... make it always beautiful .... :-)

Going crazy with to_proc - A nice post by Iain Hecker

about 1 year ago | Niranjan Sarade: InLoveWithNature

In my project, I was trying to pass an argument to my object's method being called as &:symbol_name in the collect method of an Array.

I googled to find whether any one has faced this before and I found a very nice post by Iain Hecker - http://iain.nl/2010/02/going-crazy-with-to_proc/

With his implementation, I was able to solve my problem. Thanks Iain !

It's time to REWORK !

about 1 year ago | Niranjan Sarade: InLoveWithNature

A couple of weeks ago, while I was talking to my colleague Gourav in his team room, a book lying on his desk caught my eye. The front cover image of a crumpled paper and the title of the book - REWORK - sounded interesting to me. I asked my friend whether I could borrow that book for some days from him and as expected, he happily agreed :-)
Thanks Gourav for this beautiful book !

The book has been written by Jason Fried and David Hansson, the founders of 37signals. (the authors say the book is a by-product :-)



You can read through any chapter of this book and you will feel like - yes, this is how it should be ... The authors speak the truth as it emerges from their practical and sound business experience. As the book review says, you do not need to be a workaholic, you do not need to staff up, you do not need to waste time on paperwork or meetings, etc. ... Those are all just excuses. What you really need to do is stop talking and start working.

The authors touch various aspects in running a successful business such as productivity, progress, competitors, promotion, hiring, damage control, culture, etc. They conclude the book with a chapter - 'Inspiration is perishable.' I am tempted to share some part of this chapter as I liked it the most.

"We all have ideas. Ideas are immortal. They last forever.

What doesn't last forever is inspiration. Inspiration is like fresh fruit or milk. It has an expiration date.

If you want to do something, you've got to do it now. You can't put it on a shelf and wait two months to get around to it. You can't just say you'll do it later. Later, you won't be pumped up about it anymore.

Inspiration is a magical thing, a productivity multiplier, a motivator. But it won't wait for you. Inspiration is a now thing. If it grabs you, grab it right back and put it to work."


Hmm ... worth reading this book my friends !
Ohh ... have you already started googling around this book name ? ... That's what I anticipate from whoever has not read this book before :-)

Enjoy reading ...

My first Android app with Rhodes

about 1 year ago | Niranjan Sarade: InLoveWithNature

Few days back, I attended a free online course on 'Develop Mobile apps on Android phones with Rhodes'. The course was made available on RubyLearning.org by Ruby mentor and evangelist Satish Talim. Though it was a very basic course, I got a good hands on the Rhodes framework. Good learning for me ! :-)

I am not going to list down the steps for building this sample app as these are very well explained in the online course by Satish Talim. Similar steps are also available at Rhohub and Rhodes sites under documentation. So I would request everyone who is interested to learn Rhodes to attend this course. It is definitely a good beginning.

The app that I created was a simple Contact app where you can enter Contact's name, email, phone and country and can perform CRUD operations on the Contact model. I pushed my app to Rhohub via Git. This is snapshot of my app on Android emulator :-



Looks good and simple ! Isn't it? Planning to try some advance things with Rhodes now!

The Secret book by Rhonda Byrne

about 1 year ago | Niranjan Sarade: InLoveWithNature

Another good book that I read few days ago! Thanks to my friend Swati Desai for gifting me this wonderful book which talks about spreading only positive thoughts and energy into the Universe. The book reminded me of the famous Alchemist quote :- "When a person really desires something, all the universe conspires to help that person to realize his dream."

As the book says, the negative thought gets only multiplied in your mind. It is true. When you have a negative thought about a person or his behavior, you will notice it really gets multiplied. You tend to think more negative things about the person which never existed before in your mind about that person. It is of no use to your state of mind and also to the person who you are thinking about. You start to attract your dominant thoughts. You spoil your own life.

Instead why not try to inculcate positive thoughts into our mind? The thoughts full of positive energy, positive attitude and positive beliefs ! As the book says, happy and positive feelings will attract more happy and positive circumstances. It costs zero money from your pocket.

Hmm... it's time to act on it now!

This is the official website of The Secret :- http://www.thesecret.tv/

I have signed up for the the Secret Scrolls on this site. Have you ?

Enjoy reading ...

The Passionate Programmer by Chad Fowler

about 1 year ago | Niranjan Sarade: InLoveWithNature

At the outset I would like to thank my colleague Amit Kumar who gave me 'The Passionate Programmer' book to read. When he handed over the book to me, he said - "Do not only read, but try to implement as well !" That's really true Amit.

While I was going through the chapters, I found that there are many small things that we can begin to implement to make a remarkable career in software development as the book title says. I liked the way Chad has correlated his musical experience with the software development career smoothly. You really enjoy and learn a lot while reading this book. It is a sort of introspection for yourself.

Please also read :-
http://pragdave.blogs.pragprog.com/pragdave/2009/05/the-passionate-programmer.html

I plan to implement some concepts/thoughts from this great book ! :-)

Enjoy reading !

jQuery UI Multiselect

about 1 year ago | Niranjan Sarade: InLoveWithNature

There was one requirement of selecting multiple values for an attribute in my project and I was searching for some fancy but simple to use multiselect UI widget which will allow the user to select/drag drop multiple values from the panel of available items to the panel of selected items.

I found jQuery UI Multiselect and was able to use that in my project within a very short time. It is really easy to use and provides some good features like :-

- Search within available options
- Displaying count of selected and available items
- Select All / Deselect All links
- Dragging items from the available list to the selected list directly

You can configure the multiselect widget with options like sortable, searchable, dividerLocation for the panel width division, etc.

I personally liked the look and feel and the functionality of this ui widget !

The Oscar Wilde Collection

over 1 year ago | Niranjan Sarade: InLoveWithNature

Here is a link to the collection of Oscar Wilde's stories, poems and plays.

http://www.oscarwildecollection.com/

'The Picture of Dorian Gray' is the best I think.

Enjoy reading !

Who will cry when you die by Robin Sharma

over 1 year ago | Niranjan Sarade: InLoveWithNature

I recently read 'Who will cry when you die?' book written by Robin Sharma - the author of the best seller 'The Monk who sold his Ferrari'. The book is a collection of 101 life lessons explained in a very short but succinct manner. Even if we practice only some of these lessons in our day to day life, it will certainly enrich the quality of our personal and professional life. Listing some of the lessons that I liked the most:-

- Start Your Day Well
- Talk to Yourself
- Remember, Genius Is 99 Percent Inspiration
- Get Up Early
- Laugh More
- Spend a Day Without Your Watch
- Take More Risks
- Live a Life
- Always Carry a Book with You
- Enjoy the Path, Not Just the Reward
- Get Good at Asking
- Connect with Nature
- Use Your Commute Time
- Get Serious About Setting Goals
- Walk in the Woods
- Listen to Music Daily
- Learn to Meditate
- Stop Complaining and Start Living
- See Your Day as Your Life
- Be Humble
- Don’t Finish Every Book You Start
- Sleep Less
- Learn How to Walk
- Plant a Tree
- Be an Adventurer
- Respect Your Instincts
- Love Your Work

Enjoy reading !

The right perspective

over 1 year ago | Niranjan Sarade: InLoveWithNature

I must thank my friend Sudhir Bangera for sending this very nice story to begin with my day of work. It's actually a food of thought for all ... Sharing the same.

Two brothers grew up in an orphanage. The warden of the institution was a pesky fellow, who would often say terrible things to the children.

Years passed. The little boys grew up to become fine young men, and in time got married and had families of their own.

The elder brother grew up to become bad tempered and gave his family lot of grief. The younger brother, however, turned out to be a good parent and husband. He was successful both in his professional and personal life. People who knew them would express surprise over how the two brothers were so different from each other, in spite of facing the same circumstances while growing up.

The elder brother would say, “The warden, whom we all looked upon as almost a father, set us a bad example. I had no one to guide me, so I couldn’t help but turn out the way he was. It’s not my fault, I have become like him because of my circumstances.”

And, the younger brother would say, “The warden never taught me good values or behavior. But growing up, I made a promise to myself, to hold him as an example of what not to be and to make sure that I don’t to do the things he did.”

How many times have we blamed our failures over bad circumstances or rotten luck? True success and happiness comes from making the best out of a bad situation and looking at things with the right perspective. Look at the brighter side of situations ...

Have a thoughtful day ahead ! :-)

Panoramic view of Naigara falls

over 1 year ago | Niranjan Sarade: InLoveWithNature

Sharing some beautiful snaps of Naigara falls that I have tried to capture in my small camera... Enjoy !











Mount Washington photos

over 1 year ago | Niranjan Sarade: InLoveWithNature

On October 2, 2010, my wife and I visited Mount Washington (New Hampshire) along with my friends. Mt. Washington is the highest peak in the Northeastern United States. (6288 ft). It was a wonderful experience that can not be expressed in the words. I have tried to capture the nature's beauty in my camera! Sharing some photos...