Come up with an environment that makes it very easy to do these three things:
- Execute a small snippet of code and see the results
- Debug something that's broken
- Test something that seems to be working
For instance, if I were going to go write something in Erlang tomorrow, I would:
- Google {repl erlang}; if I can't find one, set one up
- Google {debug erlang} and look for (a) a download of the standard debugger for the language, and (b) a screencast which shows someone using it
- Google {unit test erlang} and figure out if there is some kind of commonly-used test framework I can write a little automation in
(Of course, I left out 0.: Google {erlang tutorial} to find instructions on installing an Erlang interpreter and hopefully some sample code. Hopefully that one's obvious.)
If you can optimize these parts of your process - and you usually (always?) can - you'll get a lot of trial and error done really quickly. Trial and error is what allows you to learn new languages.