I have active accounts on various Stack Exchange sites falling under Technology domain. Due to the nature of the domain, often the posted answers in part or whole, requires me to to write some form of source-code in a programming or scripting language. The code is almost always originally composed, and is not copied from elsewhere.
I am aware of how the content posted on Stack Exchange sites is licensed, (Creative Commons Attribution-Share Alike). From this post on Stack Overflow blog, I understand that any republishing of content requires attribution.
However, I am curious to learn how this affects just the source-code written by me as part (or whole) of the answer? It's fairly obvious that it is also covered under the same CC license terms.
Is attribution expected, if I wish to share the source-code elsewhere publicly using my personal account(s)? Most common scenarios are including it in a public repository (such as on GitHub), personal blog post, forum post etc.
To reiterate, I am talking only about the source code written by myself in my own answers.