Definitely this. I got a BS in Computer Science and started along the path of Software Engineering while working towards my Masters. Learning some good fundamentals helps, but my code was still a mess. Writing code that you'll actually have to look at again is the best way to become a good programmer.