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 PC World newsletter!

Error: Please check your email address.

Our Back to Business guide highlights the best products for you to boost your productivity at home, on the road, at the office, or in the classroom.

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

Most Popular Reviews

Latest News Articles


PCW Evaluation Team

Azadeh Williams

HP OfficeJet Pro 8730

A smarter way to print for busy small business owners, combining speedy printing with scanning and copying, making it easier to produce high quality documents and images at a touch of a button.

Andrew Grant

HP OfficeJet Pro 8730

I've had a multifunction printer in the office going on 10 years now. It was a neat bit of kit back in the day -- print, copy, scan, fax -- when printing over WiFi felt a bit like magic. It’s seen better days though and an upgrade’s well overdue. This HP OfficeJet Pro 8730 looks like it ticks all the same boxes: print, copy, scan, and fax. (Really? Does anyone fax anything any more? I guess it's good to know the facility’s there, just in case.) Printing over WiFi is more-or- less standard these days.

Ed Dawson

HP OfficeJet Pro 8730

As a freelance writer who is always on the go, I like my technology to be both efficient and effective so I can do my job well. The HP OfficeJet Pro 8730 Inkjet Printer ticks all the boxes in terms of form factor, performance and user interface.

Michael Hargreaves

Windows 10 for Business / Dell XPS 13

I’d happily recommend this touchscreen laptop and Windows 10 as a great way to get serious work done at a desk or on the road.

Aysha Strobbe

Windows 10 / HP Spectre x360

Ultimately, I think the Windows 10 environment is excellent for me as it caters for so many different uses. The inclusion of the Xbox app is also great for when you need some downtime too!

Mark Escubio

Windows 10 / Lenovo Yoga 910

For me, the Xbox Play Anywhere is a great new feature as it allows you to play your current Xbox games with higher resolutions and better graphics without forking out extra cash for another copy. Although available titles are still scarce, but I’m sure it will grow in time.

Featured Content

Latest Jobs

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?