DEV Community

Let's Build the Tiniest Blockchain

Gerald Nash ⚡️ on July 17, 2017

Note: This article was originally published to Crypto Currently. Although some think blockchain is a solution waiting for problems, there’s no d...
Collapse
 
georgeoffley profile image
George Offley

Really cool article. Looks a little similar to creating functions and classes in an MVC app. I'm curious about building in the hashing functions. Would creating a blockchain for any other purpose also require you to build in the hashing for it to be self contained or does the lib come with something?

Collapse
 
aunyks profile image
Gerald Nash ⚡️

Not exactly sure what library you're referring to. But yes, for nearly all blockchain papers and implementations I've seen the hashing is a very important part of technology. That's because the continuous hashing sort of "sets the data in stone" in that more hashes means more trustability in the chain.

Collapse
 
georgeoffley profile image
George Offley

As a data structure it seems to me that blockchaining is essentially creating chunks of data and arranging them in linked lists. Only difference (that I can see) is the hashing. Great post, really educational.

Collapse
 
pratikaambani profile image
Pratik Ambani

Can anybody please rewrite the same for Java audience?? 😊😊

Collapse
 
aunyks profile image
Gerald Nash ⚡️

I'll think about it😉

Collapse
 
pratikaambani profile image
Pratik Ambani

Awaiting 😊😊

Thread Thread
 
Sloan, the sloth mascot
Comment deleted
 
pratikaambani profile image
Pratik Ambani

...and excited. 😀

Thread Thread
 
Sloan, the sloth mascot
Comment deleted
 
k0che profile image
Marcus Zippka

i tried a java version.

github.com/K0che/snakeCoin

Collapse
 
pbouillon profile image
Pierre Bouillon

Loooooong time after, here is mine

Collapse
 
charliedevelops profile image
charliedeveloper

Brilliant post. It feels like Blockchain is the "Breaking Bad" of the programming world at the moment - everyone keeps telling me to get into it. I have resisted up until now as I haven't been able to find a good jumping in resource. This post has explained what I need to know to get started with Blockchain in a really accessible way. Thank you for writing this!

Collapse
 
abhijitmamarde profile image
Abhijit Mamarde

Great article... Thanks for simplifying it in 50lines of Python code :)

Collapse
 
henryleparisien profile image
henryleparisien

Very nice article !
for those interested, I wrote an implementation of the code above in NodeJs for fun and profit

github.com/henryleparisien/SnakeCo...

Collapse
 
terceranexus6 profile image
Paula

Loved this!

Collapse
 
nibra profile image
Niels Braczek

Just created a PHP port: github.com/GreenCape/SnakeCoin

Collapse
 
ponickkhan profile image
Md.Rafiuzzaman Khan 🇧🇩

cool port and supper clean! i also tried in php ,copied your read me file for saving time xD
github.com/ponickkhan/snakecoin/bl...

Collapse
 
nibra profile image
Niels Braczek

Glad you like it! Would be nice, if you mentioned the source in your README as well ;)

Thread Thread
 
ponickkhan profile image
Md.Rafiuzzaman Khan 🇧🇩

sure thing! xD

Collapse
 
apen1029 profile image
Apen

Very cool!

Collapse
 
tsepontsaba profile image
Tsepo Ntsaba

I'm the happiest man on earth, this is awesome!

Collapse
 
mateuschmitz profile image
Mateus Schmitz

Really great, Gerald!

Collapse
 
aunyks profile image
Gerald Nash ⚡️

Thanks Mateus!

Collapse
 
ben profile image
Ben Halpern

Great post Gerald!

Collapse
 
aunyks profile image
Gerald Nash ⚡️

Thanks Ben!

Collapse
 
manu profile image
Manu Lopez

Great post!

Collapse
 
aunyks profile image
Gerald Nash ⚡️

Thank you Manu!

Collapse
 
cajogos profile image
Carlos Ferreira

Just came across this article, very nice introduction to what a blockchain is! I've been involved in all things blockchain for a few months now and this is really cool! Great work, onto part 2 now!

Collapse
 
bauripalash profile image
Palash Bauri 👻 • Edited

Can you tell me how did you do this? This part of series thing?

Collapse
 
shaunakpp profile image
Shaunak Pagnis

Nice Article!

here's the Ruby version for people interested:

gist.github.com/shaunakpp/704d2052...

Collapse
 
andy profile image
Andy Zhao (he/him)

Blockchains make SO much more sense now! Thanks so much, dude!

Collapse
 
papashkin profile image
Papashkin • Edited

This is a Kotlin variant

Thank you for article!