Adventures With TDD, Python and Bitcoin { level: "all" }


Details
Steve Rozick, a local cryptocurrency investor and afficionado as well as a hobbyist developer, will offer a short presentation and Q&A about how he is using test driven development to learn python and build a cryptocurrency trading bot for fun and profit. Steve's presentation will provide an overview of cryptocurrency and its place in the world today, before diving into some practices and lessons learned from applying TDD to his project.
Mr. Rozick is a Project Management Professional and Certified Scrum Master who currently works for Allstate Benefits as part of the Enrollment Technology group. He is also the president of River City Toastmasters in Jacksonville. In the past, he has worked as a technologist with ATM and credit processing companies, with a DVD rental kiosk Redbox competitor, and as an IBM hardware and systems analyst. He served in the US Navy as a nuclear reactor plant operator from 1991-1999.
Although he has never called himself a professional developer, Steve has been interested in programming since the days of BASIC. He has worked in BASIC, C, Java, PHP, SQL, Javascript, Ruby, and now Python with varying degress of success. Steve's interest in Bitcoin and cryptocurrencies started in 2010 when a Bitcoin was worth approximately $0.10 USD. In mid 2017, after extensive research, Steve decided to embark on a project that would simultaneously allow him to learn Python and discover more about cryptocurrency and investment trading.
Update (Resources):
Here are references that I have frequently revisited in my Python journey:
Python reference documentation (3.6) (https://www.python.org/)
Start here. Always.
PEP 8 Style Guide (https://www.python.org/dev/peps/pep-0008/)
Read it once, use it, and (almost) never need to go back
The Python Tutorial (https://docs.python.org/3/tutorial/)
Especially Control Flows (4), Data Structures (5), Errors (8), and Classes (9)
Refer back frequently until it becomes almost second nature
Logging (https://docs.python.org/3/howto/logging.html#logging-basic-tutorial)
Once it is working, little need to refer back
Have had packages interfere with logging
Properties (https://www.python-course.eu/python3_properties.php)
Very useful for inheritance, efficiency, and (I think) readable code
Python Unittest (https://docs.python.org/3/library/unittest.html)
Referred to almost daily even when it’s familiar
Here are reference pages for packages that I have used in my project:
OpenPyXL (http://openpyxl.readthedocs.io/en/default/tutorial.html): Package that enhances use of Python with Excel. This was the basis behind the entire project.
Discarded Pandas as too heavy and complex for what I immediately needed, but Pandas has a tremendous number of tools for database integration and might be a future tool
Requests (http://docs.python-requests.org/en/master/user/quickstart/#make-a-request): Package to make HTTP requests and JSON simple
This package saved hours of code. Very easy to use.
Threading (https://docs.python.org/3/library/threading.html): Built-in library, needed to properly control resources
Easy to use. Probably very easy to screw up too, this is one element that took a long time to understand, and I might still not be clear.
Advanced Python Scheduler (https://apscheduler.readthedocs.io/en/latest/): used to set and manage repeating tasks
Getting into trading cryptocurrency:
Coinbase (https://www.coinbase.com/?locale=en-US): After review, this is the only site that I trust to buy bitcoin. Not that others don’t exist- I stopped looking when I found this one.
Poloniex (https://poloniex.com/): A cryptocurrency trading platform with a strong reputation. Has not been plagued (much) by the problems of other platforms such as Kraken. US-Based, so subject to US law (this was important).
The API (https://poloniex.com/support/api/) (core interface for the project)
API wrapper for Poloniex trading (https://github.com/s4w3d0ff/python-poloniex)
I found this after I had implemented most functionality so did not directly use it, but code study was useful)
Probably will not use, due to identified and unknown risks associated with compromising a wallet key and limited scope compared to long-term intent
Still very useful for observing a real solution
Trading resources – learning when and how to trade
Technical trading (https://www.investopedia.com/articles/technical/02/121702.asp): start here (Candlestick charting):
Analyzing patterns (https://www.investopedia.com/university/charts/)
High level plan (https://www.thebalance.com/know-these-4-things-about-every-day-trade-1031074)
Last but certainly not least, Bitcoin:
Wikipedia (https://en.wikipedia.org/wiki/Bitcoin) (yes, believe it or not- this is easily the most unbiased source I have found
History of Bitcoin (https://en.wikipedia.org/wiki/History_of_bitcoin)
Bitcoin.org (https://bitcoin.org/en/how-it-works)
The Byzantine (http://www.drdobbs.com/cpp/the-byzantine-generals-problem/206904396?pgno=3) Generals problem (https://medium.com/@DebrajG/how-the-byzantine-general-sacked-the-castle-a-look-into-blockchain-370fe637502c)

Adventures With TDD, Python and Bitcoin { level: "all" }