How can I do development on my Android device? I have a pretty long commute to work and own an android phone. I figure it would be nice to do some simple programming on the way. I'm not picky on which language to code on. I usually have an internet connection on the train.

I've been looking through the android market but haven't found any apps that offer a "development environment" or an editor with a compiler. Is any development ON the Android possible? Does an app for this exist?
Two years on: I use AIDE, their brief summary of features states:


  Edit-compile-run cycle:
  
  
  Create a sample App with a single click
  Run your App with a single click
  No root access required
  Incremental compilation for fast build times
  Uses Eclipse .classpath project format for compatibility 
  Integrated LogCat viewer
  
  
  Real-time error checking:
  
  
  Real time error analyis throughout the whole project as you type
  Automatic Quick-Fixes for many errors
  
  
  Refactoring:
  
  
  Rename
  Inline variable 
  Introduce variable
  Extract method
  
  
  Code:
  
  
  Code formatter
  Organize imports
  Out-comment code
  Create setters/getters/constructors from fields
  
  
  Code navigation:
  
  
  Goto defintion 
  Find usages
  Goto symbol
  Goto class
  
  
  Editor:
  
  
  Very fast editor even with large files
  Code completion for Java and Android XML
  Android online help directly from the code
  Syntax highlighting for Java and XML
  Unlimited Undo/Redo
  Pinch zoom
  Smart expand selection
  Keyboard support with configurable keybindings
  UI optimized for small screens to show as much code/content as possible
  
  
  Filebrowser:
  
  
  Built-in file manager with the most common features: Rename, delete, create file or folder
  Dropbox integration
  Git integration with Commit/Dicard/Push/Pull and SSH support.