Fairly recently I started maintaining my own open source JavaScript library. I created it to solve a pretty specific need but fairly regularly see questions that can be solved (in whole/part) by using my library.

I post my answer and make sure to always include that I maintain the library.

I feel for open source projects this may not be such a big deal but where do you draw the line? (ex: commercial products) Is it ethical for a programmer to promote his/her own library? When is it not?

Full disclosure is the important thing. That's been roundly agreed upon by the community in related discussions on meta.stackoverflow.com. Whether you choose to promote an open source, for-profit, or even commercial library is irrelevant, as long as you properly and clearly disclose your affiliations.
–
Cody GrayFeb 25 '11 at 8:10

The current form of affiliation is like an excuse: 'Sorry, I am an author...' or like a self-promotion: "I am an author of this!" It is not convenient. It would be more neutral and ethical, if SO provides special icon for affiliation in answers.
–
agershunDec 27 '14 at 19:24

2

This question appears to be off-topic because it is about meta aspects of StackExchange and belongs on Meta Programmers or Meta Stack Exchange but is too old to migrate.
–
GlenH7Dec 27 '14 at 23:09

@GlenH7 Anything I need to do or just leave the question as-is?
–
Kit MenkeJan 5 at 19:28

@KitMenke - You can leave it as it is. I flagged for migration to MP.SE but I suspect it's too old to migrate. It might also be deleted off, but I wouldn't worry about that either.
–
GlenH7Jan 5 at 19:35

Is financial gain the main determination? Playing devil's advocate... what if the library was free but getting support was not? I'd directly benefit by promoting my library over another.
–
Kit MenkeFeb 24 '11 at 22:53

7

As long as your financial interest was disclosed there is nothing unethical about it. It would only be unethical if you hid your motives for promoting the library.
–
John WeldonFeb 24 '11 at 22:55

If you really believe that your library is a good solution for a specific case, I don't see anything wrong with promoting it. Since you developed it, you probably have a good understanding of the domain and of other solutions so that makes you more qualified to suggest a solutions than others who have no such experience.

When answering, do you only say to yourself, "my library could solve that problem" or do you say "my library is a great solution for that problem"?

The second is definitely OK. The first could be slightly unethical, even with your disclaimer, in the sense that you ought to be answering questions with the best answer possible. If not, you're selling, and Q&A shouldn't be used for selling (even if no money is at stake).

Keep in mind that a library won't be a great solution if much of it will go unused.

What if "could" is the best description, but there's no other better solutions out there pre-coded?
–
Matthew ScharleyFeb 24 '11 at 22:50

@Matthew - why, in this hypothetical situation, do we need pre-coded? If the library really is not a "great" solution, just describe the algorithm and suggest they build it themselves. Or, point to the source code of the library.
–
NickCFeb 24 '11 at 23:06

Well, the main reason being your definition of good vs. great. Why is a library not a great solution if it addresses all the requirements but also provides a bunch of stuff that you don't necessarily need? If this was the case, none of us would use any of the frameworks about because no one uses everything from them all the time in every project.
–
Matthew ScharleyFeb 24 '11 at 23:12

@Matthew - I don't feel that's quite what I said. I just said "if much of it will go unused." Keep in mind we have no idea what the OP's library contains, other than it fits a "pretty specific need". If that means it's specialized and unlikely to help in many other ways, then yeah, I'd say it's a pretty poor suggestion. That's where I say pointing to source code or describing algorithms is a great idea.
–
NickCFeb 24 '11 at 23:16

Sure it is ethical... That's what the open source developers do in conferences, to promote they own products. After all, if you don't care of your own products, who will? The competition? Anyway the user is the one that is going to have the final say, and ultimately the choice is in their hands.

Sure.

If it solves the problem at hand, then it is mechanically relevant, there's no doubting that.

I'm sure people would appreciate some disclosure like "I am the author of this library". Not necessary per se but strongly, strongly encouraged and expected. The doubt of ethics isn't the inclusion of the library but the reveal of you authoring it. Which you should always do.

It is definitely ethical. Sometimes it is better to receive support directly from author of the technology, especially, if the author offers better solution.

On the other hand the current form of disclosure of affiliation is like an excuse: "Sorry, I am an author of this technology..., but the right answer is...". I think it is better to have special icon for the answer "Answer from author". This is wont be an excuse, but Additional information for participants.