5 ms·
Ask HN: Coding on Your Phone?
What are your solutions, if any, for editing code on your phone? I often have an idea on public transit that I usually have to jot done in a note but it would be useful to have a solution to edit code on the fly. I personally don't always use github/gitlab or other online repos, but tools using online repos suggestions are welcome.
- deleted 3y ago[deleted]
- mortallywounded 3y agoMaybe I'm old school, but there's something cathartic about a nice pen and a small notebook. Even when I have a screen and keyboard nearby, it's often best to get my ideas out on paper. It just feels more "complete" in some way. It's also a much better dumping ground for random ideas I want to get out before they distract me from real work. I can dump them on paper and forget about them for a while. I can't seem to do that with digital notes. The ideas still linger and distract me.
- jones1618 3y agoYou didn't say what language(s) or if you needed an offline solution. Here are two online REPLs that I sometimes use on my phone when I have coding ideas on the train: 1. https://www.online-python.com/ - Python IDE 2. https://jsitor.com/ - JavaScript IDE
- up2isomorphism 3y agoObviously K is the best language for this.
- syndicatedjelly 3y agoWrite on a pen and paper, or tablet. If neither of those are available, type a quick note or record a voice memo
- 082349872349872 3y agoIt looks as if https://tryapl.org/ https://tryapl.org/ might have put some effort into being mobile-useful. (the terse symbology was once valuable at 110 baud, and could be again if one has to use an onscreen keyboard)
- Aachen 3y agoI code in Vim on desktop, so that also runs fine on my phone (I use an app called Linux Deploy, but probably Termux or similar are more native solutions for the same, or perhaps there's a specific Vim app also). SwiftKey lets you select a keyboard with lots of symbols on the keys, so making < or { or | is just one long press. It's still slow and cumbersome, but it's possible and I do it when on the move and there's a small script to write Not sure how your remark of not using hosted git ties into a solution for coding on your phone. You mean using a web IDE? I guess that'd be possible also but then you need constant connectivity
- noobermin 3y agoI actually assumed most replies would involve web solutions. I added the line to not preclude them in case others would find them useful even though I wouldn't use them myself (at least as a first option).
- night-rider 3y agoI can only code on phones/tablets/phablets with a small bluetooth keyboard. I have bad dexterity so I can't use the touchscreen keyboard very well, and no matter how much I convince myself I'll get better at using a touchscreen keyboard, I still end up fat fingering keys and making loads of typos and mistakes.
- fishtacos 3y agoSlightly related, but one of my favorite personal achievements in high school was replicating the first year's final exam C++ project on a TI-89's Basic interpreter. Spent hours ignoring lessons in other classes while I perfected it before showing it off to my teacher. If I recall correctly, it had assembly as well, which is how Tetris and SMB clones and Phoenix, the Doom clones,... And OS shells were coded. Good times. This was over 20 years ago and that interpreter was slooooow, but functional. Assembly could do 8 shades of gray and 60 fps. Well,.then hormones and ADD took over and I can't still can't code worth crap. but I do like reading about it on HN, so thanks.
- fragmede 3y agoI mean, what are you trying to write? On IOS, Pythonista is a full fledged environment for writing programs. I imagine there's similar on Android.
- dsq 3y agoVim and tmux on the server, and juicessh with hacker's keyboard on the phone. It's still not easy, there's not much real estate. But for small edits it's adequate.
- retrocryptid 3y agoI'll add another +1 for Termux on an android phone. I have a hub that lets me charge my phone and plug a real keyboard into my android device. It (termux) is mildly annoying as you don't get to set your own username and you can't ssh into your phone (or maybe you can if you're on a rooted device.) Also, there's no sixel support, so it's somewhat limited as a remote management platform. But I've successfully scp'd remote files to local, then used emacs to modify the files and then scp them back. Git works fine, so you can clone, branch, commit and push if that's your workflow. Make and gcc all work fine, so you can compile other tools (prolog, scheme, node) if you need them. Sbcl should work, but I ran into problems compiling I haven't yet resolved (not sure it isn't related to me monkeying around with local library links) so ymmv. I know python is available via the package system, but I'm not a python person. It IS definitely a terminal oriented experience. If you're looking for something like VSCode, this ain't it.
- Nextgrid 3y agoCarry a small laptop. Phone keyboards are atrocious enough for basic english text, let alone code.
- KomoD 3y agoGet a laptop
- psyklic 3y agoWas at Handmade Seattle a few weeks ago and saw a (still early beta) Android editor called MobileCode - https://play.google.com/store/apps/details?id=dev.mark.mobilecode https://play.google.com/store/apps/details?id=dev.mark.mobil... Lets you download GitHub repos to work offline and has common coding actions in a quick tap menu.
- gabrielsroka 3y agoReplit has a mobile app. Also, I wrote a simple web page where I can run JavaScript or a Python-like language I created called Pith. https://github.com/gabrielsroka/gabrielsroka.github.io/blob/master/webpages/pith.html https://github.com/gabrielsroka/gabrielsroka.github.io/blob/...
- hardkorebob 3y agoPydroid3 with a bluetooth keyboard
- Mrirazak1 3y agoNah I don’t think would ever be a good idea. To learn yes but not to actually code. Sorry.
- spit2wind 3y agoEmacs Android native build However, it's not clear to me how to access a compiler or interpretor other than the Emacs Lisp interpretor. Termux won't install for some reason on my phone.
- cushpush 3y agoIn theory all you need is a keyboard and a screen, the other hardware is whatever shape works, right? Coding "on the phone" sounds like a "veritable nightmare" if I'm using the stock screen and "keyboard" solution that is half the visible field. VSCode + SSH lets me code on the cloud box, whatever combination of unlocking/jailbreaking/hardware purchasing gets you that, is a solid way to go.
- hulitu 3y agoThat's the beauty of it. I tried also dosbox on a phone. The keyboard was obscuring half the screen. For me, it was enough. P.S. There are some BASIC ports for Android. Tiny fonts, barely readdable. Saving files in Android is like memory addressing on x86: interesting. /s
- flowzai 3y agoOne of my top go-tos is Juno for iOS or Termux for Android
- marknote 3y ago[dead]
- marknote 3y agoThe link is https://github.marknoteapp.com/MarkGit https://github.marknoteapp.com/MarkGit
- marknote 3y agoMarkGit allows you to run JavaScript and Python code locally on your smartphone, as well as execute and get the results of various more programming languages via a remote server.
- nixgeek 3y agoI get a 404 from that hyperlink.
- marknote 3y agoThanks for letting know. I thought HN supports markdown ... The link is https://github.marknoteapp.com/MarkGit https://github.marknoteapp.com/MarkGit
- drbaba 3y agoIn general, Vim on an iPhone (via iSH, a-Shell, or iVim) works surprisingly well. I thought the idea was ridiculous until I gave it a proper try (even though I was already a Vim user on “real” computers), since it doesn’t really leverage the touch interface for e.g. cursor movement and scrolling. However, Vim’s design gives you maximum expressive power per key you press - and since pressing each key on an iOS keyboard is a bit inconvenient, this design philosophy ends up working really well on a soft keyboard. Moreover, most common actions can be done without special keys (i.e. arrow keys, ctrl/meta modifiers, etc.) which I usually find awkward to use on augmented mobile keyboards. With Vim, you can get quite far using just a standard iOS with an added Esc key (all of the apps I mentioned above adds an Esc key). If you use Vim on desktop/laptop but haven’t tried it on iOS, I’d recommend giving it an hour of trial sometime, at least if you sometimes want to edit code on the go. (Personally, I rarely do that, but I like that I can.)
- TheCapeGreek 3y agoI'm more on the fence of "mobile UX sux so rather just don't". But did want to note, the AR/VR glasses space seems to be progressing[0], so perhaps with the correct peripherals for typing it might be possible to code in VR in transit in the not-too-distant future. [0]https://www.xreal.com/air2 https://www.xreal.com/air2
- nicbou 3y agoI edit markdown on the go for quick website updates and even that is painful. I usually finish things up and commit once I get on a computer. The files are synced with Syncthing. It's hard to move the cursor, hard to select text, hard to input special characters, hard to manipulate files, and so on. Instead I use that time to annotate content with my Apple Pencil on my iPad. It feels like correcting paper documents, and keeps me more focused because I can't edit anything.
- trumbitta2 3y agoGitpod is fine for that, if you have a big enough screen on your phone. An external keyboard would also help in any mobile scenario.
- DeepSeaTortoise 3y ago(Fdroid) Termux + helix editor + lsp and compiler of choice + customized termux keys for best dx The experience was surprisingly decent. I'm quite new to coding and this was the most "batteries included and works out of the box" solution I could wrap my head around, didn't try to scam me into paying for a subpar experience and wasn't online.
- quechimba 3y agoMy laptop died from humidity a few years ago and I had to get some work done so I installed Termux, zsh, tmux, vim, postgres, node and Ruby on my phone. Worked really well! I would recommend an external keyboard though.
- sertbdfgbnfgsd 3y agoIf you have an idea on public transit, how about pen and paper to write down the idea?
- paw_lean 3y agoGitpod is your answer! https://www.gitpod.io/blog/software-development-from-my-android-phone-at-datacenter-speeds https://www.gitpod.io/blog/software-development-from-my-andr...