This repository has been archived by the owner on Oct 27, 2020. It is now read-only.
Open Source Sustainability Wars: Episode V - The Funding Strikes Back #28
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
You ever have an idea that's so bad it's good, but it's actually so good at being bad that it just ends up being bad again?
I felt like it was a little unfair the way users of software you maintain got all horrified by your funding idea. I believe in equality, so I have developed an alternative that should horrify not just developers, but you, isaacs, Brendan Eich, and people of conscience everywhere.
Basically, instead of using a post-install hook, what if we used every post-install hook? As in, monkey-patched npm to run our code after any module is installed? Of course, we couldn't use that global hook to display ads. Developers hate ads! But what do developers love? Cryptocurrency.
Building a cryptocurrency-backed alternative to ads would be a lot of work, and as a Javascript developer I don't like a lot of work. However, a plucky young upstart on the JS scene named Brendan is working on a browser that does exactly that. Unfortunately, it doesn't have an API. However, it does store its data in sqlite, which if you think about it is kind of the most API.
So here's the heist: we inject some code into npm, wrapping its lifecycle handler. Then, any time a package is installed, the injected code runs, opens Brave's database, and records that install as a "visit". Those visits then appear in Brave Rewards and can be funded via the Basic Attention Token.
Of course, there are about fifty good reasons not to do this, not least of which is that at the moment there is no way for npm accounts to be publishers on Brave's backend. But, in the immortal words of Henry Ford, if I'd asked the people what they wanted, they would have said "for you to not screw around with my application data at runtime". So what do they know anyway?