Soft-boiled eggs; put room-temperature egg in a pan and cover with cold water. Bring to boil, start timing and turn off heat. Three and one half minutes I find is just about right for a yolky yolk and firm white.(Plunge briefly into cold water before consumption so the second one doesn't carry on cooking while you eat the frist.)
Hard-boiled egg; as above, just leave them for at least four minutes or let them cool in the water.