I think the smartest piece of advice I ever received from a friend was the following: ride your bicycle like someone is going to kill you.
Before I am misquoted, I did not say "ride your bicycle today as if it's your last". While that would be more poetic and ideal, what I actually said was: "Ride your bicycle like someone is going to kill you." However morbid a thought, it is packed with truth, and I find myself thinking this often while riding. Let's just face it head on - whether on foot or atop wheels, not everyone is paying attention. You could be wearing the brightest shade of orange, looking every which direction and using all available common sense - but all it takes is one person to pick something out of their teeth and therefore mess up your day.
I prefer to ride in the street wherever I go because for all intents and purposes a bicycle is a vehicle. I really think that cycling on the sidewalk is a dangerous preference, but I also believe that it is more dangerous to put yourself in what you believe to be harm's way. So while directed primarily at those who ride their bicycles in traffic, everyone of all backgrounds can benefit from this hammering of information. Now, without further adieu:
1. Stay out of the door zone. Staying out of the narrow area between parked cars and the right lane - the door zone - will give you enough room to avoid any collision with the swinging open of one's driver side door. It also allows for room to move a little to the left if any cars start edging out.
2. Look over your shoulder. If you don't have a rearview mirror device tacked onto either your helmet or handlebars, go about it old school and briefly look over your shoulder for oncoming traffic before you make a move out into the crosshairs.
3. Look ahead. With or without use of a vehicle's turn signals, one should be able to at least have a good idea of what a car is going to do before it does it just by the way it's moving. Is it slowing down? Is it coming to a corner in general? Is it not stopping? As an aside, viewing most driving as unpredictable will actually make riding with, in, and around through and intersecting traffic more predictable. Look at least two driveways ahead and down the street long before you get to it. And for the lovely alleyway between buildings/homes - slow down, or better yet, stop.
4. Look everyone in the eye. Example: when coming out into an intersection while an oncoming car is inching rapidly into its left turn, look the driver in his/her eyes. Why? For two reasons: number one, the expressions are generally priceless. But more importantly - and therefore number two - you are seen by the to-be offender. They acknowledge your existence and are either forced to stop, recognize an error in haste, or both. (Hopefully.) And while they still might inadvertently try to kill you in some other instance, you'll still have the satisfaction of knowing that you were seen.
5. Check for signs that a parked car will be moving. Reverse lights, brake lights, a slight puff of exhaust and a silhouette of a head above the driver-side head rest are all surefire signs that a parked car might be gearing to go and quite possibly not see you when they pull out into traffic. Points 1., 2., and 3. will help in this case. With enough space to stay/get out of the way, allowing for other cars to pass, if any, and spotting the car from a block away, you will be able to get out of the way without a scratch.
Aside from the blatantly obvious - not running yellow-red lights, learning/using hand signals, the use of head and rear lights (which should be built-in at this point, but what do I know) and staying away from dark clothing at night - I find that that basic tips like these find their tried and true place in a number of bicycling situations. Whether riding on designated bike paths or commuting in light to heavy traffic - rinse, repeat, and use daily.