The agile methodology has many advantages such as you are always getting feedback and quickly do the changes and show the product but with coding point of view, there is very bad impact. There is no uniformity in code.
If the developers are not enough experienced, than the resultant code is a piece of junk, even experience one’s can’t maintain the code well. The advice to those developers is take some time and think that after doing a new changes, is the quality of code still good. Can it be re-written to short the code as there is rule that less code is equal to less bugs. Ofcourse there is a complexity in problem domains, but often we make the software complex by developing from incomplete requirement and often managers/clients require changes to be done at eleventh hour and immediately.
Developers are always afriad of changing code that is working on production without any problem. Due to this approach, there comes a stage where to understand code is very difficult and to change is risky. In addition to IDE, there are also tools available for code refactoring from which you refactor or clean code very quickly.