This post is for anyone who wishes they could contribute to Bitcoin-ABC but doesn’t really know where to start. If that’s you, then you should start with what Andre Alexandrescu calls “right work.” The linked post was recently added to the Bitcoin-ABC Contributing Guide.
The gist was that there are several important classifications of open source contributions:
There is a huge and undersupplied demand for Right Work in the world of software engineering, and especially open source. The reason for this is that right work does not result in any directly visible impact to the user2 – no bug is fixed, nor feature added. The only discernible impact is that future work on the codebase is easier. Unfortunately, other engineers are often the least likely to give praise, even for this type of work.
But what exactly is “right work”? Right work, simply
put, is cleaning up small messes. Now, you may think that if every
new patch that went into a project was perfect, that the project as
a whole would never need any “right work”. However,
bitcoind is a relatively old codebase that has had lots
of contributors. Often with open source projects, authors come in
and add some functionality and then leave. They might have done a
great job, but then later another person will come and remove or
alter the functionality. Possibly because it is no longer useful, or
maybe they generalize it. Unfortunately, it is easy to leave
unnecessary code behind which incurs a maintenance cost – although
it may provide no function to the software.
Another common occurrence in open source is that someone, needing
to add functionality, does so with the minimum amount of effort.
They add some global in one part of the code, an additional
if statement somewhere else, and call it good. Over
time, this results in an explosion of complexity from too much “action
at a distance” in the code. This makes it very hard to reason
about the code, and to make sure that it is thread safe.
Often, code is moved or changed, but “comment blindness” causes comments to not be updated, resulting in confusion down the road.
There are many other phenomena that happen from code churn in open source projects. The disorder that slowly grows in a codebase makes it progressively more challenging to reason about, and difficult to reliably change. Slowly, the code ossifies – especially in the case of Bitcoin where bugs are catastrophic. Most engineers contributing to open source do so only to fix a bug, or add a feature, that is directly impacting them. Very few contributors want to take on the role of Maxwell’s Daemon and start tidying up a code base3.
Rarely are examples of “right work” highlighted over “great work” or “good work”. This is unfortunate, because it sets the wrong precedent for what work people should strive toward. “Right work” is a great exercise for learning the codebase, and also provides a lot of value to software engineers who come after. The best thing about right work is that almost anyone can do it.
So, here’s some major classes of types of “right work” I’ve seen in Bitcoin-ABC, and examples thereof:
-maxtxfee to the config objectAn example of what I could consider “good work” is actually something I am working on, which is new package selection code. Unfortunately, it seems to be necessary and no better solution has presented itself. Hopefully this will lead to potential for right work in other areas of the code.↩︎
Especially when their livelihoods do not depend on the codebase being tidy; or worse their livelihoods depend on the codebase NOT being tidy…↩︎
Who might be a software engineer being inconvenienced enough to contribute.↩︎
Read and subscribe on Substack