Effective discipline teaches children how to avoid repeating misbehaviors and what to do instead. Spanking is physical punishment, not discipline. There are many positive forms of discipline that are more effective than spanking. Discipline techniques should be appropriate to the age of the child. See the parenting section of your local book store or public library for information on child development and age-appropriate positive discipline technqiues.
Babies are never candidates for discipline or physical punishment.
They're too little to understand and follow rules. Like adults, children respond better to approval and affection than they do to punishment. Examine your expectations for your kids. There are no perfect children, just as there are no perfect parents. Parents commonly have expectations for children that are beyond their capabilities at that age.