So you want to be a web developer...

published:
2009.04.20

Chris McMillan wrote to me with a good question that I've gotten before, and he agreed to let me share it:

Zach, as someone who I would consider an expert, I'm interested in your opinion. I'm a big fan of Nettuts. What language would you recommend I learn for web development. I would like to develop web 2.0 ish stuff, great sites, learn good coding habits and ultimately be able to make some money doing it. I've bounced between C#, Python, Ruby and Php.
What are your thoughts?

I can definitely remember just getting started out with web development, and I like to hear myself talk (heh), so I'm quite happy to give some advice here. Also, I've been thinking a lot lately about the state of web developer education. There's not a lot out there in terms of formal education, so everybody is left to try to figure out what online advice is good and what advice is bad. If you're just starting out, that isn't so easy to do.

I still very much recommend you go to college for design or computer science or communications or something. You are sadly unlikely to learn anything worthwhile specific to the web in college, but you will learn many other important things.

Oh, I should also clarify something else: some people can do amazing graphic design work for the web in Adobe Photoshop or the like. Some people can write amazing software applications for the web. It is very, very rare that anybody is amazing at both. You are probably better at one or the other. My advice tends to be for the software development person instead of the graphic designer.

My Advice

So here is my advice to all web developers in training…

Always consider the source when learning online. At the very least read all of the comments thoroughly to get a better picture of the tutorial's quality. Nettuts isn't my favorite. I recommend:

You should learn how to write a web page with valid XHTML and CSS. Don't use Dreamweaver or any other WYSIWYG. Write your code from scratch. Get a good editor like BBEdit or TextMate. I know there are many free alternatives if you ask around or do some Googling. (Anybody want to help me out with some links?)

Google the following three things: web accessibility, screen reader, semantic markup.

Learn and understand JavaScript. Not just a library, but the JS language itself. Try the Rhino book or John Resig's primer. Flash is dead (kind of). JS is the language of the future for both desktop and server back-end code.... or something very close to JS almost certainly will be. I'm not alone in thinking this.

Then, learn a JavaScript library like jQuery.

Become very familiar with SQL databases like MySQL.

Learn how to use the Apache web server and its modules such as mod_rewrite.

Learn regular expressions. The basic POSIX and extended varieties are worth knowing for some UNIX command line stuff, but otherwise when it comes to programming, the Perl flavor of RegEx seems to be dominant. For example, PHP is actually going to be deprecating the non-Perl RegEx functions so don't waste your time with ereg_replace(). You want preg_replace().

C# is fine I suppose if you want to go into a big business / corporate world or contract for such an environment. C#, IIS, MSSQL, etc.... it is all proprietary and costs money to license. Or at the very least, it costs money to license Windows.

I prefer all the free alternatives: Linux, MySQL, Apache, etc. There are plenty of very big companies than use these (Yahoo, Google, etc.) and lots and lots of small/medium/startup type companies go this route as well.

As for Python vs Ruby vs PHP -- lets not forget Perl either -- just pick whichever one you like. Then learn how to write well engineered software. Check out things like unit testing, Model-View-Controller (MVC) and Factory design patterns... Learn application security for that language.

There's been plenty of successful people and projects in any language you could imagine. Digg is PHP. Twitter was (is?) Ruby. MySpace is fricken ColdFusion (barf).

Finally, make lots of mistakes and learn from them. It'll take thousands of hours of writing code for the web to become an expert. My favorite definition of the word expert actually is "somebody who has made nearly every possible mistake in a very specific and narrow area."

That's about the best advice I can give for now.