> tldr; Always assume someone will be reading your code in the future for a job hire.
I agree that what you suggest in terms of improvements in how you code is beneficial--especially if it's a permanent change in your coding style. I think permanent changes in coding style like that happen when we realise it's actually beneficial to us even before it helps someone else.
At the same time I posit that there is much useful/functional (albeit ugly) code sitting trapped on hard-drives around the world because the developer is concerned a future employer/client might judge them for it if it were released.
While this sort of filtering by prospective employer/client may well happen, I think the average developer concerned about such things has a much higher standard for work than needed.
I've tried to adjust my thinking to "Well, it works for me, that means it might be useful to someone else, so I'll put it up there. If some future employer/client can't see that it's a quick hack and not representative of my daily work, well, that probably says more about them."
I'd rather find your 10-line hack to get that obscure API working and build on it, than nothing at all.