California Law states that pedestrians always have the right of way, however many times in the "cell phone" era, you will see drivers on the phone talking rather than focusing on their already bad driving.
The best advice of course is to pay attention, and do not start walking until you are sure that the person saw you.
Others have mentioned the dangers of East Palo Alto... It's not nearly as bad as it used to be, and is even starting to build up a retail base. Don't walk East Palo Alto alone or late at night and use common sense like you would anywhere else.
Although Palo Alto, on the west side of Hwy 101 is quaint and wonderful, East Palo Alto, on the east side of the highway, should be avoided at all costs! It's a dangerous drug and gang-ridden area -- do not drive through there at night. When I used to live in the Bay Area, I would go out of my way to not drive there, day or night. If you have to drive through there (say you're determined to use the Dumbarton bridge), make sure your car doors are locked. Perhaps it's gotten better in the last few years, but I seriously doubt it.
Street parking in most areas of downtown Palo Alto is limited to 2 hours or 3 hours depending on the location, and there is not a single lot downtown where you can pay to park for a full day. (Well, there is one, the Caltrain lot, but it is supposed to be for people riding the train only.)
Parking tickets are $25 each (ouch) and if the meter person is having a bad day or something, they can ticket you multiple times if you continue to exceed the time limit. (This doesn't usually happen, but I have heard of it before.)
If you need to park for an extended period of time without returning to move your car, the best thing to do is park in the residential area that begins 5 or 6 blocks south of the main downtown area, around Lincoln Street. Just drive south until you no longer see time limit parking signs. Then you can park all day for free.