Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sgentle
Copy link

@sgentle sgentle commented Aug 31, 2019

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.

Screenshot of patcher

Screenshot of Brave Rewards

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?

@mightyiam
Copy link

@sgentle I am impressed and bewildered simultaneously. Why would you do that? Anyway, kudos.

@sgentle
Copy link
Author

sgentle commented Sep 1, 2019

Why would you do that?

You know, I've wondered that a lot myself. I think the answer is because I was pretty sure it wouldn't work, but I wasn't totally sure, so I set about trying to prove it and failed successfully.

I also felt a bit inspired by the moxie of the original idea. Oh, you say it's not possible to find funding for open source projects? Hold my post-install script... It changes the conversation from "nothing can be done" to "something can be done but I don't like it", which is a subtle but important shift in thinking: the same conversation but starting at the beginning rather than the end.

So I see this as an important dumpster fire proof of concept because, well, it might be a gross hack, but it works. You can run this code today and the npm modules you install will start showing up in Brave Rewards(and maybe mess up your data don't @ me). If enough people did so, someone at Brave would have to add support for it in the backend because, I mean, the contributions are just sitting there otherwise. Both Brave and npm inc would want this garbage to go away before it breaks something, but how? "We agree with what you're doing, we just don't like the way you're doing it." Okay, what way do you want to do it?

But that's pretty silly, right? Do I really think it's possible to Cunningham's Law my way into integrating Brave Rewards with npm, and somehow that will be an answer to the funding problem? I mean... probably not? At least, I'm pretty sure it wouldn't work. But I'm not totally sure.

@mightyiam
Copy link

Thank you for the answer, @sgentle. Such an inspiring set of attitudes 🏆 💯 keep it up.

@feross
Copy link
Owner

feross commented Sep 4, 2019

It changes the conversation from "nothing can be done" to "something can be done but I don't like it", which is a subtle but important shift in thinking: the same conversation but starting at the beginning rather than the end.

This is so wise.

@jonathansampson
Copy link

@sgentle I was thinking about the same exact thing a few days ago. Nice to see you got the conversation started :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants