An important hermeneutical tool in bible study is to study the context of the passage under consideration in it's context.
Consider for example the context for the giving of the 10 commandments in Exodus 20. Moses gives the 10 commandments in Exodus 20:3-17. One of the things that stands out in Exodus 19 happens on Mt. Sinai.
Mt Sinai is covered by thunder, lighting, smoke, trumpets, quaking and fire. The scene is so impressive that it scares the Israelites to such a degree that they want Moses to be the intermediary between them and God. They were afraid of God. God wanted to get their attention and He definitely got it.
From this impressive display on Mt. Sinai we can learn that God is holy and the word of God (commandments) is holy. So we have a holy God who has given us a holy book.
Therefore, the 10 commandments aren't a list of do's and dont's but they are the expression of a holy God who wants us to know him and serve Him. They way we can know and serve Him is through his word.