Start by getting all the important people together. In Venice, this means all the male members of the noble families over the age of thirty, usually somewhere between one and two thousand.
Then draw lots to find thirty of them.
Then draw lots again, to pick nine of the thirty. Just why they didn't draw lots once to pick nine is beyond me, but we've only just begun because...
These nine then vote for forty people - each of whom must receive at least seven votes.
Draw lots again to pick twelve out of the forty.
The twelve then vote for twenty-five people, each requiring nine votes.
Draw lots again to pick nine of the twenty-five, who then vote for forty-five (again, a minimum of seven votes each).
Draw lots again to pick eleven out of the forty-five.
The eleven now vote for forty-one - nine or more votes each.
These forty-one now elect the Doge.
Of course, just having a simple election would be too easy, so you send them into conclave, denied all contact or communication with the outside world till their work was done.
Each elector secretly writes down the name of his prefered candidate and puts it into an urn.
Work out who has been nominated - it doesn't matter by how many - and pick one at random.
If by some miracle they are one of the forty-one, they have to disappear, along with any relatives, while those left have a debate.
They come back and answer any questions.
Everyone then votes. If the candidate gets at least twenty-five votes, they are declared Doge, if not pick another nominee and repeat until you get a winner.
"There must, one feels, have been an easier way; but, as any Venetian would have been quick to point out, the system worked."