Wednesday, January 20, 2010

Ruby's block_proc_lamda_method

I went through a couple of articles on ruby's blocks, procs, lambda & method and found those really good and interesting. Sharing those articles :

http://www.robertsosinski.com/2008/12/21/understanding-ruby-blocks-procs-and-lambdas/

http://www.neeraj.name/blog/articles/589-block-vs-lambda-vs-proc

Monday, January 18, 2010

Company

Finding that cranes were destroying his newly sown corn, a farmer one evening set a net in his field to catch the destructive birds. When he went to examine the net next morning he found a number of cranes and also a stork.

"Release me, I beseech you," cried the stork, "for I have eaten none of your corn, nor have I done you any harm. I am a poor innocent stork, as you may see - a most dutiful bird, I honor my father and mother, I..."

But the farmer cut him short. "All this may be true enough, I dare say, but I have caught you with those were destroying my crops, and you must suffer with the company in which you are found."

Moral: People are judged by the company they keep.

Saturday, January 16, 2010

The Right Speech

There is a Chinese saying which carries the meaning that "A speech will either prosper or ruin a nation." Many relationships break off because of wrong speech. When a couple is too close with each other,we always forget mutual respect and courtesy. We may say anything without considering if it would hurt the other party.

A friend and her millionaire husband visited their construction site. A worker who wore a helmet saw her and shouted,"Hi, Emily! Remember me? We used to date in the secondary school." On the way home, her millionaire husband teased her, "Luckily you married me.Otherwise you would have been the wife of a construction worker." She answered ,"You should appreciate that you married me. Otherwise, he would have been the millionaire and not you."

Thursday, January 14, 2010

Model diagram generator plugin

After my one of the last posts Shaping models in Rails, I got a chance to convert that piece of code into a Rails plugin.

It has been rolled out to Github.

Github Repository :- http://github.com/NiranjanSarade/model-diagram-generator

Installation :-
ruby script/plugin install http://github.com/NiranjanSarade/model-diagram-generator.git/

Usage :-
rake model_diagram:generate
It will generate diagramatic representation of the model relationship present in your rails app. The model_relationship.dot and model_relationship.png files will be generated at the application root folder.

It was a nice feeling with contributing something to the open source community !

Wednesday, January 13, 2010

Formatting rules of UseModWiki ...

In continuation of my previous post Formatting Rules, you will find this link very useful :- http://www.usemod.com/cgi-bin/wiki.pl?TextFormattingRules

Tuesday, January 5, 2010

Ryan's_Video_Railscasts.to_s

ASCIIcasts are text versions of each Railscast developed by Ryan Bate, each with a link to the original video. So if we want to refer the text version of the railscasts, just refer this link :-

http://asciicasts.com/

Monday, January 4, 2010

Ruby/Rails Tool Box

Here is a good link for Ruby/Rails tool box which has collection of many utilities/tools to address different development life cycle concerns like deployment, testing, code metrics, continuous integration, project management and many more ...

http://www.ruby-toolbox.com/