that is a horrible way to look at it, and with that attitude you will never fix the problem.
all puppies have a strong instinct to stick with their pack at all times. when i first brought home my 8 weeks old lab he would cry ever time i put him in his cage to go out and when he went in their for bed.
the dog learns very quickly that if he whines loud or long enough he will get what he is looking for (either attention or freedom)
this is the cycle you must break. like someone said earlier the dog will eventually learn that all that crying is doing no good and get tired and go to sleep. this can be accomplished in a few weeks if you are consistent with it. it is also very important to not take the dog out of the cage when he is all excited and scratching at the door cuz you just got home. this would be rewarding that state of mind. only when you are ready and the dog is calm should you open the door.
also note that a dog could be whining because it has to go to the bathroom. if this is the case you can take the dog directly outside to use the bathroom then straight back in the cage so the dog never gets the reward it is looking for through its very annoying barking.
hope that helps
_Mikey
Aka Dog_Boy
Yea, make sure you realize the difference between whining/barking for attention, and whining/barking for needing to go to the bathroom.
My pup's realized that whining and barking for attention and/or to get out of the crate doesn't work at all. If he has to go potty, he'll still bark/whine, and we'll go straight out, he'll do his business, then we'll go straight back into the crate (IF he does whine or bark for potty, it's usually really early in the morning, when he knows it's crate time so we can get ready for work/get our son/ourselves ready and whatnot)...
So be sure to figure out your pup's potty schedule so you can clue into whether it's an attention getting whine/bark or one where he really DOES need out for a valid reason!
I would leave him with a kong that has something in it like a little bit of puppy food or something before you leave. When you return ignore him until he is calm and quiet. If you go to him right away when you get home and he is barking it will let him know it is ok to bark when you get home and he will never stop.
The original poster should realize that this doesn't work for all dogs. Mine's not that interested in a stuffed kong. Sure, he'll eat at it, but if he can't get the stuff out, he plays with something else. So now, I'll stick a duck jerky treat in the top hole that's easy for him to get.
By walking him in the morning, and spending 5-10 minutes with him working on commands, by the time I put him in the crate for me to go to work, he's plenty tired and ready to sleep. So the treat in the top is just enough for him to go in the crate, eat it, and then pass out until I get home for lunch.