This is old content! The graveyard is a snapshot of content created from 2002-2005. For new stuff, visit Maniacal Rage.
 

Status Check

posted on july 6, 2005, tags: dev, me, site, summer

The design has gone over ridiculously well. In addition to the great feedback I've been getting from everyone, the new design has also been featured on CSSVault, CSS Thesis, CSS Import and Unmatched Style. I'm very happy with the outcome and I'm glad everyone likes it.

Over the past few days, I've been making modifications to the codebase (now at version 3.0.2) and I've reworked some of the primary classes so the site is now much faster to render. Load times for every section are much faster, including some of the ridiculously long tag-based archives (e.g. the "site" tag), which used to take nearly two seconds to render but which now take well under a quarter of a second. The speed boost is primarily due to a change in the way I handle Markdown processing for my content.

I used to keep everything in the database in pre-processed Markdown mode, but after many conversations with Gruber in the past I finally changed the system to keep two versions of all content: one unrendered, Markdown version and one rendered, XHTML version. While it seems strange to have two versions of everything, it's worth mentioning what John said to me: "disk space is cheap, CPU time is expensive." The total size of the database before this change was 5.1 megabytes, the total now is 7.2. A measly 2MB and my site renders nearly twice, if not three times as fast. Well worth the space. And, since I still have the Markdown version of content, I make changes to that instead of having to write any XHTML. When I post updates to the database, they're converted using Markdown and stored alongside their unrendered brethren.

When I rewrote the quick search feature for this version of the site, I simplified the Ajax component and cleaned up the code so it's now much easier to add functionality (e.g. you can now scroll down and up, left and right (except in IE) and across columns using your keyboard), and I have more in store. The next addition is something I've not seen anywhere, but it's really obvious. I'm also going to expand Ajax use to comments, which I meant to do a long time ago but haven't had a chance until now (and, since the Ajax code is so much cleaner now, it won't be a nightmare).

Aside from all of this, or unrelated, rather, is life outside the website. I started a new job about a month ago (yes, another new job—the second in 5 months), and it's going really well. It's nerve-wracking to move from job to job like that, but it was worth it in the end and I'm happy where I am now. Katia and I have also been spending a lot of time at the pool this summer, and I'm currently healing from a terrible sunburn I received last weekend. Hopefully it will be nearly gone by Saturday so I can go back to the pool. I think the swimming is helping my arm too, so that's a definite plus. I've also started going to the gym again, which feels really nice.

Comments

There are 23 comments, comments are closed

cframe on 07/06/2005:

I'm curious, what made you decide to create your own system from scratch as opposed to using an 'off the shelf' solution like wordpress or MT?

I've been toying with the ide of throwng together something on Rails to get some more experience, something I need more and more of now I'm going for job interviews!

John Gruber on 07/06/2005:

I don't think that's quite what I suggested to you, or, if it was, it wasn't quite what I meant. It's not bandwidth that you're saving by storing preconverted XHTML output from Markdown — if you think about it for a second, it's easy to see that you're sending the same bytes over the wire, whether you're converting Markdown to XHTML on-the-fly or sending cached XHTML.

It's CPU time that you're saving. And so what I meant to say is that "Disk space is cheap; CPU time is expensive."

If you say, "I'm storing all my content twice, once as Markdown-formatted text, and once as XHTML", it sounds slightly wasteful. But if you say, "I'm caching the XHTML output so that I don't have to reconvert the same Markdown-formatted text with every damn page view", well, then you sound clever.

Garrett on 07/06/2005:

Oops, thanks for the correction, John—my quote should have said CPU time, not bandwidth. The context of what I wrote actually makes sense now as well, and it's what I meant. I cut down on processing time, not bandwidth. I've edited my original quote. And you're right—the second way you said it sounds much more clever than the way I wrote it.

cframe—as far as why I wrote my own CMS instead of using something like MT? I used Movable Type for a long time and I really like it, but in the long run I want to do very specific things with my site and it's a pain to modify someone else's system. MT is built to do certain things well but it must be forced to do other things that I'm interested in. Plus I love writing and rewriting content management systems, apparently.

topher on 07/06/2005:

I'm still very new to the world of weblog's, I'm a software engineer by trade but have always been interested in web projects. They give me a change to be a little more creative than designing windows forms.
I looked at WordPress and others, as a few people I knew were using them, but as you say Garrett, if you want to customise it at all, trying to pull someone else's code apart is a nightmare (trying to pull some of my own apart is too).
I enjoy hand crafting all my own code, it gives me a much bigger sense of achievement than integrating someone else's, and not to mention the experience since I'll be job hunting in the next month :)

gibster on 07/07/2005:

Nice site, however ajax comments has been done before, http://www.forgetfoo.com , has had them on his site for a while.

Elyse on 07/07/2005:

Just wanted to say that the new design seriously is stunning. It's simple and elegant. It's a good example of what CSS should look like...and just how far I have to go. Keep up the good work!

Garrett on 07/07/2005:

gibster—I was referring to another feature I'm implementing when I said it hadn't been done before. Ajax comments are everywhere. Including here now!

Kevin Marsh on 07/07/2005:

Looks like search is broken :(

Garrett on 07/07/2005:

Whoops, sorry—was fixing some issues and broke it for a minute there. Everything should be back to normal now. Thanks for the heads up!

Shawn on 07/08/2005:

Damn this is pretty slick. (Ajax comments) Sorry, just had to try it out. And since I didn't say anything before, the new site is great. But still gotta do something with that USDA approved sticker, though people are using it to refer to the design so you might be stuck with it. Anyway, good stuff.

Paul on 07/09/2005:

The new design looks great, my only criticism of the site would be the annoying Typekey login because I'm not SA's biggest fan, plus it doesn't seem to leave me logged in properly when I'm using Firefox on the Mac so I have to sign in every time which is annoying.

Out of interest, are you ever likely to publish the code that you use for the site? It'd be interesting to see it from the point of view of someone else who has written their own blog software.

Garrett on 07/09/2005:

Paul—I'm sorry you're having trouble with TypeKey... but the problems you're reporting in Firefox on the Mac are the first I've heard of them. I stay logged in fine here in FF on the Mac and I believe Shawn uses FF each time he comments too. Perhaps there's something screwy going on with your cookie? You can delete the cookied called "rage_tk" and try again.

As far as the code goes, no, I probably won't publish it. There was a time when I was going back and forth on the issue, but I decided it's too much work and not worth it in the long-run. The code works really well for my purposes, but releasing it would be opening up a huge can of worms.

Paul on 07/09/2005:

Typekey seems to leave me logged in for a while, I don't know whether the cookie expires when I shut down Firefox but I have told TK to keep me logged in for two weeks. It's just annoying because several blogs I visit seem to use it now so I have to sign in for each one most times I want to comment. It seems to happen on all the sites, not just this one, but I've not had problems with any other comment systems.

Jason on 07/11/2005:

site looks great garret. those css site will get you allot of new visitors as well. nice work.

Blaine Evans on 07/12/2005:

Great lookin site Garret. Just thought I should let you know that I believe I found the site through CSS Beauty, so it should be showcased there as well. (Dont quote me on that I'm not quite sure)

Anyways, really like what your doing with the site. And just thought I should let you know. Not being able to understand what the hell you guys are talking about concerning the Markdown-formatting, etc. tell's me how much further I need to go.

Colin Frame on 07/12/2005:

Garrett, have you created a web based backend for posting etc or are you using a desktop client?

Garrett on 07/12/2005:

Colin—there is a web-based backend. I had planned to fix up my XML RPC server so that I could post from a desktop client, but I never got around to it. Maybe someday when I'm bored I'll finish it up.

Jason on 07/15/2005:

integrate it into X pad.

poncho on 07/25/2005:

Garrett,

I just want to offer my appreciation for your creation. I'm halfway through a project using the smarty templating engine. I have been interested in taking a similar approach as you, when I have the time :-)

I too have fiddled with various CMS thingys, but ultimately if you want something specific, the best thing to do is code it yourself.

Very nice website, superbly built. Looking forward to "How This Site Works, Part III".

Jonas Wouters on 07/26/2005:

so you are not releasing the code... cries Could you provide a chart of how your system is build? The classes, the structure, ... just as an example. That would be a great help for me when I'll start remaking my site. Thanks

Garrett on 07/27/2005:

Jonas—You can see a chart of the request flow in the entry, How This Site Works, Part II. I'll be writing a new entry soon about how the quick search works and some things I've learned from writing and using this XML/XSLT-based system.

Jonas Wouters on 07/27/2005:

Looks very nice. Ive been experimenting with xslt, ajax, ... today, It has been a fun day. How would i implement this in my site :D

Looking forward to part III

thanks

ps: actually i'm just testing your comments :p

IvanM on 08/08/2005:

Good to find this page, i was looking for some ajax info. and ...i'm testing comments too :P


See Also

View the archive

Original iPod Introduction
How far we've come in just a few short years. Here's where it all started.

Front Row on Non-iMacs
Going to try this tonight!

WriAShorStorWe!
DY starts a one-week short story writing event for people to lazy to enty NaNoWriMo. VerCooIdea.

Lost Rhapsody
Funny Flash movie using Weird Al music and Lost stuff. Lyrics make a surprising amount of sense!

Jed's Other Poem
Unsolicited music video made on an Apple ][. Fantastic!

Printers Output Secret Barcode
The government is keeping tabs on what you print, with the help of major printer companies.

Dreamhost Promo Codes
DH already has very cheap, very good hosting—this just sweetens the deal.

Photos of the new iPod
Just received my new iPod and I put a few photos up.

PEZ MP3 Player
Funny idea that actually looks kind of neat. I like that it comes pre-loaded with "indie" music.

HD Easter Egg
"My Name is Earl" on NBC gives viewers with HD TVs a little easter egg. Cute, but weird.