A wonderful code resembles a delightful poem.The more clear your considerations and comprehension of the ideas are ,the all the more hypnotizing and engaging your code would be.
Along these lines,
1.Have a solid algorithmic base.
2.Enhance your thought on information structure
3.Always attempt to archive your code ie. leave spaces,new lines,make utilization of comments,and in particular - utilize significant variable and capacity names.
Consider it 'In the event that you were senior programming engineer at some enormous company,how would you need an assistant/your colleague present a code to you"...you would obviously need him/her to compose flawless and much straightforward codes.
Finally, just remember that that the manner in which you code reflects your reasoning so be certain with all that you do.