This article from 2018 is on the front page of Hacker News again today.

The best way you can contribute to an open source project is to remove lines of code from it.Ā We should endeavor to write code that a novice programmer can easily understand without explanation or that a maintainer can understand without significant time investment.

The author also mentions:

Every line that you write costs people time. It costs you time to write it of course, but you are willing to make this personal sacrifice. However this code also costs the reviewers their time to understand it. It costs future maintainers and developers their time as they fix and modify your code. They could be spending this time outside in the sunshine or with their family.

This is just as true for closed source code as open source. Source code is read orders of magnitude more times than it’s written. We should optimize it for the reader and optimize it to be easily improved.