I have been asked several times by many people: “I’ve never done programming before, can I start by writing Android apps?” In this article, I will answer this question and provide pointers to the best places to start.
First of all, it is important to remember that there are several ways to develop applications for the Android platform, from using a non-programmer tool like Google App Inventor, to using a scripting language like Python, to using web technologies like HTML5, to using the Android SDK and/or NDK to create fully fledged apps or games. Each have their drawbacks and advantages (which I will discuss in an upcoming article).
At this point, let me answer some big questions in one fell swoop: Yes, Android development is a good way to learn programming, and no, it’s not advisable to start your programming career by jumping straight into the Android SDK (the learning curve is steep). Your best starting point is to do a basic course (be it offline, online, a book, or just some self-learning) in Java development, object oriented principles (including newer Java SDK features like anonymous inner classes and Generics), and familiarising yourself with the core Java library (for example java.net, java.sql, java.io, java.util, etc). Do not worry about Java applets, AWT, Swing, or other UI technologies as they do not apply to Android (but are nevertheless good to know). Although not stricly necessary, you should familiarise yourself with basic algorithms and patterns like linked-lists, associative caches, and the Gang-of-four patterns. These are all important tools in the programmer’s toolbox that will make your programming career a far more productive one. Do not let these intellectually challenging names put you off though, they are complicated terms for simple ideas that you can learn as you go – you don’t need to know them all by heart before you start! It will help you to familiarise yourself with them so that you know of their existence and you can look them up when you need to use them.
During the learning phase above, I would highly recommend downloading the Eclipse IDE (integrated development environment). This will prepare you well for Android development using Eclipse. Eclipse is an open source general-purpose development tool that you can customise using plugins. Learn how to install plugins. In particular, sign up for a source code hosting platform like ProjectLocker, GitHub, or Google Code, and check your source code in there using an appropriate plugin (such as subclipse for Subversion).
I personally use ProjectLocker with subclipse, and check my code in after every successfully compiled changed (typically every 15 mins). This way, even if I loose my netbook, I will not loose a significant amount of code. You read that right – I do all my development on a netbook (and it is not too slow), so if you don’t have a PC or laptop to develop on, buy any netbook with 1Gb or RAM or more. Add an external monitor, keyboard and mouse for more comfortable coding.
In summary, if you are new to programming and would like to explore Android, your first task is to ask why you want to get into Android development in particular. Based on your answer, you may choose one of several development methods. If you choose to learn the Android SDK, you will first need to learn Java and it’s development environment (including Eclipse and source control like Subversion). Once you have successfully completed all of that (which should not take more than a week or two to get into, but will take years to master), then you will be ready to begin exploring the Android platform. This will be covered in another article.