cnp_studio (cnp studio) - An interactive division of Clark/Nikdel/Powell

A unique mix of technology, creativity and human interaction makes cnp_studio a Web development firm focused on connecting people. Creating simple, useful Web sites is what we do. Learn more about us.

cnp_studio Blog

cnp_studio Blog

Archive for December, 2007


CNP’s Christmas Breakfast

Friday, December 21st, 2007

Yesterday the CNP gang (both Web and Print) got together for the annual Christmas breakfast at the Chalet Suzanne. The Chalet is not exactly the place that any of the guys here at cnp_studio would be found, but they do make some great silver dollar pancakes and sticky buns.

Because of those great pancakes, every year I try to get the guys to compete in a pancake eating contest (the restaurant keeps the refills on pancakes coming 5 at a time) to see who's prepared for Coney Island in July. This is the third year for the contest, but it was met with more reservation than excitement, probably due to the fact that you feel like crap after eating all of those pancakes. This year's contest ended with Sean at 14 pancakes, Pete at 28, and me finishing with 33 pancakes. Previous years have seen Pete and I getting up around 50, but that didn't even seem possible this year.

What about Mike? He had to bow out this year because his wife went into labor about 4 hours prior to our 8AM breakfast (come on Mike, priorities man). Around 4:50 PM yesterday, Mike was blessed with a happy, healthy newborn baby girl (8 pounds and 22 inches). Mom, dad and the baby are doing great. Congrats, Mike!

The breakfast then finished up with the annual gift exchange where we got such cool new toys as a Palmsize R/C Copter and a Screaming Monkey Slingshot.

Pancakes or Pancakes
Sean sports the fittingly appropriate "Grumpy" Santa hat

The Whole Gang
The CNP gang

A Special Christmas Box
Pete practices for the next installment in Saturday Night Live's "A Special Christmas Box" sketch (NSFW unless your office is like ours... in which case no worries).

cnp_studio is Getting a New Office

Friday, December 14th, 2007

You may or may not know that we on the Web side have been looking for a new office for a new space for... well... going on two and a half years. It wasn't for lack of trying. Just when we'd think we found a viable space it would fall through.

We've decided we really don't want to rent out the space right now. It's just too much trouble to build it out right now.

We found that the building has a few structural issues and it's going to cost us $750K to bring it up to code.

It's the year of the pig and we have a strict rule against renting out space in a year dedicated to swine.

The list goes on and on. Meanwhile poor Mike sits tucked away in the back of our office and Pete continues to work on the "oh so ergonomic" counter. Luckily this past summer we found a space right across the park from us and after much patience there is finally a light at the end of the tunnel. Starting some time in January early to mid January we will be moving into our new digs. As soon as we're in feel free to stop by for a Samuel Adams and a game of Warhawk.

Photo of demolition of the new space
Demolition - OK, that was fun. Now what?

Photo of new space in new mid-construction
Mid-Construction - I learn where baseboards come from.

[potential] Client Honesty

Tuesday, December 11th, 2007

Whenever we are approached by a potential client, Boy on Computerwe always try and have some initial questions we ask to assist in discovery. We try to get an initial indication of what the company is about, what they are looking for in a re-design (or design), and can sometimes also raise flags (both good and bad) about what it will be like to work with said client.

Well, some answers I received back today had me in tears:

What problems are you trying to solve a site redesign?
Our web site sucks and it looks like a 7 year old built it.

And…

What does your current site do right?
It is a URL… that’s about it. It really really sucks

Ahh… if only all the answers could be that funny. In all seriousness, it's nice to see that kind of honesty. It lets me know that the potential client is easy-going, and will appreciate the final solution that we give them (assuming we get the project).

Rails 2.0

Friday, December 7th, 2007

After months of waiting, Rails 2.0 is finally here!. If you haven't already, you can get Rails 2.0 with:

$> sudo gem update rails --include-dependencies \
--source=http://gems.rubyonrails.org

note: I had to use the '--source=http://gems.rubyonrails.org' after a few 'gem not found' errors.

Obviously, if all your applications are still running 1.2.x, there are a few caveats with just upgrading to 2.0, so be sure not to run 'gem cleanup'. If you do, you can always re-install that removed gem with:

$> sudo gem install rails --include-dependencies \
--version 1.2.x

So, let's say that umm... I were to update some existing production applications to Rails 2.0, without testing… what will break?

Where to begin? For starters, you hopefully wouldn't do that. Second, if you write good tests, run 'em. You should have plenty of output letting you know what's different. You may need to tweak a few things before your tests will even run. From the get go, there were only a few things that affected my older development applications, but most of what I've been working on lately has been release candidate copies and "preview" releases of Rails 2.0.

With my older applications, the only major issue I ran into when trying to run tests was the undefined method `server_settings=' for ActionMailer::Base:Class message. The method has only been renamed. Adjust the appropriate setting to read:

ActionMailer::Base.smtp_settings

A few of my favorite new features have been some of the updates made to routing. The semi-colon has been dropped from generated routes so /admin/pages/31;edit is now /admin/pages/31/edit. No more ;action_name. As trite as it sounds, that slash just looks better, and to me anyways, is much more RESTful than the semi-colon.

Route “namespaces” are definitely a powerful addition to ActionPack. Where you might have implemented a named route like:


ActionController::Routing::Routes.draw do |map|
  map.resources :articles,
    :path_prefix => "admin",
    :name_prefix => "admin_",
    :controller => "admin/articles"
end

With Rails 2.0, you can implement that same route with:


ActionController::Routing::Routes.draw do |map|
  map.namespace(:admin) do |admin|
    admin.resources :articles
  end
end

One of the things that really got me though, was the change to named routes and how they are called from within the application. With the above example and using version 1.2.6, I would write: admin_new_article_path, but this generates an undefined method error. The correct way in Rails 2.0 is new_admin_article_path. The same applies for edit actions. You can always run rake routes to see a listing of all the routes in your application, which is an extremely helpful rake task (although I'm sure a plugin for this existed out there before 2.0, just never really looked for it).

If you had err.the_blog's Sexy Migrations plugin released in March, you know how nice it was to write much simpler migrations. Shortly after the plugin was released, it was added to the edge Rails trunk. Now, migrations are much DRYer and more efficient to write:


class CreatePages < ActiveRecord::Migration
  def self.up
    create_table :pages do |t|
      t.integer :position, :version
      t.string :title, :limit => 150
      t.string :keywords, :limit =>250
      t.text :content

      t.timestamps
    end
  end
end

Notice how you can put 2 column names on one line? And the t.timestamps declaration will automatically add created_at and updated_at fields. Ahh…

Hopefully you've been keeping up over the last couple months since the preview release was announced on September 30th. If not, head on over to PeepCode and pick up the Rails 2 PDF written by Ryan Daigle (who also has a pretty sweet list of major changes and features on his site).

WordPress + Paged Comments Plugin + Recent Comments in the Sidebar = Frustration

Friday, December 7th, 2007

A recent upgrade of a project to WordPress 2.3.1 brought about a few other new upgrades. It's one of those things where you figure, "while we're in here we might as well fix up a few things." So among the upgrades being made was the addition of the Paged Comments plugin on the blog. A small bit of styling and we were good to go with paging. No real issues to speak of until we tested the recent comments we were pulling into the sidebar on the site.

Prior to any of the upgrades there was a box in the right sidebar of the site that pulled in five recent comments courtesy of the Simple Recent Comments plugin. No issues to speak of with this plugin. Recent comments pulled in reliably.

So back to where we combined the paging comments with the sidebar. The recent comments plugin will pull the 5 most recent comments along with the permalink to that particular comment, such as:

http://cnpstudio.com/blog/2007/12/04/new-site-girl-scouts-of-west-
central-florida/#comment-97

But then what happens to that permalink once I add paging? Well, any comments on the default page of the post would still work

http://cnpstudio.com/blog/2007/12/04/new-site-girl-scouts-of-west-
central-florida/

But what if that comment is now on page 2 of the comments? Simple recent comments has no way of knowing this. Hence we start getting broken permalinks to comments because the actual permalink may now need to be:

http://cnpstudio.com/blog/2007/12/04/new-site-girl-scouts-of-west-
central-florida/comment-page-2/#comment-97

Granted, the simple recent comments and paged comments plugins were made by two separate developers and never intended to interface together. However, it's not unreasonable to think that the Paged Comments plugin would come with a way to dynamically derive comment permalinks from pages other than the actual post page. Currently, the plugin only includes the logic to dynamically create the permalink on the actual comments page, but nowhere else. Frustrating.

That left us to do some custom work on our end to dynamically derive the permalinks in the sidebar. It wasn't our ideal solution. In a perfect world, this would have already been addressed somewhere in the WordPress community, but that didn't seem to be the case. Should we have used a different plugin altogether? Was the solution available on this plugin and we just went about this the hard way? With the amount of time we dedicated to solving the problem I don't think so, but anything is possible.

Our solution fixed our one instance, but it was not a solution for all situations and therefore not something we'd release to the entire community. Anyone heard of a pre-existing solution to this before we spend the time creating it?

New Site: Girl Scouts of West Central Florida

Tuesday, December 4th, 2007

Well, not exactly a "new site." New to our portfolio is more like it. The Girl Scouts of West Central Florida Web site actually launched on October 1. I'm just now getting around to actually writing about it. Kristin over at the Girl Scouts was beginning to wonder if we were not proud of the project. That couldn't be further from the truth.

Girls Scouts of West Central Florida Home Page

The Girl Scouts Suncoast Council was merging with the Girl Scouts Heart of Florida Council to make what is now the Girl Scouts of West Central Florida, a council comprised of about 28,000 girls, 10,000 volunteers spaning eight different counties. When the councils merged they would need a brand new Web site for the single council and this is where we came in.

We tried to make things personal on the site, so the first thing you'll notice when visiting the site are the individual shots of girls from the West Central Florida council. Second, we created Jody's blog (built on WordPress of course) and Jody (the CEO of the new council) has really done a great job of posting content and actively engaging in the conversation. Even more exciting are some of the initiatives on the horizon involving Flickr and Veoh so stay tuned on that.

Mike gets to take the credit on the content management system on the site. Sean gets credit on the design of the CMS as he created the look for use on the CMS he has developed in Ruby on Rails (Girl Scouts was developed in ASP.NET). The site has a variety of content items from static pages, to events, news, forms, photos and more. The content management system Mike implemented has allowed the Girl Scouts staff to quickly and easily maintain the content on this site without having to sacrifice major amounts of time, training or resources.

Pete completed yet another complex concept integration. A quick glance over the homepage and you'll see just how many things overlap. Not only that, but the integration needed to provide flexibility once integrated with the CMS Mike had developed.

That's things in a very oversimplified nutshell. More to come on recent projects

Latest Comments

andrew:
hey mike -- thanks for the reply, let me clarify what i mean.... I know that PHP fu...

nick:
Hi Jeff, Thanks for the heads up on the link. It's all fixed now and you should...

Jeff:
I would love to try your plugin, but the download link appears to be dead again. Ca...

mike:
@Denise: 1. The image is selected randomly each time the code is run. So normally ...

andrew:
hey -- great plugin and would like to use on several different pages, not just the ...

Categories Archives