If you’re here, it’s likely because you’ve heard about Solidity and blockchain development. You’re probably looking to get involved and build your own DApps and you’re looking to learn solidity. This resource is the perfect place to get you started if that’s the case.
First let’s stop off with a primer about Solidity: the what of it, the why, and then what of what you can build with it. If you want to skip ahead to the resources, feel free to click here.
What is Solidity?
We have to start here with the concept of blockchains, immutable, distributed datastores that are verified by a network of actors rather than one centralized source. Bitcoin is the most famous example of this technology and its first widely adopted application.
The genesis of Solidity comes from the simple realization that while Bitcoin is a highly secure blockchain, it was not very scalable both from a technical sense, but also from a community development sense: people had to either create entire new blockchains or fork into the existing chain to create new innovations or iterations.
Solidity is the programming language associated with Ethereum, a blockchain that aimed to have developers iterate on top of it: the Ethereum blockchain aimed to provide a more complete platform where developers could dictate more of the logic behind what data and payments get recorded on the blockchain, and which do not. Solidity is the programming tool that makes that possible.
Ethereum rests on the principle of decentralization: as with other blockchains, there is no centralized data storage that declares a certain state for the entire system. Data and the state of the system flow through a series of decentralized nodes that can be run on a number of different servers. For example, you could run an Ethereum node on your PC, and it would form part of a collective amount of computing power dedicated to sending and verifying data on the Ethereum blockchain.
In technical terms, the Solidity language is Turing complete (meaning that it is a general-purpose programming language similar in functionality to JavaScript and that you can program for loops, if statements and more and benefit from object inheritance and function modifiers), and it’s a contract-based language oriented around Python, JavaScript and C++ concepts meant to be executed on the Ethereum Virtual Machine. It is a high-level language that abstracts away many fundamental memory and space problems so as to allow programmers to easily build their own DApps.
Why Solidity?
Solidity is a language that compiles with the Ethereum Virtual Machine within each Ethereum node — you can think of the EVM as a Solidity compiler. It comes with a set of conventions and global variables (such as msg.sender, indicating an Ethereum address that triggers a function) that can make your life easier, and it’s easily plugged into web3.js, an API that allows you to interact with common JavaScript web frameworks such as React.js. It is, in short, the easiest way for you to create Ethereum wallets and embed them in your apps (allowing you the ability to transact monetary value in your functions).
While there are other Ethereum programming languages (such as the more Python-based Serpent), Solidity is the most popular one with the most documentation out there so far. You’ll be able to access complementary libraries such as those offered by OpenZeppelin and utility tools such as Truffle. If you want to build something with Ethereum, or you want to monetize your functions or build your own token, you’re probably going to end up using Solidity.
What can you build with Solidity?
You might have heard of smart contracts — you’ll be able to build smart contracts that execute different functions with Solidity. This will allow you to write data to the Ethereum blockchain or to receive or send Ether when people trigger different functions. Think of it as integrating a wallet directly in your code.
An interesting limitation you’ll have to deal with is that function calls are correlated to gas price within the Ethereum blockchain, meaning people will pay to execute functions on your platform. This is something you’ll have to keep in mind as you scale out new applications — the monetization of your functions can be a double-edged sword.
Onto real-life examples, you can build your own token according to the ERC-20 standard and start distributing it for initial coin offerings. You can create your own game that might go viral (such as CryptoKitties). You could even create your own decentralized exchange for buying and selling other tokens such as the people behind Etherdelta have done. You can build any number of Ethereum Dapps. The possibilities are there for you to explore once you understand the technology.
Ok, what are the nine resources you promised?
Fair is fair. If you’ve made it this far or clicked through all the way down to the bottom, you’re probably looking for the resources I promised you to help you learn Solidity and different Solidity tutorials.
Here they are, in the order for which I think it makes sense for you to consult them.
1. ConSensys Resources
You’ll want to start off with a general overview of Ethereum, different blockchain concepts, and a feel for how Solidity can fit into that framework. This compilation of resources can certainly be helpful in that space and help flesh out the context of the space you’re getting into when you start building smart contracts. You’ll be able to see and get inspired by the vast potential of what has been done with smart contracts — and what you can do with them in turn.
2. How to set up an Ethereum Node
Next up, you’ll want to set up an Ethereum node yourself. This is useful for local testing of the apps you build but also, in a greater sense, provides you with the bridge you need to be part of the Ethereum community. The guide in question links out to a section where you can install an Ethereum node under different operating systems — it also contains sections dedicated to other aspects of Ethereum you may find interesting, including the mining mechanism for it.
3. Ethereum for Web Developers
This guide on Ethereum concepts can help you really understand the promise of Solidity and how you can extrapolate your thinking about web concepts into development for blockchain.
It also allows you to separate out the differences between centralized and decentralized datastores and how you should conceptually think about the programming logic for either.
The guide then moves onto a free tutorial (though the rest of the site offers paid lessons) on how to build a ballot voting system in Solidity that is much better than any “Hello World” tutorial could be in terms of getting you started on your path to learning Solidity.
4. BlockGeeks Guide to Solidity
This guide offers you yet another text-based case study for creating something in Solidity — this time though, you’ll be able to get an overview of how to build a web app in conjunction with Ethereum functionality.
Think of this as a case study upon which you can layer the Solidity concepts you’re learning and put them into practice. It will also teach you how to build a development environment for Solidity apps so that you can build your own smart contract and iterate on it in real-time without the fear of breaking anything as you learn Solidity.
5. Smart Contracts Best Practices
This resource from ConsenSys, an accelerator based on powering different teams working on Ethereum-based projects helps you define more of the meta-thinking behind Ethereum smart-contracts.
It will help you design smart contracts and tailor your learning around best practices that will keep your contracts performant and secure as you learn Solidity — highly desirable factors in an emerging tech ecosystem that is often in flux.
6. CryptoZombies
This handy game helps explain Ethereum functions in more depth and will help you learn Solidity — you can learn interactively by building your own version of CryptoKitties (CryptoZombies) — as you go through, you’ll be able to explore, among other things, function creation, function calls and modification, how to implement standard programming language such as assert and if statements, the different data types within Solidity, how to make objects inherit from one another, how to return data and finally, how to determine who can securely access and trigger different functions within your code.
7. YouTube Intro to Solidity
If you’re more of a visual learner rather than textual, you’ll find this video series on YouTube more amenable to your desire to learn Solidity.
Use it to catch up on Solidity concepts or to refresh your knowledge — or try this learning perspective first if you know a video is how you learn best.
8. Remix for Ethereum
With this web browser based compiler for Solidity code, you can experiment with different contracts and different functions cheaply, seeing what compiles properly and what doesn’t right off the bat. It’s a great, experimental way for you to learn Solidity and practice with it.
Consider it a fun sandbox for you to test different functions, similar to what JSFiddle provides for JavaScript, and your first line of validation and defense against improperly built code. It can also serve as the easiest way for you to experiment and build things in a sandbox setting you might not want to deploy.
9. Ethereum StackExchange
Finally, the last resource is the Stack Exchange forum for Ethereum and Solidity questions — a solid resource for you to consult and to pose questions as you’re stumbling around as a beginner, and a community you can give back to once you’ve practiced and built different things with Solidity.
—
I hope this guide is helpful to getting you started in your Solidity programming journey. If you want to join a newsletter packed with cutting-edge resources for how to learn new technology skills and maximally leverage them for a meaningful and socially impactful life, look no further than mine.