Hacker News new | comments | ask | show | jobs | submit login
Ask HN: Who productively writes code on their smartphone? How?
97 points by ruffrey on May 14, 2016 | hide | past | web | favorite | 62 comments
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?



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.


> I like most: it's extremely responsive and never lagging.

I spent an embarrassing amount of time yesterday figuring out why login forms in my app were incredibly laggy to text entry with stock keyboard + Safari.

Root cause? Had hundreds of login items in the keychain for that domain. Whoops!


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


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.


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


Good question but most note taking software on iOS doesn't have Vim bindings, so I take Vim on a server for note taking already. Then I can also get right into the actual code anyway.


How do you switch between command and insert modes in vim on your iPhone keyboard?


I mapped jj to Esc in my .vimrc but Prompt has also Esc as an extra key. But jj is faster.

So with jj you get from Insert to Normal mode and from there just : either from the keyboard or from Prompt's extra keys.

All like on a normal notebook.


I just wish Prompt would add "mouse" support so I could scroll my vim panes and/or drag around the dividers. I asked their support and they said no plans for that ever.


I think that's an Apple no-no. Which is a shame because the iPad is the best mobile enterprise Windows access device in the market.


I never used Prompt on an iPad just on a iPhone.


I wish there was a special keyboard widget on the iPhone for coding. I want the keys in the keyboard to be bigger than what the iPhone currently displays.


If only Prompt 2 supports Mosh like JuiceSSH. In fact, I can't seem to find any mosh client in iOS AppStore.


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/

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.


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.


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.


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)


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...


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://news.ycombinator.com/item?id=8411638


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?


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.


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.


That... is awesome. Having done a Rift demo, that's the closest I can conceive of (right now) as real-life wizardry - a terminal for (virtual) reality.


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).


Is there a good diff tool for mobile?

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


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...


This keyboard fits in my pocket: http://www.amazon.com/ZAGG-FOLZKFLEXSLV-Zagg-ZAGGkeys-FLEX/d...

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


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 might become pretty awesome, there's a myriad of traditional-ish browser-based IDEs available too.


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.


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.


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.


Good thought.


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.


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.


What app did you use?


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


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.


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


An iPad Mini 4 with either of these two keyboard cases fits handily into pants/shorts with cargo-style pockets:

http://www.zagg.com/us/en_us/keyboards/ipad-mini-4-keyboard/...

http://www.zagg.com/us/en_us/keyboards/rugged-book-ipad-mini...


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/31857050698/ipad-linode-1-year-...

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/60180703528/microsoft-surface-v...


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.


I use http://www.textasticapp.com/, 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.


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


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.


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?


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.


> Every time I boot my computer 2 or 3 different game clients somehow all have 50 - 100 meg of updates.

You should start by setting up a proper environment on your PC that is "distraction free". You are not going to be more productive on a phone when it comes to writing web apps. All is required on a PC is a cli with SSH and a browser. I'm saying that as I'm typing on a $250 dollar laptop that I use everyday for Java development, and it still boots under 10 seconds on windows 10.


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


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.


Microsoft Touch Develop is the only thing that comes to mind here: https://www.touchdevelop.com/


I always have my phone. I always have a few side projects that languish due to time constraints. There are so many blocks of 5 or 10 minutes where I could be productive if only it were possible to write code on my phone.


Exactly; that's the thing. All those annoying waiting moments you don't have your laptop (or your laptop doesn't fit like we have in the EU at least when you fly within the EU with some airlines); you are sitting there for hours with a Kindle or smartphone in hand and it would be nice to be productive. That's the major reason I actually got a pandora in the first place. To not have that issue at least.


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.


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.


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.


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


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.


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


Have you tried Coda on the iPhone?


Cathode, ssh, vi.


More like - why?


Bluetooth Laser keyboard ?




Applications are open for YC Summer 2019

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: