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.

This is a little vague. But I've tried to put the things to the point.

As much as the handhelds (smartphones, tablets) are becoming extremely popular every passing day, What I wonder is, why there are no great programming tools for them?

With great processing power of these devices, I don't think there's any problem in running compilers or even small scale IDEs on them. It is perfectly acceptable that conventional programming languages are very difficult to write with an onscreen small keyboard. I'd never want to write java on my Android.

But are there any special tools or languages that are being developed in this direction?

For exaple, I had an android application for BrainF**k that worked fine with limited number of symbols (though the language itself is boring enough for not using it).

What in general is the scope of this area and direction of the research if any?

Thank You.

EDIT

Note that I mean programming ON mobile devices. Not FOR mobile devices.

share|improve this question

6 Answers 6

up vote 4 down vote accepted

In the past, sometimes programming has been done directly on portable devices. For example, on the Psion organisers, OPL programming was often done on the device. Psions really successful period ended when they decided they didn't want customers some time in the late 90's, so we're not talking about a powerful device by todays standards.

OPL was an interpreted language - probably in the structured Basic family.

However, if you were more serious, the C++ SDK for the Psion was run on a PC, with the compiled binary then transfered to the device.

There were some third party (hobbyist?) compilers that ran directly on a Psion, and I'm pretty sure I had a Python interpreter running on my 5 series at one point.

In general, though, it's not a very practical thing to do. The screen doesn't show much code, and the keyboard (if any) isn't really up to the job. A netbook seems about the minimal platform for the moment that would allow for the development of significant projects.

A lot of programmers insist that a single monitor isn't enough - even a large monitor. I'm mostly happy enough with a single 1080p monitor, but going back to a screen with an original VGA 640x480 resolution or less isn't a tempting prospect.

I'm not aware of any research towards making programming on a mobile platform more practical. There are IIRC projector keyboards and projector screens, but both are a bit impractical and not intended for programming. A specially designed language might make some sense, but you can still only fit so much readable information on a small screen, and if BF is your model for a better fit to mobile programming - well, that language was never meant to be practical for any purpose.

One factor to take into account - the vast majority of new languages never achieve any success.

A Lisp dialect probably needs fewer punctuation symbols than most languages - the Lots of Infuriatingly Stupid Parentheses being the most obvious, and the back-quotes probably being the most awkward on a phone. It may minimise (but not eliminate) keyboard issues, and perhaps other issues can be tolerated - but I have my doubts.

If you want to give it a go yourself, though, it has never been easier to design a language and write a compiler for it. There's all the usual tools for scanners and parsers, of course - e.g. flex, ragel, bison, byacc. There's tools for working with ASTs (treecc - though admittedly I ended up writing my own) and there's back-end code generating systems like LLVM or Parrot. Or, of course, the popular approach of using an existing virtual machine platform like the JVM or .NET.

LLVM even supports multiple target platforms - I don't know if that includes any phones, but I believe there's a way to target either .NET or the JVM using LLVM.

share|improve this answer
    
Really nice expl. What's your view on the graphical programming languages in which you do something of the sort of drag-drop or joining a few pipes in few directions to indicate the dataflow and the code gets generated behind the scene. Will that be more useful approach? –  mihsathe May 19 '11 at 5:44
    
Of course that'll be only for fun-programming .. We can't expect enterprize applications by joining pipes .. lol –  mihsathe May 19 '11 at 5:46
1  
Personally, I like the idea of graphical programming, but I've never seen it done well. The tendency is that graphical languages are called design languages - e.g. UML. Whether they really are design, rather than graphical coding, languages is probably a use vs. abuse thing. I suspect that graphical programming would work better for a few specialised things rather than for general programming, though - e.g. dataflow diagrams to glue concurrent processes together, state machines, etc. –  Steve314 May 19 '11 at 6:14
    
I keep hoping for something that will supersede plain text in various fields and not finding it. Nothing's replaced novels (although there are other forms of storytelling). Nothing's replaced text as a rapid way of conveying information, although some things have supplemented it. I haven't seen a better way of organizing programs than as pieces of text. –  David Thornley May 19 '11 at 17:29
    
So is a laptop still the only mobile device which is good enough for programming? I was looking for something that's good enough. Hope there's a good device at least now in 2014 –  Nav Jun 8 at 6:07

I have Motorola Milestone (aka Droid) and spend a couple of hours in subway trains/buses daily so I wanted to use this time for writing simple scripts (Python or Perl) just to have practice and I tried several applications for that purpose.

  • Sl4a lets you write and run scripts on your Android device and provides interfaces to hardware and software, so a simple apps can be hacked together and run on the phone and have native look and feel. Its editor is a real torture to use, but it has a nice API browser

  • IDEdroid is a different thing - it's an Android client for ideone.com, so the code is compiled on a remote host and the output comes back to you wrapped in Android's messagebox. Not the most useable application I've seen, definitely, but you can write in like 40 languages, and it now features syntax highlight.

  • Touchqode is an attempt to make a good text editor for programming on handheld devices, my favourite feature is additional buttons, e.g. I have a hardware qwerty keyboard and some extra on-screen buttons for braces, sigils and such.

  • Vim (in fact, the whole Linux environment) over ssh turned out to be the most comfortable for me - advanced browsing keybindings help a lot when you have a small screen.

So far programming on smartphones is not the best user experience, but I stressed the points I liked the most about each of tools, and all of them combined in one app might make it easier.

share|improve this answer

In my opinion programming on mobile devices doesn't happen because it's not what mobile devices are for.

Tablets and mobile phones are primarily content consumption devices. Input to them is generally limited to a quick reply to an e-mail, a few small edits, or entering some parameters to specify the content you want to consume (a web address, for instance). Their input devices correspond to this consumption model - soft keyboards, for instance, allowing them to be hidden when not in use, giving a much larger screen for the same physical dimensions. An exception which proves the rule is the BlackBerry. Unlike many smartphone makers, RIM have retained a physical QWERTY keyboard on several of their models, largely because the BlackBerry killer app is enterprise-grade e-mail (rather than watching cat videos, or showing off your holiday snaps), and it needs an input device to match.

So, given these restrictions on input devices, content production on any sort of scale (including writing non-trivial programs) will always be better on a desktop (or at least a labtop), where you can have a larger screen, proper (i.e. physical) keyboard, and, perhaps most importantly for avoiding fatigue, the device holds itself up.

This isn't because mobile devices couldn't self-host their development tools - tablets are starting to arrive at where labtops were a few years ago in terms of raw performance. Most are perfectly capable of running a compiler and a simple IDE, but you wouldn't enjoy using them. Instead, vendors are focusing on allowing programmers to program in the more comfortable environment of a normal computer, then quickly and easily transfer the code onto a device (or at least a simulator therof) for testing.

In short, tablets, smartphones and so on are just not suited to content production. For now, at least, a conventional computer is far better for inputting large amounts of text due mainly to its physical form factor, rather than any technical issues.

share|improve this answer
    
Some of the things Apple pushes for the iPad are content generation tools, like GarageBand. I've seen reviews where the reviewer winds up typing the review on an on-screen keyboard because it seems more convenient than getting off the couch. I'm not at all convinced that content production vs. consumption is the key to phone and tablet applications. –  David Thornley May 19 '11 at 14:29
    
GarageBand is another exception that proves the rule - the iPad's screen allows you to do clever things like virtual musical instruments. Hard-core text entry remains (for now - I'm not going to claim it'll always be so) better on a conventional computer. Okay, some people finished a review on their iPads, but the real test is if they go on to write all of their reviews on an iPad, or did they just do it because they could? –  Scott May 19 '11 at 14:46
    
I hope you guys understand that I am talking about a new language design friendly for this scenario .. –  mihsathe May 20 '11 at 7:40

While these aren't examples of programming for the device while on the device, since I've used them to modify Objective-C code on a remote server that was subsequently compiled into a running app, they somewhat fit your question and are likely the only examples you'll get here for non-jailbroken iOS mobile coding.


Textastic is a very good code editor app that runs on the iPad. It solves most of the problems with coding in other text editors on iOS devices:

  • Syntax highlight for a ton of languages

  • Additional keyboard keys: tab (){}[]<>=/\'"

  • General coding-style text formatting you'd expect (auto indentation, configurable tab width, etc.)

  • Perhaps most importantly, FTP, SFTP, WebDAV, iDisk, and Dropbox support (along with iTunes sync), and it can function as a WebDAV server for other devices. Making a quick change to a remote file is actually reasonably easy.


The other decent iPad app for code editing is Nebulous Notes. What it doesn't have makes it less ideal: Dropbox and iTunes sync only, and no syntax highlighting. What it adds, though, is pretty great:

  • A fully customizable additional row of keys including the characters you'd expect plus, most importantly, text navigation keys and configurable macros (e.g. wrap square brackets around the selected text).

Both apps support Markdown and MultiMarkdown previews so you can write up complex SO/SA answers and see how they'll look rather than trying to type them in Safari. ;)

share|improve this answer

For me at least the tiny screen and lack of a proper input device (read: full screen ergonomic keyboard and pen tablet) means it's not a good idea to use a phone or tablet to program on.

share|improve this answer

It depends on what kind of phone you are looking at. I have a Nokia N900, and I couldn't praise it enough as a programmer's phone (it has its flaws, though). Some highlights include:

  • Debian based Linux distribution, with some compatibility with Debian
  • GTK and Qt support
  • Python interpreter
  • Terminal window (out of the box)
  • SSH (client and server)
  • Vim, Emacs and Nano
  • Physical QWERTY keyboard

It also has all the small things such as a good browser, good PDF reader (evince from repositories, the default is sort of "meh..."), HP42S RPN calculator emulator (Free42), TI86 Graphing Calculator Emulator etc.

I have developed small stuff on it (in Python and C) and it is a lovely little brick (weighting in at roughly 200 grams). There are still he drawbacks, such as:

  • Small screen, bad overview of the code etc.
  • The keyboard is still small
  • Larger IDEs are still heavy, but if you only want to use Vim, you won't have trouble. I got Netbeans to run on my N900, but is was slow
  • Some punctuation and special symbols are still hard to reach (e.g. curly brackets, you do fine in Python, but C can be quite the pain at times)
share|improve this answer
    
I seem to remember something about a minor variant of C that used Python-like indentation rather than braces, and could translate back to normal C. I though it was insane at the time, but perhaps it might make some sense for that limited keyboard issue? –  Steve314 May 19 '11 at 6:42
    
Wow! I'm surprised (and happy) to hear about the Nokia N900. Are there any better devices now that can be used for programming? –  Nav Jun 8 at 6:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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