You can combine filling-gaps and applying-to-YC by building something impressive during your 4 months. Building stuff is both the best way to learn about hacking, and the best way get YC's attention.
Better still: build something with someone else, who you can then start a startup with.
Better still: build something with someone else, who you can then start a startup with.