- Year 1: Learn to code full time. Later in the year, start applying for jobs as a developer.
- Year 2: Get a job as a full stack dev. Devote nights and weekends to improving your development skills as much as possible.
- Year 3: Get a cofounder, and work nights and weekends on your project.
- Year 4: Go full time, and work for 6 months to launch the product and get enough traction to do YC.
The problem is that if you don't spend any time actually working as a developer, you'll be limited to only doing very simple projects. And also, it's much more likely to work if you can find a cofounder and work with them part time for a while before going full time.
As someone else already said, you'll also need the skills required to create a good product and build a good company, both of which are entirely different.