One of my most productive days was throwing away 1000 lines of code.
Everything is a learning process: any time you fall over, it's just teaching you to stand up the next time.