There is no way of guaranteeing doing it right the first time.
Most of the methodologies of software development take the iterative process as a measure of caution, prevention or risk avoidance similar processes.<p>In fact CMMi mentions the importance of measure, iterate and fix as soon as you can... which is the response to the premise of being unable to &quot;just do-it it right&quot;