Pre-Hackathon: What You Need Before You Go
Noobs: Come with questions
If you’re attending a hackathon to learn, it’s a totally fine and good thing if you’re discovering new tools the day of and asking for help with your setup. Hackathons will help you upskill rapidly. Make sure you ask a ton of questions and even prepare some questions in advance to get the most out of your time at the hackathon. Scan the list of workshops and speakers to identify the veteran developers who you feel can best answer your questions and make a plan for approaching them during the event.
Remember, it might take two to three hackathons to really understand certain development workflows and to identify the key factors you’re looking for in a team. Before you go, think about the experience you want to have. You don’t want to walk away from the hackathon regretting that you didn’t approach a badass dev. And plan around the basics: coffee, bathrooms, temperature, distractions. Don’t go out too hard the first night if you don’t want your terminal to look blurry the next morning. Or maybe you code better when you’re loose. The hackathon is about your journey as a dev, so make it yours.
Pros: Come with tools
Most in-person hackathons instruct participants to not work on their projects beforehand. However, before the hackathon, you should at least make sure that you can deploy a smart contract to your local blockchain and identify common bugs that could otherwise eat up your time during the event. So have all your tooling ready before the hackathon and get familiar with it. You should install and configure Git, Docker, homebrew, npm, chocolatey, node.js, react.js, and/or angular.js, and other tools you may need before the hackathon, so you don’t spend valuable time on basic setup. You don’t want to be discovering your new favorite tool in the midst of the hackathon if your intention is to win.
The fastest way to get started is to go through the ConsenSys “Getting Started with Ethereum” three step guide. It will get you set up with all the necessary tools you need to succeed at your hackathon. If you need further details, check out the deep dive into tools we provide below.
Text Editors and Integrated Development Environments (IDEs)
Okay, you’re one week out from the hackathon. Now it’s time to download your tools and ensure that you have everything set up before you get to the hackathon. Start with your text editor or IDE. If you already have one you prefer, start by getting the Solidity linter. If you don’t have a preferred text editor, pick from the options below, and open Remix IDE in your browser.
Remix: an in-browser IDE. Whether or not you have a preferred text editor or IDE, you should use Remix at the start of the hackathon, since it’s useful for rapidly writing and testing your smart contract code. Use Remix to start your development—you can move your code over to your favorite IDE/text editor once you feel you have worked out the initial bugs and are thinking about writing tests for your code.
Visual Studio Code: Microsoft’s code editor. Useful for those who are new to the Ethereum space AND do not already have a preferred text editor or IDE.
Atom text editor: a text editor created by GitHub. Useful for those who love the design of GitHub’s products. Has a teletype function, which allows you to collaborate in real-time with your team if you are all using Atom.
Sublime text editor: text editor with great search functionality (goto is the name of the function).
How to Run Ethereum on Your Machine: Local Chain, Clients, and APIs
You’ll need to install the software that will allow you to run a blockchain locally on your computer or connect to a blockchain. Our recommendation is that you run a blockchain locally, since this is the easiest way to quickly build and iterate during the hackathon. Download Ganache the week before the hackathon and use that for running a blockchain on your machine. You should be comfortable using Ganache and getting things like account information. Once you do, you can save your workspace to save even more time and effort during the hackathon.
Ganache: a one-click blockchain from Truffle. Allows you to create a private Ethereum blockchain on your machine and has both a GUI-based application and a command line interface.
Go-Ethereum: an Ethereum client, often called “Geth,” that can create a blockchain locally on your machine, connect to a testnet, create a private network, or connect to mainnet. Geth is the official Golang implementation of the Ethereum protocol. It has had hundreds of contributors since it was started in late 2013. Geth is battle-tested and important for you to know about, even if you do not use it in your hackathon.
Ethereum Smart Contract Development Framework
A week prior to the hackathon, you need to make sure that you download and set up your smart contract development framework. We recommend Truffle, which has become devs’ go-to environment, testing framework, and asset pipeline for blockchains using the Ethereum Virtual Machine (EVM). Install using the instructions below, and then follow the Truffle Quickstart to ensure you understand the framework’s functionality.
Truffle: a comprehensive suite for writing, compiling, testing, and deploying smart contracts.
Also, you don’t have to reinvent the wheel when it comes to basic smart contracts. OpenZeppelin has an open source repository of audited smart contracts that you may find valuable.
How to Use Testnets and Get Test Ether
We recommend using Ganache to run a blockchain locally on your machine. Each account in Ganache comes pre-loaded with test Ether, so you’re all set from the start. If you are using a testnet instead of a blockchain deployed locally on your computer (again, for the sake of simplicity, we recommend just running the blockchain locally on your machine), you have to get test Ether beforehand, or else you will not be able to send transactions, which means you can’t deploy your smart contract and you’ll be stuck in limbo during your hackathon. If you’re determined to use a testnet instead of a local deployment, here are a few faucets where you can request testnet Ether:
Also, check out this beginner’s guide from Compound on how to use an Ethereum test network.
How to Connect Your Front-End to the Back-End
So you can read data from and write data to the blockchain, you need to have either Web3.js or Ethers.js as part of your developer workflow before the hackathon. Regardless of whether you use Web3.js or Ethers.js, we highly recommend you set up MetaMask beforehand as well.
MetaMask: allows you to run Ethereum dapps right in your browser without running a full node. MetaMask provides you with a secure identity vault and wallet for managing your identities across different sites and signing blockchain transactions. You can install the MetaMask add-on in Chrome, Firefox, Opera, and Brave.
Connecting It All: Double-check Your Environment
Alright, you’ve downloaded everything you need and feel geared-up to hack. Now it’s time to take your tools for a spin by trying them out with a sample decentralized application. Go through Truffle’s tutorial on building an Ethereum Pet Shop application. This tutorial will ensure that you are able to successfully use your IDE/text editor, Truffle, Ganache, Web3.js, and MetaMask, and it will build your confidence that you can get up and running on the day of the hackathon.
Day of the Hackathon: 4 Pro Tips
It’s officially time to get hacking. You’re excited, a little nervous, and totally prepared. Make sure you arrive at the venue on the earlier side of registration so you can find out where the snacks and drinks are, locate the bathrooms (more important than you think), connect to the Internet, scope out the most comfortable locations to hack, and start meeting your fellow hackers and members of the community. Here are four specific pro tips to guide you on the day of:
Stay lightweight and account for connectivity
If you’re going to an in-person hackathon, think about Internet connectivity and the challenges that hacking over a public WiFi might mean for you. You should have already downloaded and installed all your tools, but if for some reason you need to redownload and install tools like Truffle or Ganache using npm, it will not be a huge issue. Installing an Ethereum client and syncing it with mainnet at a hackathon is a poor choice. We’ve recommended tools and setups that are lightweight and let you focus on building quickly. However, every option has a cost in terms of time to install and usability, so think through the specific parameters of your hackathon and how the tools that you use could impact what you ship.
Keep any documentation you need at the ready
For whatever tools you choose to build with, keep the documentation open on a tab on your web browser. We designed this survival guide to be a quick-reference compilation of some key links you’ll need.
The community is your friend
Can’t say it enough. Make sure you connect to the Discord, Gitter, and/or Slack channels of the tools that you end up using. The community often has helpful answers to any questions that you might have. Meet people on the ground, both to find potential teammates and to identify experts who can help you debug a smart contract when you run into issues. ConsenSys is running a help desk at ETHDenver, staffed with knowledgeable and friendly technical folks. Join our Discord and say hello before you run into an issue so they know who you are. We might even have a few surprises for you if you come talk to us in person!
Keep it simple
Hackathon winners are often able to create a proof-of-concept during their hackathon and limit themselves to that scope. Time limits mean that you won’t be able to sort out every detail or fix every bug. The simpler you keep the scope of your project, the more likely that you will be able to bring a version of it to life. Remember, for most hackathons, your app does not have to be ready to deploy out to the world.