My first taste of programming was in high school and I didn’t think much of it. My second taste was at university when I had spare subjects and decided to take a programming 101 course utilising Python out of curiosity. It was right about the time when the mobile revolution was starting and I had an inkling that maybe this tech stuff might be important. That was a couple of years ago and since then I’ve gradually built up my knowledge through self-learning that I feel confident enough to build apps or learn new technologies to build apps.
Given the quality and breadth of resources freely available via the internet I’m a firm believer that you can learn to program and become a competent technologist/data scientist without spending a cent (whether you should is another question) and you certainly do not need to graduate with a university degree to become one.
Depending on your circumstances you may want to pursue a university degree. Whether you should go to university to learn this material is a question that I don’t intend to explore in this blog post. This is a guide to self-learning programming.
##Timeframe and Costs
I’ve personally spent a couple of hundred dollars on various course material but you don’t have to. I have for different reasons but mainly because I could save time by purchasing helpful material.
It’s taken me a couple of years to get to the point where I know enough to build apps but probably not skilled to be employed professionally as a software engineer. To be frank, I don’t believe the gap is huge and filling it is just a question of time and motivation. Personally, I believe if a person is motivated enough and allocates enough time they could learn enough to be employed professionally within a couple of months if not weeks.
Ultimately, how long it takes to competence depends on what you’re trying to achieve and the motivation and time you can allocate towards this pursuit.
##Basics
Programming is not the same thing as computer science. For a guide on what computer science is see this blog post by Matt Might.
Whether you’re someone looking to build applications, taking the data science route or aspiring technologist, learning a programming language will be the starting point.
A programming language is the language computers understand. If you want to build an application and want the computer to make the application work you need to ‘speak’ to the computer in a language it understands.
Keeping things simple, most of the concepts and principles underlying most programming languages will be the same or analogous and the difference is in the syntax. Hence, for the layman coming to programming the choice of programming language won’t matter much except for pedagogical purposes i.e. pick the language that will help you learn most efficiently. Having gone through this process myself I can help you make that choice. Once you have grasped the key concepts learning the syntax of another language takes minimal effort.
Once you’ve learnt a programming language, you can choose a learning track depending on your motivation:
- Web Development
- Mobile Development
- Data Science
Note that depending on which track you choose you may have to learn an additional languages suitable for that track.
##What track to start with?
If you’re planning a career in data science then go straight to the data science track. If you want to build apps I would start with web development even if you intend to only build mobile applications due to the fact any mobile app with a reasonable set of features will at some point require implementing technologies within the web development stack.
##What programming language to start with?
I personally would start with the Ruby on Rails stack because the learning resources available are excellent. More importantly Ruby on Rails is known for allowing you to build a working deployable app quite quickly. It’s a mature technology stack so support via the community is excellent.
If there were better learning resources available for Python+Django stack I may have gone with that. I would not go with PHP because it has a reputation for not being modern. Ruby and Python are contemporary.
I would avoid going through the Node.js stack initially as there are not a lot of great learning resources for it and because it is more cutting edge it is not as mature and well supported by the community compared to Ruby and Python.
##Pedagogy
I’m a better reader than listener. Anytime I have to listen/watch a lecture I lose focus very quickly. Luckily the best learning resources available these days reflect this so maybe I’m not the only one with this predilection.
##Learning Resources
####Starting with Codecademy
Start with Codecademy to learn the popular programming languages. Once I finished one programming language I continued with a different one to reinforce the concepts I’ve learnt. It’s for free and cover many of the most popular programming language in use today. They recently introduced a paid version but nothing that wasn’t free prior requires payment now. This is my Codecademy profile.
The great thing about Codecademy style learning is that it’s learning by doing and you can complete things in small self-contained chunks and it’s free. One con some people may find is that it doesn’t provide enough detail or motivation behind concepts. It’s a great starting point.
Codecademy is great for familiarising yourself with the syntax of various programming languages and a basic understanding on how web technology works.
#####Graduating to Codeschool
Once I completed most of the Codecademy courses I felt I didn’t know enough details. That’s when I paid to enrol in the courses provided by Codeschool. Learning style in the same vein as Codecademy except that it provides more depth in concepts and you get access to broader set of technologies that software engineers use day to day such as Git.
Strong on front-end web development, Ruby on Rails and Javascript stack and also Git. No Python or Android, basic iOS. Move onto Codeschool if you want to pursue a web development track. All you can eat charged monthly. Relatively cheap and good value for money.
####Building a static website
By now, you should be comfortable enough to build your first (static) website. This how to guide by Jon Chan is what I used to help build my first website.
####Building a dynamic website with Michael Hartl’s Ruby on Rails Tutorial
To complete your education in the basics of web development you should build a dynamic website. I used Michael Hartl’s Ruby on Rails Tutorial for this purpose. It’s universally well reviewed, being regarded as the preeminent tutorial book for Ruby on Rails and having completed all twelve chapters I understand why. It brings together all the concepts you have learnt up to now and very carefully takes you step by step in putting all the pieces together to build a twitter-clone and into production. You can see the version I built here. By the way did I mention it’s for free? You can pay for extra materials but not required.
####Resources for data science
If the motivation for learning programming is to pursue an interest in data science then you have the option to skip Codecademy and start straight away with the following resources:
Datacamp - Codecademy style learning focused on the R programming language (which is the leading language used in data science. Python is probably second). Costs USD $25 per month all you can eat style. Wide breadth of courses covering most fields of data science, from programming in R, probability and statistics as well as applications, to machine learning and data manipulation/visualisation. Good value for money.
Dataquest - Haven’t personally used myself but looks like a good complement to Datacamp. Focus on Python.
R and Python are complements in the data scientist toolkit. There will be things that R is preferable to Python and vice versa so worthwhile to learn both.
####Additional resources for mobile development
For mobile app development check out Codeschool mentioned above for iOS and Swifty to learn the Swift language.
There is also Appcamp focusing on mobile development but I haven’t used this personally and appears to focus on Angular.js as a ‘cross-platform’ tech stack serving both iOS and Android. I can’t comment on the merits of such a approach.
Codeschool and the resources listed here are probably not sufficient to build and deploy a mobile app so you will need to complement with courses from the lecture based resources I list below.
####Lecture based learning resources
For learners who prefer video and lecture like approach to learning I’ve listed resources below:
Udacity and Treehouse are more modern approach to university style lectures. Have varying degrees of interaction. You can access most material from Udacity for free and essentially you’re paying for certificates which is optional. Treehouse is pay per month all you can eat.
There’s also Udemy which is a marketplace version of Udacity and Treehouse.
EDx, Coursera, and iTunes University are basically online university courses. All provide course material for free but EDx and Coursera provide option to pay for course certificate
I like EDx, Coursera, iTunes U to learn about topics that aren’t covered in the other resources I use.
If you’ve tried all of the above but find that you need the real-life human touch than there are various bootcamps such as General Assembly.
Finally check out Bento by Jon Chan. It’s a cool website pointing out tonnes of other resources out there.
##Appendix - Taxonomy of Technologies and Jargon
This list is not meant to be comprehensive or correct to the letter. I’ve taken some liberties in order to convey the general gist of ideas.
#####Web v Mobile
Web refers to web browser which can be on both PCs and smartphones. When referring to mobile, this is to denote applications ‘native’ to that mobile device, i.e. downloaded from the App Store as opposed to using an application in a webpage/site through the web browser.
#####Front-end v Back-end
Front-end refers to the interface of an application (web or mobile). This is the part of the application that you can see and interact with by using touch, mouse, or keyboard. Every website will have a front-end
Back-end refers to the components of the application that a user can’t see but are required for an application to provide more utility. To draw an analogy with the human body, the back-end is like your memory and cognitive skills. You can’t really ‘see’ memory or cognitive ability but your interaction with someone is enhanced when they have memory and some cognitive ability.
I know it’s not a great analogy but I think it provides the gist of the idea.
#####Static v Dynamic website
A static website is an application with a front-end but no meaningful back-end. Dynamic websites have both front-end and back-end.
#####Web Development Technology Stack
To create a static website you need at the minimum HTML and CSS. For interactivity in the front-end e.g. motion, you need Javascript and jQuery.
To create a dynamic website, in addition to the above, you require knowledge of a programming language that can interact with servers and databases. You have a number of options to choose from but the most commonly used ones are:
- PHP
- Python (combined with Django)
- Ruby (combined with Rails aka Ruby on Rails)
- Javascript (combined with Node.js + Express.js) - Can be used for both front- and back-end
My recommendation is to use either Python or Ruby because they’re designed for the web in it’s modern incarnation yet mature and well supported. Javascript via node.js is more cutting edge which also means it’s not as mature and therefore harder to get help when you can’t work out why something isn’t working.
Django and Rails in the lingo are referred to as ‘frameworks’ corresponding with their respective programming languages. In this context, basically you can think of the programming language as factory machinery that manufacture tools in which case are Django, Rails, and Node.js (you can add jQuery to this category as well). Technically Node.js is not a framework but the analogy still holds.
Rails is a collection of tools made from Ruby. Django is collection of tools made from Python. Node.js/jQuery is a collection of tools made from Javascript.
Frameworks are like infrastructure. Basically they make your life easier by not having to reinvent the wheel each time you build a new application.
Finally, you need a database. Database are analogous to your memory. The most commonly used database are relational. I won’t go into details as not important at this stage except that you need a database to build a dynamic website. In order to use relational databases, you need to learn SQL (which is a language that manages the database).
#####Mobile Development Technology Stack
The two most important mobile platforms are iOS and Android. The programming language you need to learn are Swift or Objective-C for iOS and Java for Android. One small positive thing about iOS and Android is you only need one language for both front-end and back-end for feature lite apps.
Unfortunately as soon as you develop more feature rich apps that provide utility through the internet you will need to learn the web development back-end stack.
With respect to iOS, Swift is the new language Apple released in 2014 and is most likely to be the basis for future development on all Apple products. I’m planning to focus on Swift rather than Objective-C for my mobile projects.
#####Data Science Technology Stack
If you’re an aspiring data scientist you’re learning programming to help you do your job better. If you plan to build data products you will need to learn some web/mobile development as well.
To get started the two main languages you need to learn are R and Python. R was designed for statistical computing while Python is a more of a general purpose language with applications in data science being a strong component.
There will be applications where R is better than Python and vice versa but ultimately you should aim to have both in your toolset because they complement each other.