I asked C coding design - function pointers? on which EJP commented it's off-topic and/because it belongs on SO. Kortuk says no:

@EJP I disagree. Just because there is an overlap does not mean it has to be on one site or the other. It is asking questions related to the design and programming of low level embedded systems, that seems on topic either place.

Now the same thing happens at this answer: Absolute address of a function in Microchip XC16

Who's right, EJP or Kortuk?

  • 22
    \$\begingroup\$ Kortuk - there are many concepts, techniques and styles in C (and programming in general) that apply mainly to EE. \$\endgroup\$ Feb 2, 2013 at 8:59
  • 7
    \$\begingroup\$ These questions would be ideal for the new Embedded Programming and Design proposal. If there is a groundswell of opinion that EE shouldn't be accepting embedded programming questions, perhaps people here could help EP&D just as they helped us get Robotics off the ground. \$\endgroup\$
    – Mark Booth
    Feb 3, 2013 at 18:06
  • \$\begingroup\$ Kortuk is right IMHO - trygvis puts it perfectly. \$\endgroup\$
    – Oli Glaser
    Feb 5, 2013 at 4:14
  • 1
    \$\begingroup\$ @tryvgis Most concepts in computer programming, including this one, are addressed by the language specification, including this one. The OP in this case is clearly abusing the language specification in a way most easily spotted by a compiler writer or C language lawyer. I assert that there are a lot more of either at SO than there are here. The issue is not whether denizens of this site can answer it (although none of them has actually done so): it is where is it best for the OP to ask it, so as to get a reliable answer. The answer as always is to ask in the biggest market. \$\endgroup\$
    – user207421
    Feb 6, 2013 at 9:45
  • 2
    \$\begingroup\$ In the case of the 2nd question, related to the dsPIC33 and its cousin, the PIC24, the correct answer uses the compiler's built-in functions to access program data. The PIC24/33 are not only Harvard architecture but store 24 bits within two double-words using a phantom byte. It simply cannot be done with standard C constructs. Only those familiar with these microcontrollers would be able answer the question correctly. It is doubtful there are many on SO that are familiar with this series of PIC processors (or any PICs for that matter). It is a much more appropriate question for this forum. \$\endgroup\$
    – tcrosley
    Mar 5, 2013 at 1:09

4 Answers 4


Any two sites will have their own style of communities, if a question exists on the boundary between the two sites than the poster will be picking the community that better suits their taste and approach.

Function pointers are going to have wildly different implications if you are running on windows and a new intel as opposed to running on a pic10F, which is why asking about using them when related to microcontrollers seems functional and will allow others with the same question, a question I have had before myself when I was early on, to find our site via google!

  • 14
    \$\begingroup\$ +1 for style of communities. I remember last time I asked a C question on SO. People spent more time convincing me to just switch to latest version of GCC for PIC18 instead of helping me solve the issue. \$\endgroup\$
    – AndrejaKo
    Feb 2, 2013 at 21:24
  • 1
    \$\begingroup\$ Function pointers are going to have exactly the same implications on all hardware if expressed correctly to a correct compiler, which they weren't in the question concerned. Not a valid argument. \$\endgroup\$
    – user207421
    Feb 5, 2013 at 12:03
  • \$\begingroup\$ @EJP I remember using Micros that did not support the pointers the way you would want and it took a large amount of assembly that was quite messy to do what would be very very simple on a PC. I could be wrong, I dont promise to be an expert on this subject. \$\endgroup\$
    – Kortuk
    Mar 14, 2013 at 20:10

"There is also the question of where the relevant expertise is most concentrated, and re that there cannot be any doubt that SO wins by a mile."

This is a ridiculous claim. C experts are a very small sliver of the StackOverflow community. Many of the answerers on SO are Java experts or C# experts or Haskell experts or whatever. C experts are maybe 5-10% of StackOverflow [source: PIDOOMA].

On EE.SE, though, probably half or more of our answerers are regular C users. If anything, C expertise is more concentrated on EE than SO.

Of course, you may reply,

Okay, but 5% of StackOverflow is still bigger than the whole EE.SE community

If our policy was, whenever there's a bigger community available to answer a question, we should refuse it, then StackOverflow and EE.SE would never have come to be.

When SO was first started, they would have had to respond to every C question with, "we refuse to answer this because there's more experts on comp.lang.c than here."

And when EE.SE (or Chiphacker or whatever we were at the time) was started, we would have had to say, "go ask this on AllAboutCircuits. They have many more people to answer your question there than we have here."

So just because there's a bigger community available elsewhere (SO) is no reason we on EE.SE should refuse to answer a C question.


Regarding the comment, "It's the absolute numbers that count."

My point is that it is not. If we want to grow our community, we can't do it by refusing to answer questions until our community is bigger.

If you think a question could get better answers on SO, it's perfectly reasonable to leave a comment that OP should try their question on SO. I've often done this for questions that overlap with physics.se or dsp.se.

But if you say it is "off topic" for EE, that's going further. That's not just giving the OP advice on other places to ask a question, it's saying that EE.SE should refuse to answer the question, like we refuse to answer questions about consumer electronics or the airspeed of an unladen swallow. It's saying that the EE.SE community should restrict itself from answering this type of question.

  • 1
    \$\begingroup\$ Leaving aside the numerous straw men you have raised up here, and the fact that your comments on my answer are not themselves an answer, and should have been posted as comments, the percentage you mention is entirely irrelevant. It's the absolute numbers that count. Do you have some evidence that there are at least as many C experts here as at SO? On the face of it, it's an improbable claim. \$\endgroup\$
    – user207421
    Feb 5, 2013 at 12:04
  • 3
    \$\begingroup\$ @EJP, I don't claim there are more C experts here than on SO. That's the point of my second section. Even if 5% of SO is bigger than ALL of EE.SE is no reason we should refuse to answer embedded programming questions. \$\endgroup\$
    – The Photon
    Feb 5, 2013 at 16:46
  • 1
    \$\begingroup\$ Another straw man. It's not a question of 'refusing to answer'. It's a question of where is the best place for the OP to ask the question so he gets a reliable response. \$\endgroup\$
    – user207421
    Feb 6, 2013 at 9:32

I think it's important to note that C for EE can be for x86, but is many times embedded. So there is a larger emphasis on optimization, memory conservation, low level access, etc with which many of the C experts on SO are not familiar.


For completeness I will restate what I said in the posts referred to. Both are computer programming questions, and have precisely nothing to do with electronics except insofar as you want to represent that EE includes computer programming, which from very long experience is not a belief that I share. There is also the question of where the relevant expertise is most concentrated, and re that there cannot be any doubt that SO wins by a mile. So asking here instead of there is basically not a rational mode of enquiry and is not calculates to yield a decent discussion let alone the correct answer. The two posts cited are already sufficient evidence of that.

The specific question of different types of pointer raised in another comment here is already addressed entirely by declarations to the compiler, which the poster in one of the posts referred too is simply misusing, in a way than practically any competent SO member would spot in a minute. There are aspects to that question that only a compiler writer would really know, and I am speaking as a compiler writer myself. I assure you that the relevant expertise is to be found there rather than here: so that is where the question belongs. Raising that as an excuse to discuss it here is yet more evidence that the relevant expertise to answer the question simply is not concentrated in this site.

  • 6
    \$\begingroup\$ Just because "any" SO member would spot the questioner's error doesn't mean that there aren't several users on EE who could spot the error just as quickly. \$\endgroup\$
    – The Photon
    Feb 3, 2013 at 6:59
  • \$\begingroup\$ Of course it doesn't. The question is how many. It's a question of probability, and of what the optimum strategy for the OP is. I don't see any of these people you claim to exist falling over themselves to actually answer the question concerned. \$\endgroup\$
    – user207421
    Feb 5, 2013 at 12:01
  • \$\begingroup\$ The reason I didn't answer the couple of questions that came up recently is that I didn't even read the questions. Because the titles made it look like the question is about details of PIC architecture which I know nothing about. Probably other EE users skipped reading them for the same reason. And for the same reason (bad title) the question would be unlikely to get many answers on SO, and would probably even be thrown out as off-topic. \$\endgroup\$
    – The Photon
    Feb 5, 2013 at 16:51
  • 1
    \$\begingroup\$ @ThePhoton The problems with all that are as follows. 1. It hasn't been thrown out of SO as off topic. 2. No gaggle of compiler experts on electronics.stackexchange.com has come forward to provide the answer. 3. The only answer in either place, including all the objectors to my statement that it is off-topic here, has come from me, and I am a compiler writer, and I am a lot more comfortable posting answers on SO than I am posting here, as you can tell by my respective vote counts in each place. \$\endgroup\$
    – user207421
    Feb 6, 2013 at 9:36
  • 5
    \$\begingroup\$ @EJP, I am confused why you say you are a compiler expert on EE.SE, but are so uncomfortable to answer questions here. I will note, the way pointers are implemented I have seen very funny on things like the low end pic micrcontrollers that have very little hardware support for pointers in general. The general advice is for communities to be greedy, even if a question fits in 4 different communities, if it is posted here and is on-topic is stays here. \$\endgroup\$
    – Kortuk
    Feb 11, 2013 at 0:41

You must log in to answer this question.