There's a fascinating thread on Slashdot by a recent CS grad. The writer notes that "...for some of the software being written nowadays, I would have absolutely NO IDEA how to even begin writing it." It will take a bit for you to slog through all the responses, but there are many good ones, the essence of which is typically the same advice as given by many writers: to become a good programmer, you need to read lots of code written by others and you need to practice by writing lots of code of your own.
Professional singers work hard to polish their voices; good writers write and write some more; world-class photographers take lots of pictures; athletes train their bodies through hard yet thoughtful workouts. There is no royal road to becoming a great programmer: it takes dedication, passion, and lots of hard work.