Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Have you ever tried coding from your phone or just simply going through it when you are commuting or waiting at the doctor? I hate to carry the entire laptop for it.

share|improve this question

closed as primarily opinion-based by MichaelT, gnat, GlenH7, Dan Pichelman, Kilian Foth Sep 25 '13 at 12:10

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

BTW, do you have any compiler on your phone? –  Abimaran Kugathasan Feb 7 '11 at 8:52
Have you ever tried coding from your boat? :) –  Trufa Feb 7 '11 at 12:42
Seriously, think about the question. Do you think it makes sense? Who on earth programs for a living and thinks coding from a phone is a realistic, workable option? Seriously. –  luis.espinal Feb 7 '11 at 12:49
Bluetooth keyboard makes doing command line tasks less painful. @luis.espinal: It makes sense when you are on a road trip and something needs modified immediately to resolve a bug. I do not foresee regular long coding sessions using your mobile but I have encountered various situations where having ability to pull up a terminal and do a small task made my life much easier than driving into the office or to the closest wifi area to pull out a larger device. –  Chris Feb 7 '11 at 12:57
... and she thinks I am obsessed with programming.. !!! –  Danish Feb 7 '11 at 14:35
show 4 more comments

12 Answers

And how do you imagine the process? Half of the tiny screen would be eaten by the keyboard. The other half by the toolbars. With luck 1-2 lines of code will squeeze in. To say nothing about the absence of the development tools.

If you insist on doing something useful, download a book or a few blog articles you never have the time for and read them on your way. However phone screens aren't designed for reading (low or extreme contrast, tiny dot pitch). I suggest you grab an electronic book with a E-Ink screen and use that to spare your eyes.

Anyway, my personal opinion is that while you're commuting the best idea is to... relax. Watch the nature, look at the girls, read a book, listen to music. Come to work fresh and unstressed. I personally learned to enjoy these brief periods when you don't have to do anything, just deactivate yourself while your body is being transported.

share|improve this answer
+1 for "look at girls" :D –  Mahmoud Hossam Feb 7 '11 at 8:43
But please think about the female (and non-lesbian) developers as well ;-) –  Péter Török Feb 7 '11 at 10:00
+1 - why on earth you'd want to do this is beyond me. –  Ozz Feb 7 '11 at 11:19
@Péter And the male (non-straight) developers. –  billynomates Feb 7 '11 at 11:36
Coding no, but what about debugging existing code? –  Les Feb 7 '11 at 12:05
show 3 more comments

I have. It is not an experience I'd care to repeat.

  • You can't test your code.
  • There isn't even syntax highlighting, let alone any other basic code editor features.
  • Typing is incredibly slow. T9 or autocorrect will slow you down even more.

If you want to code on the go, use a pen and paper.

share|improve this answer
+1 for pen & paper –  thorsten müller Feb 7 '11 at 9:04
Hey maybe someone could write an app to take a picture of the paper and compile the code :) –  Doug T. Feb 7 '11 at 13:44
+1 good idea..take a pic and compile... –  Shekhar_Pro Feb 7 '11 at 14:34
@Doug stackoverflow.com/q/5508110/365102 –  muntoo May 20 '11 at 4:17
add comment

I've used SSH and IRC clients on my phone before, and that process was painful enough for me to think it a waste of time. Without a full keyboard, which I can type at normally (not try and hit the exact point to get the right line)... it just doesn't work for me. I don't see how anyone could be productive in this situation. Better to use your internet-enabled phone to browse the web and read about programming, or spend the time considering the problem you're facing.

Most of programming is just thinking, with a little typing here and there. You don't want to be distracted from the thinking by the effort involved in typing on your smartphone.

share|improve this answer
+1 for mentioning thinking. –  Péter Török Feb 7 '11 at 10:03
add comment

I agree completely with Developer Art's answer, look at girls instead of coding when commuting.

If you however insist on using your phone for development related stuff, use it to read programming books instead of coding.

share|improve this answer
I think programming one of those apps that obviously isn't fake, that "X-rays" clothes off would accomplish both coding and looking at girls at the same time. –  Jonathan. Feb 7 '11 at 19:58
add comment

With the Nokia N900, it is possible to chroot into Debian and use gcc from there. You also have a terminal emulator, python interpreter, a port of Java (including developer kit) etc. There is an editor with syntax highlighting (PyGTKEditor, Vim). The whole OS is actually a Debian based GNU/Linux distro, with support for things like GTK and Qt. It also has SSH support.

It even has a QWERTY keyboard. Now, the screen is small but I have done some smaller things with mine.

share|improve this answer
I've tried NetBeans on my N900 (benjiweber.co.uk/blog/2010/08/23/netbeans-on-n900), which was good but it's much easier and quicker to use nano in a terminal. The N900 also has ports of PHP, Python and Ruby as well as a bash shell, so it's great for writing small scripts. I've also used jsfiddle.net for wed development on it. –  dave1010 Feb 8 '11 at 9:51
add comment

If you were desperate, I'd probably get some sort of shell/terminal app for my phone and do all my work on an external server. I agree with TZHX that it can be pretty painful (though I have a Android G1 with a keyboard so it's not too bad) but the most I was able to do were Perl scripts for Project Euler tasks.

For apps, the one I used on Android was 'ConnectBot' by Kenny Root and Jeffery Sharkey (http://code.google.com/p/connectbot)

Other than that mate, it's gonna be difficult.

share|improve this answer
add comment

I do it occasionally with the Motorola Droid. Having a hardware keyboard makes it almost tolerable, depending on what you need to code. I do short snippets locally on the phone using gEditor (and sync them to my desktop using Dropbox), and for more complex stuff I SSH to my Linux box and use VIM. The latter option is nice if you are in an area with good connectivity, as you get syntax highlight and all the other niceties of a real editor.

The Android Scripting Environment also makes it possible to test short scripts written in one of the supported languages (Python in my case).

share|improve this answer
add comment

I had a situation where I was editing an Apache config file, on VIM, on my iPod Touch. Having been through that I would not recommend coding on any device without a full keyboard. The tiny screen I can deal with, but the (comparatively) clumsy input I cannot.

Now I would love to have a Python or Haskell interpreter included on a phone. Simply to tinker and play around with though – no serious coding.

share|improve this answer
Check out the N900, though it is a little expensive as a portable Python/Haskell interpreter –  Anto Feb 7 '11 at 15:23
add comment

Believe it or not there is a way to do so. There is a whole project out there to let common scripting languages work on phones. Take a look at http://code.google.com/p/android-scripting/

I haven't actually written code on a phone but I downloaded and ran some of the samples just because. It was cool to show off to my coworkers esp a python script that reads out any text you type.

However I do think in future phones will become "dockable" with a keyboard and bigger screen and when not mobile they will replace the big desktop CPUs.

share|improve this answer
add comment

I did this for a while back in 2003-2004 on a Palm device. I was writing applications for the Palm itself, in C. Crank down the font size (6pt or so), get a good editor (syntax highlighting, etc), and it's an excellent experience. Yes, text entry is a little slower than with a full-size keyboard, but if typing speed is the bottleneck in your development, you need to slow down and think some more ;)

share|improve this answer
add comment

First and foremost I wouldn't recommend putting your valuable personal time on work related issues, so if you're talking about programming work-related stuff on your phone my recommendation is simply: Don't! If you want to put your free time into developing your side-projects (and thus your programming) I'd recommend honing your skills in other ways then programming on the phone.

Seeing how little time of programming is actually spent writing code (at least for me). I'd say you would be better of training your brain or just relax so you're rested when you arrive at work.

Good ways to spend time, have fun and evolve as a person and/or programmer while commuting:

  • Spend time thinking about just about anything
  • Read a book, it doesn't have to be programming related. Reading is a great way to keep your brain working.
  • Solve sudoku puzzles or play chess.
  • Listen to music. I like to listen to Mahler while programming but if Mötley Crüe is your poison getting psyched pre work is probably not a bad idea.

Of course these are just some suggestions and others have previously suggested similar things, but for me it all boils down to keep my free time and my work separated. I spend 8 hours a day (yes I'm lucky not to work overtime) at work, why would I like to bring it home?

share|improve this answer
add comment

Used to do this all the time, back in the PalmPilot days! (Starting to show my age...)

Key was to use a terse language, in this case Forth, as I used to work with the guy that created that implementation.

Forth as a stack-based language for those who don't know it, is similar to the old RPN of HP calculators. It is quite expressive, and well suited to writing compact applications in few lines of code.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.