Skip to main content

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
Image used with permission by copyright holder

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
Image used with permission by copyright holder

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
Image used with permission by copyright holder

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
Image used with permission by copyright holder

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]

Editors' Recommendations

Topics
Randy Lubin
Former Digital Trends Contributor
Randy Lubin consults for technology startups, tinkers on his own projects, and blogs about the future of everything. You can…
Here’s why you should seriously consider this HP Pavilion Aero Laptop that’s $80 off
HP's new Pavilion Aero 13 laptop.

Thanks to HP, now is an excellent time to get a desktop or laptop at a competitive price. Just take a peek at some of the latest HP laptop deals and you'll see there are a lot of options. There are gaming laptops, laptops that are phenomenal for productivity, and some for media streaming. The best option is always to go with something that can do most, if not all of those activities. Then, you don't necessarily have to choose, and you can swap seamlessly between what you're doing without worrying if your computer will hold up. That's the deal with the HP Pavilion Aero Laptop, a 13-inch looker that's available at a fantastic price, right now.

Free shipping? Check! Great discount? Check! Plenty of power under the hood? Check! As part of HP's Days sale, the Pavilion Aero Laptop (13z-be000) is $80 off, and here's why that's such an exciting thing. Powered by an AMD Ryzen 5 processor, Ryzen graphics, and 8GB of RAM, or up, this thing is a well-designed Windows 11 laptop. Right out of the box you'll get Windows 11 Home 64-bit, the latest Microsoft operating system. It also features a 13-inch WUXGA IPS display with a native resolution of 1920 x 1080, upgradeable to a WQXGA IPS panel with a native resolution of 2560 x 1600. That's what's so great about it, you can customize the machine so both the performance and the price match your budget. You can check out that deal below, starting at $670 -- you'll even get a free HP mouse with it -- or keep reading to learn more about the HP Pavilion Aero Windows 11 Laptop.

Read more
A.I. is leading a chip design revolution, and it’s only just getting started
CPU Computer Chip being put in place with tweezers.

For decades, constant innovation in the world of semiconductor chip design has made processors faster, more efficient, and easier to produce. Artificial intelligence (A.I.) is leading the next wave of innovation, trimming the chip design process from years to months by making it fully autonomous.

Google, Nvidia, and others have showcased specialized chips designed by A.I., and electronic design automation (EDA) companies have already leveraged A.I. to speed up chip design. Software company Synopsys has a broader vision: Chips designed by A.I. from start to finish.

Read more
Why you should think twice about buying a gaming laptop for college
ROG Zephyrus sitting on a table.

Tracking down the best laptop for college is no easy task. You want something that can handle papers and note-taking week after week, a battery that can last you all day without a charge, and a price that won't empty your wallet before you've had a chance to buy any books.

Gaming laptops don't really fit that mold. Unless you're willing to spend up for a premium gaming machine, you'll often sacrifice what makes the best laptops the best in favor of a beefy graphics card and processor.

Read more