Solid Design Patterns – Open Closed Principle Open Closed Principle In object-oriented programming, the Open Closed Principle states “software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification”; that is, such an entity can allow its behaviour to be extended without modifying its source code. Quick recap, SOLID stands for five…

Read More Solid Design Patterns – Open closed principle

Solid design patterns – Single responsibility principle Here we are going to discuss “Single responsibility principle”. Single responsibility principle: “A class should have one and only one reason to change, meaning that a class should only have one job.” Recently I was reading a book “Clean Code” by Robert C Martin. It is a really…

Read More Solid Design Patterns – Single responsibility principle

Efficient Way to handle deep paging in Solr 4.7 One thing Solr has never been very efficient at is a problem that people refer to as “Deep Paging”. What is the Deep Paging? What is Deep Paging: Imagine the following problem – we have an application that expects Solr to return the results sorted on…

Read More Efficient Way to handle deep paging in Solr 4.7

Rail Budget: Not a single thing for Udaipur (Mewar) Nobody mention of Udaipur-Ahmadabad gauge conversion Rail Ministry, which had been a highly politicized department of the Central Government for past couple of decades, presented its Indian rail budget today. It was bound to be a complex situation for the Rail Minister Sadananda gowda not only…

Read More Rail Budget: Not a single thing for Udaipur (Mewar)

What is Rotated Sorted Array It is nothing but a sorted array, which is twisted/rotated with some pivot element. So if you observe rotated array then it can be classified as two sub-array that is sorted. For example your sorted array A: A = { 0,1,2,3,4,5,6,7,8,9 } and your rotated sorted array look like this:…

Read More Searching an Element in a Rotated Sorted Array