Over the past few months, there has been a heated debate about whether everyone should learn to code or if it’s a specialized skill that should be left to the professionals. Software developer Jeff Atwood from StackOverflow/Coding Horror stirred up a hornet’s nest when he wrote an article titled ‘Please Don’t Learn to Code‘, inviting the wrath of the opposing team by suggesting that coding wasn’t something that everyone should seek to understand. Within hours there were fierce rebuttals flying around the blogosphere, and the aftermath of that firestorm is still smoldering away.
Today, however, I’m going to assume 3 things;
- Everyone should learn to program.
- You’ve dipped your toes into the water by learning HTML and CSS.
- Now you’re wondering which dynamic language to learn.
Hopefully this article will clear this conundrum up for you, but first, some clarification is needed so that you understand the difference between client-side and server-side languages.
Both Sides of the Fence
Every website that you interact with is a complex blend of technologies that can be understood more simply by dividing them into client-side and server-side scripting.
Server-side scripting is a technique whereby your request to a website is processed by running a script on the web-server, and then the finished result is sent back to your browser (i.e. Chrome or Firefox). Server-side scripting languages include: PHP, Python, Ruby on Rails and Perl (among many others).
Reasons to Learn PHP (or Not!)
Now you know that PHP is a server-side scripting language, meaning that it is excellent for certain tasks and totally inappropriate for others, we can go into some reasons why you should consider learning it if you’ve decided to go for a server-side language:
- It’s one of the most widely used languages in the world, powers everything from Facebook to WordPress, and has a large community built around it that are happy to share tips and techniques with you.
- It’s relatively easy to deploy, it works on virtually every server known to humankind, and it’s free to get going (especially with an open-source stack like LAMP).
- There are numerous free tutorials that will take you from scratch to a high-level within a year.
You should keep in mind, however, that PHP is widely criticised for being messy, inconsistent and maddeningly illogical at times. There are also many, many other options for server-side scripting languages, so you should research Python, Ruby, ASP.NET, Perl and others before you make the decision about which one to learn.