Learn reading and judging code, especially your own
Learning to write requires the ability to read. Becoming a better writer requires much more reading than writing. To improve your writing you need to be able to judge what you've written and understand how to improve it, often many times. To become a professional writer requires talent, exercise, continuous learning and the ability to judge writing to enable its improvement. In the past, before text editors, a typical writer will put most of his hand-written or typed sheets into the trash bin, before a manuscript was finished. Even then, copy editing might require re-typing larger amounts.
The same is true for software. Unfortunately there is not yet much work available that gives good role models. It is just too easy to publish bad software, as easy as it became to publish bad writing on the Internet.
Some programmers, like me, were lucky to have access to good code while still learning how to write code. However, not many textbooks actually explain what good code is, or even contain excellent code to learn from.