Riding in Town
Now this depends very much on the town, but I have found that it is safest to ride assertively but not aggressively. This means:
-If there is a bike lane, use it, unless it's unusable because of glass, potholes, or parked cars. If there is a bike path, don't use it, unless it's visible from the road at all times (especially near intersections). Accidents mostly happen at intersections when car drivers watch for cars but not for bicycles when turning right. In Brandenburg, use bike lanes if possible because roads are narrow and drivers are dangerous. Also, bike lanes are usually newer than the roads and have a smoother surface.
-Always keep at least one meter between you and parked cars. You never know if a door suddenly opens, or if you have missed one of those hydraulic platforms installed in the back of lorries that are just at eye level when raised - I have this mental image of the upper part of my skull slipping across the lorry floor while the rest of me rides on. Drivers are required to place flashing lights or red cones on the edge, but I won't bet my life on it.
-Don't ride at the right edge of a lane. Ride in the center or at least about one third into the lane. This tells drivers that they must change lanes and they can't just squeeze by closer than the 1.5 meters required by (German) law, recently increased to 2 meters (OLG Hamm). The rare maniac will still pass too closely but at least you'll have room to escape.
-Don't weave into and out of a lane. If there is a gap in the line of parked cars in the right lane, don't use it and stay in your lane. It may be dangerous to return to that lane, and car drivers may not give you an opening.
-Only pass to the right of cars stopped at a light or elsewhere (legal in Germany) if this doesn't force all these cars to pass you first thing afterwards. It'll annoy them and you don't want lots of annoyed people to shoot one ton of steel each past you. This doesn't mean that you have to play the traffic jam game that seems to please car drivers so much that they play it every day. I draw the line at about five cars; if there are more I pass unless there is a narrow stretch of road ahead. If I wait behind stopped cars I always stop in the center of the lane, to prevent cars from boxing me in.
-In a situation where a car might turn and cut you off because they haven't seen you, some people recommend making eye contact with the driver. I don't think that is good advice because you can't make the driver look at you - and if he did, there would be no danger. Instead, watch his front wheel. You'll notice when he slows down because the front of the car dips a little, and you'll see a turning wheel long before the car actually turns into your path.
-It may be hard, but be friendly. Let that car that followed you patiently pass when there is a chance. If there is a whole line of cars backed up behind you, stop and let them pass at the next opportunity. Don't pass buses as they prepare to reenter traffic. In short, don't make anybody mad - they have all the kinetic energy on their side, and you are not going to "educate" anybody.
-Use lights at dawn, dusk, and night. An LED flasher makes you more visible because it catches the eye between all those lights in a city, but it also makes it more difficult to pinpoint your position. Ideally, use both regular and flashing taillights. Very strong headlights gain you a lot of respect because at a distance, people think you are riding a motorcycle. Most of this isn't legal but I'd rather be alive than legal...
-Don't ride on sidewalks, parks, and pedestrian zones where riding is not legal, or if you must, ride at walking speed. Pedestrians are unpredictable (especially if you ring your bell, don't even try), and you'll annoy or endanger a lot of people for a few seconds gained - precisely what we always accuse car drivers of.
-The best front lights I know are made by Lupine. They are massively expensive but I consider my health more important, and these guys really know what cyclists need. Among other things they manage to put a three-level menu structure into a penny-sized control panel sporting one button and four LEDs that lets you program light levels and battery control. They are now called "camping lights" because they seem to violate some traffic regulation, and Cateye has sued them. One thing is certain, I won't ever buy Cateye again - a company that must rely on its lawyers rather than the technical quality of their product to push competitors out of the way isn't someone I'd trust when buying equipment!