Ruby : There difference between puts and `p` methods

Note: There is vast difference between `p` and `puts` though they might look behaving similarly. For normal string there seem no difference in behavior however when there comes multi-line string or string containing CR / LF characters then the difference is vivid.

p "first line\n second line>>  "first line\n second line" 
 
puts "first line\n second line>>  first line 
        second line

Continue reading

Ruby : Similarity and Difference between Symbol and String with facts

No matter how they behave, Symbol and String in Ruby are alike. We can define Symbols as a type of String ( just according to behavior ). We often use them interchangeably in our code knowingly or unknowingly. Its has been said that Symbols are better than String however many of us are unaware about the core reasons. Continue reading

Difference between ORM and ODM

MySQL is an example of a relational database – you would use an ORM to translate between your objects in code and the relational representation of the data.

Examples of ORMs are nHibernate, Entity Framework, Dapper and more…

MongoDB is an example of a document database – you would use an ODM to translate between your objects in code and the document representation of the data (if needed).

Mandango is an example of an ODM for MongoDB.