I don't think I'd ever try to do any extensive amount of writing / coding on my phone (maybe a netbook?) I'm not aware of any compilers / IDEs that run on any of the major mobile OSs (doesn't necessarily mean they don't exist) but if you really, really had to, you could always Remote Desktop in onto a computer which DOES have a compiler installed, probably along with the source code / versioning (there ARE various programs for the various mobile OSs that support the various remote login protocols)