Front End for Beginners

No theory..just clubbing all topics here with videos for basic understanding..




Responsive Web Design

How website works..



Wikidata Sparql Query Tutorial

What is SPARQL?

SPARQL, pronounced ‘sparkle’, is the standard query language and protocol for Linked Open Data on the web or in a semantic graph database (also called RDF triplestore). Eg: Wikipedia is a linked open data

SPARQL, short for “SPARQL Protocol and RDF Query Language”, enables users to query information from databases or any data source that can be mapped to RDF.

Basics – Understanding Prefixes

Wikidata Query Service (WDQS) is a software package and public service designed to provide a SPARQL endpoint which allows you to query against the Wikidata data set.

WDQS understands many shortcut abbreviations, known as prefixes.

Some are internal to Wikidata

wd, wdt, p, ps, bd, etc.

and many others are commonly used external prefixes, like

rdf, skos, owl, schema, etc.

?s is a prefix for a statement, or triple, or you could even think of it as the subject in an spo triple.

In the following query, we are asking for items where there is a statement of “P279 = Q7725634” or in fuller terms, selecting subjects that have a predicate of “subclass of” with an object of = “literary work”.

PREFIX wd: <>
PREFIX wds: <>
PREFIX wdv: <>
PREFIX wdt: <>
PREFIX wikibase: <>
PREFIX p: <>
PREFIX ps: <>
PREFIX pq: <>
PREFIX rdfs: <>
PREFIX bd: <>

# The below SELECT query does the following:
# Selects all the items(?s subjects) and their descriptions(?desc)
# that have(WHERE) the statement(?s subject) has a direct property(wdt:) = P279 <subclasses of>
# with a value of entity(wd:) = Q7725634 <Literary Work>
# and Optionally return the label and description using the Wikidata label service

SELECT ?s ?desc WHERE {
  ?s wdt:P279 wd:Q7725634 .
     ?s rdfs:label ?desc filter (lang(?desc) = "en").



Label service

You can fetch the label, alias, or description of entities you query, with language fallback, using the specialized service with the URI <>. The service is very helpful when you want to retrieve labels, as it reduces the complexity of SPARQL queries that you would otherwise need to achieve the same effect.

The service can be used in one of the two modes: manual and automatic.

In automatic mode, you only need to specify the service template, e.g.:

 PREFIX wikibase: <>
 SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .


Install Redis and start working with it

Download redis

Unzip the folder and goto redis folder..

1. redis > `make` hit enter

2. cd src

3.  `./redis-server` hit enter

4. Open new tab in cmd prompt/terminal -> `./redis-cli` and hit enter. make sure you are in src folder.


you can use set and get commands in key value pairs format. Eg: `set “name” “Sathya”`. later `get name` will print sathya.

Similarly Publish and Subscribe also very easy to use in redis..

Publish: Take a new tab from src folder and enter `./redis-cli` and hit enter. Then do the following..

Subscribe: Take a new tab from src folder and enter `./redis-cli` and hit enter. Then do the following..

In simple words, like in twitter..when you subscribe to a channel, when ever user post(publish in redis point of view) a message, all channel subscribers will get that update.



Apache Cassandra Tutorial

What is Apache Cassandra?

Apache Cassandra is highly scalable, distributed and high-performance NoSQL database. Cassandra is designed to handle a huge amount of data.

Cassandra Database Tutorial for Beginners: Learn in 3 Days

In the image above, circles are Cassandra nodes and lines between the circles shows distributed architecture, while the client is sending data to the node.

Cassandra handles the huge amount of data with its distributed architecture. Data is placed on different machines with more than one replication factor that provides high availability and no single point of failure.

Cassandra History

  • Cassandra was first developed at Facebook for inbox search.
  • Facebook open sourced it in July 2008.
  • Apache incubator accepted Cassandra in March 2009.
  • Cassandra is a top level project of Apache since February 2010.
  • The latest version of Apache Cassandra is 3.2.1.

First let’s understand what NoSQL database is.

Nosql Cassandra Database

NoSQL databases are called “Not Only SQL” or “Non-relational” databases. NoSQL databases store and retrieve data other than tabular relations such as relation databases.

NoSQL databases include MongoDB, HBase, and Cassandra.

There are following properties of NoSQL databases.

  • Design Simplicity
  • Horizontal Scaling
  • High Availability

Data structures used in Cassandra are more specified than data structures used in relational databases. Cassandra data structures are faster than relational database structures.

NoSQL databases are increasingly used in Big Data and real-time web applications. NoSQL databases are sometimes called Not Only SQL i.e. they may support SQL-like query language.

Nosql Cassandra Database Vs Relational databases

Here are the differences between relation databases and NoSQL databases in a tabular format.

Relational Database NoSQL Database
Handles data coming in low velocity Handles data coming in high velocity
Data arrive from one or few locations Data arrive from many locations
Manages structured data Manages structured unstructured and semi-structured data.
Supports complex transactions (with joins) Supports simple transactions
single point of failure with failover No single point of failure
Handles data in the moderate volume. Handles data in very high volume
Centralized deployments Decentralized deployments
Transactions written in one location Transaction written in many locations
Gives read scalability Gives both read and write scalability
Deployed in vertical fashion Deployed in Horizontal fashion

Apache Cassandra Features

There are following features that Cassandra provides.

  • Massively Scalable Architecture: Cassandra has a masterless design where all nodes are at the same level which provides operational simplicity and easy scale out.
  • Masterless Architecture: Data can be written and read on any node.
  • Linear Scale Performance: As more nodes are added, the performance of Cassandra increases.
  • No Single point of failure: Cassandra replicates data on different nodes that ensures no single point of failure.
  • Fault Detection and Recovery: Failed nodes can easily be restored and recovered.
  • Flexible and Dynamic Data Model: Supports datatypes with Fast writes and reads.
  • Data Protection: Data is protected with commit log design and build in security like backup and restore mechanisms.
  • Tunable Data Consistency: Support for strong data consistency across distributed architecture.
  • Multi Data Center Replication: Cassandra provides feature to replicate data across multiple data center.
  • Data Compression: Cassandra can compress up to 80% data without any overhead.
  • Cassandra Query language: Cassandra provides query language that is similar like SQL language. It makes very easy for relational database developers moving from relational database to Cassandra.

Guru99 provides 3 days course

Here is what they cover in the Course

1. What is Apache Cassandra?

2. Download & Install Casandra on Windows : A Step By Step Guide

3. Cassandra Architecture & Replication Factor Strategy Tutorial

4. Learn Cassandra Data Modeling with Simple Example

5. Create, Alter & Drop Keyspace in Cassandra: Complete Tutorial

6. Cassandra Table: Create, Alter, Drop & Truncate

7. Cassandra Query Language(CQL): Insert, Update, Delete, Read Data

8. Create & Drop INDEX in Cassandra: Complete Tutorial

9. Cassandra Data Types & Expiration Tutorial

10. Cassandra Collections Tutorial — SET, LIST & MAP

11. Cassandra Cluster Setup on Multiple Nodes (Machines)

12. Datastax DevCenter & OpsCenter Installation Complete Guide

13. Cassandra SECURITY — Create User & Authentication With JMX

What is A/B Testing

Everyone is busy for talking about latest frameworks / new technologies, but here I am going to talk about AB testing.

AB testing is the good and growing approach used in E-commerce/ Content / Retails site.In this blog I am going to explain about what is AB testing, process & uses of it.

What is A/B Testing?

A/B testing is comparing two versions of a web page to see which one performs better. You compare two web pages by showing the two variants to similar visitors at the same time to similar visitors at the same time.

Every business website wants visitors converting from just visitors to something else. The rate at which a website can do this is its “conversion rate”. Measuring the performance of a variation (A or B) means measuring the rate at which it converts visitors to goal achievers.

As visitors are served either the control or variation, their engagement with each experience is measured and collected in an analytics dashboard and analyzed through a statistical engine. You can then determine whether changing the experience had a positive, negative, or no effect on visitor behavior.

(Detail -> Single price is PDP page price with coupon, control is default site). In this graph, we can check how many unique visitors and order conversion rate for each experience (Variant like control and Variant).

Why AB Testing?


A/B testing allows individuals, teams, and companies to make careful changes to their user experiences while collecting data on the results. This allows them to construct hypotheses, and to learn better why certain elements of their experiences impact user behavior

Testing one change at a time helps them pinpoint which changes had an effect on their visitors’ behavior, and which ones did not.

What is the A/B Testing process?

Collect Data – Look for pages with low conversion rates or high drop-off rates that can be improved.

Identify Goals:

Your conversion goals are the metrics that you are using to determine whether the variation is more successful than the original version

Generate Hypothesis:  Once you have a list of ideas, prioritize them in terms of expected impact and difficulty of implementation.

Create Variations:

Using your A/B testing software (like ADOBE TARGET), make the desired changes to an element of your website or mobile app experience. This might be changing the color of a button, swapping the order of elements on the page, hiding navigation elements, or something entirely custom. Many leading A/B testing tools have a visual editor that will make these changes easy. Make sure to QA your experiment to make sure it works as expected.

Run Experiment: Kick off your experiment and wait for visitors to participate! At this point, visitors to your site or app will be randomly assigned to either the control or variation of your experience. Their interaction with each experience is measured, counted, and compared to determine how each performs.

Analyze Results: Once your experiment is complete, it’s time to analyze the results. Your A/B testing software will present the data from the experiment and show you the difference between how the two versions of your page performed.

What I am Testing?

Almost anything on your website that affects visitor behavior can be A/B tested.


Applying the coupon code to the price of all eligible item (coupon exclusion list needs to be apply) and displaying the discounted price in everywhere. Like Gallery page all tiles, PDP page, Recommendation zones, Mini cart, cart page, till checkout before applying the coupon.




Goal: adding Coupon link in header will increase the order conversion and usage of coupon as well




Goal: Adding timer will create the emergency and will increase the order conversion




4.Coupon page Timer:

Goal:  By adding a unique countdown timer relevant to the coupon will create a sense of urgency and improve online coupon take rate






5.Home page marketing zones and Recommendation zones:




Carousel in Home Page- Contains Multiple Banners

Carousel removed, vertically aligned Banners


6.Search Box & Auto suggestion:

Improving the Search relevancy

7.Navigation, Menu

8.Compliance and Production fix:

The important feature of the tool is can push the code to production environment. Most the production front end issue are handled in AB testing.

*Pricing server down scenario

*Wrong coupon in coupon page (intercept the service call – response)

*Changing discount percentages (intercept the service call – request)

Tools we are Using:

1. Optimizly (initially)

2. Adobe Target (Now)

Up Coming:

1. Introduction to Adobe Target and Tutorial

2. Creating simple test for specific feature

3. Techniques used to achieve the feature

4. Difficulties faced and overcome the difficulties


CAP Theorem

The CAP theorem says that, fundamentally, there is a tension in asynchronous networks (those whose nodes do not have access to a shared clock) between three desirable properties of data store services distributed across more than one node:

Availability – will a request made to the data store always eventually complete, no matter what (non-total) pattern of failures have occurred?

Consistency – will all executions of reads and writes seen by all nodes be sequentially consistent? Roughly, this means that the results of ‘earlier’ writes are seen by ‘later’ reads, but the formal definition is a little more subtle.

Partition tolerance – the network can suffer arbitrary failure patterns. This can be modelled as the refusal of the network to deliver any subset of the messages sent between nodes. Note that the failure of a single node can count as a ‘partition’.