Fortunately, it's not as black and white in the real world. Quick and dirty hacks are a real thing that will never go away. If anything, having the ability to do those under stressful scenarios is a good quality to have.
EDIT: And of course, there's learning from your mistakes so you can get it right on the first try the next time you have to do a similar thing.