Learning ethereum and Solidity basics

Ethereum is a public blockchain system similar to Bitcoin, but it provides a comprehensive programming structure to write and deploy smart contracts, small programs that can be used for many use cases, from enforcing agreements between multiple parties to issuing your own cryptocurrency.  It has it’s own programming language called Solidity.  I recently started learning about Ethereum and got my hands dirty with some entry level coding and setting up a local Ethereum blockchain for learning.

The easiest way to get an understanding of Solidity, Ethereum and Smart contracts is to use Truffle, a framework that will let you compile and deploy simple smart contracts to play with.

The first steps are to install TestRPC which produces a local Ethereum blockchain and 10 addresses to play with, as well as nodejs, Truffle and a handful of dependencies.

The following is the video (by Jordon Leigh and Will) I used to get going. It provides a great walkthrough for making a basic contract and concludes with an intro on how Ethereum handles a token issuing contract (or Metacoin), which is a common scenario. Jordon plays the role of new learner in the video, although he clearly knows the stuff well, it’s a good style for learners!



I did need to spend a few hours resolving issues with installation of TestRPC and Truffle (the guys in the video are using a Mac) and I’ve left a few notes below the video on all the things I needed to install as dependencies.  You’ll (hopefully) find one or two of these things are already installed on your system.  The video does not cover the actual installation of TestRPC and Truffle.

1. Downloaded and installed node.js (which installed npm I guess)

2. Downloaded testrpc files,


3. Downloaded github for windows. (desktop.github.com) and install

4. Add the path of gitbub to PATH (Environment settings in Advanced settings – Control Panel)
e.g. C:\Users\Admin\AppData\Local\GitHub

5. Install Visual Studio community edition


6. Install Python 2.7


7. Add Python 2.7 location to windows PATH

8. Install Open SSL


9. Download/Install windows SDK 8.1 !!. (actually step 10 should achieve this as well)

10. Add VC++ files (from within Visual studio CE) to add the Cl.exe file

11. Try and install testrpc (https://github.com/ethereumjs/testrpc)


12. Install Truffle


13. I ran from c:/Users/Admin

type truffle and should see list of truffle standard commands.

Note: If using standard windows command window and running truffle commands opens the js file instead of command, you may need to append’.cmd’ to the end,
e.g. truffle.cmd init. I heard that with Windows Powershell you may not need to do this.


Instant Confirmations and Double Spends

When making a transaction with BTC using a wallet, it is broadcast to the network. A miner will verify the transaction by checking that the amount you are sending and address matches an unspent input of a previous transaction in the chain. The miner will include your transaction in a pool of other transactions and include them in a block. They then attempt to solve the block. Miners compete to solve the block. It usually takes an average of 10 minutes for a miner somewhere to crack a block and for any given transaction to be added to the blockchain ledger.

Generally, particularly when being a receiver of BTC from an unknown or untrusted party, it’s recommended to wait for six confirmations to consider the transaction well and truly concreted into the blockchain with no risk that there has been a double or multiple spend that could later invalidate the transaction. This would take approximately one hour from the time that the transaction is submitted.
For relatively small amounts, one confirmation may be considered enough. Interestingly, some payment service providers such as CoinDesk give a nice friendly confirmation message within seconds of a payment made to them on behalf of a merchant. How is this possible when it takes several minutes for a transaction to clear on the blockchain? In this case, Coindesk validates your transaction, transmits it to the BTC network, tells the merchant that monies have been received and then kind of assumes that the transaction will be OK.

It is willingly taking on the risk that a payment could be dishonest and that a double spend could be happening. If a double spend occurs, Coindesk could either be lucky or unlucky; lucky if their transaction makes its way into the main chain; unlucky if their transaction ends up in a block which later becomes orphaned. Coindesk is running a succesful service so its assumed that double spends do not occur against them so frequenctly.

Why would anyone want to perform a double spend? In an attempt to obtain goods or services from 2 seperate parties with the same cash! kind of like trying to write 2 identical cheques with 2 people attempting to pay with them at the same time in 2 different cities. Before the merchants and the banks know what’s going on, the fraudsters have made off with double values of goods.

We’ll discuss more about double spends in the future. For now it’s good to know that if you really need a BTC payment to be accepted in a few seconds and it’s a relatively small amount, services like Coindesk exist that make this possible.

Do Percent Completes mean anything on schedules

Most people working on IT projects are familiar with the type of meeting where a Project Manager calls up a project plan and asks team members to report progress on particular tasks. Usually this is in the form of reporting a percent complete. Important questions are are they useful and do they mean anything? I once worked with a respected Project Manager who believed not. She worked on the basis that tasks have three states only: Not Started, In Progress or Complete.

A problem with percent completes is that they are highly subjective to the person reporting them. One team members 20% will be another team members’s 40%. A key idea of project plans is to breakdown work into chunks and work out the sequence that tasks need to be completed, i.e. which tasks are dependent on others being finished. As a project manager or scheduler, Knowing that a task is 30% complete is possibly telling you nothing more than the task was started but not finished, and that it’s not possible for a dependent task to start yet.

One rule I support that I’ve seen used in practice is the 5 day rule. This means that no task in a schedule should be more than 5 days long. If a team member identifies a task that is 20 days long, they can try to identify four separate stages lasting approximately 5 days. Using shorter duration tasks will make it more practical to track it as having only Not Started, In Progress or Complete status.

Percent Completes do have their place, for example in large construction projects that need to use Earned Value calculations to examine cost and schedule together and calculate values such as CTC (Cost to complete) tasks, but for software projects they often do not add value.

Bitcoin expert Andreas Antonopoulos

This is the first part of a 2 part interview with Bitcoin expert Andreas Antonopoulos. A highly engaging interview as he conveys many aspects including the potential of Bitcoin to reach people with no access to modern banking facilities.

Trace Mayer On Bitcoin

In this interview economist Trace Mayer gives a comprehensive upbeat account of Bitcoin and how it’s succeeding in many ways. He makes some great comparisons between Bitcoin and Gold and explains how you can start investing in this innovative financial technology.

Powered by WordPress