So what is a blockchain? By a “Full stack developer”

There is a lot of hype growing about blockchains. But what the hell is it?

Well, Blockchains are next-gen technology with highly scalable and distributed networks with support for smart contracts which can be used in solving many problems.

Now that most of the blockchain fan base has left thinking this is just another copy paste article, I’ll tell you what I got to know. I just don’t want them to criticize this because somethings are not according to what they know :/

Before I start about what blockchain is, let me tell you what I was before I saw into blockchain.


Me

I was just another Full Stack NodeJS developer you find everywhere on the road nowadays

This was who I am and I am not ashamed to admit it.


So yeah, as a full stack developer what all do you use? Some coding language, some platform to run it, something to store data etc. Being from this mindset I couldn’t understand what blockchains are. For me blockchains could just be used to store banking information. What else can you do with something which is associated with cryptocurrencies?

Zombies

What? Zombies?

Oh I just like to put some funky stuff in between so that I can catch your attention. 😆

So one day while getting bored of writing another set of CRUD operations, I came across a site https://cryptozombies.io/ . And this is how kids my view of blockchains changed.

What I learnt completing their 6 lessons were:

  1. Blockchains are not that boring to work on.
  2. It is more than just cryptocurrencies.

Initially when you start the lessons you will feel like “uff, another language to learn”, but why not? You are a full stack developer you can write hello world in any language and add it to your CV.

So with the above goal I started. Solidity on its first look seems like JavaScript but with pinch of bitterness and a coating of caramel.

Instead of classes, you have contracts. Contracts you ask..?? Contracts are just a glorified name for classes. Classes?? A namespace which holds a set of functionality together 🙄

Inheritance

A concept by which one class or contract can extend the functionality of another class. I don’t know much languages but the general trend how you inherit is

class SomeClass extends BaseClass {

And it makes sense. SomeClass extends the functionality of BaseClass.

But in solidity it is like

contract SomeContract is BaseContract {

Now what again??? The basic english here is flawed. When an object A is B, then obviously A cannot have more functionalities than B. Anyway, I am no one to judge.

Databases

Ooohh yeahh… You got excited by reading “databases”… 😈

source: https://www.lynda.com/ — An image because I now you don’t like to read longs texts

So one thing I understood is that blockchains are some kind of database where data is stored. But this is a special kind of database which is present with every node in the network. So as opposed to our general trend of keeping our production database in a secure location, we actually send it to everyone who is using our network.

What all do you do with databases? Read & write? Here also you do the same. Except…!!! Reads are normal. But writes, any write you make to the storage will actually be written on the blockchain. FOREVERRRR*….. So yeah, each change you make in data is added as another data on that node and then it is broadcasted to every other node in the world. (Now here some people use the term Proof of Work, but I don’t really understand it right now but will update this once I understand).

This is similar to database replication but different in the sense that every node is able to write to the network and the true data is decided by consensus. So if my name is Jibin, but if 51% of the nodes say that my name is not Jibin, then the network will say that my name is not Jibin.

One more caveat is that every write you make or any operation you do costs you money, or specifically GAS. This means if you want to change a=1 to a=2 in the block chain, it will cost you Gas. And yes the one who executes it will have to pay, not the provider (as per my understanding till now).


But why another database?

Another term you will hear a lot “Decentralization”. So what it means that if a techie Thanos snaps his fingers and destroys half the databases in the universe, your data will still be intact since your data is present with every node.

Basically no one has complete access to your data. In the existing infrastructure, a particular firm or individual holds your data in your database and can modify it according to their will if they want and cause havoc. So if tomorrow google decides that you are a criminal, they could make it happen unless others use bing or other search engines. With blockchains, I will have a copy of googles data. So if google changes the data in their nodes, the rest of the world’s network won’t agree with it and discard it.

Blockchains are much bigger than this blog can cover and I just tried to encourage you to test the waters with blockchains. It is interesting. I am eagerly waiting for the next lesson on cryptozombies.


Because you know what is more cool than a Full Stack Developer?

Full Stack Blockchain Developer

Now go and start or return back to writing CRUD operations. The choice is yours…