When it comes to write code you don't need to learn magic spells.
All you need is to take a look outside the window and solve your problem with patterns from the real world.
This is part of a series of good lessons that my dad tried to give me when I was young. Of course, I didn't get it for the best part of my life. But it is better late than never, right?