A Prologue to Ethereum Development
How and Why to Get Started
I got my first computer in 1996. It was an old HP that my grandmother used to do taxes on. It didn’t have a hard drive and used 5” floppy disks that still flopped. You had to use DOS to load the program from the disk, and the only programs I had for it were the Wheel Of Fortune and Jeopardy! games. It didn’t matter — I was hooked. From there, I started digging through the trash for old computer parts to keep upgrading the hand-me-downs I would get from Nana every few tax seasons.
When I joined the Navy in 2008, I learned simple things, like how basic electrical circuits composed logic gates, or how combining those gates could form computational and storage circuits. I was taught how to troubleshoot on a Motorola 6800, the processor from my first video game console, a Nintendo Entertainment System. All I wanted was to learn more. While I was on my ship, I became the IT administrator for the local network. After learning that, I started to ask questions about the software side. How do I code? I wouldn’t find the answer until my passion for blockchain was ignited.
I was still new to the Navy during the bailout and government shutdown, so I didn’t feel the sting as hard as those outside. After I got out years later, I found out more about printing money and inflation, and was appalled at what I had learned. At first I considered politics — maybe I could change things from the inside — but my service with the Navy reminded me of the crushing weight of bureaucracy. I came to the conclusion that big ideas and change come from the outside.
This big idea was discovered in a conversation, and it was named Bitcoin. The properties of this system astounded me! You can code the rules of the system at the time of creation, and it can not be altered after that. The cryptographic nature made it so that you can not defraud the system, and I discovered, in the same conversation, that this could be applied to more than just currency.
This is possible using the underlying technology, named Blockchain. You could create outlets of expression that could never be censored or even make voting anonymous and perfectly transparent. I didn’t know how to code, but I received the invitation to join this infant project if I could learn, and I would let nothing stop me.
The project was named Ethereum.I joined the Ethereum Foundation startup in 2014. Despite having no prior web development experience, I was tasked with building ethereum.org alongside a few others. I started my coding path learning HTML, CSS, and JavaScript to do that.
I used sites like Codeacademy, Khan Academy, and Code School to get the basics down. When the Ethereum project had matured some, I began writing Solidity and testing it locally on my machine, and then small networks in-home. Combining the two gives you a recipe to build decentralized applications (Dapps) by yourself — you could call it a full stack for Dapp development. Resources were limited back then, but, today there are a lot of great tools and references that you can use to get started. I would like to share some of them with you.
Currently, blockchain developers are in high demand, and learning these skills will greatly increase your marketability as a coder. I want to start with the foundation and give you a grounded, realistic paradigm to begin operating under, the tools to succeed after you read this, and a road map of how to further your studies and stay ahead of the curve.
What You Will Need to Know About Ethereum and Where to Find it
Taking a high level view, traditional web based applications utilize a central server to do the heavy lifting, and lightweight clients that run locally on consumer devices. With a distributed, decentralized model used in blockchain, the database is shared globally.
Most clients run the virtual machine as well as maintain a copy of this database locally, making updates to the network that are validated and verified in steady increments called ‘blocks,’ synchronized to the rest of the network. This can be viewed as an immutable state machine where each update includes a reference to a previous state and forms a chain of the history of the system, including program execution. You can abstract this as one server, and all you are doing is learning a new language for the server side logic. Easy peasy, right?
We will reference Ethereum, a mature and highly utilized blockchain at the time of this writing. Ethereum is the Swiss army knife of blockchains, with a built-in virtual machine capable of running any program, and is, in essence, a world computer. The best reference to keep handy, and visit often, is the Ethereum Wiki.
The concepts contained range from beginner to advanced. If you’re just beginning, start with the home section. For an intermediate view of the concepts that span blockchain technology in general, read the design considerations section. For the advanced, check out the hard problems of cryptocurrency section. For staying up to date with improvements and changes, keep your eye on the Ethereum Improvement Proposals (EIPs).
You don’t have to do all of this before you start coding, but it will help you as you continue your journey. When you do start coding, consider the necessary applications of blockchain, as a 15-second time between state changes means you can’t do all computations on the blockchain. Imagine if you had to wait 15 seconds every single time a web page had to change! You can think of this world computer as having the computational power of a 1990’s cell phone. You will have to get creative.
All of the Tools Needed for Ethereum Development
Every craftsman needs a good set of tools, so we’re going to touch on some wonderful tools to cover the front and back-ends of Dapp development, both JavaScript and Python based.
For JavaScript, your favorite front-end stacks, such as Angular, Ember, or React, are all you need to get started, and for the back-end, Truffle Suite has put together an amazing set of tools for creating your project, testing, and even deploying to the blockchain!
For Python users, Flask and Django are full stack tools for writing logic and templates, and Populus will create, test, and compile your programs or ‘smart contracts.’
The major language for developing smart contracts is called Solidity. You can find the docs here, as well as some great examples to look at. The language is similar to C and JavaScript, with low level control of the virtual machine built in, but can still be picked up quickly. The Remix IDE will help you write your code and error check right from the browser.
If you’re a visual person, you can check out EtherScripter to visually place puzzle pieces together to represent variables and logical functions! Etherparty is a tool to generate smart contracts and is friendly for those who do not know how to code.
Do you code in C or Rust? You may still have to learn Solidity for now, but Ethereum is working on a version of Web Assembly (eWASM) that will allow you to compile smart contracts from C and Rust, lowering the barrier by allowing developers to code in a language they already know.
A word of caution — smart contracts written insecurely can have catastrophic consequences, so before you write anything that will protect significant value, check out the Ethereum Smart Contract Security Best Practices, as well as the CryptoCurrency Security Standard, and have good audits performed on your code.
Keeping Up With Blockchain’s Technological Advancements
With such a rapidly advancing technology, it’s paramount to stay ahead of the curve. For this reason, we’re going to cover a few topics that push the boundaries. A consensus algorithm is the method a blockchain uses to come to an agreement on the network’s state changes.
The most used system at this time, proof-of-work, is slow, requires expensive equipment that will soon become obsolete, and uses electricity on the scale of entire countries! Ethereum is changing its consensus algorithm from proof of work to proof of stake — the Casper system will increase the network’s speed, efficiency, and security.
Scalability is a big topic in the blockchain community, as it is a major hurdle to mass adoption of the technology. A roadblock is that every member of the network has to process all of the transactions. This redundancy is necessary for the peer to peer nature of the system. Sharding is a technique to split a database over multiple servers, and is being researched and implemented to the Ethereum network.
The Ethereum network can currently process approximately 20 transactions per second. This is orders of magnitude lower than the 56,000 transaction per second capability of the Visa network. The Raiden network, one part of the solution, is a side network or ‘state channel’ that can process and consolidate transactions in between blocks. This allows for faster payments and even micropayment services.
The blockchain ecosystem is diverse, and interoperability will allow it to grow as a whole instead of in a siloed manner. There are two major projects I want to make you aware of: Plasma and Polkadot. The idea is that there can be separate blockchains for different applications, all being validated by one master chain (Ethereum) that will maintain the high level record of the state of the other blockchains, as well as the ability to initiate changes to the connected blockchains. This will help the Ethereum network and other associated applications come much closer to mainstream accessibility.
The Future of Blockchain Is You
Blockchains are not magic. They are made of algorithms and data structures, many of which existed before they were combined into blockchain, and can be learned the same as any other piece of Information Technology. It uses private key infrastructure like PgP, data structure, and peer to peer protocols similar to the BitTorrent network. Don’t be afraid to experiment and break it — there are test networks to do that on. Try the experimental software, and when changes are made, don’t respond to changes after they happen.
The thirst for knowledge has led me to my own company, Mimir Blockchain Solutions. We’re working on a decentralized infrastructure solution to bring blockchain to your mobile devices. Accessibility is more than physical, and education is necessary for users and developers alike, so feel free to ask questions so that I can better assist you. Join me in this exciting new community, find problems, solve them and find a way to monetize it. The next generation of developers is being made, right now, and I want you to be a part of the next wave of technology.
The Ethereum Developer Cheat Sheet
Where to Learn to Code
Where to Learn about Ethereum
- Ethereum Wiki (Beginners)
- Ethereum Wiki Design Considerations (Intermediate)
- Ethereum Wiki Hard Problems of Cryptocurrency (Experienced)
- Ethereum Improvement Proposals (Stay up to date)
JavaScript DAPP Development Tools
- Angular (Front end)
- Ember (Front end)
- React (Front end)
- Truffle Suite (Back end)
Python DAPP Development Tools
Smart Contract Development Tools
- Solidity (Smart contract programming language)
- Remix IDE (IDE)
- Etherscripter (Visual smart contract creator)
- Etherparty (Non-programmer friendly smart contract creator)
- eWASM (Future web assembly standard)
- Ethereum Smart Contract Security Best Practices
- CryptoCurrency Security Standard
Hello Nicolas,
Is polkadot better than Cardano? if so why?
Hello Nicolas, Thanks for the rich information…
I have seen some examples where people are using Nodejs for testing smart contracts…let me know how it works…
This is rich, detailed and informative.
Could you please explain the “Django for Front End” part of your post? I understand Django has some awesome template features and engines, but is it built for Front End?
No. I just mentioned front end for the templating, it’s more of a full stack. I did change the desciption from just front end because, you are right.