//

clojure

Using the iPad as an IDE

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.

programming with the iPad


What you’ll need:

  1. an iPad
  2. a bluetooth keyboard
  3. 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:

$ tmux new -s dev

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:

$ exit
$ tmux ls
koans: 1 windows (created Sat Jan 25 14:24:13 2014) [93x32]

We can then reattach to our session with

$ tmux attach -t koans

and when we are done, we can kill the session:

$ tmux kill-session -t koans

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:

photo


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.

References:

Mohamed Alaa’s tmux cheatsheet: https://gist.github.com/MohamedAlaa/2961058

Discussion

2 Responses to “Using the iPad as an IDE”

  1. Rich,

    Do you use a home server to ssh into, or are you using a VPS/cloud setup for your code?

    Posted by celeron504 (@celeron504) | January 28, 2014, 2:01 AM

Leave a Reply

You can also enter your email address to receive notifications of new posts:

Tweets

World Community Grid

Read this blog in your favourite news reader:
Subscribe