I’ve recently been working through Aaron Bedra’s set of clojure koans in an effort to improve my functional programming skills and try something new. I’ve found it difficult to make time at my desk for this, so I’ve set up a development environment on my iPad. It’s worked surprisingly well, so I thought I’d share my setup.
- an iPad
- a bluetooth keyboard
- iSSH – available from the app store
Obviously, these can be substituted for their Android / Windows equivalents. Personally, I would struggle to do any serious programming with a smaller screeen than the iPad has, but that’s not to say it can’t be made to work.
With a connection established through iSSH, our first step is to start up a session in tmux:
Creating a named session that we can re-attach to later is particularly useful when working from a mobile device. We can leave the session and list those that are running as follows:
koans: 1 windows (created Sat Jan 25 14:24:13 2014) [93x32]
We can then reattach to our session with
and when we are done, we can kill the session:
Sessions can be split into panes, using
PREFIX (Ctrl-b by default) + " or
PREFIX + % for horizontal and vertical splits respectively. Armed with a basic command of our window manager, we can now set up a development environment that consists of a text editor (I use vim), a REPL and a file browser:
Depending on the task at hand, this configuration could be modified to tail a log file, interact with a SQL prompt, run a compiler, execute a test suite… the possibilities are almost endless. I’m not sure how successful working on a large enterprise project in this environment would be, but for quick programming tasks, particularly with languages where the code is organised into short functional declarations, this setup has proved more than sufficient.
Mohamed Alaa’s tmux cheatsheet: https://gist.github.com/MohamedAlaa/2961058