Don't buy a folding bike unless you have folding bike issues.
I agree on the idea of taking a maintence course even if you are buying a new bike. You will have to know how to do simple repairs on the road like changing a flat, fixing a chain and adjusting a derailer or brakes.
The factors to consider when buying a bike are in order as follows:
1. Fit and Sizing
2. Geometry
3. Wheels
If you get these things right, the importance of the other factors are diminished.
Pick your shop based upon somebody that really knows how to fit a rider. Your shop should be willing to swap the stem and maybe even the handlebars to fit you. They should make sure that the crank lengths are the right size and make sure you are in a comfortable and effecient position. Ask an experienced cyclist in your area for recommendations. The very good shops may even charge $100+ for this service. However, it is well worth it.
The geometry of the bike should also match your intended use. If you are looking for comfort, you should look for a bike with a longer wheelbase and a lower bottom bracket. These bikes will inherently absorb the road shock better and put you in a more upright position. If you want to ride agressively, turn fast and maybe even race, then look for a bike with a shorter wheelbase and a higher bottom bracket. To see the impact that frame geometry makes, you might want to test ride a Cannondale Six13/SystemSix and a Cannondale Synapse. Both bikes are made by the same company but are designed for two completely different types of riding and will have a different feel.
I would also recommend test riding as many different bikes as possible. Choosing a bike because of an advertisement or a friends recommendation is like marrying a mail order bride.
Once you have narrowed things down a bit, you will probaby end up making decisions based upon price and componants. If you have a choice of getting nicer wheels or a better groupset, always always always go with the better wheels. A good dependable wheel eliminates alot of hassles and may even increase performance. If possible, get a pair of Mavic wheels like Kysriums. They are very reliable and worth the upgrade price if your are going to ride much.
I am not saying that groupsets are not important. It is just that there is very little difference between the high end groupsets and the lower end stuff. Just make sure that you buy at least 9 speeds because you can always upgrade some of the parts later. If you choose 8 speeds, some of the upgrades may be incompatable. If you get Simano 105 or better you will be more than fine.
Ignore anybody who tries to tell you that frame material or weight is important for your first bike. Don't obsess over either of these. They are not important. Neither is brand name. Don't get focused on whether your bike is a Cervelo or the bike de jour. Get the basics of size, fit and geometry correct and you will be happy. You won't be happy if you are riding the Tour winners bike and it is the wrong bike for you.
Oh yeah...color is really important. I'm serious.
Have fun. Let us know what you choose.