3 ms·
It's tricky. Like there's real benefits to allowing contributions sometime. I was profiling some code and discovered that OpenNLP uses StringBuffer where it s
by marginalia_nu 4y ago
It's tricky. Like there's real benefits to allowing contributions sometime.
I was profiling some code and discovered that OpenNLP uses StringBuffer where it should use StringBuilder in a few places, and for those not fresh with Java, the two work the same except StringBuffer is a thread safe construction that is very slow and largely considered a deprecated vestige of Java 1.0, and it was used in a way where it didn't need to be thread safe and wasted significant resources on memory barriers and lock acquisition. This code is real hot so monkey patching the code to use StringBuilder instead made my code run like 10x faster.
Happy to have figured a performance issue, I wanted to tell them that the might want to change the letters 'ff' to 'ild' in this one place. But I just couldn't figure out how to contact these people and let them know about this trivial 5 character change patch that would make their code tangibly suck less. Like they wanted me to sign up to a jira instance that wasn't publicly available to create an issue so that I could create a github pull request or some such. Real byzantine. Couldn't even find any contact information to the developers. It's a bit of a shame.
Overall I wish there were more good role models for open source projects that aren't like a text editor or some small library. I've had serious trouble figuring out how to operate my own projects that didn't fit the mold.
- m3047 4y agoA lot of projects like this can / should be forked. It depends on how much credit you want, if someone then looks at your fork and incorporates the change into mainline themselves.
- marginalia_nu 4y agoWell I don't want credit and I don't have the time to maintain a fork. I already have more than enough on my plate.
- m3047 4y agoIf you don't have time to make a fork where do you find time to complain or file bug reports with the upstream? The only person you have to maintain a fork for is you; you don't even have to submit a fix upstream. You don't even have to put it on GitHub. I've got code (with stars!) on GitHub. It's not all the code I'm willing to give away; it's all the code I'm willing to honor some vague level of public commitment for curation. There are a lot of shitty places to work. I worked at a place that told me I couldn't take the time to submit a bug report upstream because of "OpSec"! Utter baloney. I've worked places where the upstream was religion: there are no bugs in the upstream, you're using it wrong. I've worked places where only packages which come with some distro or package manager are allowed. (And these places always use the public repos. They also habitually complain about Docker fees.) I understand, but I do not sympathize. If I have to choose between fixing your workplace and fixing software I use, which is it going to be?
- marginalia_nu 4y agoIn that sense of the word, I already have made a fork. But I think it would be useful if my patch helped other people's version of the code be faster too. A forked version of the code that alters 3 characters in one place and is never maintained does not help with that even a little bit. Given a choice of the version of the code that maintained, and the version of the code where one function is much faster, but is abandoned, how many do you think will go looking for the latter?
- m3047 4y agoYou're not a stranger here. I looked through your submissions for one about the specific issue at hand, didn't see anything about OpenNLP. Even if it doesn't stay on page 1 for days a Show HN is a submission, and people can look for it in your submissions. Things like that. It's an example of not helping them find it. Maybe you don't even need the code, or all the code. Maybe it's a common enough issue that a blog post or Show HN with _just that_ would be enough. Heck, a Twitter thread: less is more!
- marginalia_nu 4y agoWell I'm not going to submit it to HN. I have no reason to expect the developers of OpenNLP to read HN. Overall I'm not going to promote a fork I have no desire or intention of maintaining. That would just be misleading people. I don't want to be an OpenNLP developer.
- michaelsalim 4y agoThe other replies defends the walled garden approach but I agree with you. Most of the time I patch or fork the project to suit my needs. But sometimes there's little things that would definitely help if it's merged to the mainline. Note: for others, not for me. I already have my own fork. So my patience to go through the hoops is very small. Since I'm only doing it because I think it'll be beneficial for others. It doesn't matter for me if it doesn't get merged or even read by the maintainer. But in cases like you mentioned, it's just such a shame.
- deleted 4y ago[deleted]
- tetris11 4y agoI kind of think organic projects need to be a little shielded from the entire world to grow. To contribute to a walled garden you need to prove to the gardners that you're not going to destroy everything they've strived towards, even if what you're proposing is more efficient or better. Make friends with the Gardner's first, talk to them on their level, prove to them you're willing to jump a little. If you stake nothing of yourself but demand to be let in to let your contributing be known there's a risk that the whole project will lose focus, sure not after first or the second, but maybe after the 10th or 20th contributor with their own destabilising vision of how things should work. Open source projects need to be democracies from the get go in order to fascilliate such chaos. Otherwise, contributors need to prove that they're at least a little sympathetic to the long term goals of the original authors.
- brudgers 4y ago...They wanted me to sign up to a jira instance that wasn't publicly available to create an issue so that I could create a github pull request or some such. Real byzantine. Couldn't even find any contact information to the developers To me, all this seems like a reasonable filter. Not much of a barrier when if contributing to this particular code base was of high personal importance. I mean, if that's the way the team works. That's the way it works and if it isn't the way a particular person wants to work then perhaps they are not a good fit with the team. [This is not intended as snark] If the project is important to you and the team doesn't work in a way that works for you, set up your own fork. Yes it's a lot of work that will beget more work. But that's what important things usually entail. Once you have your fork, you can set your own bar for contributions and other project policies.
- marginalia_nu 4y agoWell I mean I started out essentially with my own fork, that has modifications that make sense to me. In doing so, I found a trivial optimization that it would be neat if it was backported. Although this would benefit everyone using the mainline project, this is of very low personal importance to me and my patience for navigating an obstacle course is fairly low, even if this is to the detriment of the wider developer community.
- brudgers 4y agoThe goal of the filter is probably to pass people for whom benefiting everyone who uses the project is important because in the long run that's more valuable to the team and more sustainable for the project.
- funcDropShadow 4y agoI agree with you in general. But in this specific case, a walk by merge request should be acceptable. To anyone who is familiar with Java enought to be able to work on performance sensitive code, the described change is a no brainer. It doesn't need to be documented, it doesn't need to be discussed, I am pretty sure Intellij IDEA would highlight it as proposed change for performance reasons.