“How do I learn to code?” I’ve been asked this multiple times over the past few years of blogging and designing and have answered it in bits and pieces in various blog posts. But the question keeps coming up, so here’s your definitive answer on how I learned to code and how you can too…
I learned to code years and year ago in the age of gURLpages and Geocities. I started with a one page, one-column site with a purple background and cheesy moving graphics. I used the site builder to said page and then looked at the HTML view to try and figure out how it was put together. Once I had a handle on the basic layout, I would find design elements on other sites that I wanted to replicate. Right-click > view source allowed me to view the code of a website and see how things were put together. (FYI – use this trick to learn, not to scrape someone else’s code)
For the next few years I re-designed my blog layout on a monthly basis. I’d finish one design and the next day I’d be ready for something totally new. (Curse of the designer amiright??) Eventually I wised up and created myself a bunch of test sites. I have Blogger, WordPress.com, and Tumblr accounts with dummy content that I only use to build templates. For self-hosted WordPress I did two extra installs so I can work on coding two client sites at once. Now I can test things out and screw around without worrying about crashing my own or a client’s site.
If you’d like to produce sites for clients or premade designs you’ll need a template that is of your own making. It’s not really PC to use just any old theme and add your own elements and it also doesn’t look terribly professional. You’ll want to find a naked theme like Starkers, build a child theme for a framework like Genesis or Thesis, or purchase a license to alter a theme’s design.
My favorite places to sort out coding questions are Stack Overflow, Web Designer Wall, CSS Tricks, W3Schools, and WPMU. Or when all else fails, Google it. Someone, somewhere has likely already run into the same issue and conveniently figured it out.
Bottom line – the best way to learn to code is to jump in and start figuring things out. Choose an element – a gallery, slideshow, sidebar box, navigation – decide how you want it to look and then spend some time learning to make it work. It’s also slightly less overwhelming than tackling an entire site at once.