when should I apply for a position?
If you've been dabbling for a bit, and have learned enough to be able to build a simple web service or app, I'd start applying now. There's really nothing to lose. Worst case, the recruiters will look at your portfolio, will think you're too junior, and won't call you back. Best case, you'll get an interview and a job offer! Don't be afraid to apply for a position, most companies worth working for won't put you on a "blacklist" or something like that.
What sort of projects should I create to form a portfolio.
When looking at a candidate's portfolio (a github account is more than enough, you don't need something fancier). I always look for finished things. Libraries, services, websites (this is very oriented to back end development). I don't care for the complexity, or how unique the solution is, but I like to see developers who finish what they start. Focus on things you're curious on, tech you want to learn, or just to solve problems you yourself have (e.g. I once wrote a web service to tell me when my next bus was due).
Ramiro Berrelleza
Co-founder & CEO at Okteto