Being that you battery only has a certain number of cycles, should one leave the power cord in if possible?

I ask because I also know it's good to drain the battery.

is having the cord in then extending or reducing life of the battery?