My programming knowledge was acquired the same as Tweakie's. I learn as I need to.
As it relates to Mach3, it's very easy, as you just need to ask here, if you get stuck.
As far as writing better code, post your code and ask people to look it over.
My suggestion is to load some of the wizards and look at the code they use. You can typically see the code by choosing Operator>Edit button Script and selecting the button that created the g-code.
The only thing that would give you what you're looking for would be a generic vb script book. But, imo, you'd spend a lot of time learning stuff you didn't need, as Tweakie said.