Don’t ask what I do, because I have written both good and bad code in my life!
Of course Stack Overflow is great; the problem is when you use it to try to hack through a problem you don’t completely understand. The other day I was trying to get a feature working in a fast-changing beta product and it wasn’t working as advertised. I resorted to copying different bits of Stack Overflow examples in an attempt to see what might work. It was a fair experiment, but would be a disastrous approach with a real product.