With holidays approaching, you will likely have some free time to kill. Even if you’re the gaming type, such moments can be exploited to start a new project or learn something new. In this digital age, that something new can easily be learning how to code. Of course, it’s not something you can completely learn in a weekend, or even a week.
Fortunately, it’s entirely possible today to learn at your own pace, anywhere through your smartphone or tablet. Even better, you can actually code right on your phone or, preferably, tablet. No desktop or laptop required. To help get you started on the road to become a developer rockstar, we present 8 of the best apps on Android or iOS to code right on your Android or iOS device
Why code on mobile devices
This isn’t going to be a discussion on whether it’s really advantageous for people to learn how to code, on the same level that they learn how to read, write, or do math. That’s something for academics to decide. This presumes that you’ve decided to embark on that journey already. This is more about asking why anyone in his or her right mind would want to write code on a mobile device. The simple answer is because you can and because it liberates you.
Mobile devices, especially smartphones, have evolved to the point that they can rival lower end laptops in terms of raw power, yet still retain mobility and energy efficiency. Of course, screen size and input will be huge concerns, especially in the case of smartphones. But with the right accessories, or the right tablet, you will be able to plop down anywhere and hammer out some lines of code without batting an eyelash.
There’s a saying that goes “just because you can doesn’t mean you should”, and that definitely applies here as well. You will inevitably run into the limitations of programming on a mobile device, even on a tablet, so it’s best to actually set your expectations right.
Mobile platforms like Android and iOS aren’t exactly designed with the same free-form file access that desktop operating systems have. Android is more forgiving in this case, not imposing limits on file or online access. iOS, on the other hand, has some policies in place for security reasons that prevent apps from doing one thing or another. Apps that can run programs, for example, can’t download files from the Internet to prevent malicious code from being downloaded and the executed on the device.
You are definitely not going to write complete, complex apps on a smartphone or laptop, though you are definitely welcome to try (and some may have indeed done so). That’s not exactly the point. Coding on a mobile device lets you adopt a rapid and iterative development process where you can quickly test out ideas even when you’re away from your beefy desktop. Besides, you will probably amaze your friends when you can whip out your phone or tablet and rapidly code a game or app in no time flat.
Learning: Khan Academy, Udemy (Android, iOS)
But first, you actually have to learn how to program. These days, there are ton of resources online for learning how to code, covering almost every programming language, tool, or topic imaginable. But while tutorials are great for one-off topics, nothing beats a program that takes you from start to finish in progressive steps. Fortunately, there are quite a few websites that offer programming courses to that end. Unfortunately, there are quite a few of them to choose from.
Khan Academy and Udemy stand out as two of the most popular learning hubs on the Internet. Bonus points that they both have mobile apps that allows you to browse their courses separate from a browser. Both do have courses that go beyond programming so those might be worth looking at as well. Khan Academy promises free learning forever, so it’s definitely a good place to get started. The selection of topics, however, is considerably smaller than Udemy. The latter does have some free offerings, but most of the good ones require a paid subscription.
SPRK Lightning Lab (Android, iOS)
In the past, programming has mostly been seen as the domain of grownups and geeks. These days, even kids are getting trained at an early age. Start them young, they say. Of course, you’ll have to keep the lessons and concepts interesting as well. And nothing sparks interest in kids (and cats) than moving balls.
Sphero’s robotic balls are more than just for games. They’re programmable as well. The Lightning Lab app offers colorful drag and drop action blocks that users can string up together and then watch the balls roll. Or bounce.
While the interface is kid-friendly, it isn’t really just for kids only. Even grownups can have some fun as well, testing their logic skills from a safe distance and letting Spheros do all the dirty work.
Bonus point: Sphero’s BB-8 is actually compatible with Lightning Lab as well. Just don’t make it bounce, as its shell isn’t exactly built for rough play.
Codea (iOS, iPad only)
Ready to graduate to more formal programming while still keeping the fun aspect? Then Codea is probably the app for you. Codea uses a language called Lua which is one of the most deceptively simple programming languages around. It also happens to be a favorite scripting language for games.
As you might imagine, Codea lets you create games right on your iPad. There’s no drag and drop interface like Lightning Lab, though there are some nice UIs for picking out colors or images. Here, you’ll really have to start coding, which is a great way to get your hands dirty in actual programming.
Codea has access to many of iOS’ functionality, like graphics, audio, and even the camera, and while it is immediately great for 2D graphics and games, more advanced users can pull a 3D rabbit out of the Codea hat as well. Sadly, the app is only available on iPads.
Python is one of the few programming languages praised for its power while keeping the language clear and readable. Thus, it has become a favorite in the industry, serving many uses, from tools to more sophisticated applications. When on iOS, there is perhaps no better Python programming environment than Pythonista.
In addition to offering the core Python command line and libraries, Pythonista also offers programming hooks into iOS itself, like the clipboard. In fact, Pythonista is popular among iOS power users who want to automate a lot of tasks on iOS, from editing photos to copying clipboard content to another app.
One of the amazing aspects of Pythonista is that it has a user interface builder right inside the app itself. That means you can create input forms, dialog boxes, and even calculators right inside Pythonista. It is, in other words, a one-stop shop for all your iOS scripting needs.
From iOS, we take a turn towards Android land. While Android doesn’t boast of something like Codea or Pythonista, at least not with the same level of sophistication and polish, there is one thing Android has that iOS will never have: writing Android apps writhing Android. Yep, app-caption! AIDE, or the Android Integrated Development Environment, has been around for a rather long time. It basically allows you to code a real Android app right inside an Android device.
Like Pythonista, it also has a UI builder so you don’t have to write the painful UI code by hand. Although it will be better to publish your code on Google Play Store via the official routes, you can still use AIDE to create APKs for testing and even distributing.
And you aren’t limited to using Java either. AIDE has support for Android NDK (Native Development Kit) for writing code mostly in C++, though with the necessary Java hooks included.
Mobile C (Android, iOS)
And now we get to the more hardcore languages, considered the grandaddies of languages: C and C++. While there are quite a few C/C++ tools on iOS and especially on Android, Mobile C stands out from the rest with one crucial feature: integration with SDL2 and OpenGL, even on mobile devices. These two libraries basically give you access to graphics functionality that will let you draw both 2D and 3D images.
With a bit of work, you can even create games too! Of course, you aren’t going to be able to create a distributable app or game from it, especially on iOS, but if you code it write, you can write your program on Mobile C, test it, and then build the app on a desktop when you get home or to the office.
C4Droid is another C/C++ IDE (Integrated Development Environment) that, as the name hints, is available only on Android. And while it shares most features with Mobile C, it has one that you won’t find in any other Android app.
C4Droid has support for the Qt C++ application framework, one of the most popular cross-platform (works on Windows, Mac, Linux, Android, and iOS) libraries for creating applications and even games. What this means is that you can write full graphical applications on Android using Qt, something not easily possible with Mobile C unless you write your own from scratch. There are some caveats, like Qt versions and missing libraries, but most of the basics, as well as some extras are present. Again, if you code your app right, you can have the same source code working anywhere.
And since this is on Android, C4Droid can actually create APKs that you can distribute. Do note that such APKs aren’t going to be optimized, something to keep in mind for a final app version.
Code management: Working Copy (iOS), SGit (Android)
Once you get the hang of coding, sooner or later you’ll come across the problem of keeping track of all your files and all the changes you’ve made to them, especially when your project starts spanning multiple files. That’s where source code management (SCM) tools like Git comes in. A favorite among developers and the backbone of services like GitHub, Bitbucket, GitLab, and similar, Git allows you play with your code as much as you like, “rewinding” to older versions in case you reach a dead end. It’s like having infinite and branching save games! It should be no surprise that Git on mobile is quite limited compared to their desktop incarnations. But that doesn’t mean you have to miss out on the benefits of source code revision control.
While there are quite a good number of Git clients on mobile platforms, Working Copy on iOS and SGit on Android share one common trait: they’re not limited to a specific Git hosting service. While some only support GitHub or GitLab or a select few services, these two allows users to clone from lesser known services or even self-hosted Git repositories. In other words, you’re free to get code from wherever you want.
Because of iOS restrictions, Working Copy is more limited in functionality. Some of its crucial features, like pushing changes to remote repositories, are also gated behind pay walls. If that’s an issue, Git2Go is a viable alternative with its own set of limitations on the free version.
As the Internet and technology become even more ingrained in our daily lives, the interest in coding and the need for coders will continue to increase as well. It won’t be long before the young learners of today become the app developers of tomorrow. But it isn’t too late to get started, even if you’re not so young.
With all these apps at your disposal, and some chunk of time here and there, you can already start the journey to learning how to make your own apps, so you won’t have to wait forever for someone else to write it for you.