Hi Jim,
I am from a very similar background to you - although I certainly find it VERY difficult to start 'from the beginning', and certainly not 'from a book'.
So, when I wanted to see what I could do in PJSR - out of a need that nobody else could be bothered to resolve (i.e. deBayering CMYG images from a DSI Colour camera), I started with code written by others - all of whom were far more skillful than I.
The result, after months of hard graft, was my Batch deBayer script, now included as part of the 'standard distribution' - thanks to Juan.
Now, the only reason that I am mentioning it is that I spent a LOT of effort trying to comment the ENTIRE script - mostly for my own benefit, as I learned each new step. But I also realised that, with Juan's intention to include it in the standard distribution, the effort into adding these comments might be helpful to others.
So, please, feel free to start with my script (and the efforts of others) - and rip it into manageable chunks to suit your needs.
Don't ask 'me' too many questions though - it has been a year since I last looked at the code in detail, and I probably have a LOT of re-learning to do already
Good luck - and have fun!
Cheers,