Two years into a management consulting career at a not-so-busy project 5000 miles away from home, I had a lot of free evenings, which I really didn’t know what to do with. So I decided to learn how to code proper software applications. (Later, this choice turned into a master’s degree and then to the pursuit of a doctorate, but that’s beside the point)
I imagine there are a lot of people out there who want to learn how to code apps, have no computer science background, and don’t know where to start. So here’s a short guide of how to get at it.
1. Decide on a platform. If you want to jump on the recent bandwagon of web or mobile apps; you get to choose only one of those. If you have no CS background – my advice to you is to go for web. Mobile applications, are generally lower-level coding efforts with much time spent in the nitty-gritty, whereas web applications have had more time to evolve and we have many good frameworks with web applications that are sufficiently abstract, and easier to learn.
2. Learn a programming language -that is, for the platform you chose. If developing for Android, it’s almost always Java, in iOS – it’s Objective-C (and recently Swift). For web, PHP is a classical option, but I recommend higher-level programming languages with cleaner syntax such as Groovy, Ruby, and my personal favorite: Python. These languages are easier to grasp and more intuitive, which is why there is a vibrant community of developers building web frameworks on them. In my opinion, coding is best learned watching videos: video lessons, tutorials, screencasts, etc; and there are a lot of websites out there that you can get programming videos for free or for a minimal price.
3. Start with a framework: a set of conventions for building apps. In software, you want to “reuse” as much as possible, and develop only the functionality unique to your application. This is why you’ll hear programmers talk about APIs, libraries, etc. A framework is basically a set of conventions along with a load of libraries that allows you to code as little as possible.
If developing for mobile, you choose the platform’s native framework -Cocoa for iOS, Android App Framework for Android. (There are some other frameworks as well, not recommended: go for native). These two also have their development environments (IDEs, basically programs in which you write the code) that make life a whole lot easier.
For web, you want to start with high-level frameworks. We talked about Groovy, Ruby and Python -so the corresponding frameworks (most popular) would be Grails, Ruby on Rails, and Django in respective order.
4. Find a good tutorial. The classical Ruby on Rails tutorial by Michael Hartl takes you step-by-step through building Twitter (which, incidentally, was also initially built on RoR). In learning almost anything, you want to get to some meaningful result as fast as possible to stay motivated: and walkthrough tutorials are the best way to achieve that. Again, you will probably want a video tutorial, possibly those are usually 30-40 hours of footage and a lot of code-along work.
5. Read code. It helps a lot. There are a lot of projects on GitHub that other people will put out there for reference. Find good codebases where people try to solve problems similar to yours and work through them, try to run them on your own, alter them and see what happens.
6. Learn about developer best practice. Coding is not only about the code, it’s about a process, one which humanity has not really mastered yet. The process includes managing effort, managing the codebase, deployments, etc. Learning about keywords like continuous integration, agile development, distributed version control will equip you with a novel way of thinking required for managing high-volatility projects where a lot of “art” goes into the mix (software projects included).