post

It was only a matter of time
It was only a matter of time

I’m growing terribly sick of this site. To me, the design is very ugly and bland. It all started to go downhill when I began to realize (and despise) the faded/foggy look from the blend of color choices I’ve chosen. I’ve made an attempt to sharpen things up a bit, and it worked, but was nowhere near enough to bring me back as a fan of my own site.

I no longer like showing a little bit of the “Latest Post.” Really, that doesn’t do anybody any good. It’s a hassle for me, because if the post contains an ul or blockquote or h2 or whatever, I have to worry about the word count ending before the closing tag, which would throw the entire page layout off the rocker. As a fix, I just strip out all of that stuff from the main page (and the bits, as well). It’s a lame solution to something that has no benefit to begin with. There are a few other things like that, but I’ll spare you the details.

My first post on this site was sometime in August of 2006. It’s amazing how much I’ve learned since then. Compared to now, the code here is a mess. But I guess that comes with learning—old code always seems like a mess. In a way, I want to start over again on a clean slate, but as always, time is against me.

I have an idea for something simple, and now, I could probably throw it together rather quickly. I just don’t know if it’s worth it. I thought about Mephisto or a similar solution, but I like to get more experience something out of it. Plus, I enjoy going custom with my own site. I guess I’ll figure something out, and hopefully sooner than later.

Comments
01
04 Apr 2007 01:11 PM

I like the opportunity to built over simply because I get to try out the latest Rails stuff. Like the RESTful resources and things like that.

If you do decide to switch up your designs, I recommend taking screenshots of the current design – it’ll good for nostalgia :-)

02
04 Apr 2007 01:12 PM

Dang it… that link was completely wrong.. http://pearlcrescent.com/products/pagesaver/

03
04 Apr 2007 01:32 PM

Also, I’d recommend doing something similar to tiny – I started out with the minimal features (i.e. scraps) and slowly built from there. The design was minimal too, and I enjoyed it for a long time. I really like my current design because the simplicity, though I suspect I will grow tired of it eventually.

The funny thing is we think a new design means a new application, but that doesn’t have to be the case. True, your code may be messy now that you know better, but you have a solid base. And one of the best parts of coding is removing code and refactoring. It’s like giving your app an oil change :-p

04
04 Apr 2007 02:33 PM

I’ve been debating that very thing for a couple of weeks now: new design or new everything. Right now, I’m 60/40 in favor of new everything.

I have spent a little bit of time getting rid of a lot of garbage. But there’s plenty more to go. When I first built this site, for whatever reason, I wasn’t using RJS consistently. I had render_without_layout’s everywhere (and still do in spots). The CSS/markup isn’t structured properly, the views are too large, etc, etc. Basically, all the signs to do exactly what you’ve suggested: refactor. But in this case, it seems like too much work, when rebuilding a simpler version would be more gratifying and possibly quicker. Plus, I don’t think I’d catch everything right away, and while that’s perfectly OK, it would annoy me to constantly stumble across something else that needs fixed/modified.

The funny part about this is I’m acting like rebuilding this site is the golden solution, and I’d never have to worry about it again as long as it was done right. Well, I thought I built this site right the first time. And before that, I thought the PHP solution was wonderful. And before that, just having a layout that used CSS was exactly what I was looking for. It never ends, and I’m sure this round would be no different in a couple of months. But that’s why I wake up everyday: to rebuild my site over and over and over :-)

05
04 Apr 2007 02:36 PM

Oh, and that pagesaver extension is pretty cool—thanks.

06
04 Apr 2007 04:50 PM

Just an FYI – this site is much improved over simplebeta.com, so it’s clear that you are improving your skills :^)

07
04 Apr 2007 06:36 PM

Geez, Ryan, if you think your site’s behind-the-scenes were messy, you should’ve seen mine! I had Ruby code scattered all throughout my views; I didn’t even know how to use helpers; and I had been borrowing code from previous designs for the past five or six re-designs.

So, I know how it feels to beat yourself up over it all.

By the way – I still can’t get these dumb cookies workin’!

08
05 Apr 2007 12:01 AM

It just takes time for us normal folk—Chris seems to pick up on things really, really fast. Way faster than I can. Often I’ll read something he posted, and not realize what he was talking about for another 2 months. But it’s fun nonetheless.

About those cookies, Rails really does make it easy. Whenever you save a new comment, that’s when you set the cookie. Something like this:

def save_comment
  @comment = Comment.new(params[:comment])
  # ...
  if @comment.save
    cookies[:name] = {:value => [@comment.name],
                      :expires => 1.week.from_now}
  end
end

You can call it whatever you want, you could say cookies[:neolyn] if you felt so inclined. Then, to use the cookie (you could put this in the action that loads a single post, the one with the comment form—you might call it permalink?):

def permalink
  # get the post based on the year, month, day,
  # and permalink params
  # ...
  @comment = Comment.new
  @comment.name ||= cookies[:name]
end

That should fill in the “name” field if there is a cookie. And of course, you’d have to do that for each field you wanted a cookie for (name, email, site).

And I could be wrong about this one (I don’t think I’ve ever tried it), but you may be able to store all the values into one cookie, though I don’t know the benefit.

cookies[:neolyn] = {:value => [@comment.name,
                               @comment.email,
                               @comment.site],
                    :expires => 2.months.from_now}

Then maybe access it like:

@comment         = Comment.new
@comment.name  ||= cookies[:neolyn][0]
@comment.email ||= cookies[:neolyn][1]
@comment.site  ||= cookies[:neolyn][2]

Anyway, like I said, I don’t know why you would do it that way, but I think you can.

09
05 Apr 2007 10:28 AM

Thanks, Ryan. And yes, I’ve known Chris for about four years and he’s always picked up on things really, really fast.

10
05 Apr 2007 11:13 AM

Hmm, I wonder if this works…

# loading defaults from cookies
@comment = Comment.new(cookies[:comment])

# storing cookies (after creating a comment)
%w{:name :email :site}.each do |c| 
  cookies[c] = @comment.send(c) 
end

Untested, but worth a try ;-p




Please rewrite the image text in the SPAM field: Spam Protection

Preview

2008 by Ryan Heath | Get In Touch

flickr

DesolateInfinityLooking upDazedBlurred