I like to code in the following way.
Readability is the most important aspect of your code. Even more so than correctness. If it's readable, it's easy to fix. It's also easy to optimize, easy to change, easy to understand. And hopefully other developers can learn something from it too. Reference
Write small methods. It seems that programmers love to write loooong methods where they do multiple different things. I think that a method should be created wherever you can name one. Reference