How to make circuits that work every time