You'll get there, it just takes practice. As for how long it takes to come up to speed, it's different for different people - it depends on whether or not this is your first language, if you're isolated or have people you can ask stuff, and how much time and focus you can dedicate. I suggest that if you haven't already, start with a book. Online examples are great, but they can also be fragmented (scattered) and only take you so far. A book can be more comprehensive, with each example building off the last (if the book is well written).
Keep at it, and ask lots of questions. It will "click", and before you know it you'll be helping others!