Or you can do pair and/or mob programming, where the review happens as the code is created. This eliminates the feedback loop and the creation of throwaway code.
Even when I pair program it is nice to have someone else review the code before merging. Or at a minimum do a 'self' code review after the work is complete, once you have pulled your head out of the weeds things might look different.