Background: I work for a small company which does not have a set of established best practices for designing software. I was hired to work on a project which gathers data from a stream, does some processing and aggregation and writes it to the database. It should eventually help replace an old system which is basically many thousands of lines of spaghetti code. Together with a colleague, we have designed and build something which I would consider a good base for a system which would be extensible, testable and stable.
The problem: The development of the last feature took about 15 days of work and the situation was looking rather bleak with regards to meeting the deadline when the feature would be demoed to the customer. A more senior guy "comes to the rescue" and builds the same feature in three days, using the same coding style and overall approach as is used in the old system. The result is just as monstrous as the original, but this is not visible to management, who will certainly ask why we're not nearly as productive as this guy. Our solution has actually still met the deadline, but in the meantime the UI was wired to show data from this new solution.
It is very easy to be a cowboy coder and write code with no tests, no safeguards against unexpected situations and no real structure. The new code just darts through the happy scenario and does the bare minimum of work necessary to get the correct (but how do we know?) result to the database.
How do I persuade management that this practice is extremely harmful and that good software engineering will very quickly start paying dividends? Are there any good examples I could mention to support my case?