Hanoi is the second biggest city in Vietnam, when you visit Hanoi especially in the old quarter the road is full with motor bikes and cars, the sidewalk is very narrow and the seller show many thing they sell on that and it is difficult to cross the road.
First, standing at the side of the road, street. Watch around, right, left, and right then left few time.
Second, Look at the line of the transport move to you (in Vietnam they driver on the right side) face to face with the driver and you guest. When the nearest transportation goes by you then you step the fist step into the road.
Third, Keep going one by one, step by step, face to face with the driver. Some time, the driver non stop when you step in front of their car do not worry and never step back... just stand and wait remember that always face to face with the driver of the line moving in front of you.
Four, When the car, the bike or motor-bike comes by you, there is a short space before another one coming, so you should step in and if there is other space keep moving. If not, please wait and do the same up to the other side of the road.
Try the "No Look" technique.Just step into the middle of the road WITHOUT making it clear that you looked either way. Not looking puts the burden on the drivers. So "they" will be aware and keep away from you.
This is not a joke. You can see how the local crossing the road without caring anything, they just enjoy the phone or talking to each other. In Vietnam, if you ride a bike or a car and you unfortunately hit a passenger, all mistakes will be yours. That's "civil law".