As one of the co-founders of CrossBrowserTesting I wrote a LOT of code. We started in 2008 and went from nothing to first customer in maybe 9 weeks.
So I wrote a lot of code fast.
Fast forward to now. It is 2020 and a lot of the code I wrote back in 2008 and later is still running. It has been massaged and changed a bit by much smarter employees but a good portion of what powers CBT today is my ugly and quickly written code.
None of it is great. About the only thing that I can say about the code that is good, is that it has lasted. And continued to work. And that ugly code helped us sell the business.
Do not be afraid to write ugly code that works.