Writing code on an iPad would require an external keyboard and a propping mechanism - both of which have their problems.
When working with an iPad half the keys on the external keyboard are useless. And it just so happens that these 'useless' keys are the ones we hit a lot while programming.
The propping mechanism should be sturdy enough to not fall over since tasks such as alt-tabbing now require that you reach over and touch the screen, which should ideally be situated at a distance of 20inches from your eyes when typing. Shuffling between touch gesturing and typing wastes a lot of time.
For these reasons, an iPad would make a pathetic medium for coding. However, there was a link recently to an iPad IDE which focused on trying to get a lot of work done with as little typing as possible. I haven't tried it out yet, so can't comment on how useful that would be.