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!