How to learn to code for free

Looking to learn a new skill? We have a few tips to help amateur coders get started on writing their own sites and Web apps.

In days gone by, all you needed to make a website was a Geocities account and some basic knowledge of HTML. Maybe you'd throw in a bit of CSS (Cascading Style Sheets) if you wanted to get fancy. Times have changed, though, and now people build websites using at least one advanced coding language. Programming is a noble pursuit, but if you want to build apps and services for the Web, you need to learn one of these popular languages.

Unfortunately there's no lingua franca when it comes to coding, so beginners can find it difficult to choose their first language. Here's what you need to know to select a coding language that's right for you and take your first steps in writing code.

Choosing a Language

The first step in learning to code is selecting a language to code in. You'll find a number of languages with very different pros and cons, but the first decision you need to make is whether to learn front-end or back-end coding.

Front-end coding relates to the appearance of your website. If you're just looking to add some pizzazz to your site or your blog, a front-end coding language is probably the better choice for you. Front-end coding concentrates on extending the basics established with HTML and CSS so that you can customize your site even more.

Back-end coding focuses on the work that happens behind the scenes. Back-end languages govern server-side tasks such as setting up and manipulating databases that feed into the Web so that users can, say, log in to your website or read forum posts. If you want to build a Web app or create the next big social networking site, you'll need to learn some back-end coding.

If you're interested in back-end Web development, I suggest taking a crack at the Ruby programming language. Ruby is a relatively intuitive language in terms of syntax, and it has a lot of powerful built-in tools for Web development. Many of today's most popular sites (including Twitter) were coded in Ruby.

For aspiring front-end coders, I suggest JavaScript. It's a little more difficult to pick up than Ruby, with a harder syntax and the requirement that you know the basics of HTML and CSS, but it's a powerful tool for dynamically changing the content of your site so that you can pull off cool animation tricks or quickly edit information on every page of your site.

Some readers might disagree with my suggestions (in fact, I'm sure at least a few will have something to say down in the comments), and that's fine; there are good reasons for selecting other languages, so take a crack at learning Django or Python if you so desire. In the end, I wouldn't stress out too much about picking the perfect language on the first try. Most coders and programmers learn multiple languages during their careers, and your first few lessons in coding will be more about grasping the internal logic of coding than understanding the minutiae of the language itself.

Where to Start

With both JavaScript and Ruby, getting your first project working without a bit of experience with the language can be difficult. Thankfully, for both languages you can find some great free tutorials online that help you get started without all the heavy lifting of setting up a test server.

JavaScript newbies should check out Codecademy; for learning Ruby, visit Try Ruby. Both sites have a nice interactive tutorial that guides you in the basic syntax of the language and lets you input code in a window that instantly shows you the results when you press the Enter key.

Once you get a little more comfortable with JavaScript or Ruby, I suggest taking a look at Code School. This service provides courses on high-level JavaScript (the jQuery library for JavaScript) and Ruby (the Ruby framework Ruby on Rails) that have the same interactive coding window, along with video tutorials. Code School does charge for some of its advanced courses, but its basic tutorials on both jQuery and Ruby on Rails are free. Codecademy also supplies a few free higher-level tutorials in JavaScript once you finish your initial lesson; many PCWorld staffers have used them for self-edification, and the tutorials are informative and simple to follow.

What's Next

Once you've gotten your feet wet, you'll need to start doing some of that heavy lifting I talked about earlier, which means you'll need some sort of test server to evaluate your coding skills. Setting up a test server on your own could be the topic of several articles; thankfully, most hosting services have automated systems that make setting up a test server simple.

This part might not be free if you don't already have access to a Web server owned by a family member or friend. If you don't already have server access with a Web hosting service, check out our guide to finding the right Web host, and get yourself a personal server. Once you have server access, poke around in your Web host's control panel to see if it offers a tool that will let you set up a separate folder to test your coding projects.

You'll also need an FTP (file transfer protocol) program to upload your programming projects. I suggest the free Cyberduck for Mac OS X and Windows. Linux users can try FileZilla, which is also available for Mac and Windows.

If you're getting serious about your coding, you'll probably want a specialized editor for writing code. Mac users have a lot of great options here, including Coda and TextMate, both of which have a pretty hefty price tag. Windows users can try the free Notepad ++, and Linux loyalists can check out the cross-platform Bluefish.

Once you're set up to start coding, you'll still have plenty to learn. If you get frustrated, you can turn to coding community sites such as Stack Overflow to ask questions about your code and get advice from professional coders. You can also check the official sites for JavaScript and Ruby if you need reference materials.

Learning new skills is always a challenge, but all of these resources will make getting started with coding a little easier. Good luck!

Join the newsletter!

Error: Please check your email address.
Rocket to Success - Your 10 Tips for Smarter ERP System Selection
Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

David Daw

PC World (US online)
Show Comments

Cool Tech

SanDisk MicroSDXC™ for Nintendo® Switch™

Learn more >

Breitling Superocean Heritage Chronographe 44

Learn more >

Toys for Boys

Family Friendly

Panasonic 4K UHD Blu-Ray Player and Full HD Recorder with Netflix - UBT1GL-K

Learn more >

Stocking Stuffer

Razer DeathAdder Expert Ergonomic Gaming Mouse

Learn more >

Christmas Gift Guide

Click for more ›

Most Popular Reviews

Latest Articles


PCW Evaluation Team

Edwina Hargreaves

WD My Cloud Home

I would recommend this device for families and small businesses who want one safe place to store all their important digital content and a way to easily share it with friends, family, business partners, or customers.

Walid Mikhael

Brother QL-820NWB Professional Label Printer

It’s easy to set up, it’s compact and quiet when printing and to top if off, the print quality is excellent. This is hands down the best printer I’ve used for printing labels.

Ben Ramsden

Sharp PN-40TC1 Huddle Board

Brainstorming, innovation, problem solving, and negotiation have all become much more productive and valuable if people can easily collaborate in real time with minimal friction.

Sarah Ieroianni

Brother QL-820NWB Professional Label Printer

The print quality also does not disappoint, it’s clear, bold, doesn’t smudge and the text is perfectly sized.

Ratchada Dunn

Sharp PN-40TC1 Huddle Board

The Huddle Board’s built in program; Sharp Touch Viewing software allows us to easily manipulate and edit our documents (jpegs and PDFs) all at the same time on the dashboard.

George Khoury

Sharp PN-40TC1 Huddle Board

The biggest perks for me would be that it comes with easy to use and comprehensive programs that make the collaboration process a whole lot more intuitive and organic

Featured Content

Latest Jobs

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?