Actually CC BY-SA 3.0 is a license which looks pretty good for most Stack Exchange Network sites, but on Stack Overflow which is used mainly for coding questions, is pretty much rigid since a lot of answers contains portions of code that usually are intended to be copy-pasted.
For example yesterday I did need to copy the following 2 lines of code from How to make a div's background color translucent? in order to give some style to a css file.
background-color: #fff;
background-color: rgba(255,255,255,0.5);
As I understood the conditions on the Terms of service I should include something like the following in my code:
/*!
* Code snippet from StackExchange Network question on <https://stackoverflow.com/q/4729196> by at. <https://stackoverflow.com/users/326389>
* Edited by user <https://stackoverflow.com/users/3075942>
* Answered and copied from <https://stackoverflow.com/a/4729214> by David Thomas <https://stackoverflow.com/users/82548/david-thomas>
* Licensed under CC BY-SA 3.0 <http://creativecommons.org/licenses/by-sa/3.0/>
*/
Which could be ok to certain point considering just 1 copy-paste on my entire project. But not for the daily work.
As today, I needed to copy 20 characters from How would you convert secs to HH:MM:SS format in SQLite?, and I don't know if it's wrong to not attribute, but I know it's wrong to attribute 20 characters.
Is copying 1 or 2 lines of code considered fair use? Varies by country? Should we think on other license for programming sites?