First off, this is intended to be an extension to the question "Is it ethical to read programming books on the clock?". I do realize the irony of asking this on Stack Exchange itself, but hey, I'm not on the clock right now.
I am a programmer who, like many of my colleages, oftentimes gets stuck on something and asks a question on Stack Overflow or Programmers Stack Exchange to get past the problem. I imagine that people of other disciplines may do this as well for other technical subjects, like Physics Stack Exchange. I have never met an employer who objects to this (so long as the code is general and limited enough), because it directly results in me solving the problem quickly and moving on to other things.
However, I recently came into a situation where I asked a tricky question on Stack Overflow, but I didn't get an answer to it. After a few days, I finally figured it out and wanted to write an answer to it. But in the back of my mind, I wondered if doing this on company time was all right. After all, I'd already found the solution to the problem within my company's code and writing an answer to benefit others outside of the company wasn't what I was being paid to do.
Seneca the Younger was famous for saying "docendo discimus" ("by teaching we are learning"), so one could argue that answering my own question, or other peoples' questions about something relevant to what I'm doing, could be a form of learning (for instance, solidifying in my mind the answer to the tricky question I figured out). However, I'm a bit unsure about this, because it is a less direct form of learning and could be considered as "work".
This seems to me like a similar dilema of "Is it ethical to read programming books on the clock?". The consensus for that seems to be that it's ethical to read programming books in order to learn, so long as it's relevant, not interfering with work, and not forbidden by your boss.
Would answering Stack Exchange questions on the clock also be ethical so long as it too is relevant, not interfering with work, and not forbidden by your boss? Or is the fact that it is a less direct form of learning and possibly "work" makes it a different category? And does it matter if it answers your own questions or other peoples' questions?
If you think the answer is no, then please don't answer this while on the clock :-)