Let's say you have a content type, containing a Field Collection which itself contains an Addressfield and you have to create the node programmatically. Complicated enough? Just imagine the rest of the content type I've got here! Below is how to do it without spending hours sailing the seas of che... PHP Exceptions.
Creating nodes via the UI in Drupal is easy, creating or updating them programmatically(in code) has always been a tedious. I've nearly lost my mind staring into the depths of a dpm($node);
The problem was the lack of straightforward API to handle the field level CRUD. You had to manually shove correctly formatted data into an object, often by comparing against an existing node's array. The correct old process went(and still can if you want!) like this:
Update: Dave Reid just added basic field token support to Token. Try the beta4 of Token (http://drupal.org/project/token) before Entity Tokens. I worked out what needed to happen a few weeks ago, and finally wrote it up. I didn't realize there was an update the Token when I posted. Haha! Internet moves quick!