
Ask HN: Who productively writes code on their smartphone? How? - ruffrey
For those who have found a way to develop software, particularly web backends and frontends, via smartphone - what is your workflow? Which tools are best?
======
greenspot
I do.

iPhone 6 + Prompt (a SSH client) + tmux + Neovim/Vim + a remote dev server

for Android phones use JuiceSHH instead Prompt

Usually I use a notebook sshing to my dev server but when I am on the go and
get good ideas I immediately try them on mobile before getting home. With tmux
I am still in the same session having easy access to all windows and panes.
Vim's key bindings are the best way to use an editor on a phone anyway. All
very satisfying and not much slower. Sometimes when I need to go to bed and
still want to play around with the code the same: I tinker a bit more till I
fall asleep.

Or today: I read about a new JS NLP library on my phone I want to quickly
test: I just start Prompt and type "npm i nlp_compromise", fire up Vim and
play around.

I am quite fast with the iPhone keyboard and I think the reason is that I use
the keyboard in general without any assistance, so no spellchecking,
prediction, etc. Just the plain keyboard and after a while using it like this
you get super good and fast (it took some weeks though). The keyboard of the
iPhone is also one of its features I like most: it's extremely responsive and
never lagging.

Prompt extends the iPhone keyboard well: you get Ctrl, Alt, Tab and more keys
nearby and aesthetically very similar which I like. Prompt is quite slick and
iPhone's iTerm.

So, it's not about doing entire projects from A to Z on your phone but it can
get ultra productive when your are away from your computer and get those
'shower thoughts' you haven't gotten for three hours sitting in front of the
screen. Then a phone as a devkit comes quite handy.

~~~
srtjstjsj
Is coding on your phone really better than tapping out a note and then filling
in the details when you have a keyboard?

~~~
ghrifter
That has to be a troll post. No one in their sane mind would code on a phone
when a keyboard is close by.

Like if you were flying or something sure I guess writing something in notepad
then emailing it to yourself later...

But writing in bed? Please.

~~~
askafriend
It's an extremely skilled troll though... let's give them some credit.

------
feklar
Through a browser like MIT's iCampus XTutor or custom made backend server
interp/compiler with browser access
[http://icampustutor.csail.mit.edu/6.001-public/](http://icampustutor.csail.mit.edu/6.001-public/)

I had the crazy idea once that since Facebook's Internet.org was available in
developing countries I could create a simple curriculum by finding freely
distributable teaching material and make it into a phone based course where
you could learn both math and how to script your own device, instantly test
your answers like edx/XTutor, analyze other apps or modify other apps behavior
ect by practicing with an interpreter running on your phone using lambda
native. I never got around to trying it but if the free tier for Internet.org
lets you run javascript on any facebook page you could create 'Facebook
Technical Insitutute' by calling out to a server like XTutor to return results
(which is likely blocked for free tier access) or just using a basic
interpreter (lambdanative.org) on the device.

You would also probably need to write your own in app keyboard to make typing
(),#,',[], __/ ect easier or buy an external keyboard. Other than my insane
idea of FB school I've never tried to be productive on a phone beyond ssh into
a remote server to fix something.

------
sunir
I use textastic, a Bluetooth keyboard, Dash for documentation and I plan on
using the workingcopy app for git. I tried a lot of code editors. textastic is
the best.

My goal was to code offline from my iphone. I was motivated from a trip to
Jamaica to chill out. I don't code for work anymore as I have ended up in
marketing. But I started coding since I was 4 and I miss it a lot. So I
figured it would be fun.

I am coding a React app. There is no good (ie fast, keyboard friendly,
functional UX on mobile screen) firebug for mobile despite the built in
firebug extension in textastic. So I built my own error trap, JavaScript
console and element picker. I can open source them sooner than later if you
want. I was planning to do this over the summer.

------
tluyben2
I write a lot of code on the OpenPandora which is about the size of a
smartphone and runs a full version Linux (Debian in my case). Especially when
travelling a lot I like it much better than carrying a laptop with all the
cables around. I have been working on an environment to work productively on
my smartphones but that proves to be a lot harder. Textual input is just not
very nice so it needs something different which I think I figured out for some
cases; general programming though I am not sure about. When I really have to,
it is faster to just talk into whatsapp/wechat and send those snippets to my
colleagues who turn that into code and debug it.

Hopefully this year I will have a Pyra (which actually can double as
smartphone) and hopefully I will have progressed with my 'visual IDE'.

Edit: what surprises me is that not more people are working on this; we have
more touch devices than anything and more (aspiring) programmers than ever;
there is a market _and_ a greater good there.

~~~
bound008
How has the OpenPandora fared with time? Been thinking for a while about
grabbing this for writing notes, and playing old emulated games, (as well as
ssh+tmux+neovim)

~~~
tluyben2
For me it is perfect; it allows me to do web dev and enough mobile dev to
write 80% of what I need to write[0]. I also do embedded dev on it and dev for
retro (z80) systems (which are quite similar). I have a USB wifi stick because
the wifi driver for the built-in chip is horrible. With Debian there is plenty
of software and I too use it for emulation to use PS1 (Crash!) and MSX games
and software. Windows 95 runs fine on it which allows me to play
Phantasmagoria and some other old games as well.

[0] [http://brainfisheatfishbrain.com/2015/03/writing-a-game-
with...](http://brainfisheatfishbrain.com/2015/03/writing-a-game-without-
sleep-or-internet-at-jfk.html)

------
sourcd
Does it count if display is a VR gear and input device is a detachable
keyboard ?

[https://www.youtube.com/watch?v=db-7J5OaSag](https://www.youtube.com/watch?v=db-7J5OaSag)

[https://news.ycombinator.com/item?id=8411638](https://news.ycombinator.com/item?id=8411638)

~~~
grogenaut
Isn't there a huge problem with the resolution of the rift/vive being that of
a monitor but it's got to render a monitor at distance thus losing pixels and
being equivalent to an old vga monitor?

~~~
bemmu
Looks like the screen in the video is about 1/3 of the view size in each axis.
Rift resolution is 1080 x 1200 per eye, so about 360 x 400. That's even worse
than VGA.

~~~
dwild
The Gear VR use your smartphone screen, not the Rift. That's a resolution of
1440 x 2560 for a Samsung Galaxy S7, which mean 1440 x 1280 per eye. The optic
is also made to have more pixel in the center than the border of the viewport.
I have no doubt that you can have a resolution similar to VGA with no issue
and even better than that if you use a bigger screen. I'm pretty sure none of
us had any trouble working in VGA back in the day either.

------
jasonjei
I find that doing code reviews are helpful on the phone. I often catch things
that I don't on the desktop because the screen is so focused. However, I find
writing code on the smartphone screen so clumsy that I only do it in
emergencies no matter the tool (and my favorite tool is usually some SSH app
and then using vim to make changes). My SSH server has docker installed so I
can test the changes via Safari via Cisco IPSec. However, multitasking on iOS
is still painful (always live in the fear of my SSH connection being closed by
iOS).

~~~
codecamper
Is there a good diff tool for mobile?

Do you use a certain mobile app specifically focused on code reviews?

~~~
jasonjei
I just used the Github mobile UI to read code. I'm sure there are better tools
out there. I've been meaning to try iOctocat...

------
kanzure
This keyboard fits in my pocket: [http://www.amazon.com/ZAGG-FOLZKFLEXSLV-
Zagg-ZAGGkeys-FLEX/d...](http://www.amazon.com/ZAGG-FOLZKFLEXSLV-Zagg-
ZAGGkeys-FLEX/dp/B00695OFE2)

otherwise, I'll often use a "wifi keyboard" app:
[https://play.google.com/store/apps/details?id=com.volosyukiv...](https://play.google.com/store/apps/details?id=com.volosyukivan)

------
benologist
I've been thinking a lot about how I can reach device independence, for me the
biggest missing component right now is the web inspectors in desktop browsers.

But there's other issues too that will need to be fixed. When I plug my tablet
into my screen Firefox's menu stuff takes about 1/3 of my monitor with no way
to adjust the resolution and no way to go fullscreen in the browser.

[https://news.ycombinator.com/item?id=11685845](https://news.ycombinator.com/item?id=11685845)
might become pretty awesome, there's a myriad of traditional-ish browser-based
IDEs available too.

------
a-saleh
Not sure if counts, but I have used 7 inch nexus 7 + bt keyboard to write my
diploma thesis in latex.

The writing experience was decent, and I liked how few distractions I got when
writing.

Was even able to do corectures without the bt-keyboard, combination of Vim-
touch and thumb-keyboard (that has easier access to braces) made it reasonably
possible.

------
highd
I was toying with a little android tablet (Samsung) and a bluetooth keyboard
for a while. I basically just ssh'd somewhere and used vim mostly. I had some
keybinding issues, but the principle was sound. With the case it's all about
the size of a book, so pretty reasonable to just carry around.

------
cdevs
Just quick bug fixes or the one time I wrote a parsing script for work while
waiting on jury duty. Wrote 150 lines of parsing csv and MySQL inserts and it
took about the 4 hours I was sitting around...never again if I can avoid it.
Should have brought a laptop.

~~~
ruffrey
What app did you use?

------
abhi3
A tiny chromebook would cost half of an iPhone and be much more productive for
coding on the go.

~~~
ruffrey
You are totally correct..are there any chromebooks that fit in your pocket?
Somehow leveraging my smartphone without additional pieces of technology to
carry around - that is the goal. I was hoping for an app that is just unknown,
which does this.

~~~
ChuckMcM
I believe that ultimately something like Google Glass or an equivalent and a
roll up keyboard will be an answer.

------
jdi
A good advice is to always use _tmux_ or _screen_ in your ssh session, just in
case your ssh connection drops out.

I also use Hacker's Keyboard on Android, but on tablets I sometimes don't find
it comfortable when I would like to type with my thumbs. Does anyone know a
good alternative/solution for tablets?

Some time ago, I ran into a series of posts where someone used an iPad, a
bluetooth keyboard and a Linode server to do work. It's not exactly
smartphone-"have everything in your pocket" purism, but it's close enough.

These are the 2 blogposts related to that:
[http://yieldthought.com/post/12239282034/swapped-my-
macbook-...](http://yieldthought.com/post/12239282034/swapped-my-macbook-for-
an-ipad) [http://yieldthought.com/post/31857050698/ipad-
linode-1-year-...](http://yieldthought.com/post/31857050698/ipad-
linode-1-year-later)

It's also nice to see 2 other blogposts of his on the same subject:
[http://yieldthought.com/post/42450188171/working-in-the-
clou...](http://yieldthought.com/post/42450188171/working-in-the-cloud)
[http://yieldthought.com/post/60180703528/microsoft-
surface-v...](http://yieldthought.com/post/60180703528/microsoft-surface-vs-
ipad-linode)

------
jspaetzel
I don't write code on my smartphone but I do some planning work on it.
Basically any editor will do that can sync to a pc, I use a combination of
Journey & Google Keep currently.

My workflow is essentially to think through the problems im going to
encounter, make lists of everything, define naming for things that have to be
thought through. (All these things are easy to do on a phone) So when I go to
actually write the code I can just reference my document and essentially only
write the logic on a computer.

------
mamcx
I use [http://www.textasticapp.com/](http://www.textasticapp.com/),
[http://omz-software.com/pythonista/](http://omz-software.com/pythonista/) on
iPad and haven't find a trouble on the _write_ part. Is ok with touch and
decent with a keyboard.

The trouble is the lack of feedback. Pythonista can run the script, but if for
example I need to edit a django project I'm out of luck.

With ssh + VIM/Emac this could work, but then I find it harder (and I don't
like, don't wanna learn that!) even for basic stuff (specially, without a
keyboard). Some people are sucesfully with it.

My dream is that textastic/pythonista or similar integrate SSH and the ability
to run commands against a server, and have the source sync on save.

------
projectramo
Do you mean with a foldable keyboard? Typing is the hard part. I would be all
thumbs on a smartphone

------
pgbovine
i've never seen this done successfully. what's your motivation for doing this?
so that you can code on the go? why not get a tiny laptop?

~~~
benologist
My motivation is I have a myriad of devices that cost practically nothing and
require no configuration or upkeep, that can also open pages on the internet
and connect to the same monitor, keyboard and mouse.

Replacing my laptop later this year will cost ~$2k, along with endless time
and attention and so much otherwise-useless knowledge to keep it operating and
secure and configured. I get bugged every day by software asking me to watch
an update download. Every time I boot my computer 2 or 3 different game
clients somehow all have 50 - 100 meg of updates.

None of that helps me write web apps.

~~~
srtjstjsj
That's.... not really "on your smartphone".

~~~
benologist
I think the distinction only matters if the goal is to code with nothing but
your phone, if you went all in you'd continue to use your monitor, keyboard
and mouse so they're pretty much interchangeable.

------
codecamper
Not writing code, but learning a lot with mobile. I put relevant HN articles
into pocket & then take frequent walks. Google TTS reads the articles for me.
Pretty good, but that robo voice does get annoying after a while.

I can listen also to podcasts / video courses.

------
metatribal
I develop an SaaS and a couple of apps as well as some webdev contracting
work. I frequently work from the road on either an iPad via Coda or on Android
using Termux and neovim. I always use an external BT keyboard. Works very
well.

------
shaftway
I've done AIDE on a tablet. It'd be cramped on a phone, but possible. It pairs
very nicely with a bluetooth keyboard and mouse (or wired even, with the right
cable). It was pretty awesome on the old Asus Transformer line, and if you're
rooted it's pretty fully functional.

------
warcher
I can do some remote server management on the phone, but that's about it. And
depending on the circumstances, can be a very, very useful thing to be able to
do if you find yourself out living, you know, your real life and the server
catches fire.

------
rcarmo
I've been known to do commits from
[http://workingcopyapp.com](http://workingcopyapp.com) from both my iPad and
my iPhone. Works better than you'd think, really.

------
Spooky23
iPhone with some cheapo Bluetooth keyboard and an Anker iPad stand.

It works pretty good for looking at on-call issues.

For travel I had to get some work done at a conference and decided to skip my
usual stuff try out a larger display. I used an HDMI cable and a hotel TV with
my little keyboard and stand. It worked pretty ok!

I used VDI to do business-y stuff, and prompt to do UNIX stuff. It worked
well, but I wouldn't want to do it every day. The lack of a good mouse style
interface is limiting.

------
tmaly
I use my phone but only for wifi tether on train. I program on a macbook pro.
Iterm2 is my best tool

------
dalacv
Have you tried Coda on the iPhone?

------
lowlevel
Cathode, ssh, vi.

------
Giorgi
More like - why?

------
Qantourisc
Bluetooth Laser keyboard ?

------
meeper16
One of the big differences between software engineers and everyone else is
that we type 100wpm and until we are able to do this on a phone, they remain
largely useless to me unless I'm a bind and need SSH access and the command
line.

On another interesting note, it seems the internet continues to be designed
around people that just don't know how to type.

~~~
pshc
Right. There doesn't seem to be enough information bandwidth in or out (no
touch typing, keyboard consumes half the screen, 80x24 is hardly readable) on
a mobile phone to do any non-trivial coding.

We may need to design a wholly different language/editor combo to make it
feasible.

~~~
meeper16
Good thought.

