You’re a developer on a team new to developing agile software, programming away, when you realize, “Holy crap, this has to be done in only two weeks.” Agile programming involves delivering working, tested software every iteration (two-four weeks). As the iterations flow, this demand creates a new kind of pressure as developers code more, modify code more, and stay focused on today’s deadlines.

Under such production pressures, the teams’ traditional programming practices (lengthy analysis design phases, testing at the end of the project, etc.)  will not be sufficient. Fortunately, a new set of agile best practices has proven to enable more frequent delivery with higher quality. These agile best practices help the programmers and the code itself become more agile. The smaller cycles of agile programming appear to some as less rigorous, but the effectiveness comes form the application of these practices with great discipline. This discipline leads to extensible, low-defect code with the simplest robust design that will work for the features currently implemented. It is well-factored and well-protected by unit tests.

Source: https://www.versionone.com/agile-101/agile-software-programming-best-practices/