Tuesday, December 29, 2009

Formatting rules for UseModWiki

Here are some formatting rules and how to use guide for UseModWiki :-

- Creating a new page
Every Wiki page has an edit button. Click on the edit button and type a wiki word. A wiki word starts with a capital letter and has at least one more capital letter in it. Between the capitals there must be lower case letters. There cannot be two capitals in a row.

e.g. MyWord will bw displayed as MyWord?
Now click on the ? to go to the wiki page

- See the Recent Changes
Type in the URL as http://localhost/cgi-bin/wiki.pl?RecentChanges

The Recent Changes page shows the dates on which the individual pages have been updated.

- Editing Content
Click the edit button on a wiki page. Input the contents in the text field and press the save button.

- Create Links
Page Link: wiki words are treated as links to the corresponding wiki pages.

External Link : use the corresponding URL e.g. http://c2.com

- Search content
Enter the key word that needs to be searched in the text field labelled search at the end of the wiki page.

- Creating Inter Wiki
Our wiki can refer to pages in other Wikis. Edit intermap file in cgi-bin folder and add the entry for the mapping. It contains the mapping for the key word and the corresp URL.

e.g.: UseMod? is the key word and the URL is http://www.usemod.com/cgi-bin/wiki.pl?. Now if we want to refer to a page WhatIsaWiki? in the wiki http://www.usemod.com/cgi-bin/wiki.pl, we just need to refer it as follows: UseMod:WhatIsaWiki

- Having a non-wiki word as a link
[http://c2.com/ppr/about/author/martin.html Martin Fowler] will be displayed as [Martin Fowler]

- Sub Pages
The [SubPage] - [http://www.usemod.com/cgi-bin/wiki.pl?SubPage SubPage] idea allows every main page to contain its own wiki universe of subpages. The subpages can be used to help refactor a large page without the problems /LongPrefixBeforeEachPage?.

Monday, December 28, 2009

Are you Wiki ?

I gave a try to UseModWiki (an implementation of the original Wiki concept created by Ward Cunningham) and found it simply superb! We can use this internally across the teams for sharing information :-)

The name wiki comes from the Hawaiian word wiki wiki, which means quick/fast. There is a famous quote by Glen Wilber: "Knowledge grows faster than the way to organize it !". Wiki does provide an efficient and simpler way to organize and spread the ever growing knowledge across the entire team. It enables easy collaboration and sharing of information across the network.

Why wiki ?
- Similarity to HTML
- Instant Feedback Mechanism
- Accessible anywhere
- Easy Searching
- Easy to learn and use
- Open Source
- Tracking of pages

Installation steps on Windows :-

- Install active perl (http://www.activestate.com/activeperl/)
- Install Apache Web Server (http://httpd.apache.org/download.cgi)
- Extract usemod10 (http://www.usemod.com/wikicode/usemod-1.0.5.zip.)
- Copy wiki.gif from extracted usemod directory to apache htdocs folder.
- Copy wiki.pl from extracted usemod directory to apache cgi-bin folder.
- Edit the first line of wiki.pl so that it shows the right path to perl.exe. (say c:/perl/bin/perl)
- Edit wiki.pl to change the value of $DataDir so that it points to "wikidb" folder (say d:\usemodwiki\wikidb )
- Edit wiki.pl to change the value of $FullUrl so that it points to 'http://localhost/cgi-bin/wiki.pl'
- Start the Apache server.
- Open a browser and type in the url : http://machine-name/cgi-bin/wiki.pl where machine-name refers to the name of your local machine.
e.g. http://localhost/cgi-bin/wiki.pl

Once installed, the wiki is accessible across all machines in the same domain.

This is the simple page that I created on my local machine :-



And clicking on 'RailsTips' link navigates to other page that I created as :-



I will be writing more on formatting rules in my upcoming blog ...

Enjoy being wiki ... :-)

Friday, December 25, 2009

Gitanjali - Poor Heart

" I had gone a-begging from door to door in the
village path when thy golden chariot appeared in
the distance like a gorgeous dream and I wondered
who was the king of all kings!

My hopes rose high and I thought my evil days
were at an end, and I stood for alms to be
given unasked and for wealth scattered on all sides in the dust.

The chariot stopped where I stood. Thy glance
fell on me and thou camest down with a smile, I felt
that the luck of my life had come at last. Then
of a sudden thou didst hold out thy right hand
and say "Why hast thou to give me?"

Ah, what a kingly jest was it to open thy palm
to a beggar to beg ! I was confused and stood
undecided and then from my wallet I slowly
took out the least little grain of corn and gave it to thee.

But how great my surprise when at the day's
end I emptied my bag on the floor to find a least
little grain of gold among the poor heap. I bitterly
wept and wished that I had had the heart to give
thee my all. "

- Rabindranath Tagore

Thursday, December 24, 2009

Seven wonders

A group of students were asked to list what they thought were the present "Seven Wonders of the World." Though there were some disagreements, the following received the most votes:

Egypt's Great Pyramids
Taj Mahal
Grand Canyon
Panama Canal
Empire State Building
St. Peter's Basilica
China's Great Wall

While gathering the votes, the teacher noted that one student had not finished her paper yet. So she asked the girl if she was having trouble with her list. The girl replied, "Yes, a little. I couldn't quite make up my mind because there were so many."

The teacher said, "Well, tell us what you have, and maybe we can help." The girl hesitated, then read, "I think the 'Seven Wonders of the World' are:

to see
to hear
to touch
to taste
to feel
to laugh
and to love."

The room was so quiet you could have heard a pin drop. The things we overlook as simple and ordinary and that we take for granted are truly wondrous!

A gentle reminder -- that the most precious things in life cannot be built by hand or bought by man.

Tuesday, December 22, 2009

Patanjal Yogadarshan

I recently read a very intuitive and scientific book written by Dr. P.V.Vartak -"Patanjal Yog - Vidnyananishtha Nirupan" (Scientific explanation)

Dr. Vartak has explained the Yoga Sutras (threads) in a very scientific language in Marathi with real life examples. He has also established the date of Patanjali as around 5000 BC from reference of Brihadaranyaka Upanishad.

Patnjali was an authority on Yoga and had written way to enlightenment through Yoga (Yoga darshan - vision of Yoga). The Yoga system of Patanjali or the ancient Hindu doctrine of concentration of mind, ways to achieve it, are called Yoga-sutras, of Patanjali.

The Yoga Sutras consist of four chapters (called padas - Pada means 1/4th) :-
1. Samadhi Pada
2. Sadhana Pada
3. Vibhuti Pada
4. Kaivalya Pada

- Samadhi refers to a blissful state where the yogi is absorbed into the One.

- Sadhana is the Sanskrit word for "practice" or "discipline". The author explains karma yoga and ashtaanga yoga.

- Vibhuti is the Sanskrit word for "power" or "manifestation". 'Supra-normal powers' (Sanskrit: siddhi) are acquired by the practice of yoga. e.g. becoming invisible, travelling with a speed much more than a speed of light, reading minds, enter into foreign bodies (parakaya pravesh), etc.

- Kaivalya literally means "isolation", but stands for emancipation, liberation and used interchangeably with moksha (liberation), which is the goal of Yoga.

Here is the link for whoever is interested in reading Patanjal Yogasutras -
http://www.santosha.com/samadhi-pada1.html

But only reading would not help, every one needs to practice this as it is a practical knowledge !

Really great work done by Dr. Vartak ! Hats off to him for bringing this true ancient knoweldge in a very simple and heart touching language !

Monday, December 21, 2009

Display SQL queries in ruby script/console

Whenever we use ruby script/console during development, we often would like to see the SQL queries instantly that get being generated at the backend. Those queries can be a result of method calls on model, named scope, etc.

We just need to execute the below 2 lines to have this enabled on console.

ActiveRecord::Base.logger = Logger.new(STDOUT)
ActiveRecord::Base.clear_active_connections!


And now whenever we will interact with ActiveRecord object method calls, the SQL query will get displayed immediately in the console.

e.g.

Saturday, December 19, 2009

Focus on solutions

When NASA began the launch of astronauts into space, they found out that the pens wouldn't work at zero gravity (Ink won't flow down to the writing surface). In order to solve this problem, they hired Andersen Consulting (Accenture today). It took them one decade and $12 million. They developed a pen that worked at zero gravity, upside down, underwater, in practically any surface including crystal and in a temperature range from below freezing to over 300 degrees C. And what did Russians do ?

The Russians used a Pencil !!!

So, learn to focus on solutions not on problems

"If you look at what you do not have in life, you don't have anything. If you look at what you have in life, you have everything... ! "

Thursday, December 17, 2009

Faith...

Once a priest had been on a long flight. The first warning of the approaching problems came when the sign on the airplane flashed on: "Fasten your seat belts." Then, after a while, a calm voice said, "We shall not be serving the beverages at this time as we are expecting a little turbulence. Please be sure your seat belt is fastened."

As he looked around the aircraft, it became obvious that many of the passengers were becoming apprehensive. Later, the voice of the announcer said, "We are so sorry that we are unable to serve the meal at this time. The turbulence is still ahead of us." And then the storm broke. The threatening cracks of thunder could be heard even above the roar of the engines. Lightening lit up the darkening skies, and within moments that great plane was like a cork tossed around on a celestial ocean. One moment the airplane was lifted on terrific currents of air; the next, it dropped as if it were about to crash.

The priest confessed that he shared the discomfort and fear of those around him. He said, "As I looked around the plane, I could see that nearly all the passengers were upset and alarmed. Some were praying. The future seemed ominous and many were wondering if they would make it through the storm.

And then, I suddenly saw a girl to whom the storm meant nothing. She had tucked her feet beneath her as she sat on her seat and was reading a book. Everything within her small world was calm and orderly. Sometimes she closed her eyes, then she would read again; then she would straighten her legs, but worry and fear were not in her world. When the plane was being buffeted by the terrible storm, when it staggered this way and that, as it rose and fell with frightening severity, when all the adults were scared half to death, that marvelous child was completely composed and unafraid."

The priest could hardly believe his eyes. It was not surprising therefore, that when the plane finally reached its destination and all the passengers were hurrying to get off, he stayed back to speak to the girl whom he had watched for such a long time.

Having commented about the storm and behavior of the plane, he asked why she had not been afraid.

The sweet child replied, "Sir, my Dad is the pilot, and he is taking me home..."

Saturday, December 5, 2009

How much land does a man need ?

The physical desires can never be satiated. The more one attempts to satisfy them, the more intense they grow, even as fire blazes instead of going out when oil is poured into it.

Tolstoy has written a very instructive story under the title "How much land does a man need ?"

- A man was promised free all land he could run round from sunrise till sunset. In his sheer greed to cover more and more land, he ran so far that he never got back to the starting place before sunset, and in utter exhaustion, he died. Only a strip of land, 7 feet, was needed to bury him !