Live data from Hacker News

BasicCoin, a cryptocurrency in less than 600 lines of Python

github.com

1–10 of 40 posts

Re: BasicCoin, a cryptocurrency in less than 600 lines of Python

#2
Honest suggestion: Change the tagline to "less than 1000 lines" or exclude the GUI or whatever, but don't just not include line breaks anywhere.

You have 7 very sensible, and indeed admirable, style guidelines and while no line breaks only clearly violates one of them (PEP8), it's not really in the spirit of the others either. I opened gui.py and immediately was overwhelmed, rather than compelled to dive in and digest your small codebase.

Re: BasicCoin, a cryptocurrency in less than 600 lines of Python

#4
I have to say I think crypto currencies is an area where the keep it simple approach is extremely beneficial. If it means fever optimizations, and leads to a greater dependency on off chain transactions, so be it. For genuinely wide spread adoption, more important than speed and transaction volumes, are an ironclad faith in the integrity of the underlying code itself.

Re: BasicCoin, a cryptocurrency in less than 600 lines of Python

#7
post #5

I wonder how practical it would be to take Bitcoin Core and gradually reduce its # of (non-blank) lines.

Sadly, the core client has the job of being capable of bootstrapping itself starting at the genesis block and ending at the most recent block.

That means that, barring a huge design change in Bitcoin itself, the core client has to support every single feature ever implemented in Bitcoin, no matter how half-assed or poorly thought out.

That's why things like the way P2SH got implemented really grind my gears. Bitcoin has a few idiosyncratic and unintuitive design additions that make it really hard to make simple clients.

Re: BasicCoin, a cryptocurrency in less than 600 lines of Python

#8
600 lines, however the codebase is quite unreadable. Typically, code written in python is rather readable and easy to follow, but this is heavily condensed and somehow completely void of any sort of pythonic code. Programs are the communication of thoughts between fellow software writers, readability should be your #1 priority.

Re: BasicCoin, a cryptocurrency in less than 600 lines of Python

#10
post #2

Honest suggestion: Change the tagline to "less than 1000 lines" or exclude the GUI or whatever, but don't just not include line breaks anywhere. You have 7 very sensible, and indeed admirable, style guidelines and while no line breaks only clearly violates one of them (PEP8), it's not really in the spirit of the others either. I opened gui.py and immediately was overwhelmed, rather than compelled to dive in and diges…

As someone more accustomed to Lisp than Python I must say the lack of extra line breaks didn't feel so weird to me :)
Post reply on HN