The blockchain what is it?

Lately I’ve been reading and taking an interest in the technology known as the blockchain. In this article I attempt to outline and explain in broad terms what the blockchain is and how it has the potential to change society in a number of ways.

So what is the blockchain?

 

Wikipedia has a nice concise definition of the blockchain

blockchain[1][2][3] – originally block chain[4][5] – is a continuously growing list of records, called blocks, which are linked and secured using cryptography.[wikipedia]

So lets break this statement down. First is the continuously growing list of records, which essentially is like a database in the technical aspect in which “rows” or in case of the blockchain “blocks” keep getting added to an ever growing collection of “stuff”

What is this “stuff” we keep adding? Well it can be anything really, anything that can be cryptographically hashed and stored digitally. For example a record of a monetary transaction or a music file or some digital artwork.

All these records are linked together in whats called a “block” which are further linked together in the blockchain and are timestamped and verified.

That’s all well and good but we already have the ability to store data like in in the form of databases. Why are we interested in a blockchain?

Distributed blockchain

 

The most interesting aspects of the blockchain technology is the fact that it is distributed across multiple parties who verify the blocks by doing some computationally expensive task and all parties have to agree on the correctness of the blockchain entries.

This is a massive difference to most databases that are centrally stored and controlled by one or very few entities.

This means that no one person or company can take control of the blockchain and manipulate it to their own ends.

Think banks and governments that control currency, think record labels that control rights to music and you will get the idea.

Moving to a more distributed society.

 

If we think in terms of what applications we can use the blockchain for, we can point to the main and most well known application which is the Bitcoin digital currency.

Bitcoin uses the blockchain to store it’s transactions on and to verify and protect users of the currency from things like double spending and fraud.

Bitcoin has no central bank or institution controlling the currency and this means that anyone anywhere in the world can use the currency to purchase good or services, people who would normally not be able to participate in the world of financial services. Billions of people in the world right now still have no access to financial services. What people do have access to is a mobile phone and the internet. This is where blockchain and digital currencies can enable a whole new economy based on distributed ledgers.

The cryptography

 

Let takes a look at the next statement in the definition that says the blocks are linked and secured using cryptography.

Each piece of data in the blockchain is encrypted with whats called asymmetric encryption (or public key cryptography) which essentially means that you have both a public and private encryption key and every piece of data gets encrypted with your private key. This means that only you have access to the data that is encrypted with your private key.

Data encrypted with a private key can only be verified with the corresponding public key and so a digital signature made up of a hash from a users private key provides a cryptographically secure way of identifying someone (or something).

In the use of Bitcoin and other digital currencies you maintain a “wallet” which is encrypted with your private key and allows the blockchain to verify that the transactions you created (for instance to send some currency to another wallet) are allowed and you are not trying to spend currency you don’t own.

Smart contracts

 

Smart contracts are in my option the way we are going to use the blockchain going forward. Essentially smart contracts allow users of the blockchain technology to automate transactions and programatically execute workflows that influence the outside world.

For example imagine setting up a contract with a freelance software developer to build you a website. The smart contract can digitally record every detail of the agreement and automate payment once certain milestones have been completed. Once the developer has built the home page you could automate a payment of digital funds directly into her account. The contract is cryptographically secured in the blockchain and distributed between multiple users in the system so it cannot be changed later or disputed.

Micropayments

 

Blockchain based currencies allow micropayments which would be prohibitively expensive due to transaction fees from banks and payments providers such as Visa. People in countries that can’t use these payments providers because the transaction fees are too high can suddenly participate in an digital economy and they can also store their savings somewhere less risky (rather than things like livestock for instance) and be afforded the luxuries of financials services that developed countries enjoy.

Identities and reputations

 

When transactions and services are based on the blockchain everything is stored and publicly available to anyone who can read the blockchain. Online identities and reputations can be built up and moved away from central control. Want to get credit? A company could look at your blockchain history and determine exactly how reliable you are instead of relying on the checkbox approach of most credit agencies. More people can participate in an economy based on blockchain technologies than could previously.

Conclusion

 

Blockchain technology enables a host of new services and economies that was previously either unavailable or controlled centrally by the “key” holders who only really have their own interests in mind.

Distributed ledgers based on the blockchain can free us from the reliance on centrally controlled intermediates and create a more peer to peer society.

I am going to follow this article up with a deeper dive into specific uses and the technical aspects of blockchain implementations.

 

Passed the BCS Foundation Certificate in Systems Development exam.

I have been a professional member of the British Computer Society for years now and I recently started to take a look at what exams they offer. I noticed they did a foundation certificate in systems development exam which looked like from the website that you could self study using a book.

I wanted to give a BCS exam a try but I didn’t want to pay out for expensive training courses and take time off work. Looking at the exam description page they referenced the BCS book titled Developing Information Systems bcsbook

I bought the book and started reading and studying the material. To my surprise the material in the book was reasonably up to date with modern software development practices and went into most aspects of formal systems development models around today and gave a nice history of where these practices came from.

The book covered the full systems development life-cycle from requirements engineering to business analysis to software development methodologies.

The exam itself was a 40 question exam and the book definitely covers enough for you to easily pass the exam and if you already have a lot of software development experience then most of the material will be pretty familiar to you.

All in all the exam is probably worth doing as the book is worth a read especially if you are new to the industry.  I booked my exam through Pearson Vue which can be accessed from the BCS website.

TypeScript 2, React 15, Bootstrap and WebPack 2 Boilerplate.

I was recently working on a TypeScript project with React that uses WebPack 2 and Gulp for it’s build process.

I thought it would be worth creating a GitHub repository that stores this boilerplate code so that anyone can download the code and get started creating web apps with this particular technology stack.

The source comes with TypeScript, Less, Bootstrap all wired up with React and some base example components to get your started. It also sets up webpack-dev-server so you can easily spin up a local dev server to host your web app while in development.

To get started just run the following to get the code from the repository.


git clone https://github.com/leedale1981/typescript2-react15-webpack2-boilerplate.git

You should then run an NPM install to download all dependencies.


npm install

Finally you can compile the TypeScript code and run the dev server like so:


gulp webpack

gulp webpack-dev-server

And thats it you should be up and running with your web app.