The experts don't want you to know this, but I'm gonna let you all in on a software industry secret.
The key to writing good code is to just meow at the interpreter / compiler / etc. until it does what you want it to.
That's it! That's all there is to being an expert!