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]

Computing

Here’s how to install Windows on a Chromebook

If you want to push the functionality of your new Chromebook to another level, and Linux isn't really your deal, you can try installing Windows on a Chromebook. Here's how to do so, just in case you're looking to nab some Windows-only…
Computing

A dead pixel doesn't mean a dead display. Here's how to repair it

Dead pixel got you down? We don't blame you. Check out our guide on how to fix a dead pixel and save yourself that costly screen replacement, or an unwanted trip to your local repair shop.
Computing

Our favorite Windows apps will help you get the most out of your new PC

Not sure what apps you should be downloading for your newfangled Windows device? Here are the best Windows apps, whether you need something to speed up your machine or access your Netflix queue. Check out our categories and favorite picks.
Computing

Edit, sign, append, and save with 12 of the best PDF editors

There are plenty of PDF editors to be had online, and though the selection is robust, finding a solid solution with the tools you need can be tough. Here, we've rounded up best PDF editors, so you can edit no matter your budget or OS.
Computing

Should you buy the affordable MacBook Air, or is the MacBook Pro worth the price?

Though they both share Retina Displays and similar keyboards, there are still some specs differences and other changes which distinguish the new 2018 MacBook Air and MacBook Pro. In this guide, we stack the two up against each other.
Computing

Want to save a webpage as a PDF? Just follow these steps

Need to quickly save and share a webpage? The best way is to learn how to save a webpage as a PDF file, as they're fully featured and can handle images and text with ease. Here's how.
Computing

After a month of bugs, the Windows 10 October 2018 Update is finally here

After more thoroughly investigating and resolving all bugs and related issues, Microsoft is announcing the Windows 10 October 2018 is again rolling out to consumers starting today, November 13. 
Computing

Installing fonts in Windows 10 is quick and easy -- just follow these steps

Want to know how to install fonts in Windows 10? Here's our guide on two easy ways to get the job done, no matter how many you want to add to your existing catalog, plus instructions for deleting fonts in the process.
Computing

Changing file associations in Windows 10 is quick and easy with these steps

Learning how to change file associations can make editing certain file types much quicker than manually selecting your preferred application every time you open them. Just follow these short steps and you'll be on your way in no time.
Emerging Tech

New simulation shows how Elon Musk’s internet satellite network might work

Elon Musk has the dream of building a network for conveying internet traffic via thousands of satellites. A new simulation created by a computer scientist looks at how feasible the idea is.
Computing

Great PC speakers don't need to break the bank. These are our favorites

Not sure which PC speakers work best with your computer? Here are the best computer speakers on the market, whether you're working with a tight budget or looking to rattle your workstation with top-of-the-line audio components.
Computing

Printing to PDF in Windows is easy, no matter which method you use

Microsoft's latest operating system makes it easier than ever to print to PDF in Windows, but there are alternative methods for doing so, even if you want to forgo Adobe Acrobat. Here's how.
Computing

These are the 5 best free antivirus apps to protect your MacBook

Malware protection is more important than ever, even if you eschew Windows in favor of Apple's desktop platform. Thankfully, protecting your machine is as easy as picking from the best free antivirus apps for Mac suites.
Computing

These laptop bags will keep your notebook secure wherever you go

Choosing the right laptop bag is no easy feat -- after all, no one likes to second-guess themselves. Here are some of the best laptop bags on the market, from backpacks to sleeves, so you can get it right the first time around.