

Processing for Android - aufreak3
http://wiki.processing.org/w/Android

======
andybak
Anyone else hoping this will eventually allow coding on the device itself?

Of course someone would have to come up with a more programmer-oriented
virtual keyboard. I've already messed around with using bash and python
without a physical keyboard and you really want easier access to all your
punctuation and braces.

~~~
barrkel
I've been thinking about this on and off for a couple of years. I reckon
there's a case for a highly syntax-directed touch-based editor for scripting
on these devices. Freeform text is too awkward.

Imagine the program as a tree of nested boxes: a leaf node / box for each
single-line statement, an inner node (= outer box) for compound statements.
Introduce some modalities: insertion between nodes, selection of node
subtrees. Edit and create nodes using aggressive code completion. Complete
initial keywords, consider using 'let' and 'call' or equivalents for
assignment and invocation expressions (avoids starting statements with an
identifier). Complete identifiers aggressively, starting with params, locals
and most-recently-used, being able to browse up into an outer scope, possibly
converting long lists of potential identifiers into Patricia trie navigation
to avoid laborious scrolling.

A typed language would probably be better, though with inference wherever
possible, because completion has much higher quality there.

~~~
revorad
What I imagine will be most annoying about programming on a mobile device is
the amount of scrolling needed to move around the code. Sometimes I find my
17" laptop screen too small, so a phone seems unusably small.

~~~
dataguy
You are so right. Seriosly, I would never, NEVER code on my Android phone. And
why should I? It is a small device with a small display and small keys - I
would not like to search for a specific line of code in a 2000 LOC document..
seriously. I am a CS guy, so I have my laptop around me most of the time when
I feel like I need to code something. That's far enough I think.

~~~
barrkel
When I was a kid, I sometimes went to toy shops during school lunch hour and
coded BASIC on a toy computer with one LCD row of text (couldn't afford a home
computer).

Why would one want to code on an Android device? Not everyone uses laptops all
the time. Laptops need to be lugged around (even though mine's a Toshiba
Portege, and is lighter than most at ~1.2kg, I seldom bring it anywhere),
opened up, resumed (takes a second or two), balanced on a knee (so you need to
be sitting), etc. Hard to do when you're e.g. waiting in a queue, walking in
the countryside, lying in bed (without rearranging pillows, sitting up,
lighting up the room from the screen, fans and light disturbing your
significant other, etc.)

And then there's the idea that you're writing programs for your device without
the need for a deployment stage. You're running them right there on the
device. No need to faff about with cables, or build / deploy steps.

As to lines of code, in a structure-oriented editor, I think that would not be
relevant. I would imagine program navigation to be spatial with drill-down, up
and out; all identifiers are hotlinks to their definitions; MRU lists and the
same Patricia trie technique, or incremental search, for more random access,
etc.

