Simple Ways To Save Time With A Default Code Library

We’re all busy designers here, and that means we’d rather not spend more time hacking away than necessary. It is very easy to cut down on development time by collecting, organizing, and using default code snippets. Most of us probably do it already, but are we doing it good enough?

WordPress DevelopmentAs for me, 95% of every site I design is based on WordPress, one way or the other, which means I’ve got a default WordPress theme for my own usage. This default theme is written by me from scratch, and I’ve made sure that it is easy enough to modify. If you are a WordPress theme designer you could do that too, or pick any of the free open-source themes out there to base your freelance design work on. Some of you might prefer Sandbox, others will modify Kubrick (the default WordPress theme), and so on. It doesn’t matter, as long as it is a theme that you can bend to your will in as little time as possible.

Another area where you can save time by using default code snippets is the various scripts we use to make our sites more bling-bling. There’s a gazillion jQuery tutorials out there, so collect the best of them for your fancy navigation menus, tabbed boxes, and so on. That way, when you need a dynamic element, you can just pull up your favorite jQuery code snippet. jQuery Javascript Or Mootools, or Prototype.js, or whatever’s your poison.

Naturally, this also goes for PHP scripts,, and any other programming languages you might use in your web sites and applications.

In essence, here are some tips on how to store these code snippets for easy use:

  • Set up a reasonable directory structure on your hard drive. I suggest using one folder for scripts, then have one for jQuery in that one, and so on.
  • Store the code snippets in plain text files, using descriptive file names, like tabbed menu or wisiwyg textarea adaption. That makes it searchable.
  • Consider setting up some sort of index file containing all your saved code snippets. That way, if you’re not sure wether you want to use this or that to do a specific solution, you can just scan this file for code snippets that do what you wan.
  • Index hardcore style: Setup a local WordPress blog and put each code snippet in its own post, then tag accordingly. Would work with a wiki and whatnot as well, the functionality we need is tagging. There are software solutions to do this to files as well.
  • Use a text editor that supports storing code snippets. My favorite is Coda.

It is all about saving time, and avoiding doing the same thing twice. If you keep track of all your nifty solutions and fancy hacks, then you’ll produce faster, and that means more time for other things. So, how do you do it?


Scroll back to the top