>I always wondered if studying law, also prepares your mind for coding
Could work in reverse too. I met the author Ken Liu at a convention, and he mentioned he started out as a software engineer, and then went to law school. And then began writing on the side as well.