Thursday, April 5, 2012


You're a young, plucky go-getter with an interest in tech and nothing but time on your hands.  What to do?  Why learn web development, of course!  So, here are some random tips for those just starting out:

1.  Learn HTML and CSS.

Seems kinda like a no-brainer, right?  You'd be amazed at how many people feel uncomfortable with the basic building blocks of the web.  Some developers learned HTML in the late 90's and never took the time to keep up-to-date on it.  They get all Unfrozen Caveman Lawyer when confronted with the modern web ("Your world of Cascading Style Sheets confuses and frightens me").  Don't be that person.

Other would-be devs feel that HTML/CSS is somehow beneath them.  That, somehow, they'll be forever isolated from the unwashed masses that have to write markup because they're a programmer, not a coder.  Don't be that person, either.

Here's the thing: at some point, the stuff you'll program will be rendered in a browser.  Even if you're a programmer, chances are you'll need to tweak templates in order to have the yummy, yummy data you massaged earlier in the process display on screen in the right place/format.  Knowing how to debug these templates when things go wrong (and they will) is essential.

Besides, both are fairly easy to learn.  HTML can be learned in a couple hours.  CSS takes a bit more time, mostly due to CSS positioning and the Box Model, but is still doable.  No one will expect you to be an awesome designer.  They will expect you to be familiar with the basics.

2. Server side language choice

In the long run, this doesn't matter too much as you'll likely learn a variety of languages if you stick with it.  But, short term, it's an important decision that must balance ease of use, availability of quality resources, and success/failure/positive reinforcement.

For me, there are only two viable choices: PHP and C#

PHP has some nice benefits - Ubiquity, easy syntax, it's dynamically typed, so you don't have to worry about type initially, and it rewards the developer with fast results.

PHP also has some drawbacks - A lot of horrible, out-of-date resources and tutorials floating around online, when done wrong PHP can teach some very bad habits, it's dynamically typed, so you may not even learn about type, and a lot of little technical things that a newbie likely wouldn't notice, but are there anyway.

C#'s benefits are - Statically typed, so one learns about type right off the bat, clean syntax, object oriented, more options in terms of more complex data structures.

C#'s drawbacks are - A much higher learning curve from the get-go, possible reliance on the .NET framework as a crutch, the MSDN (although it's getting easier to navigate).

For web development, I started with PHP.  I feel it's the best at efficiently teaching a prospective developer how forms work, how a server side language interacts with a database, and how processes on the back end eventually become things an end user experiences.  YMMV.  That said, I prefer C# now.

3. It's a database, not a spreadsheet

One of the classic mistakes a newbie can make is treating a database like a spreadsheet.  Most of the databases used with the web are relational databases.  Database tables model the relation between different sets of data.  To get the tables into the right form, developers 'normalize' them.  Here's a good primer on normalization:

Simply put, if you use your database as a spreadsheet, you're doing it wrong.

4. It's 2012.  Time to learn JavaScript

JavaScript is probably the most important language employed on the web today.  It's a vital component of many sites (Google Apps, Facebook, Twitter, to name a few), and with the upcoming improvements in HTML5, it will only become more widely used.

Despite that, JavaScript still carries a stigma.  Older end users remember a time of constant JavaScript errors, and older developers remember the browser wars.  It doesn't help that the language itself is a bit odd, and has some hidden gotchas baked right in.

That said, the emergence of JavaScript frameworks (including the ubiquitous jQuery) has all but made the pain go away.  There's no reason not to learn the basics.  With the way things are progressing, saying, "Nah, I don't do JavaScript," will be akin to saying, "Nah, I don't do email."  Get on board.


So, there you go.  Random thoughts on a Thursday morning.