
Ask HN: Can programming be learnt completely on smartphone? - TheRealmccoy
I have enrolled for two EdX courses which involves programming in R and Python.<p>I am little conversant with Linux environment and have installed GNUDebianRoot app from play store.<p>Is it possible to complete the  courses on only mobile? I am being able to do almost everything right now, which a desktop can perform.<p>The phone has 2GB RAM and screen size is 5&quot;.
======
cheeze
You can learn how to program from books. Phone should be no problem either.

But it is going to be much, much harder to learn how to program anything with
any decent level of complexity. Writing everything in a single file? Sure.
Writing a java app which has 20 classes? Sounds like hell.

And while linux terminal isn't really programming, sending key combos like ^d
sounds terrible on a phone keyboard.

Something else that PCs are much better at is context switching. Being able to
alt+tab to documentation, or having that documentation on another monitor
would be way better than having to switch back and forth. Although that can be
remedied somewhat by using a book as a reference.

Something as simple as typing a constant in Java becomes much more difficult
on a phone

private static final SOME_RANDOM_VARIABLE =
RandomVariableFactory.getRandomVariable();

is not easy to write on most phone keyboards.

I think the biggest area that you'll struggle is that there isn't really any
good IDE, or even editor out there.

I watch videos all the time on my phone which help me with programming. Those
are easy. It's the actual doing and writing the code that will be a PITA on a
phone.

May I ask why you're trying to program on a smartphone rather than picking up
something like a cheap netbook?

Cheers!

~~~
mrfregg
>sending key combos like ^d sounds terrible on a phone keyboard.

Terminal apps like termux supplement the phone keyboard with a pane atop it
with tab,ctrl,pipe buttons. Should be usable.

>there isn't really any good IDE, or even editor out there.

Vim and others are available as packages in gnuroot, etc. A shell and editor
split with tmux should work.

Still very uncomfortable programming on a phone ofcourse.

~~~
TheRealmccoy
This is about learning how to program solely on an android phone.

the assignment i believe would not require typing very long and complex
programs and may be if they do, i would try to do it in batches.

Once a person has learnt programming on a smartphone, she could graduate to
work on an actual laptop or desktop.

But this is an experiment or a research project kind of thing, and it is too
early to count the chickens.

------
rl3
I've written small snippets of code from my phone before, but it's usually
either testing specific language syntax, or making minor tweaks to existing
code in situations where I'm either learning a new language, or dealing with
weird edge cases.

For full-blown development, it's not really suitable. Your phone is best used
for reading technical material and watching video content.

Even if you can program on mobile, it's going to be painful. Perhaps less so
with an external keyboard and SSH into a cheapo VPS instance, but you're still
going to take a substantial productivity hit.

May I ask why you're going this route?

~~~
TheRealmccoy
this is an experiment to see how conducive mobile is for learning.also hundred
if millions of people around the world have a Smartphone as their only
computer. is it possible for them to learn programming and make themselves
better due to it?

~~~
rl3
That's a relief. I was really hoping the reason wasn't cost due to some
unfortunate circumstance. :)

For what it's worth, there's quite a few apps that teach programming or serve
as reference. Some of them can run live code inline.

~~~
TheRealmccoy
I am currently into voluntary poverty but that does not mean I could get a
cheap laptop. I am currently far from my home, where I have a Ubuntu desktop
as well as laptop.

~~~
TheRealmccoy
_Not_ get a cheap laptop.

------
marcell
Can you play tennis with chopsticks? Sure but it will be terrible.

Your phone is a terrible way to program...you will type 20x slower and see 10x
less than a real screen. And you won't be able to quickly switch tabs, search
Google, etc.

Just get a cheap laptop.

~~~
justboxing
> And you won't be able to quickly switch tabs, search Google, etc

Also won't be able to debug responsive web apps, setup break points in chrome
or firefox debugger etc etc. Will be quite a nightmare doing this on a smart
phone, even if you have a bluetooth keyboard to speed up the typing...

------
slang800
You can probably read all the content of the courses on your phone and even
run a basic Python/R interpreter on it, but no. Phone keyboards suck for
programming and there are a ton of programs you can't run on a phone (like
RStudio or Python IDEs).

Just get a cheap desktop and keyboard on Craigslist. I've found ones for as
little as 20USD. Or you might be able to use a Raspberry Pi, if you're into
that.

~~~
TheRealmccoy
yes IDEs are not possible. I found one for Python called QPython but not sure
how it is. After using some of the desktop IDEs, not sure whether to call it
by same name.

~~~
ethereal_int
Since you're using python and R I'm gonna throw Jupyter (used to be called
ipython) into the mix (I'm using it half the time on desktop anyway because
notebooks format everything so beautifully). You might also want to install
Hacker's Keyboard from the play store so you have access to shift/enter/ctrl,
and while I havent personally used it on a phone it should work fine. Here is
a random tutorial link [http://bretahajek.com/2016/12/jupyter-notebook-opencv-
androi...](http://bretahajek.com/2016/12/jupyter-notebook-opencv-android-
machine-learning/)

And using termux+vim is definitely an IDE, but has a pretty damn steep
learning curve.

------
kzahel
Use termux (termux.com) and then you can apt install many useful things
([https://github.com/termux/termux-
packages/tree/master/packag...](https://github.com/termux/termux-
packages/tree/master/packages))

You'll definitely want a keyboard

~~~
TheRealmccoy
Thanks ! not using keyboard is intentional and deliberate.

~~~
mrfregg
Be sure to use tmux. The tmux package in termux allows you to resize panes and
switch windows by tapping instead of using the usual key combinations.

------
contingencies
Yes, absolutely. A lot of us learned on far less powerful machines. Don't
listen to the detractors. The hardware limitations will help to create focus
and understanding... but do buy a bluetooth keyboard. If you can't afford one,
email me and I'll post you one.

 _You 're not going to find the best algorithm in terms of computational
complexity by coding._ \- Leslie Lamport

 _Clarke 's Second Law: The only way of discovering the limits of the possible
is to venture a little way past them into the impossible._ \- Arthur C. Clarke

... quotes from
[http://github.com/globalcitizen/taoup](http://github.com/globalcitizen/taoup)

~~~
TheRealmccoy
wow ! thanks so very much! I hope that I won't disappoint, either of us.

and yes, thanks for the offer to, but it would cost you a lot to ship it all
the way where I live.

but also, this is an experiment in pedagogy and Mobile learning. If tomorrow,
I am staying at a place where bombs are exploding everywhere, it would be so
much trouble to run with Bluetooth keyboard and the mobile both, rather than
only mobile :-)

------
Mathnerd314
Probably, yes; the first programmers did not even have keyboards or screens,
but rather swapped out the relays manually and checked their voltmeters. But
what is the point? You will not be able to complete the exercises as quickly
and it will be a pain to download and configure all the software.

You can get a cheap Chromebook for $200, stick Ubuntu on it
([https://www.lifewire.com/install-linux-on-
chromebook-4125253](https://www.lifewire.com/install-linux-on-
chromebook-4125253)), and finish both those EdX courses, probably before you
can even get R and Python running on your phone. Plus you will be more
motivated to finish the courses, having spent $200 and therefore proven your
commitment.

If even $200 is too much, I guess you have to ask what you're doing with your
life... maybe getting a stable job should take priority.

~~~
JohnnyConatus
Umm...$200 is a lot of money in many parts of the world. You never know who
you might be responding to.

~~~
michaelmrose
I have a 10 year old laptop I found at a thrift store for $15 which is both
faster than his phone and infinitely more suitable for programming.

------
Jonathanks
TheRealmccoy's goal is commendable. Many economies do not have favorably
balanced trade with the big nations, so an effective way to learn on mobile
will help many persons. But in a crisis where bombs and bullets are flying
around, will studying be really important to survival? Will edX be of any help
to someone who likely does not have internet access (I'd rather spend on
essential goods than pay an ISP that doesn't care about me)? His solution, if
he finds one, will be of benefit to the captive economies of the third world,
except the crisis-torn economies.

~~~
TheRealmccoy
specially in crisis torn places, one finds only gloom and sadness; the future
looks dark and bleak, if a pedagogical approach is found where kids and
youngsters can learn on mobile itself, something like Programming, which could
help them in a better future, that could help many. Unfortunates those who are
forced to migrate, may be can learn enough to start a new beginning.

~~~
Jonathanks
I sincerely hope you find something that works. It is a good pursuit. Will it
be limited to learning programming only? There are many other skills that will
be needed after such crises. One such skill is creative writing to bring the
arts back to life (other arts are needed too). Another is story telling,
because the story of the events will need to be told, preferably by those who
were in the midst of it, not those who wish to write the victims' history
(like the colonialists did to Africa).

~~~
TheRealmccoy
This is one of the first in the series. Post October, I am going to work as a
waiter at one of the beach shacks here and based on my experience, I intend to
write a novel and also publish my research on "How to get maximum tips,
working as a waiter".

Both creative writing and story telling are very close to me, off late I have
written 17 short stories, they can be read on
[https://medium.com/@realmccoy](https://medium.com/@realmccoy)

the stories are numbered.

------
jankotek
Absolutely, 8" phone with bluetooth keyboard is decent machine. It runs full
linux shell and python...

------
fellellor
Mobile environment, IMO, is hyper focused towards the software content
consumer rather than software content creators. While what you say is
certainly possible to an extent, a person attempting this will be much more
hobbled than someone with a cheap laptop, access to constant electricity and
an internet connection. This situation can be remedied if the dev environment
owning companies in question - Google, Apple and Microsoft - make a
substantial attempt to make the mobile environment conducive for software
development.

But I honestly don't know why they would do this because the incentives aren't
extremely strong here. The vast majority of developer population across the
world already has access to the tools mentioned earlier. If you are talking
about the populations of the developing world who don't have access, then the
companies in question would rightly ask what is the incentive for the effort
required to target these populations when it's unclear how many of them would
want to participate in this sort of activity.

That said I'd love to see mobile devices with environments as configurable as
desktop linux, while giving you full control over the hardware, including even
the radio reciever (if not the transmitter).

~~~
TheRealmccoy
indeed,this experiment is to find out that, whether a mobile could be used for
creating value also like programming skills resulting into direct or indirect
employment.

certainly no incentive for biggies here because time spent creation in mobile
means, time not spent consuming which is ulterior to their motive.

------
theparanoid
I programmed on a TI-89 calculator, so it's possible. But not for passing
classes.

~~~
slang800
TI can't run R or Python, at least the last time I checked... Maybe someone
really clever has ported it.

------
wikibob
For those reading this that are on an Apple device here are some interesting
options for getting started with learning on iOS. At a very very basic level
there’s swift playgrounds.

Also I used Pythonista years ago and it was pretty cool. Looks like they’ve
done a nice job of keeping it up to date.

\- Pythonista 3 $10. Supports Python 2.7 & 3.5, stepthrough debugging, popular
modules, and apparently it can access some iOS things like photos and sensors
now too.

Website: [http://omz-software.com/pythonista/](http://omz-
software.com/pythonista/)

App Store:
[https://itunes.apple.com/us/app/pythonista-3/id1085978097](https://itunes.apple.com/us/app/pythonista-3/id1085978097)

~~~
TheRealmccoy
thanks, I have an android phone. also my intention is to finish he two EdX
courses specifically.

------
tinyrick2
The question should be "how effective is it" not whether you can or not. Sure
you can read a lot of programming resources using your phone and perhaps even
write and run some programs, but it would not be as effective as practicing it
on computer.

~~~
TheRealmccoy
yes to most extent it won't be. this is an experiment in pedagogy also, where
I would like to see, if someone is really driven and resources are under
constraints, can he do it?

Can passion overcome constraints?

------
vivekd
If you are looking to learn python on the smartphone SoloLearn has a great
free app that can give you enough to get started. It also has sample programs
you can run in a simulated python programming environment so you can get your
hands dirty. I highly recommend it.

I just checked out the edx website now (never heard of it till now) but some
of their courses look interesting, might check them out.

I doubt either SoloLearn or edx can make you a python or r master, but if you
want to program in python, going over them + a few other tutorials and writing
some test programs doesn't seem like a bad way to get started.

~~~
TheRealmccoy
I saw Solo Learn but did not check out, I am not sure of the level of
complexity it would present in real.

EdX courses are in truth, God send, hundreds of millions of people around the
world have only mobile as a computer, if they can access EdX courses and
simultaneously, in some way do those programming exercises on mobile itself,
they would be so much better off.

------
dhoe
Absolutely. It's not really convenient, but it's possible. One thing I'd look
at is if you can connect a USB keyboard, as that would make a much nicer
experience.

------
xparadigm
Yes. My younger brother did learn programming in a phone. He started in Nokia
2700 Classic, which is not even a smartphone. Then he took a Samsung which
runs Android. He certainly didn't become an expert using those devices. But he
learnt the basics of Python.

One thing to note probably is, he started very young. And in young ages people
can learn very easily. I don't think I can learn programming in a smartphone
in my current age. But for kids, whole different game.

~~~
NegativeLatency
I learned on a TI-83. Compared to that a phone doesn't seem so bad.

------
Ologn
AIDE for Android allows you to write and run Android apps on your Android
device. It is on Google Play. You can write and run an app for free, although
certain functions need an in-app purchase. It is decent enough, and highly
rated, as it's one of the best ones there. The nice thing is you can write and
run apps on the device itself. Of course, if someone wants to seriously
program Android, they would get a computer, Android Studio and such.

------
tomjuggler
Did you mean GNURootDebian? Don't know about R but I have learned a lot of C
using the Termux app, I know python is supported. With Termux you are limited
to a terminal, but personally I have never been able to see emulated Linux
desktop on a phone correctly... Of course if your course includes gui
programming you need full desktop. I would recommend getting an external
keyboard for programming, or at least the hackers keyboard app.

~~~
TheRealmccoy
Yes it is GNURootDebian.

I would definitely try out Termux, thanks so ever much!

------
gpm
Not practically.

If you hooked up a keyboard, used emacs or vim as an editor, you would likely
be able to program enough to pass a intro to programming course (with
significantly more difficulty than anyone on a computer). In theory you could
do a fair bit of development work on your phone, but in practice it would be
far too much friction to develop any real (i.e. more complex than intro to
programming assignments) software.

~~~
TheRealmccoy
the objective is same, is someone learn enough on a mobile to either get an
entry level job or may be showcase his skill to someone who could get that
person a laptop.

hundreds of millions of people have only a smart-phone as a computer.

------
lytedev
Ehh... Sure. It CAN be learned, but just because you can doesn't mean you
should. Everything about the process will be... Just difficult. Tedious.

Don't do it.

~~~
TheRealmccoy
it's an experiment in pedagogy and then in myself, I want to see how far I can
go and learn both about pedagogy and programming.

pedagogical approach for mobile has to be completely different than the
classroom ones, and that's what I am after.

------
devross
I think it could work, but learning a programing language completely on
smartphone is suck in a way in the past, the now the situation changed, you
know the latest Android version -- Android O, which allow user to split App
cards, and we can also use bluetooth keyboard to code(I did it when I was
learning my first language before owning my first PC a year ago).

------
ofrzeta
Take a look at Touchdevelop
[https://www.touchdevelop.com](https://www.touchdevelop.com) Originating from
Windows Phone it is a playful way to develop apps on WP, Android, iPhone (and
others) with an own programming language and a smart editor.

------
timonoko
I made phone keyboard shortcuts for Emacs:
[https://www.flickr.com/photos/timonoko/14726648438/in/album-...](https://www.flickr.com/photos/timonoko/14726648438/in/album-72157646625417440/)

------
jackyinger
It is probably possible if you are persistent. There are some online dev
environments like js fiddle.

Also, if you can afford a vm in the cloud you could probably get an ssh client
for your phone to log into it.

If you hook a Bluetooth keyboard to the phone you might just be able to really
pull it off.

Edit; good luck :)

------
tpaschalis
Go for it! Adding a USB keyboard would be immensely helpful.

Seeing that you have access to the internet I would second @rl3's suggestion
about trying a (free or cheap) VPS service and SSHing to the machine,
especially for snapshots, networking and better performance.

~~~
TheRealmccoy
yes, that's the next step. thanks so ever much!

------
ellius
I used Termius app + DigitalOcean droplet with some success. It's not fun but
it will get the job done if you know vim or some other command line text
editor well.

~~~
TheRealmccoy
I would try termius but I believe I have the entire Linux setup now on mobile.
I am using Vim.

------
sovlex
Never tried it myself but you could possibly write on the phone and find free
cloud service (like openshift.com) to test and debug.

~~~
TheRealmccoy
thanks so ever much, I would try openshift.com

------
mandeepj
You can buy a low price physical keyboard for your phone to make it easy to
type

------
safek
Have you considered using a Chromebook? It costs $150 and runs Ubuntu.

~~~
TheRealmccoy
this is an experiment in mobile learning and pedagogy. hundreds of millions of
people have only a smart-phone as a computer.

------
devcamcar
No.

------
rileytg
no good editors

~~~
nanomonkey
You can run emacs under termux on Android. I use this as a mobile platform
with a bluetooth keyboard.

~~~
TheRealmccoy
thanks so ever much, I would try Termux, though I would like to stick with VIM
which I have currently installed. I want to be comfortable with it first and
then may be take on Emacs

