What sort of software are you planning to write? e.g. apps, webdev, games, command-line utils, etc.
In what language?
Do you need to be able to code while offline?
An iPad with the keyboard case could work, particularly if you'll always be online. You can just use it as a dumb terminal to ssh into a more powerful remote server.
Another idea is the old MacBook Air 11". It doesn't meet your requirement of being a tablet but it's just as portable and would give you a lot more grunt. You can probably get a refurb or used one fairly cheap. 8GB RAM, SSD, good battery life...