Blockchain explained in 6 steps – for your toddler and your manager

Want to explain to a toddler how Blockchain protocol works or your father asked you recently about blockchain or cryptocurrency stuff?

Here, I’ve tried to explain it in 6 simple steps for different persons in your life.

For your toddler –

  1. ‘A’ wants to send money to ‘B’
  2. A block is created representing a transaction
  3. Block is broadcast to every node(miners) in the network
  4. Node verifies the block and create a consensus
  5. Block is added to the existing chain
  6. Money moves from ‘A’ to ‘B’

For your manager –

  1. Your cousin Seema in the USA wants to send money to you in India and she doesn’t want to put his hard earned money in the hands of some middleman like banks and wiring service providers for which they take a ‘brokerage’.
  2. Seema sends you some bitcoins which get recorded in form of a ‘transaction’ over the bitcoin cryptocurrency network.
  3. The ‘transaction’ that ‘Seema sent some bitcoins to you’ is shared with everyone in the network in a secure way.
  4. Every node in the network reads this ‘transaction’ and actually verifies that Seema has actually sent some bitcoins to you.
  5. When all the nodes or miners have created a consensus that this transaction is legal, it gets added to the public distributed ledger.
  6. You get your money without any middleman in secured, fast and anonymous way.

Improving code quality with sonarcube

No matter if you are writing cross-platform applications using Javascript or writing an enterprise application using J2EE or setting up a quick e-commerce store using PHP, you always care for code-quality and it’s maintainability.

Sometimes we make our own standards like curly brace will start on the same line and in other time we say it would be on next line. To help and manage it better, we have an ecosystem in which 20+ code analyzers live with thousands of code recommendations and code smells.

Here is a quick small introduction to the tool and I hope you use it in your projects –

Creating your own private ethereum blockchain network

Let’s get our hand dirty on creating a private ethereum blockchain network.

  • Install geth

    Go to

    Download the installer, follow the wizard.

  • Create a genesis.json file

    Create a genesis.json file which will look like below –

  "difficulty" : "0x20000",
  "gasLimit"   : "0x8000000",
  "alloc": {},
  "config": {
        "chainId": 15,
        "homesteadBlock": 0,
        "eip155Block": 0,
        "eip158Block": 0

Open a console and create a folder

C:\>mkdir mychain
C:\>cd mychain

Open a create a folder chaindata, this folder will have all of our blockchain related data in file based storage

C:\mychain>mkdir chaindata

Create a file genesis.json as stated above. Now mychain folder will have a folder chaindata and a file genesis.json

  • Init and bring up your blockchain

Initialise your blockhain

C:\mychain>geth --datadir=./chaindata init ./genesis.json

You should see something like this output:

[INFO] Successfully wrote genesis state

You now have to start geth with that chaindata directory:

C:\mychain>geth --datadir=./chaindata --nodiscover

Congratulations, your first private blockchain is up. Feel free to comment your thoughts.


Complete list of open-source blockchain platforms

The blockchain ecosystem has exploded with multiple open source projects and that’s good for the blockchain’s future because multiple blockchain platforms communities will urge themselves towards more innovation in the same field.

  • Ethereum
  • Hyperledger
  • R3s Corda
  • Axoni
  • Ripple
  • Eris
  • HydraChain
  • MultiChain
  • OpenChain

If I’ve missed any other platform, please let me know in comments, I’ll add it to the list.

Startup ideas – should make them lazy or make them crazy

As an avid reader about startups, I have figured out a feature that successful startups share in common.

They either solve a problem exceptionally well or act as a catalyst to the fun side of us. So, basically there are two types of ideas:

  1. Ideas that solve a problem: Let’s call them of “make them lazy” category. Because when we are solving a problem, unconsciously we are making users of our solution lazy. Be it online shopping, or providing them a remote control for tuning channels.
  2. Ideas that helps to have fun: Can we call them of “make them crazy branch? Essentially all the games applications, mary-go-round, wind-surfing make them happy, fun-filled, entertaining. Why not consolidate them in a single word “crazy”?

If you are looking for new ideas, don’t look for ideas. Think to make them lazy, to solve a real problem or somehow offer them fun to turn them crazy.

So, are you going to make them lazy or you believe in making them crazy?

FirefoxOS Hackathon at Unbox Festival

As an open source enthusiast, I believe in the philosophy of Mozilla’s FirefoxOS :  to bring the “openness, accessibility and opportunity” of web to mobile.

Last weekend,  I went to Unbox Festival. There, I got chance to help in organizing FirefoxOS Hackathon with FirefoxOS India Core team. The event was full of fun and excitement with peoples from very diverse fields like arts, literature, designers, technology, MIT, TED, IoT, open source, arduino and entrepreneurs.

You may peek into some snaps here

The FirefoxOS Hackathon was a 3 day long competition. First day was meant for hustling and looking for nice ideas to implement. Second day was devoted to forming teams and voting for ideas. Third day was for actual implementation.

There are lots of ideas floating around but I do believe that execution is better than idea. I believe in “Product guy” over a “Idea person”.

Today, the technology is changing at speed of thought and open-source software and hardware are taking this change “wave” into a “storm”. More specifically on hardware side, Arduino and Raspberry pi are taking the leads. These days, I am into Arduino (although, don’t know when will my first big IoT idea will shape into a product).

Some of the interesting resources, which I found from this event are enlisted below  :

1. Arduino + Robotics :
2. Photography :
3. FirefoxOS :
4. Arduino :
5. FirefoxOS :
6. IoT Academy :

First contribution to Laravel : Most popular PHP framework of 2014

Before switching to Laravel, I used to be a fan of CakePHP

I got a multi-lingual web app project  in which we need to sanitize some timezones. I wrote it for my project then I proposed to include it in Laravel by filing a proposal (link). And happily got green signal from Taylor Otwell. I forked laravel/framework, made changes and filed a Pull Request here. Documentation for uses can be found here 

Taylor Otwell merged my commits 🙂 Cheers !

So, if you are using Laravel > v4.2. It have 42 lines of code written by me 😛

Are you looking to contributing to Laravel? Here is the key.