trial & error (And a little bit of Google)
12 years ago I started with vb.net, switched over to C# and finally digged into WPF.
Java along with Wildfly is nowadays daily business for me, as well as WPF and C#. (Hate me or love me: For "some" tasks, there is nothing quicker or better than PHP!)
Stackoverflow was and is a very valuable and perhaps the most reliable source of information, when it comes down to expert questions you can't find in any of those many blogs out there.
I'm a (frequent) contributer since 2011 and willing to keep going - whatever I'm doing here :-)