Link to Julia questions on StackOverflow

On Julia Observer, I use the discourse gem because the project is written in rails. // see code below…

My guess is that you have to send the key & username as headers instead of as query params?

https://github.com/djsegal/julia_observer/blob/41fd8126489e467ed8a134669562998850dd82bc/lib/tasks/news.rake#L143-L145


and @kevin.squire, not to seem annoying, but I could add stack overflow as a news item on juliaobserver.com. maybe that makes more sense than to put it on discourse?

@djsegal, definitely not annoying. I hadn’t realized that you had a news section on juliaobserver. It certainly seems to fit there.

I still think that it would work on Discourse as well. I think it has the potential to increase the set of individuals contributing StackOverflow answers to Julia questions by making those questions more visible, and it should help limit cross posting the same question to both StackOverflow and Discourse (which isn’t that common, but still happens from time to time).

(@dfdx, thanks for trying to pull this together!)

Cheers,
Kevin

Rather than “some service on someone’s random server” (that might expire when they graduate/move), it might be simpler to set up a (well-obfuscated) gmail address subscribed to the appropriate SO tags, and have a read-only Discourse category poll that address:

It didn’t work either. I’ll check existing API clients and how they handle endpoints.

As far as I understand in this case it would be impossible to modify content of the topic, e.g. add a link to SO question or a text explaining that users should answer there. Am I right?

Yes. But the category can have a permanent banner at the top, and the SO email already includes a link (though not necessarily the full text of the question, I guess that’s not ideal). If more customization is needed then using the API makes sense.

It turns out the example endpoint from Discourse docs is just available only for admins. I tried other endpoints and they work fine. In fact, this post is created using an API call instead of web UI.
I’ll try to create the tool for re-posting SO questions here in the next couple of days.

BTW, since we may need more Discourse-related stuff and posting to Julia forum from Julia itself is always funnier, I will put all API methods to a separate repository.

3 Likes

Here’s a test topic created via API:

Notes / questions:

  1. StackOverflow returns HTML of a question. Discourse seems to process it correctly except for <code> tag which is escaped. From discussions on forums, I suppose this tag can be whitelisted and be inserted correctly here. If it doesn’t break any other configs, can somebody from admins take a look at it?

  2. Currently, I set the service to re-post questions to the “Usage” category on this forum. Does it make sense to create a separate category? Are there better ideas how to distinguish topics created here and reposted from SO?

  3. We may want a separate user to publish reposted questions. Otherwise, I will very quickly become the most active user here :slight_smile:

1 Like

I think that it would be better to preserve the authorship of the SO question and make it more clear that it’s a xpost from SO at the top of the question.

Please don’t post them into Usage, we might need a special category that is read only.

What worries me the most is that we will have the same question in two places (without the author actually knowing) and it will also split discussions.

Escaping [code] should be fine.

Definitely!

I guess I don’t quite understand the point here.

I suppose I can understand the rationale if you view the Discourse board as more of a mailing list. In that perspective, then it’s a kind of megaphone, and getting SO notifications in your email inbox from that same megaphone makes a certain kind of sense.

But it’s not just a mailing list. It’s a live board all on its own. Kevin is just one of 54 members (out of 800+) to have ever sent a reply via email. Very few members treat it as a mailing list. Having stale, read-only content isn’t really helpful on a live messaging board.

If you want email notifications for StackOverflow, you can sign up for them through the Stack Exchange network: julia-lang - Stack Exchange .

3 Likes

Hi Matt,

Thanks for your perspective (really!). Rereading my original post, it does seem quite narrow (I was probably on my phone, in a hurry, and attempting to be terse). Let me add a few thoughts, and then ask if you have any particular followup.

Even given that most people don’t read this forum through email, wouldn’t it be useful to make this forum more of a one-stop shop and give more visibility to Julia questions posted on StackOverflow? StackOverflow isn’t going away any time soon, and many programmers who don’t use Julia much head there first when asking questions. While it doesn’t have the sense of community this Discourse forum has, in my opinion, active participation on StackOverflow is good PR for Julia. Beyond my own use case, pointing people there just from Discourse, to me, seems like it would make it more likely that those questions would be answered well, and might increase the set of people answering them.

Matt, do you (or anyone else) have further thoughts on why this wouldn’t be worthwhile? While I proposed this idea because I thought it was reasonable, I’m okay with it not happening it’s reasonably found to be not worth it, or even detrimental.

Cheers,
Kevin

I would prefer not to merge the two forums in any way, since it would increase the amount of information I have to cope with. I find that following and contributing to this forum (Discourse) is the sweet spot for me, and seeing questions from SO in addition would be too much.

2 Likes

Sure, the format is still to be adjusted. Note, however, that I can only put the name of the SO user in the body of a topic, but the topic itself will be posted by API user anyway.

It would be perfect, but I can’t see any docs on read-only categories. Are they available from admin panel?

How about notifying SO user the first time his question is re-posted here?

A more general question: do we want to pull users from SO here or is it better to keep questions in 2 separate places? I can see the point of both approaches: a single place means a single centralized knowledge base which is always easier to work with, but at the same time StackOverflow is a good entry point for new users who only start exploring Julia and don’t know much about this forum.

What about making a “private” category that is only visible for users who have subscribed to SO questions? It’s like “watching” feature, but if you don’t explicitly opt in, new topics won’t appear neither on the “Unread”, nor on the “New” tab.

1 Like

From my perspective, I can see three primary objectives:

  1. Provide direct help to the question-asker.
  2. Create a public and searchable record of answers to help future question-askers find the solution before they ask it.
  3. Foster a community of users

Mirroring questions to discourse might help improve #1 — maybe more folks will see questions. That said, though, the Julia questions on SO are doing a good job of finding answerers. There’s a 10% unanswered rate for the julia-lang tag; this compares very favorably against all the other tags I’ve looked at.

I don’t think it’d help #2. Edits won’t propagate, answers won’t show up, and I think Google docks SEO points for having exact mirroring.

And I don’t think it’d help #3. We don’t want to split the discussion, so we’re talking about it being read-only. And so then there wouldn’t be a place for discussion.

1 Like

Just a heads up, Julia Observer now shows the most recent Julia questions from Stack Overflow

Thanks, @djsegal!