What is the purpose of using node_submit() before node_save()? I am creating a node programmatically , In the code given in the link 
http://timonweb.com/how-programmatically-create-nodes-comments-and-taxonomies-drupal-7
after creating a node,
the code goes as follows :

 $node = node_submit($node); // Prepare node for a submit
    node_save($node); // After this call we'll get a nid
node_submit() is a small helper function that makes sure the uid/author and creation date is set. Its main purpose is to map ->name to uid and ->date to created. Those two are used in the node edit/create form.

So if you set these two properties yourself anyway (and the validated flag but I haven't found anything that cares about it, likely some sort of left-over from earlier code), there is no need to call it.