PyBox / Blog / Guides

How to Code on Your Phone: A Beginner Setup

You do not need a laptop to start programming. A phone, a coding app and a few habits are enough to write real programs.

How to Code on Your Phone: A Beginner Setup: the PyBox screen this guide uses
PyBox is the Python IDE I build. The steps below use it, and the ideas carry over to any Android coding app. Get it on Google Play.

Pick a language and an app

Start with one language. Python is the usual first choice because the syntax is short and the same code runs on phones, laptops and servers. Choose an app that runs the code on the phone, so you can practise anywhere.

Set up the screen

  • Extra keys row. Brackets, quotes, colon and Tab are one tap away in a coding app.
  • Landscape mode. More columns for long lines.
  • Font size. Increase it until you stop squinting.
  • Theme. PyBox has light and dark app themes and twelve editor themes.

Write a first program

numbers = [3, 8, 1, 9]
print("Largest:", max(numbers))
print("Sorted:", sorted(numbers))

Habits that make a small screen work

  1. Write small functions so they fit on screen.
  2. Use the editor's diagnostics to catch typos instead of scrolling for them.
  3. Run often. Short feedback loops beat long files.
  4. Keep projects in folders and use Git to save progress.
  5. Pair a Bluetooth keyboard when a session passes thirty minutes.

What you can build

Scripts, small web scrapers, data analysis with pandas in a notebook, games with pygame, and desktop style apps with Tkinter. See Python projects you can build on a phone and the 30 day plan.

Questions

Can you really code on a phone?

Yes. Python, notebooks, Git and small GUI apps all run on a modern Android phone with the right app.

What is the best coding app for a phone?

Pick one that runs code on the device, has a code editor with extra keys, and works offline. PyBox does this for Python.

Do I need a keyboard?

No. A coding app adds a row of symbol keys. A Bluetooth keyboard helps for long sessions.

Anshuman MishraBuilds PyBox at Vytros, a Python IDE for Android. About the developer.

Code Python on your phone.