My trajectory as a programmer has gone from sucking lots to sucking less. I might get good someday.
How long did getting good take? It's hard to say. I feel I've learned something from each of those experiences, and gotten better in the process. I'd say I've gotten to the level where I'm confident in my skills as a programmer within the last couple years, as I've seen meaningful things done with my code.
Summer '78: most everything but C and the like on a rich UNIX V6 system. Focus then besides exploration was still writing the best quality systems, started learning how to work on other people's code bases helping others with their final class projects.
After some time off for first year of college, starting in the summer of '80 heavy duty C (Lions' notes best reference then) on UNIX V7 and BSD 2.x. Plus playing around with Lisp Machines.
'82-83 Lisp at LMI, although wasn't able to get a whole lot of time in (Lisp Machines were scarce back then). First serious work with SICP and Scheme.
'84: C on a variety of 68000 BSD UNIX workstations. Learned how to grok and port code between these subtlety different systems. Also some Common Lisp on PCs, followed by the T Lisp dialect.
'85 on, moved from working on ersatz versions of EMACS to the real thing (mostly Gosling, which was what Gnu EMACS started from), some heavy duty debugging required to find wild pointers (e.g. ATRON on 8088). More work on other people's code and first client-server project.
Long break for more school and aftermath in a period when Route 128 was dying.
'90 or so, MS-DOS and Sun OS C (WORM filesystem and system interfaces), followed by C on Windows 3/3.1 and Sun OS 4.x. Starting transition from journeyman to master.
After various C and Oracle consulting work, transition complete in mid-90s with a serious greenfield C++ client server system using OOSE methodology (The Unified Process nowadays). That's when I considered myself to have become "good".
With all the interruptions and distractions (was trying to become a scientist in this period, but finances got in the way), took perhaps 10 years of concentrated effort in 20 calendar years.
I've only started to think of myself as a "good" programmer in the last couple of years, but I'm not so sure it's a healthy perspective - it's mainly in response to increasingly interacting with other peoples' code and realising how shoddy a lot of it actually is.
And I'm still learning :-)
From there I was hooked.
How long did getting good take? Well, that was 16 years ago, and I think I'm still working on improving everyday. But, how long before I felt proficient at it? Probably a few years or so...
Anyway, it depends on how much you practise (in both senses of the word) and/or challenge yourself. If you're learning to build web sites, say, maybe by the 5th or so project you're beginning to feel like you know what you're doing. Maybe by the 10th you are confident enough of your skills that you feel like you can apply for a job, if that's what you want.
The key is to just start work on something ASAP.