Here&#x27;s a anecdote of how a typical webapp goes to shit with the best intentions from everyone.<p>&quot;building it right from the start&quot; sounds great. I&#x27;ve never worked on a project where people did not honestly try to do it this way. Lets say that for once you have a clear set of unambiguous requirements (a rarity) when starting in.  I like to start with the database first. I&#x27;ll design a nice normalized database and start building the website from there. If the requirements are fleshed out enough you&#x27;ll already have a map of what pages ought to do what.<p>Once you get to the point where you can have a customer try out a few pages you get some &quot;feedback&quot; which is actually a change in the requirements.  You can&#x27;t hit them with a change request for every little thing at first so you comply. Maybe it&#x27;s just a small change turning a one to many into a many to many relation for example, or moving a few fields from one table to another. Soon you have 30 or so similar &quot;small tweaks&quot; even if you hit them with a change request every time, they don&#x27;t all come in at once giving you a good opportunity to re-evaluate the schema&#x2F;application as a whole, it&#x27;s always viewed as a singular &quot;small&quot; change so re-factoring the whole thing isn&#x27;t really an option. The more changes that come through the more your elegant implementation becomes a series of hacks.<p>Soon they may start complaining asking why their &quot;small&quot; changes are taking so long to fix. This adds further budget pressure.<p>The problem is, it&#x27;s not very clear to people down in the weeds when implementing the small changes if it&#x27;s a hack or not. I think this is something that takes experience.  So even when you have cleanup be a blocking requirement,  taken one at a time it might seem fine and no large refactor is obvious until it becomes too large of a task to lump in a typical change request.<p>This is an especially easy trap to fall into for people who have been toiling away at the current design. They will have a blind spot&#x2F;affinity for keeping as much of their implementation as possible and resist an overhaul.<p>If you have an iron will and a steely ice cold 1000 yard stare from 10 years of war in enterprise app development it&#x27;s easier for us to kill code because we don&#x27;t get attached to it as easily.<p>Be careful not to fall into the dark side though, (the flip side of those 10 years can instil a cold iron heart who stares right through the hacks and stops trying to argue with the client about doing things properly. In this scenario you just do as you are told and stop caring about the overall state of well-being of the codebase.)<p>The real art to web dev consulting is being able to build a flexible enough design to withstand these sorts of changes and still remain elegant and well thought out. It also takes the experience to know the difference between a hack and a proper change and the will power to do the right thing.  It&#x27;s really hard to do and it a good &quot;gut&quot; feeling for how a particular thing will actually be used, what a customer really means when they say something etc.  I&#x27;m not sure that it&#x27;s something that can be taught. It leads right back to your brain dump wish.<p>Cheers