>And it seems kind of obvious you can't hold the author liable for any trouble
But legally it's not obvious. I'm not a lawyer, and I don't pretend to understand all of the concepts, but I believe there is a concept of "fit for purpose" where unless you specifically say otherwise, it is assumed that your "creation" will do what it says it will do, and if it fails to do that in a way that harms someone, you can be held liable. A company that makes ladders can't claim it's not their fault that it collapsed unless they put in very obvious and clear wording that the ladder has no warranty or purpose and they can't be held accountable. Similarly, your code that pads strings on the left is expected to do so, and if it doesn't and that causes harm to someone, then they could claim that you are liable for at least part of those damages.
Also, there is no such thing as "no copyright" in many parts of the world. IIRC in the US EVERYTHING has copyright automatically and until it expires, even if it's not declared. You can't "give up" your copyright, all you can do is license it. Again, i'm not a lawyer, but this is how I understand the system works.
Answers to those questions may seem obvious to a layperson, but they aren't to a legal system. And choosing to not participate in the legal shit doesn't mean you are immune to the law.
But legally it's not obvious. I'm not a lawyer, and I don't pretend to understand all of the concepts, but I believe there is a concept of "fit for purpose" where unless you specifically say otherwise, it is assumed that your "creation" will do what it says it will do, and if it fails to do that in a way that harms someone, you can be held liable. A company that makes ladders can't claim it's not their fault that it collapsed unless they put in very obvious and clear wording that the ladder has no warranty or purpose and they can't be held accountable. Similarly, your code that pads strings on the left is expected to do so, and if it doesn't and that causes harm to someone, then they could claim that you are liable for at least part of those damages.
Also, there is no such thing as "no copyright" in many parts of the world. IIRC in the US EVERYTHING has copyright automatically and until it expires, even if it's not declared. You can't "give up" your copyright, all you can do is license it. Again, i'm not a lawyer, but this is how I understand the system works.
Answers to those questions may seem obvious to a layperson, but they aren't to a legal system. And choosing to not participate in the legal shit doesn't mean you are immune to the law.