I'd like to share a way to set default values of fields to new nodes (more generally "entities") programatically in Drupal 7.
At the time when Drupal 7 was released, it seems that the APIs of Drupal were not in high demand. So Drupal 7 doesn't provide a full set of APIs to make use of field default values. It uses field default values in a limited case, only when a node creation/edit form is rendered. So there's no sample code in the core which shows how to set default values of fields to nodes programatically.