Bitcoin accepted here

bitcoin logoWhen F.A. Hayek wrote his book “The Denationalisation of Money” (1976), as imaginative as he was, little could the Nobel-prize winning economist have imagined bitcoin. When I read it in grad school, his book sparked questions more than offering answers. How could this work? The future then remained open. It wasn’t clear what exactly technology might deliver over time, yet technology would push this question. Of that I was convinced. (And I had some ideas that I worked on, but that’s for another discussion…) Enter bitcoin.

In spring 2011 I encountered bitcoin, and once I saw that it had certain desirable qualities, I began learning how to use it and work with it, attending Meetups in New York City and San Francisco. In late 2013 there began a more technical Meetup, SF Bitcoin Devs, out of which came the O’Reilly book on bitcoin by Andreas Antonopoulos, who founded the meetup, and out of which came a project that I’m working on now, along with a former longtime Google employee, Bryan Vu, stemming from a presentation he made.

As I proceed with this project, I hope to share some of the code. It’s all open source. The leader of SF Bitcoin Devs, Taariq Lewis, asked me to organize a course around a book, but I haven’t yet had the time. After discussing with people what might be useful, there was one idea that stuck: writing about bitcoin in conjunction with a real project focussed on code, primarily Java. If I do continue with this, time-permitting, the writing, too, is to be open-source with attribution, per the philosophy of SF Bitcoin Devs.

So let’s start. In just a few steps I hope to have you running the latest Bitcoin Core 0.10.0 on your machine along with some code to help you play with it and see some of the details involved in bitcoin transactions. I’ll describe here what’s needed for a Mac using IntelliJ IDEA. (Feel free to add documentation for other OSes or IDEs!) Later code will involve Android so I highly recommend the use of IntelliJ.

Make sure you have Java 6 or higher, and then download the Bitcoin Core 0.10.0 dmg and install.

Clone pg-regtest and follow the instructions in the readme.

In IntelliJ run the test ‘BalanceSpec’. You can also run the test from the command line (see readme). If all goes well, you should see the Bitcoin Core GUI appear briefly and one spock test succeed. If so, congratulations – you’re all set! You’ve just run bitcoin in regtest mode. No real bitcoins were used. Next time we’ll play with this some more…

To be continued…