Is replacing the spokes on bike wheels something you can learn to do yourself?

I'm a heavy guy and regularly have spokes break on my back wheel. Getting a bicycle repair guy to fix it is a pain in the ass and kind of pricey. Ideally I would like to have a couple of spokes lying around so I could fix the wheel myself.

I'm not a complete idiot with tools but I'm still very much an amateur. Can I learn to do it myself?