When you start looking around for a good notebook on the market you quickly realize that there are a few key elements of a good notebook that ramp up the price more than anything else. The most expensive part of a laptop is the set of internal components, the processor, graphics adapter, memory chips and such, and the other major player is the battery.
Batteries cost a lot of money to replace so choose your laptop wisely, and make sure you take care of it too even after you've paid up at the checkout. There are a few reasons for dead batteries, here are a few ideas and tips that could help you avoid them.
Lithium-Ion cells absolutely hate heat. It's the thing you should be avoiding most of the time but there are sources you're most probably unaware of. There are two main types of heat sources; internal and external. External can be direct sunlight, a radiator in your room or a lamp. You can't do much about them apart from trying to move away from them as much as possible.
Internal heat sources cannot be worked around easily either, you can't just rip off the processor and use something less power consuming, but you certainly can affect the ways hot air is expelled from the computer. When you cover the lids where fans blow hot air, you get rid of the main way of your computer to keep cool.
To ensure longest battery life and lowest temperature, always use flat and firm surfaces, like a table. If there are no such surfaces around, you can have laptop pillows that have a pillow on the bottom and a hard plastic 'table' on top. Both are great ways to do this.
Another way to kill the laptop battery
soon enough is to continuously discharge it completely followed by a full charge. The best operating condition for these cells is about 15-25 degrees Celsius and 40% charge level, if you use the computer using AC power, you can always charge the battery to 40% and store it in a dry, cool place.
You can also utilize micro-charges, or partial recharges to ensure longest life.
Another, fairly uncommon, case is when the unit is dead on arrival. They're also called shelf-dead, because they lose their charge standing in the store for too long before you purchase them. Fortunately warranty starts when you purchase a given product, so if you bought a laptop with a battery that should do at least 2 hours, and you cannot get more than 40 minutes of operation out of it, you can easily RMA(Return to Manufacturer) it as faulty and get a replacement.
