It is impossible to write the perfect code, it is always going to be bad code for another programmer. So don't try to reach perfection and waste so much time coding. Try to solve real problems and build products, like apps, websites and any other type of software.