Why do we use "target_id" as the name of the index in php instead of "entity_id"? I'm finding that while I'm coding that I type in things like $entity->field_fieldname['und'][0]['entity_id'] and that this doesn't work.  When the Drupal 7 developers were developing it, why did they select 'target_id' as the index instead of 'entity_id' (or even better, why not try eid? ) I don't know how to contact the Drupal Coders who made this decision, do does anyone know who made this decision? 

Drupal 7 has become quite harder to write code in.

Is there a better way for me to be coding that would avoid this problem?
target_id is generally used in entity references.  So if you have an entity reference to another entity the target_id is the id of that entity.  This depends if it is a node or an entity though.  But I will mention that generally you want to avoid $entity-&gt;field_fieldname['und'][0]['entity_id'] but instead using the entity_metadata_wrapper to target values instead:

$node = node_load($nid);
$node_wrapper = entity_metadata_wrapper('node', $node);

$mytitle = $node_wrapper-&gt;title // Title
$myfield = $node_wrapper-&gt;field_my_field-&gt;value(); // Value of the field, cleaner

You can also use the set method
$node_wrapper-&gt;field_my_field-&gt;set("My value"); // If single value

$node_wrapper-&gt;save(); // Save my entity