Technology

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

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

While creating API for Android App, i came across with very simple but difficult (for me) problem. How would it be possible to generate a random, unique string using numbers and letters for verfiy user, Something like api_key which is unique to user but at the same time it shuold be safe and it will…

Read More How to generate a random, unique string using numbers and letters

Subfolders and Subdomains have their own pros and cons if viewed from business viewpoint. However, these day’s website owners more interested in  focusing their efforts on SEO. Which one to choose Subfolder or Sub Domain for my blog promotion? If you are thinking of launching a new blog, then using a sub-folder will bring better…

Read More Subfolders v/s Subdomains: Which one to choose for SEO?