Getting started with programming on the Blockchain is far easier than you think but there are different approaches you need to analyze depending on your goals. The purpose of this guide will help inform you better of the options you have available to you for getting started coding in within the Ethereum Network.
Blockchain Programming
There are many facets to program within the blockchain ecosystem. At the deepest core you have coding the actual blockchain itself, meaning you are building Ethereum Nodes that run the network. This is a highly complex and technical area, suited for experienced programmers who like Go or Rust languages and can work with large application and systems level type programming. You’ll need to understand distributed computing, the blockchain itself at an advanced level, smart contracts, hashing, consensus mechanisms, and the major technical decisions behind the blockchain.

You can take a look at the Ethereum Node source code here (LINK) and view the commit history to see examples of what working on the chain is like. If you are unsure if you want to start here, I would highly recommend further reading down. This option will be self evident to the proper people.
Smart Contract Programming
The next layer up from the blockchain itself is learning to write smart contracts, or how to tell the blockchain to do something for you programmatically. The Ethereum Network consists of all the computers running Ethereum Nodes, which in turn have their own Ethereum Virtual Machine on them. Your smart contract will be programmed towards this virtual machine and can have it perform many actions to get to the desired end state of the program. As each Ethereum Node is a valid member of the network in sync with other nodes thanks to consensus, any of them can run the smart contract you submit to them on a new block in the chain, and indeed each node will need to run your contract to agree upon the end state of the network after a block is mined and the process repeats.
In order to gain access to this computing network Ether is used to pay for all expenses in this operation. After all, if it was free to store and compute on the network it would quickly end up being useless due to spam and the low value returned to miners and nodes. Gas is the the perfect encapsulation of this expense on the network, for it costs *something* to store data and to execute a program on the network, and those costs must be accounted for. When you make a smart contract you must store it on the network in order to access it and execute it. Once that is done you are then able pay ETH to have it modify the state of the network (e.g. pay someone, withdraw money, etc..), however read operations (get a wallet balance, get the value of a variable) are free as they do not affect state. More on smart contracts here (LINK).
Advanced Smart Contract programmer try to build their programs with the maximum amount of gas savings by choosing efficient methods to reduce their costs. Each operation in Ethereum Virtual Machine is explicitly described (see image below) in terms of cost that the user will incur to execute, with the overall costs scaled up or down depending on the congestion of the network. When interacting with the network it is important to keep this is mind as every unnecessary piece of code will cost you money.
Smart Contract programming can vary from easy (Hello World, basic DAOs, simple dApps) to extremely complex (DeFi contracts), so it is ideal for any sort of person. I highly recommend running Remix as a development environment to get started and play around. This is the easiest way to get started and the lowest cost to you as it is all simulated for free and provides a full developer environment. Once you are comfortable playing with Remix I suggest you move to deploy on the Rinkeby Network, which is a ETH testing network but also a live network that will give you the real environment to ensure your code is correct. This flow from Remix → Testnet → ETH Network is a common development approach to reduce any spending of real ETH.
As far as programming languages for the EVM, traditional wisdom would recommended Solidity as your first choice. However if you have Blockchain programming already in your belt, then Vyper or Yul can be considered. Try reading ERC 20 (Tokens) and ERC 721 (NFTs) smart contract program links below to get a feel for structure and design of a program. See the additional resources below to get started with smart contract programming.
Resources for learning EVM programming
Remix - Browser Based programming environment - Free
Ethereum Org Developer Docs - Free
Crypto Zombies - Free
Learn NFTs and Smart Contracts and build a DApp
The Complete Guide to Full Stack Ethereum Development - Free
OpenZeppelin Smart Contract Reference Implementations - Free
See ERC20, ERC721 for how Tokens and NFTs were implemented.
These are security hardened contracts, don’t reinvent the wheel!
Solidity, Blockchain, and Smart Contract Course – Beginner to Expert Python Tutorial - Free - YouTube
Has some focus in Python, ignore if not desired
Ethereum Blockchain Developer Bootcamp With Solidity (2021) - Udemy - Variable Pricing - Video - $18.99 (try to get on sale)
Personally took this course and enjoyed it.
Follow Patrick Collins on Twitter - Crypto Dev Advocate
Vitto Rivabella Tweet Thread
Web3 Programming
There is a simpler way if you just want to interact and work with the blockchain and build dApps and not code directly on the blockchain. This is where building Web3 comes into play. Simply put, Web3 is the intersection of the World Wide Web and the Blockchain. Having smart contracts on chain are nice, but if you want to interact with them you need to run a local Ethereum Node and use that as your main interaction point with the blockchain. Most end users will not do this due to computing, network, and storage requirements along with the complexity to set this up. Web3 makes this mass adaptable with a much better user experience by offloading that complexity on someone else. All you need to get started with Web3 is a modern Browser with a Hotwallet (typically MetaMask), and a website dApp that has built the bridge between their smart contract and your wallet. A typical flow goes like this:
Open dApp Website (OpenSea, Yearn, etc...)
Log in / Connect with your MetaMask.
Interact with the dApp Site and have them call a function on their smart contract via a button or form.
MetaMask will open and allow you to confirm the interaction with the data provided, therefore sending the transaction to the blockchain network to be confirmed.
You have interacted with the blockchain without the need for running your own node.
This nice thing about this approach is that is it extremely simple for the end user. Running a node is overhead that 99% will not use and that burden is shifted off to infrastructure providers such as Infura. This also means the cost of programming Web3 is low as it is on the user to maintain their wallet, and the network provider to provide the full blockchain. As a dApp you just need to know how to call methods (see ABI below) on your smart contract and everything else in-between that is handled for you.
The best way to get started with this is using the JavaScript libraries web3.js and ether.js. Both work inside a browser and also inside a NodeJs app. I personally prefer web3.js as I felt their documentation and the examples were much easier to work with, however both should be suitable for any dApp you make. For an example project with these libraries, I used web3.js and built a NodeJs application that tracked NFT prices of certain projects and tweeted them out. See small code sample below that examines transaction logs from the blockchain on a contract and reacts accordingly in the if case statement chain.
import { AbiItem } from 'web3-utils';
import ContractName from './ai42abi.json';
import { web3 } from "./web3";
const CONTRACT_ADDRESS = '0x4242422677Fdd7CA7f638B57afbE04371d318d19';
const ai42Context = new web3.eth.Contract(ContractName as AbiItem[], CONTRACT_ADDRESS);
ai42Context.events.allEvents({})
.on('data', (event: any) => {
if (isNotableEvent(event.event)) {
console.log(event);
if (event.event == 'Transfer') {
handleLoopTransfer(event);
}
if (event.event == "MintedLoops") {
handleMintedLoops(event);
}
if (event.event == "DestroyedLoop") {
handleLoopDestruction(event);
}
if (event.event == "ChangedLoopName") {
handleChangedLoopName(event);
}
}
})
.on('error', console.error);
You’ll notice in the code the import line “import ContractName from './ai42abi.json';”. Remember I said Web3 is a bridge to the Ethereum Network. While we can simply read from the blockchain itself with the libraries mentioned above, if we want to actually build a dApp then we need to learn how to read and write from our smart contract. The Application Binary Interface is a JSON representation of the smart contract’s functions to call. This JSON files allows us to bridge the JavaScript code call from the browser/server with the needed data to be used on the smart contract. See small ABI excerpt below, detailing inputs, their types, the method name, and more. This ABI lets us see an event called MintedLoops with parameters minter, loopId, and count. Web3.js handles all complexity of translating this JSON to the proper hashed and transformed format on the blockchain.
...{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "minter",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "loopId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "count",
"type": "uint256"
}
],
"name": "MintedLoops",
"type": "event"
},...
To summarize, get the ABI from your Smart Contract and then build a JavaScript app that connects the UI input with the User’s Hotwallet to invoke functions on the Blockchain. Simple really 😊. See below for more training resources.
Resources for learning Web3 programming
Getting Started with Web3.js - Free
Getting Started with Web3.py (Python Focus) - Free
In conclusion, the best advice I can give you to learn and grow in Crypto Programming is just go out and build a project, no matter how silly you might think it is. You need the practice learning the libraries and researching how to do things in order to progress as a developer. We are still so early that I guarantee you that you will gain a massive knowledge advantage against people by just knowing the basic ropes of smart contract programming. People are desperate for Crypto Programmers and you can absolutely fill that need through diligent practice and study.
As usual, leave any questions in the comments and I will try my best to answer.
Follow me on Twitter if you enjoyed this.
P.S. If you enjoyed this, feel free to send some tips (for ☕) at BowTiedCrocodile.eth