Default [Q] Creating patches for Android kernel

Hi everyone,
I wanted to learn how to develop patches for the kernel of a Nexus 4. But i'm a complete beginner in all this. Could someone give me guidance on how to develop the patches to add additional features to a kernel, or from where I can learn this from. Please note that i'm not asking how to ADD a patch to a kernel but how to DEVELOP a patch.

Or is there any other way to develop a kernel based on someone else's kernel? As in a step by step guide in DEVELOPMENT?
Thanks in advance.