In Code We Trust

in #learning6 years ago

If crypto bills could have slogans, this would be it. This is not news in the cryptoverse. Even The New York Times pointed this out a long time ago. There is another dimension to this slogan though. I've been following the cryptoverse for a while. I've read numerous news articles. I've followed excellent explanations of its main concepts. I've even read very technical papers of various colors. Still I must admit my ignorance. A very crucial part is missing. Even though I'm a software developer, I have not written a single blockchain related line of code. Therefore I don't really understand it and I don't really trust it.

The-Bitcoin-Supper-994x500.jpg
source

Why bother with code?

Code is the brain of any cryptocurrency, obviously. It's also a door to understanding it. Reading about blockchain concepts is nice but it's not enough. If you didn't implement those concepts in code, you don't really know them. Reading articles about cryptos becomes reading about magic in Harry Potter. It's interesting but fundamentally you can't predict what works and what doesn't.

Why do it on Steemit?

If things are somewhat clear on 'code' in 'In code we trust', who are the 'we' that do the trusting? It's the best kept well known secret (everybody knows it but no one talks about it). Money needs a community of people that believe in it. Otherwise it's just code (or shiny things, paper, cigarettes). We get value in exchanging things, time, ideas, etc. Money is just a medium that the community trusts.

I have something to offer: a perspective on how to learn cryptos, selected links to tutorials, step-by-step guides, code. All that will be even more valuable if someone else offers an opinion, another perspective, or anything else they have to offer. This sounds suspiciously like open source. You give me some code and I'll give you some code back. What if we added an exchange medium to the mix? Steemit sounds perfect for the job. Also, there is a ring of Inception to it: 'Learn blockchain on blockchain!'

Sounds fancy but who cares?

My first interaction on Steemit gave me hope that my Learn Crypto project might be useful for someone else. To be honest, I didn't plan it like this. I thought "I'll write code on Github and that will be it". Recently I wrote an intro post on Steemit. Among informative, welcoming, and encouraging comments there was one other very useful kind from @eccles who politely inquired why I haven't written my next post yet. Being held accountable is very rare and precious because not caring is the normal state of the Universe. Mean bosses don't count. They really don't care what you do. They just worry they will not get paid if you don't do something. I started wondering if I should split my plan into smaller more presentable chunks. True, quality must not be sacrificed but the good old 'publish or perish' is too old now. The reality now is 'publish fast or perish fast'.

Inspired by that and lots of useful info from people and bots in my intro post, I decided to make a series of posts on Steemit coupled with code on Github. I was also surprised by bot comments. At least, I think they were bots but I can't be sure. I wonder if calling an entity a bot will soon be politically incorrect. Maybe we'll call them autobeings.

How are we gonna go about it?

The general plan is to split concepts into bite-size chunks, pick a concept, implement it in code, write a Steemit post about it, listen to what people and autobeings have to say, make corrections or improvements, and repeat all the steps building on already implemented code. The approach is no different from writing any other complicated software. It's not possible to grasp all blockchain complexity at once but it's possible to do it in series of software patches and small blog posts.

Where should we start?

Nothing is new under the sun. This statement might not be true in general but it holds in our specific case. Let's not waste all that good work.

So much bla-bla-bla, where is the code?

Okay, okay, my imaginary impatient friend.

First there is a project with simple blockchain implementation and an accompanying blog post explanation. This is a nice and simple step by step tutorial. It uses Python Flask to build endpoints that add new transactions to a block, mine new block, and return full blockchain.

The second project with a related blog post also uses Python Flask but implements a more complicated version and introduces blockchain client. I like how the author uses gifs to show how things are supposed to work.

The third tutorial adds a little twist and builds a very simple website that stores content on the blockchain. There is no separate blog post but there is an awesome explanation page on the Github project itself (which is even better).

The forth project is a strong proponent of the 'read the source code' movement. There are some instructions in README.md file and the code seems to be well organized with comments.

The fifth project is more of a coin-oriented interpretation of blockchain. It has separate miner and wallet modules.

Let's take a break and actually read Satoshi's paper. I like the paper in MD format but there is also an official pdf if you prefer pdfs. The paper is surprisingly short.

The last project is an implementation of bitcoin blockchain parser. It's interesting to see the code that actually interacts with the real working blockchain.

For dessert there is bitcoinbook Github project. It has some code examples as well.

What's next?

My plan is to work through the links above and implement my own simple version of blockchain. I will not rewrite existing explanations. Instead I'll focus on things that weren't mentioned or interesting twists. I'll focus on a single concept per post to keep things short and keep posts as frequent as possible.