Archive for March, 2008

And a Dim Bulb Brightens…

Though developer by trade, I think I can talk CSS fairly intelligently with any hardcore designer. But the one thing that always eluded me a bit was the “em” sizing element. I could never find a definitive description of just how the hell they actually worked.

Today I put that one to bed, thanks a straightforward article on A List Apart

Working from a default of 16px, the following styles should give the desired text sizes:

.bodytext p {
      font-size:0.875em; /* 16x.875=14 */

}.sidenote {
      font-size:0.75em; /* 16x0.75=12 */

}

If you want to work with em’s, your sizes are all relative to 16 pixels. Simply multiply the size by 16 to get the actual display size.

Be sure to convey your “Well, duh!” reactions in the comments.

Update: When it rains it pours. Playing with my newfound logic, I’ve also learned that you can adjust what an em is relative to based on different font-size definitions in nested page elements. Take this simple example…

<div style="font-size:0.5em" />
  <div style="font-size:1.5em" />
    What size is this?
  </div>
</div>

The text in between the two div tags will actually work out to be 0.75em (0.5 x 1.5 = 0.75), which is equal to a pixel size of 12 (see quote above). Now I gotta learn to play carefully with these things…

Do Search Stats Dictate Your Agenda?

The latest trend in perfecting “the message” in the internet age has been to optimize content for search engine indexing, aggregation, and delivery through the voodoo of search engine optimization – SEO. Let me be plain: I think most sites and web services are spending too much time worrying about what the Google crawler sees.

I can hear every one of you website statisticians howling at me right now. “We get so much traffic from Google results, it just doesn’t compare to direct hits.” I know, I know, and I’m not suggesting that we bury our heads in the sand and ignore those numbers. Instead, I think most site administrators are aiming their efforts at reaching the 10-yard line, instead of the end zone. Walk with me…

Off the top of your head, what do you think are the most important things to include on a site that will improve your SEO? If content wasn’t the first or most emphatic idea you had, you’re doing it wrong. Under Google’s own Webmaster Guidelines, the following appears as the third bullet in the “Design and content guidelines” section, after emphasizing internal linking and site map submission.

Create a useful, information-rich site, and write pages that clearly and accurately describe your content.

Keep in mind that the focus of the page is on how to build crawler friendly pages.

The “Quality guidelines” are even better. Here Google is pushing the need to avoid the blacker arts of SEO voodoo, such as link schemes, but here’s how they start…

Make pages for users, not for search engines. Don’t deceive your users or present different content to search engines than you display to users, which is commonly referred to as “cloaking.”

Avoid tricks intended to improve search engine rankings. A good rule of thumb is whether you’d feel comfortable explaining what you’ve done to a website that competes with you. Another useful test is to ask, “Does this help my users? Would I do this if search engines didn’t exist?”

Seeing the pattern? Even when the king of search engines is focused on talking SEO, they talk early and often about the importance of building a positive, informative user experience. Sure there are other tasks you need to do in order to get properly listed—meta tags, submit your site for searching, build a sitemap, etc.—but you’ll see the best results by building a library of good content.

However, note that I said “primary focus;” You are seeing a significant influx of users from searches, after all, so I’m not suggesting that you leave them out in the cold. Just keep in mind that at the end of the search is a real person, who wants to see real content.

Good content equals users, equals links, equals page rank, and the numbers should ideally help you identify hot spots and weak points in your digital library. To place your primary focus on anything else is rolling the dice on what Google and other search engines think of your stuff. That may get users to the site, but it won’t keep them there.

I say all this because the negative effects of misplaced emphasis run deep on a lot of sites. Placing time and energy onto a search crawler’s keyword hits detracts from your efforts to enrich your visitors’ experience. It’s a 1:1 inverse relationship, and applies to every site regardless of staff size…

  • Did you put a designer or developer in charge of your SEO effort? Fairly obvious time-share problem there.
  • Oh, you went all out and hired someone explicitly for SEO purposes? How about hiring someone to write more content instead, or even *gasp!* another developer? Lord knows there’s always plenty to do, and never enough developers on staff to do it (at least that’s been my experience; if a developer is reading this because his/her plate is clear right now, please drop me a line informing me where I can submit a resume).
  • If you have gobs of money and can hire all the staff you need, I suggest you ask your developers and designers how much time a week that SEO person (or people, ick…) saps away from tangible site development.

Regardless of your SEO approach, I can promise you that any excessive attention to it is detracting in some real way from what should be your true goal: delivering an ever-better experience, leaving your users more satisfied with each return visit.

Hello World, now where’s my e-mail?

Having just spent several hours doing some basic setup on a new WordPress blog, I can safely agree with the masses that it is indeed an excellent, well-written program. Even the most tech-inept amongst us would likely have no problem getting the software up and running.

Which is probably why I had a problem, and it had me initially cursing the name of WordPress.

My e-mail server sits on a different box, which means that I need to configure the e-mail functionality of my site to access this server via SMTP. I’ve set up countless PHP-based CMS’s—I contribute to one, and I’m in charge of custom-building another—so I know the first thing you always do is consult the manual, both the official one and Google. Of course, as you can see in these search results, I come up with absolutely nada. There is seemingly nothing in WP documentation about natively configuring the e-mail functions to use a mail server outside of the local box.

Further searching does reveal a hack up solution, which would suffice since I am pretty well-versed in PHPMailer. I also came across two decent plugins; ultimately I decided to go with WP Mail SMTP, as it’s functionality seemed to fit my needs. The plug-n-play style of the plugins system also made this a far better solution than hacking at the core code.

Which brings me to the reason I’m explaining all of this: simple SMTP e-mail configuration should be required in every CMS or CMS-style framework that sends e-mail, and that’s pretty much all of them. Why should users have to traipse across the net looking for a solution to a very common situation? Most hosting packages physically split their hosting and mail services for a menagerie of security and performance reasons.

I’m betting that a lot of WP users have found themselves in the same boat I did, and handled the issue with a plugin or two. But how many users even realized that what they lacked was SMTP configuration options, and instead simply knew that “I can’t send e-mail?” At the very least, WP documentation ought to explicitly lay out the e-mail setup, and point users to the available plugin solutions.

In the end, the plugin functionality came through, and honestly did impress me overall. Plus, during the turmoil, I learned about another great WordPress feature, the kvetch