I spend a lot of time writing automation and data extraction stuff. Sometimes I catch myself spending three hours trying to write the absolute cleanest, most elegant database query or optimization logic, when the "ugly but functional" version would have done the job just fine.
In this industry, how do you guys draw the line between writing "perfect" code and just getting the script to work so you can move on to the next project?