Is there a place where you can request code reviews on opensource software?

3 years ago by onlinepersona to c/programming

Many of us write opensource code in a void: nobody ever looks at it, uses it nor reviews it. We are the only users and authors.

In order to improve, where can we get our code reviewed? I don't mean professionally, just from like-minded individuals.

stifle867 69 points 3 years ago

This is not an answer to your question but it's tangentially related.

Someone I greatly respected ran an open-source project with the policy of merge everything. Completely flip this idea of carefully review, debate and revise every PR. His theory was that it helps to build an open community, and if something breaks someone else will revert that commit. He says that the main branch was almost always stable, a massive improvement to how it was run previously. He passed several years ago and for some reason this reminded me of him.

I guess what I'm trying to say is if you get something out there that people find useful, the code will be looked at. It doesn't help you if you're looking for someone to collaborate sorry.

path: 0 5534203, hotness: undefined, score: 69, children: 13
treadful 33 points 3 years ago

This is how you get supply chain attacks.

path: 0 5534203 5534918, hotness: undefined, score: 33, children: 1
stifle867 13 points 3 years ago

Yes it is. The code is in Bitcoin Core so there's a non-zero chance you win at life if you want to try.

path: 0 5534203 5534918 5535746, hotness: undefined, score: 13, children: 0
varsock 17 points 3 years ago

There is a very effective approach (34:00), that big companies like cloudflare use, to ship a product in a fast and quality way. It bears parallels to what you are describing. In essence engineers should not get hung up in the details to trying to solve everything.

  1. Just build a proof of concept
  2. Discard the prototype no matter what and start from scratch keeping the initial feedback in mind
  3. Build something internally that you yourself will use
  4. Only once something is good enough and is used internally, then release it to beta.

So that tedious process in trying to flush out all the details before seeing a product (or open source effort) working end to end, might be premature before having the full picture.

path: 0 5534203 5541545, hotness: undefined, score: 17, children: 0
jeremyparker 9 points 3 years ago

That's Wikipedia's approach, arguably one of the most successful "open source" projects in history - certainly not without its problems, but overall it's pretty great

path: 0 5534203 5539312, hotness: undefined, score: 9, children: 0
varsock 4 points 3 years ago path: 0 5534203 5548644, hotness: undefined, score: 4, children: 6
stifle867 4 points 3 years ago

There's a number of them as the idea grows. See also the C4 process RFC

path: 0 5534203 5548644 5549176, hotness: undefined, score: 4, children: 5
lysdexic 3 points 3 years ago path: 0 5534203 5548644 5549176 5573999, hotness: undefined, score: 3, children: 0
onlinepersona 2 points 3 years ago path: 0 5534203 5548644 5549176 5576378, hotness: undefined, score: 2, children: 3
stifle867 1 point 3 years ago

It's great to see the attempt and also an example of what the C4 guidelines are made to avoid.

Notice how many comments are little nitpicks about this and that. Completely stalling the commit and getting further away from the original point of C4 which is to reduce contributor friction and avoid these kind of endless discussions on PRs.

I don't want to be too critical because some of that is a clear lack of understanding of the motivations of C4 which is explained more thoroughly in Pieter's blog posts. You don't want to adopt a contributor guidelines that you don't understand of course.

IMO it's better just to implement it as-is and start using it in practice rather than bikeshedding.

path: 0 5534203 5548644 5549176 5576378 5576750, hotness: undefined, score: 1, children: 2
attn_dfct_dev 3 points 3 years ago

This is for 0mq right? I remember reading Pieter Hintjens about this realization he had over a long time of developing 0mq.

path: 0 5534203 5544367, hotness: undefined, score: 3, children: 1
stifle867 7 points 3 years ago

Yes that's right. I was only just transitioning into adulthood and Pieter mentored me and profoundly changed how I view many things. It wasn't just zeromq but that was the main thing. I still keep his books at hand on my bookshelf. His death impacted me greatly.

path: 0 5534203 5544367 5545066, hotness: undefined, score: 7, children: 0
mvirts 39 points 3 years ago

Let's get a community going on programming.dev?

path: 0 5534598, hotness: undefined, score: 39, children: 15
Ategon 32 points 3 years ago path: 0 5534598 5534755, hotness: undefined, score: 32, children: 14
kassuro 15 points 3 years ago

Would love something like this, but it's very hard to get such a community working. Most of the time there will be way more people wanting a review of their code than people wanting to put in the work and review something.

Maybe some kind of point system could work. Like one needs to review at least two times before you can get your work reviewed.

path: 0 5534598 5534755 5535211, hotness: undefined, score: 15, children: 12
lhamil64 9 points 3 years ago

One issue I can see with the points system is that people could just approve it with a "Looks good to me!" without even looking at the code. Or just looking at a small portion of the code.

path: 0 5534598 5534755 5535211 5542031, hotness: undefined, score: 9, children: 4
coloredgrayscale 4 points 3 years ago

Also bike shedding. Simple stuff may get many people willing to review / argue about how you should have used A over B, or even C

Big / complicated projects - forget it. Especially if if they would need major refactoring.

path: 0 5534598 5534755 5535211 5542031 5575111, hotness: undefined, score: 4, children: 0
kassuro 1 point 3 years ago

Yeah that's definitely a possibility. It's really a tricky topic to build a review community. One could try other approaches like dedicated volunteer reviewers. But if you look at exorcism, that will become hard to manage for languages with huge demand.

A system where everyone also needs to review is definitely better. Especially since everyone also learns reading other peoples code.

path: 0 5534598 5534755 5535211 5542031 5545215, hotness: undefined, score: 1, children: 0
threelonmusketeers 1 point 3 years ago

Could there be a way to award the points proportionally, based on how useful the feedback is?

path: 0 5534598 5534755 5535211 5542031 5542527, hotness: undefined, score: 1, children: 1
Ategon 3 points 3 years ago

with that there would need some way for people to have things to initially review to get the community started. Could do something like after the first 3 posts the point system goes into effect

path: 0 5534598 5534755 5535211 5535366, hotness: undefined, score: 3, children: 5
kassuro 2 points 3 years ago

True, it's not a fleshed out idea haha. But starting with a few points would work.

Could actually be a cool in it self, wish I had time for something like that.

path: 0 5534598 5534755 5535211 5535366 5535673, hotness: undefined, score: 2, children: 1
subignition 1 point 3 years ago

Kinda sounds like a format similar to Stack Exchange might work

path: 0 5534598 5534755 5535211 5535366 5536531, hotness: undefined, score: 1, children: 2
kassuro 1 point 3 years ago
path: 0 5534598 5534755 5535211 5535661, hotness: undefined, score: 1, children: 0
Eikichi 6 points 3 years ago path: 0 5534598 5534755 5534957, hotness: undefined, score: 6, children: 0
RoToRa 27 points 3 years ago

There is a Stack Exchange community for code reviews: https://codereview.stackexchange.com/

However they have some strict rules on what is allowed so it may not be suitable for open source projects. Two problematic ones are: 1) The poster must be the author/owner of the code. You, for example, can't post code that someone else has written. 2) All code that is to be reviewed must be included in the post. You can't just link to a repository.

path: 0 5538948, hotness: undefined, score: 27, children: 0
Nulubez 13 points 3 years ago

I would totally get in on that. Seems almost like a fun OS project itself. Like a volunteer hub type site to just seek reviews

path: 0 5534453, hotness: undefined, score: 13, children: 0
theherk 6 points 3 years ago

There was something like that on Reddit but I can’t remember the sub. I haven’t seen one here. The best way to get reviews of open source is via contributions to larger projects. That of course doesn’t answer your question directly but is worth noting.

I’d recommend joining some discord or matrix servers for the language you work in or likeminded folk. They tend to have channels for that, and some have really helpful communities.

eta: I just checked my local instance and saw a community with very few subs and zero posts called /c/reviewmycode. Somebody has to post first.

path: 0 5534152, hotness: undefined, score: 6, children: 1
onlinepersona 1 point 3 years ago path: 0 5534152 5535374, hotness: undefined, score: 1, children: 0
GravitySpoiled 5 points 3 years ago

don't put us on the rack and post the link to the git

path: 0 5534893, hotness: undefined, score: 5, children: 1
onlinepersona 14 points 3 years ago

It ain't near ready mate. Let me cook.

path: 0 5534893 5535299, hotness: undefined, score: 14, children: 0
coloredgrayscale 1 point 3 years ago

Not exactly what you want, but plug-ins like sonarlint can nudge you in the right direction.

path: 0 5575055, hotness: undefined, score: 1, children: 0
asw13c -2 points 3 years ago
path: 0 5534925, hotness: undefined, score: -2, children: 0
MxHyde -5 points 3 years ago
path: 0 5534567, hotness: undefined, score: -5, children: 1
MxHyde -4 points 3 years ago
path: 0 5534567 5534575, hotness: undefined, score: -4, children: 0
MxHyde -6 points 3 years ago
path: 0 5534578, hotness: undefined, score: -6, children: 0
programming
programming

@programming.dev

login for more options
28795
3717
3346

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev


go to feed...