For when `const’ just doesn’t cut it.

Every programmer, at one point or another, will need to define a variable that cannot be altered. No matter how many // DO NOT CHANGE!!!s and /** @final */s you use, someone, somewhere, will change it. And then get annoyed because now things don’t work. Such is life.

ES6 introduced new ways to declare variables: let, and most importantly in our situation, const. This will work for most data types; attempting re-assignment will throw a TypeError.

> const myStr = "Hello,";
< "Hello,"
> myStr = "world!";
< TypeError: Assignment to constant variable.
> myStr
< "Hello,"

Similarly, when defining…

Cryptocurrency is the money of the future! No, just kidding, it’s a total scam. But seriously though, a decentralized currency would be great for consumers. Well, no. It’ll never get the adoption. The environment! The banks! The people!

Now, you’d be forgiven for thinking I’ve had a stroke, or that the Internet finally gotten to me. What I’m quite poorly attempting to convey is the amount of contradictory information surrounding cryptocurrency, and why you need to stop trusting the things that come out of people’s mouths.

Blogger, circa 2018.

Everyone has an agenda.

Not the things your mother buys you on your first day of primary school…

When British voters went to the polls in 2016, they had a lot of information — some real, some decidedly less so — being shouted at them by the campaigns for Remain and Leave. When Leave won in a shocking victory, the conversation naturally shifted to how the UK would leave the EU. Even before negotiations officially started, the UK seemed to lose its advantage, and now — almost two years on — the British Government has fairly bad cards in its hand for the poker game of negotiating a withdrawal. …

Cryptocurrencies have taken the world by storm recently, and with good reason: the appeal of a currency which is controlled by no centralized authority is compelling, though a more likely reason for its prominence is Bitcoin’s astronomic rise in value. But the technology that powers Bitcoin and other cryptocurrencies, the Blockchain, is arguably a more compelling technology to examine. What we’ll be focusing on here is building the blockchain itself — not just a cryptocurrency (although, the blockchain could easily be used to create one).

The first thing we need to establish is what exactly a blockchain is.

A blockchain…

Sam Bird

I write about technology, politics, and things that interest me. I think I'm funny. I'm not that funny.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store