This brings up an interesting point about what exactly the law is and how everyone's supposed to be aware of it.
It's 2014. Why can't officers carry a tablet that stores the entirety of the law, and show you exactly to the letter which law you're violating? Likewise, every citizen should have trivial access to the extant laws, with notes explaining them in a way that's comprehensible to anyone with a high school education.
If ignorance of the law isn't a valid excuse for breaking it, everyone should have simple access to it.
That said, things like that do exist - the UK's entire statute book (well, almost) is available online,[0] free of charge and via a RESFTful API in machine-readable formats.[1]
Likewise, the German federal government publishes the law in XML, and there's even a markdown representation available on github.[2]