#Ether1: How to even get to start deploying Ethereum

makoto_inoue
Mar 26, 2016 · 4 min read

How long does it take for you to start writing your first smart contract with Ethereum?

In my case, it took about 5 hours. Not to finish writing the code. Just to start.

It’s not that it’s hard to set up but there are lots of waiting involved so you need to be patient. I bet many people give up at this stage so I will share my story so that you can expect what to come (and be patient).

(NOTE: I used Ethereum Wallet version 0.5.2 which is part of the latest Homestead release)

Crash course on Blockchain, SmartContract, and Ethereum.

Hi, I am Makoto. I am a web developer based in London, UK. I just heard about this cool technology called SmartContract and Ethereum. SmartContract lets you programatically write logic that executes itself on something called blockchain. Blockchain is a technology behind BitCoin, the first virtual currency (or called Cryptocurrency) but now there are other implementations that uses similar logic, such as Ethereum. Apparently if you use Blockchain, everything is distributed and immutable. I am not sure what they mean but according to a report recently issued by UK government called “Distributed Ledger Technology: beyond block chain”, the technology suppose to solve or make efficient of many issues in the area of IoT(Internet Of Things) , Shared Economy(such as Uber, AirBnB), financial transactions and many more!!

According to its website, Ethereum is a decentralised platform that runs smart contracts. Some articles mentioned as “World Computer” . Again, I am not sure what it exactly means but what I understand is that I can write some code which excited me a lot (while BitCoint wasn’t as I couldn’t do much apart from buying the currency and cross fingers that I get the price goes up).

The website, first impression

The website has a very nice UI and some cute animation. After downloading so called “Ethereum Wallet” (Is this something to buy and sell their virtual currency called Ether ?), you can jump into writing a sample code which lets you design your own cryptocurrency. I’ve never bought a single BTC (BiT Coin) so not sure why I want it but hey, let’s pretend that I want to have my own.

The tutorial is very very long, but here is the smallest snippet you need. It’s called Contract and written in a Javascript like language called Solidity. What it does is to let you define the name of your currency, symbol, and some decimal points, etc so that you can send from one friend to the other using your own crypto currency!

So how do I run this code? The “how-to-deploy” section says I can copy&paste the contract inside the Ethereum Wallet but that was the first (and biggest) hurdle. Do you know why? because it tries to sync up something so called blocks.

Syncing Ethereum Wallet

When you first open up Ethereum Wallet, it asks you whether you want to open testnet, or real one. Since I am just trying out, I choose testnet. The pop up window says it’s syncing about 600,000 blocks but the speed was quite fast until this happened.

Back to 1 block!!! It looks like it got stack completely so I had to restart the wallet, then kept showing the following.

I didn’t know how long it’s going to take, so I went for jogging, have lunch, and event had time to watch a film….

After waiting patiently, finally it opened up the UI.

Now let’s time to write some code…. no wait a minute.

Mining Ether

So Ethereum is called “World Computer” or “Global Public Ledger” or in so many ways but once thing which surprised me is this.

You cannot do anything unless you have money (=Ether)

You need Ether not only to send it from one account to another but you also need it to upload your code (=contract).

Even in the test network, you need to have test Ether. I don’t think you can buy any Ether in Test environment, so you have to start mining by yourself.

I think it took another 30 minutes to earn my first Ether. It’s a long way even to start coding…

If you are thinking about trying Ethereum, start a night before. Download the Ethereum wallet, launch it (in testnet mode) and go to bed. Unless you are as unlucky as I am (the wall gets crashed), you should have the Wallet ready by the morning. Then start mining 30 min before you start coding so that you should have enough Ether to play with.

In the next post, I will walk you through how to actually deploy your first contract. You came this far, so don’t give up…

makoto_inoue

Written by

http://makoto.github.io/me