Ask HN: Resources to learn blockchain and smart contracts?
526 pointsWhat resources are available to get into these two and related topics?
Would be also better if there are papers/books that introduces to these concepts (and toy implementation)?
Would be also better if there are papers/books that introduces to these concepts (and toy implementation)?
Comments (116) 52 threads
Earlier commentsBlockchains are designed to solve a certain set of problems. Understanding those problems and their relation to your product will help you determine whether a blockchain is a reasonable solution.
1. Do you need a distributed ledger? (https://en.wikipedia.org/wiki/Distributed_ledger)
2. Do you need proof of work? (https://en.wikipedia.org/wiki/Proof-of-work_system)
3. Does your distributed ledger need to record things such that one block follows the next, as opposed to blocks of data being saved independently of each other? (https://en.wikipedia.org/wiki/Blockchain)
If the answer to all of the above is yes, using a blockchain probably makes sense. Otherwise, you probably want to use something other than a blockchain (for instance, if you just need a distributed ledger, just use a distributed ledger. No need to chain each block together unless that's actually useful for your product).
A better single question would be: do you need a distributed ledger with immutability guarantees (i.e. security against an adversary that might want to tamper with the history of your ledger).
To me a blockchain is just a tree, where the "parent pointers" are just hashes of the parent nodes rather than their addresses. And I guess to pick one as the "correct" one, you just choose the one with (say) the longest chain. End of story? What else _is_ there to learn about this that people are looking for? (Btw, isn't this just a Merkle tree, which has been around since at least 1979? What's so revolutionary or even different in a blockchain?)
Continue this thread — 2 replies
This is where it gets a bit interesting. While Merkle Trees are great for ensuring, immutability, most cryptocurrencies need more than just that. They need to have a way for records to be inserted into this immutable ledger and an incentive to keep adding records to the ledger. This is where Proof of Work and mining rewards come into play, and this is where a lot of altcoins (non-Bitcoin cryptos) have a lot of different opinions. A decent amount of work has also been put into making sure that there isn't an incentive for a miner to mine on two different chains (and cause the ledger to fork) and other concerns.
But regarding the topic of what it can be used for... yes, I see people talking about doing healthcare with blockchain, or BP using blockchain, or archeology using blockchain, and people asking about how to learn to use blockchain for their next random startup ideas, and I start wondering if I'm going crazy. To me it seems basically like asking "could linked lists revolutionize healthcare?", or "could Dijkstra's algorithm help end global warming?" which sounds like a completely nuts question to ask. Am I just missing a huge, fundamental part of the picture? The whole thing just doesn't make sense to me.
Well, yes, they certainly could, even though that's an extremely vague question from someone who might not even understand what they're asking.
If you're interested in hearing about blockchain's potential from a business and society perspective, there's a bunch of material, but for example the latest Andreesen-Horowitz podcast episode was about "why crypto tokens matter".
Also this recent interview with someone deeply knowledgable about the supply chain world: https://www.youtube.com/watch?v=dla42bY7k90
I've found that smart contracts have a lot of jargon that can be opaque, but the concepts are familiar to web developers (and not that hard to learn).
For example, in traditional webdev we use our browser to connect to an app server, which is connected to a centralized database.
In Ethereum dev, every node has a copy of the entire database. To write distributed apps, you read from your local copy. That is, for a JavaScript DApp, you use the web3 JavaScript library to connect to a local node you have running on your own machine.
Writes are little more involved, because you need the network to agree that your writes are valid. So to perform writes, you submit a transaction to the network.
The result is reads are free and writes cost money.
Solidity is tricky, but not that bad if you're careful. If you know JavaScript already, you can totally learn to program smart contracts.
In any case, my site is here. I'll be making the first course free shortly: https://www.newline.co/
The Coursera class took around 20 hours end to end.
All comments shown.
Couldn't load more comments. Check your connection and try again.