Well, no mystery here: “Practice makes the master” is as true as ever. Just start coding, and keep doing it - until you wouldn’t think much of throwing away a 1000-line piece of code you just wrote simply because you came up with a better idea (and because you could write it again if you wanted to, in a few hours).