patrick code