Coding for the rest of us: Why you should learn, and how to get started

Coding-for-the-rest-of-us-Why-you-should-learn,-and-how-to-get-started

Those who code have the power to transform their dreams into reality. If you can imagine it, you can create it.

Whether it’s crafting a personal website, gaining an edge in the office, or building the next Facebook, a little programming knowledge goes a long way. You can learn enough to build a personal website in weeks and simple Web applications after only a few months.

And you don’t need to a computer science degree or decades of experience to build something original and useful. Instagram founder Kevin Systrom was a marketer to who learned to code in his spare time. In case you somehow missed it, his company just sold to Facebook for $1 billion.

While you could sign up for courses or buy textbooks, a host of free online tutorials, videos and classes can make it easier than ever to painlessly learn code in a hurry. I know because that’s how I recently taught myself. Here are some of the best resources and tips I discovered along the way.

shutterstock_programmingDive right in

Learning to code can be daunting. A beginner is faced with understanding computer science concepts, picking up the idiosyncrasies of a programming language, and mastering new software tools to develop and run the code. It’s so intimidating that many people quickly give up or fail to start… but it doesn’t have to be that way.

I’d wanted to learn for years and even tried a few online tutorials; I never stuck with them. Last winter vacation, I powered through one of Stanford’s free, online courses, and loved it. The reason it clicked: fun, bite-sized projects.

Project-based learning is incredibly powerful. It provides context for the new concepts, increases motivation, and enhances retention of knowledge. It’s also much more fun.

As you begin your coding journey, start with a project in mind. As you’re ready to learn a new concept or element of the stack, settle on a small project that will use those skills.

Getting oriented

Web applications have many different components – one hurdle beginners face is to figure out how the parts all fit together. I’ll provide a brief overview of the big picture. Don’t be intimidated – you can dive right into coding without knowing most of this.

web_stack

Front-end code

This code is sent from the server to the user, whose browser renders it onscreen. The main components (all different types of code) are:

  • HTML – the elements on the page (paragraphs, headings, images)
  • CSS – the style of the page (colors, sizes, fonts)
  • Javascript – dynamic components of the page (e.g. fancy user interactions)

Back-end code

This is the logic powering the site. Popular back-end languages include Python, Ruby, PHP, and Java. Most Web apps use a framework (e.g. Ruby on Rails) to help organize the code into buckets. Most frameworks have these components:

  • Model – storing and retrieving site data
  • View – dynamically generating front-end code
  • Controller – Combining the view and the model to serve to the user

Database

Most web applications need to store information.You’ll need to learn at least one type of database. Popular databases include MySQL and MongoDB.

Webserver & operating system 

The webserver handles the incoming requests to the server and passes them off to the back end code. The most popular webservers are Apache and Nginx.You won’t need to become an expert in webservers but do need a basic understanding of how to connect them to your app.

shutterstock_webdesign

Linux is the most popular operating system for running webservers. As you continue to learn coding, you’ll want to learn basic Linux commands as you build your app.

First steps

As I mentioned above, the best way to start is through projects. Here is a natural progression:

Personal Website

Build a personal website using just HTML and CSS. There’s no need to learn any back-end code or databases. You don’t even need a server to start playing around – just save a text file to your desktop with a .html extension and open it with your browser. Good resources are Mozilla Web Development and w3schools, and Codecademy has a few HTML lessons available so far; once the course there is complete, it will likely be the best resource.

Programming Course

To build anything more complicated, you’ll need to learn some fundamental programming concepts like variables and control flow. I highly recommend Stanford’s intro course 106a Programming Methodology. This is the class that finally hooked me. Each week has fun projects related to the lessons and the professor is outstanding. The videos, handouts, and assignments are all free on the site. Definitely go through this if you have the time.

shutterstock_light-up-keyboard

Another option is Code Year by Codecademy. It provides a great introduction to the key concepts and even has a few projects (e.g. build a blackjack game). Every lesson is accompanied by an interactive tutorial. Codeacademy is just expanding into the HTML and CSS now, and might be the go-to place for all coding education in the near future.

Dynamic Web Page

Apply what you’ve learned by building a one-page Web app without a database. You still don’t need back-end code, but you’ll be using Javascript alongside the CSS and HTML. An example project could be a calculator, or adding animation to your personal website.

Simple Web app

Take the plunge and build a full Web app. The best way to start is by picking a framework and going through a tutorial. I started with Python and its framework Django. The tutorial I used is Django Book. If you want to use Ruby on Rails, try Rails for Zombies.

Node.JS has been growing in popularity; it uses Javascript for the back end. I really like Node, but it may be intimidating for a first-time learner. Try this tutorial: Node Beginner.

This is probably a good time to get your own server. Amazon provides free micro-instances and it’s easy to get started at Amazon Web Services.

Next Steps

Once you build your first web app, there are many directions in which you can grow. You’ll have a much better sense of what knowledge you lack. As always, let your curiosity drive you and pick a small project for each concept you want to learn.

Some Useful Tools

Stack Overflow – A Q&A site for programming questions

Sublime Text – A great text editor

Aptana – A good text editor which also lets you run the code

Bootstrap – An excellent tool to quickly make sites beautiful

Learn Code the Hard Way – A series of language specific programming guides

[Image credit: photoart985/FuzzBones/Alexander A. Kataytsev/chaoss/Shutterstock]

Emerging Tech

Awesome Tech You Can’t Buy Yet: Self-balancing skates, tiny tripods, and more

Check out our roundup of the best new crowdfunding projects and product announcements that hit the Web this week. You can't buy this stuff yet, but it sure is fun to gawk!
Emerging Tech

From flying for fun to pro filmmaking, these are the best drones you can buy

In just the past few years, drones have transformed from a geeky hobbyist affair to a full-on cultural phenomenon. Here's a no-nonsense rundown of the best drones you can buy right now, no matter what kind of flying you plan to do.
Movies & TV

September brings 'The Dragon Prince,' an animated war series, to Netflix

Looking for a new show to binge? Lucky for you, we've curated a list of the best shows on Netflix, whether you're a fan of outlandish anime, dramatic period pieces, or shows that leave you questioning what lies beyond.
Home Theater

Looking to cut cable? Here’s everything you need to know about Pluto TV

Pluto TV offers plenty of entertainment in a fashion similar to live internet TV services, only at no cost — you don’t even need to register. Too good to be true? Here’s everything you need to know.
Home Theater

How to wall mount a TV: Tips and tricks to cut down on frustration

This how-to guide includes a video on how to wall mount a TV, along with other tips and tricks about the process. Step-by-step, we'll take you through what you have to do to successfully get your TV on your wall.
Computing

Don't buy a new router, fix your Wi-Fi with these quick tips

Don't panic when your Wi-Fi goes down. Instead, fix it. These simple solutions to the most common Wi-Fi Problems will get you back online at high speed in no time (hopefully) without buying a new router.
Mobile

This orange puck keeps you online in any country, with one hidden catch

Staying connected on your travels can be a challenge and sometimes results in hefty cell phone bills you could do without. We tried out the Skyroam Solis, a global Wi-Fi hotspot and power bank billed as the perfect solution.
Computing

Our favorite gaming desktops make the latest consoles look pathetic

PC gaming doesn't always come cheap, but it doesn't have to be extortionate either. In this guide we've put together a list of the best gaming PCs you can buy, with everything from the big and flashy, to the super compact.
Computing

These 15-inch laptops are both powerhouses, but which should you buy?

The Asus ZenBook Pro 15 UX580 offers an innovative twist on the tried-and-true touchpad: the LCD-equipped ScreenPad. That's not all that Asus has up its sleeve, but is it all enough to compete?
Computing

Don't spend hundreds on Pro Tools or Logic. Try one of these free alternatives

Believe it or not, Pro Tools isn't the only digital audio workstation worth your time. Check out our picks for the best free recording software, whether you're looking for a lightweight app or a full-blown audio workstation. Updated meta…
Computing

Microsoft may go back to black with 2018 Surface Pro and Surface Laptop

Microsoft may be adding black as a color option to its refreshed Surface Laptop and Surface Pro models on October 2nd. Rumors of the new color along with an image of the black Surface Laptop popped up over the weekend.
Computing

Microsoft could debut transparent Surface Dial sequel at October event

Microsoft's upcoming October Surface event could show off more than just laptops. A new FCC filing suggests Microsoft may also debut a new Surface Dial device, potentially with a transparent center.
Home Theater

HDMI 2.0b is a whole lot more than just a connection to your TV

HDMI 2.0b is the backbone for many of the latest updates in 4K UHD technology. And while a new cable standard can often involve a bunch of changes for consumers, that is not the case this time around.
Deals

The best laptop deals for September 2018

Whether you're getting ready for a new school year, shopping for a special student, or just need a new computer, we've got you covered: These are the best laptop deals going, from discounted MacBooks to an on-the-go gaming PC.