Tips? It's hard to give little tips because a lot of people have thier own style... But I suppose the normal ones are:
1. Write structured using tabs(Or 4 spaces for all the hoes out there)
2. Write lots of comments
3. Don't only code to get women... I know it helps a lot, but you need love for the code
Anyhow if you want an easy plugin then try to remake one thats already out, then you'll have source to refer to