Before you start reading this article, I would just like to emphasise a key difference between this and the majority of all the other articles talking about Ethereum development and dapps programming out there. So here it is:
This is not about programming dapps or smart contracts running on the Ethereum blockchain. This is about developing Ethereum itself, in its core.
With that out of the way, you can now start reading ...
Why contributing to Ethereum?
One of the main reasons I am interested in Ethereum is purely its technology. Ethereum is the dominant platform of developing and running decentralised applications and this is not going to change anytime soon. If you are a developer, you probably know what I mean. Yes sir, of course there are scalability issues and better solutions implemented already by other blockchain protocols (e.g. Cardano), but none of those projects are even close to the level dev-env tool maturity and the proven reliability Ethereum has gathered over the last couple of years. Why do you think VISA is trusting it? Because it's a battle-tested blockchain ecosystem against some serious production workloads out there. So the underlying infrastructure that glows together all those decentralised bits and pieces is quite robust. In addition to that, this "magic" of engineering is open and free for anyone to see it and study it. All you have to do is go to Ethereum's GitHub page and read the source code. That reason alone is enough for me ... but hey, that's just me! Let's see other reasons:
It's open source
Ethereum is an open source project with a great community around it. So, as any other open-source project, Ethereum is offering you the common advantages you get when you contribute into open-source . According to a blogpost at opensource.com, these merits are:
- Building your confidence as a developer
- Build your resume or CV
- Build your professional network
Over there, you will find plenty of repositories, but most importantly there's one that stands out like a gem among others: the implementation of the protocol itself, that is Go Ethereum. That said, if you are curious to learn how things are working under-the-hood, this is the best place to start your homework. I have to warn you though, it's not going to be easy and chances are that you will most probably give up pretty soon -- unless you have a very good reason not to (e.g. hired by a company to implement a specific feature). But for the average Joe, coding after-work on voluntarily basis can be quite hard in terms of time. Especially if you like me and you have family to look after, you most probably need to stay up late at night to follow your passion. Yet, this is normal, this is life, this is ... a production's system code, written and maintained by a very small group of experts for a technology that is still in its early phase in humanity. It takes a lot of dedication and months (yes, that is correct, I said months) if you want to familiarise yourself with some sort of packages and their concepts.
What programming language to use?
The answer is clear: you need to know the Go programming language. If you don't know Go, you will have to learn it. Period. But, please don't do it for the sake of making an Ethereum contribution; do it for the sake of your personal skill development career plan. I guess I don't need to remind you that nowadays, we live in the era of containerised applications running into Kubernetes clusters -- and this ecosystem is written exclusively in Go. So, if you are a software engineer by profession, then this crypto-journey will hopefully give you the opportunity to become a better developer as well and position yourself in the spotlights of the industry market.
Anyway, without any further ado, here's my top 5 tips to make your first open-source steps into Ethereum's codebase:
1. Find a repository you are genuine interested into
If you want to contribute just for the sake of being another Twitter celebrity, I'm sorry but I have bad news for you, as this is not going to last and you will probably going to have a bumpy road ahead. I would suggest you to find a repository in the Ethereum organisation that triggers your curiosity and craves your need to convert coffee beans into machine code (lol). Having a true passion and motivation is my top one thing that matters in those cases, and please do trust me when I am saying you that experienced PR reviewers can identify cosmetic junk PRs from real work. However, in case Ethereum org doesn't have something interesting for you, no worries. The next place would be to have a look at all the other tools around the Ethereum ecosystem (e.g. try Ethereum 2.0 wallet: Prysm that is part of the PrysmaticLabs org). I know it sounds cliché, but really ... just follow your passion.
2. Start with the basics
Every good project follows good practices. As a beginner into Ethereum's development it's your responsibility to provide feedback for your onboarding experience. For example, read the documentation and see if the information there is up to date and sufficient for a beginner (like you). To be more specific, you are interested in documentation targeted for developers -- not users. What I mean by this is to look for stuff such as how to build and how to test your code. Do they use native Golang tools? Do they use a Makefile? Do they use GitHub actions? etc. All these are part of the DevOps aspect of the project, which is great to know as it would make you already feel more comfortable around it.
3. Fix linter issues
In case the project is not using some common CI best practices (e.g. running a linter against each PR) feel free to do so. Install golangci-lint locally and run it against the codebase of the repository you are developing. If the project is not using any linter, you are probably going to be busy for the next couple of weeks (or should I dare to say months depending on the findings and your free time). If you are new to Go, then you are in for a treat, as this is going to teach you some cool stuff about best-practices and write native Go coding style, like a good healthy gopher.
4. Start writing tests
The next step in the process is to start writing tests that are missing. I am 100% sure that the codebase is not going to be 100% tested, so this is a good opportunity for you to find where testing functionality is missing and enhance it. Quality assurance it's an important aspect of every software project out there, not to mention how important this can be if the software itself it's actually responsible for putting digital trust in banks' world. Even if you manage to improve a single unit-test (or an integration tests) then that should be really beneficial for everyone, making a contribution with an actual and important impact. Feel free to use the go cover tool to reveal you all those missing tests ;)
5. Start Refactoring
"With great power comes great responsibility" and unless you are Spiderman or uncle Ben, in your case this is paraphrased into: With large projects come big code smells. All you need to do is fork the repository in your GitHub account and install a code analysis plugin for Go. This will analyse the various coding patterns and it will let you know what is good, what is bad and what is ugly. However, most of these benchmarks are quite picky on technicalities and they tend to miss the bigger picture, so this doesn't mean that you need to fix everything the tools consider to be a problem. Not at all! Use your experience and think if it makes sense to change something in terms of readability and maintenance of the code. Ideally, I would pick a section where there is existing testing for those, so when I change something then there's some automatic mechanism to block me from releasing regressions into production, thus breaking Ethereum (ouch!).
All in all, all these steps will take you quite awhile to accomplish; and to be frank you don't have to follow them of course. This is not a standard way of doing this, this is just my preferred guideline/approach when it comes down to contributing into open-source projects. I am sure there will be plenty places to fix and improve the already existing code, but please do baby steps: one thing at a time. Consider this as a training and studying exercise around the codebase of Ethereum that will make you familiar with its core tech and it will also make you a better developer in the end. Of course, to do all that stuff lot's of reading (and coffee) is required.
Have fun and good luck :)