enter image description here

Postgres uses a mechanism called MVCC(Multi Version Concurrency Control) to track changes in your database. Due to this reason, some of the rows become “dead”. Dead rows are generated by DELETE and UPDATE operations, as well as transactions that have to be rolled back. Refer this link learn more about MVCC.

These dead rows keep on adding as there are lots of updates and deletes. Periodic clean up of these dead rows is necessary to not only save space but also maintain the performance of your...

Read complete blog post

Hi Everyone..!! All of us have dreams to accomplish so many things in our lives..!! There are many instances in which we face difficulties in fulfilling our dreams and sometimes we just let go those dreams due to irritation or frustration that we go through due to those difficulties. But Dreams are one of the reasons for which we live life for and letting them go without fulfilling them is a big heart break..!! I would request all of you to never forget your dreams and kindly go through this...

Read complete blog post

Recently while working on one of our project we came across requirement where we wanted Hubspot integration with our application for ease of sales team to manage user's data and understand their interactions and trends in application. I will quickly explain few things about Hubspot here in my article.

What is Hubspot?

In brief, Hubspot is a CRM which helps you monitor and fine tune many things regarding your application. Based on my analysis I will shortly list down few most important of them...

Read complete blog post

Currently I've been working on writing acceptance test cases for my project in which there were lot of scenarios where I'd to use mocking/stubbing for which I used MockJax plugin of jquery.

So I'm sharing some examples which might be useful to someone.

A simple mock request using mockjax plugin can be written as

$.mockjax({
 url: '/posts/1',
 responseTime: 500,
 responseText: {
 status: 'success',
 post: 'Mockjax Plugin for mocking or simulating ajax...

Read complete blog post

As an Ember developer, discovering Yarn package manager by Facebook was the best that could happen to me. Whenever one of my fellow developers encountered “Broccoli Plugin failed…” I used to say ‘rm -rf node_modules’, that’s what my seniors told me and I continued the tradition.

That was very frustrating and as a beginner, I use to blame it all on Ember as I didn’t understand much of what was happening. As time passed I realized npm was the culprit. But a few months back I discovered this...

Read complete blog post

Recently, I had come across a situation where I had to make 2 ajax calls sequentially, i.e. fetch address from GeoLocation API and send it to Fedex API for fetching the transit time. For this, I needed to convert the address from GeoLocation in particular format using loop to send it to Fedex. Initially, I used '$.each()' method of jquery on an address array to convert it in desired format. This is common approach that we follow and it took 1.12ms for the processing. I wanted to reduce this...

Read complete blog post

By default, regular expression matching is greedy, which means they try to match as many matches as possible in a given string.

Lets see an example considering HTML snippet - <p>Hello</p><span>Awesome</span><p>World</p>. Our task is to extract first p tag. i.e pattern matching should return <p>Hello</p>.

Immediate solution is to write regex - /<p>.*<\/p>/. But it would match the whole string.

Greedy

The reason it matches whole string...

Read complete blog post

One of the coolest feature I came across in Elixir - our code documentation becomes our unit tests. I was amazed by its simplicity when I saw it in action in sample app I was writing. I feel this is one of the most incredibly and helpful feature I saw in any modern programming language in recent times. (Python has similar functionality using Python’s doctest.)

Let me explain this by giving a quick demo using few simple examples: Math functions sum and multiply.

Lets say this is our Maths...

Read complete blog post

Extensions add new functionality to an existing type. Type can be class, structure, enumeration or protocol. This includes the ability to extend types for which you do not have access to the original source code.

Extensions in Swift can add computed instance properties and computed type properties. Extension helps to use more usable method by declaring it once in extension which means no need to redeclare and repeat same method in every class.

Extension Syntax

Declare extensions with the ...

Read complete blog post

enter image description hereHello Everyone,

I am excited to start this new journey as my role of HR Executive in Kiprosh 2.0 initiative and I hope I live upto your expectations. This is my very first week and I am happy to know you all during introductions.

This is my very first blog post here and I thought to share this very interesting story that I came across.

In 1968, Spencer Silver was working at 3M trying to create super strong adhesives for use in the aerospace industry in building planes.

Instead of a super...

Read complete blog post

Almost all Ruby on Rails developers might come across scenario where they need to add a new column with a default value to one of the database tables. Most of us (including me) would write following migration statement -

add_column :table_name, :column_name, :boolean, default: false

This is a good practice but would cause downtime if the table has large number of records. It took 3 secs when I ran the migration for a table having 50k records.

-- add_column(:table_name, :column_name,...

Read complete blog post

Hero’s Journey Retrospective

We had an awesome retrospective session recently. As the topic of this retro was little different, everyone in the team was excited. The retrospective was about the Hero's Journey , where we discussed about our journey relating to the current project state.

Running Retrospective:

1). Our first focus was to understand areas of our journey.

So we came up with the following areas :

Hero : Who completed/working on the major features.

Guide : Who guides to complete...

Read complete blog post

This article will help you solving browser compatibility issue. To make detection more robust, here included browser-specific characteristics which is different according to browser.

Opera 8.0+

var isOpera = (!!window.opr && !!opr.addons) || !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0;

Firefox 1.0+

var isFirefox = typeof InstallTrigger !== 'undefined';

Safari 9.1.3+

var isSafari = /constructor/i.test(window.HTMLElement) || (function (p) { return...

Read complete blog post

Recently we had a good Retrospective. I loved the outcome of this retrospective. First we had an Ice breaker session, Empathy Snap followed by PLEASURE AND GAIN retrospective.

Empathy Snap Is a nice Ice breaking team building exercise. We did empathy snap for the big hitter +big blow and through this exercise team really came to know, how well they can empathise with each other So it was a nice start, everyone opened up and ready for the retrospective.

Joy is not in things; it is in us.

...

Read complete blog post

Table Print on Rails Console

TablePrint shows objects in nicely formatted columns for easy reading. It even lets you nest other tables of related objects, contextualizing data across tables. It's incredibly flexible, yet simple, making it easy to see exactly the data you care about.

Installation

Install as a standalone gem

$ gem install table_print

Or install within rails In your Gemfile:

gem "table_print"

$ bundle install

Usage

Outside rails $ irb

> require...

Read complete blog post

In Rails 5 Active Record provide two finder methods to specify JOIN on associated tables,

 `joins`
 `left_outer_joins`

Suppose in our application we have Article and Comment. Here comments belong to an article, while article have many comments. Now if we want to show list of all articles along with number of comments, we need join to Article and Comment by left_outer_join.

In rails 4.x, Active Record does not have support for outer joins. So we need to add SQL for left outer...

Read complete blog post

API testing -

A set of functions and procedures that allow the creation of applications which access the features or data of an operating system, application, or other service.

What is an API ?

API is an acronym for Application Programming Interface. It enables communication and data exchange between two separate software systems. A software system implementing an API contains functions/sub-routines which can be executed by another software system.

What is an API testing ?

The API Testing is...

Read complete blog post

Dependency Injection

One of the most important features of the MVC design pattern is that it enables separation of concerns. Hence you can make your application’s components independent as much as possible. This is known as loose coupling, and it makes testing and maintenance of our application easier. Using Dependency Injection you can make you application’s components more loosely coupled.

Dependency Injection(DI) is a software design pattern that allow us to develop loosely coupled code....

Read complete blog post

Raising our Emotional Quotient

We all have different personalities, different wants and needs, and different ways of showing our emotions. Navigating through this takes tact and cleverness – especially if we hope to succeed in life. This is where Emotional Quotient (EQ) or Emotional Intelligence (EI) becomes important.

EI is the ability to recognize your emotions, understand, and realize how your emotions affect people around us. It also involves our perception of others: when we understand...

Read complete blog post

autolink-js is a small (about half a kilobyte), simple, and tested JavaScript tool that takes a string of text, finds URLs within it, and hyperlinks them.

autolink-js adds an autoLink() method to JavaScript's String prototype, so you can use it on any JavaScript string. Take a look at the tests, but essentially, after including either autolink.js or autolink-min.js to your page, it works like this:

Input :

"This is a link to Google http://google.com".autoLink()

Output :

"This is a...

Read complete blog post