WordPress and Twenty-Sided

 By Shamus Jun 3, 2006 3 comments

Several people have asked me to release the theme for this site so that others can use it. This sounded perfectly reasonable at first, but then I started taking a look through my code and realized that it is a mess. It was built a little at a time over the last nine months, adding on little gadgets and details as they came to mind without any thought for the long-term effects on the site itself.

As a coder, I should really, really, know better than this by now. But sometimes you just want to spend your time doing something, not making a tool for doing something.

When I write code for a living I’m always thinking about how I can re-use or extend it later. Barring that, I at least try to make it neat so I can make sense of it if I come back to make changes at some later point. I didn’t do any of that, and now the site has become a “code contraption”. It works, but you can’t change one thing without breaking three others. It’s sloppy and hard to read (the underlying code, not the site itslef) and now I’m getting nuts. Even when the hood is closed and I’m not reading the code, as I look at the site I know the bad code is there… hiding beneath the surface like so much duct tape, holding everything precariously together.


For example: Lots of stuff is hard coded. Even the title at the top. So, if you were to take this theme and put it on your site, the title at the top would be Twenty-Sided, no matter what you really named the site. The dice rollers are built into the theme, when they should be a plug-in. There are old, unused functions laying around, mixed in with in-use functions. No code comments. I edited the site in the wordpress admin interface and not in a proper editing program, which means the indenting is hosed.

So now I’m re-creating the theme from scratch. It’s far from done yet, but now that I’m doing it I’m curious what the strong points are. What is it about the theme for this site that works well? What would you change? What gets on your nerves?

I should add that I don’t plan to change the look of this site. My goal is to clean it up and maybe make minor adjustments based on feedback, but visually it isn’t going to change much.

3Three comments. 33% of them are the most recent.


  1. ubu roi says:

    By and large, it’s a clean looking site, and that’s one of the things that appeals to me. I like the proportions of the main and narrow columns, and that it covers most of my screen. (I recently made some changes to mine to widen it, but I’m still not entirely happy.) I don’t plan to adopt yours, because the graphical elements and style are too different, but there are aspects I would like to see; particularly how you change the pictures and quotes at random.

  2. Gothmog says:

    I agree with Ubi- the crispness of your site is what impresses me- that’s something that’s hard to find in the WP theme collections out there.

    What kind (if any) plugins do you use, Shamus?

  3. Shamus says:

    What kind (if any) plugins do you use, Shamus?

    Sadly, most of the cool stuff (dice, random image, random quote) is built into the theme. One of my current goals is to yank all of these little gadgets out of my theme and put them into plugins.

    Aside from my spam filter, I’m using two plugins I made myself. One is a very simple stats plugin that tells you how many posts per day over the last week / month /all time, and it also tells how many comments per post over the last week / month /all time.

    The other plugin is the lexicon thing I mentioned before.

Leave a Reply

Comments are moderated and may not be posted immediately. Required fields are marked *

*
*

Thanks for joining the discussion. Be nice, don't post angry, and enjoy yourself. This is supposed to be fun.

You can enclose spoilers in <strike> tags like so:
<strike>Darth Vader is Luke's father!</strike>

You can make things italics like this:
Can you imagine having Darth Vader as your <i>father</i>?

You can make things bold like this:
I'm <b>very</b> glad Darth Vader isn't my father.

You can make links like this:
I'm reading about <a href="http://en.wikipedia.org/wiki/Darth_Vader">Darth Vader</a> on Wikipedia!