You can start writing patches now, there are tons of resources to get started. Pick a small bug on https://bugzilla.mozilla.org/ (even fixing a typo) and fix it. It may take a week, but who cares? You can get help via patch reviews and asking questions on IRC (irc.mozilla.org)
There is also a lot of resources on wiki.mozilla.org about all our projects and how to get started.
Don't let your inexperience stop you. It will certainly take a while to improve. All great programmers have years, even decades of experience.