I’ve decided I’m leaving the 140 Club. 2 months and about 70 tweets later, I’ve had my fun and indulged my obsessive nature for long enough.
Micro-Micro-Niche Advertising
I was reading a local news story and in the sidebar I noticed what appeared to be an ad banner for Barack Obama in the sidebar. It turns out it was actually a link to the news site’s section of Obama-related stories. What struck me about the banner was the wording: “President-Elect Barack Obama Click Here.” Apparently they are targeting the extremely small niche of web users that are President-Elect Barack Obama, and imploring them to click on a mysterious banner (and for those counting along at home, that’s a niche of one.)
Just a little mid-week levity. The moral of the story: think carefully about your calls to action. You need to make it clear to your readers what you want them to do and why they should want to do it. Give them a reason to click your banner or sign-up button. And if something isn’t an advertisement, make sure that it doesn’t look like one. This banner looks like a paid ad for who knows what and I never would have clicked on it if I weren’t planning to write this post poking fun at it. It doesn’t represent a compelling call to action for me. At face value, I can’t tell what I’ll find once I click, or even if I’m supposed to. After all, I’m not President-Elect Barack Obama. That’s some other guy.
Blog Post Title SEO–The Only Tip You Need
Quick tip: Search engines are designed to work for people, not the other way around. They’re designed to pick results that are likely to be what the searcher is looking for, and for a blog the post title is an important part of that. If you want people to find your blog post in a search engine and click through, do the following:
- Think about what you would type into Google if you were looking for whatever information you’re about to post. Make it specific.
- Put that in the title. You can add some more detail to make the title more “punchy,” but make sure your search phrase is in there.
- There is no step 3.
If a searcher sees exactly what she typed in the title of a search result she’s going to click. The trick is that your content has to support the title you picked. Otherwise, even if you trick the search engine, your site visitor will take one look and hit the back button.
140 Characters
I recently launched a just-for-fun project called The 140 Club. As the site mentions, “The 140 Club is a group of Twitter users loosely committed to writing tweets of no more and no less than 140 characters.” I’d like to say that it’s an artistic experiment in creating something in a constrained environment, but it’s really just for fun. After finding that I had a knack for writing updates that were close to 140 characters (the maximum on twitter,) I decided I would start rewording my updates to be exactly 140 characters. I announced my plan with the following tweet:
Also my new thing is writing updates of exactly 140 characters. The one before last only made it because I put an extra word in by mistake.
Shortly thereafter, Sean Bossie, a client of the company I work for and all around cool guy replied:
@scottnelle That cracks me up Scott…I am now joining The 140 Club. So the thing is: Can you end with incomplete words or must be dead on??
Sensing an opportunity to get a chuckle out of Sean, I bought a domain, cracked open Photoshop, and got to work over my lunch break. An hour later I had designed, built, and launched the140club.com. Talk about agile. :-) The 140 Club is currently accepting new members, so why not join up?
24 Ways 2008
Drew McLellan has posted the first article in this year’s 24 Ways To Impress You Friends, the advent calendar for web geeks. The site will have a new article about web design or development each day from now until December 24. Over the past few years it’s become a great holiday season tradition, and the only one that doesn’t seem to start earlier every year.
Extending CodeIgniter’s Validation Library To Check For Unique Values
Updated August 29, 2010: I’ve updated this post to be compatible with the latest version of CodeIgniter. It’s currently compatible with 1.7.0 and later. If you are still running on an older version and want the old version of this code to match let me know; I will send it to you. When I updated the post I also reset the discussion since most of it was specific to the old code.
February 15, 2011 Calvin Froedge rightly notes in the comments that with the release of CodeIgniter 2.0 the old PHP-4-compatible constructor style no longer works. The code below is updated to reflect that. He also has some thoughts about internationalization with language files and storing the visitor’s language in the session variables. This should be back-compatible with old versions CodeIgniter as long as you’re running PHP 5 on your server.
I’m working on small web application and I’m building it with CodeIgniter. Like most web applications, mine requires user registration and login. And like most login systems, mine is happiest if each user has a unique username. While the CodeIgniter validation library is pretty robust, it doesn’t come with a function for checking a value to see if it is unique or if it already exists in the database. Fortunately there are a couple of ways to remedy that.
The first way is outlined in the documentation for the validation library under the heading “Callbacks: Your own Validation Functions.” I tried this and it works well, but it requires you to write the functions in your controller or model. I thought that looked messy and I wanted something a little more streamlined, so I decided to extend the validation library with my own function. Extending CodeIgniter’s libraries is pretty easy. Here’s what I came up with–I’ll explain the important lines afterward:
Web-Based MySQL Administration with SQL Buddy
I always find it interesting to see what software people are using to build websites. I’m always open to new applications that might make my job easier or less stressful. With that in mind, I’ve decided to start posting reviews and tips about some of the software that I use. Today I’ll be writing a mini-review of an application that I’ve started using to perform routine database maintenance tasks on my development box.
SQL Buddy is a web-based MySQL Administration tool that’s free, open-source, and easy on the eyes. I’ve installed it on my development machine and I’m loving it so far. Most web developers are probably familiar with PHPMyAdmin, and this does pretty much the same thing, but it does it while looking quite a bit nicer. It’s also got some tasteful interface enhancements (yes, that’s code for AJAX minus the abuse) to make the whole thing feel a bit faster. I haven’t done proper benchmarking, but it sure feels faster than PHPMyAdmin on my machine while managing my little databases. And the interface seems pretty well considered. It allows you to easily edit multiple records on a single screen.
It was REALLY painless to install. The download for the program is only 167KB zipped. To install it just unzip and drop it on the server. That’s it. Then point your browser to wherever you placed it and log in as one of your MySQL users. Easy.
I only have minor issues with SQL Buddy. The interface for browsing records in a database looks so much like a regular desktop application that I expected it to work like one, allowing me to click on rows and edit the data in place. Unfortunately it doesn’t work like that. You have to check a box and then hit the edit link to edit all selected rows on another page. It’s a minor issue but I’d like to see it changed. Due to the open-source nature of SQL Buddy I’m sure it’s only a matter of time before someone adds edit-in-place.
SQL Buddy is a nice, simple piece of software that allows you to easily edit your databases from the web browser. I don’t know if it will ever be more popular than the deeply-entrenched PHPMyAdmin as the de facto standard database editor for web hosts and developers, but it’s quickly become my favorite web-based editor. Highly recommended.
Jeremy Keith Covers AEA San Fransisco 2008
Jeremy Keith is live-blogging An Event Apart San Fransisco 2008 over at his website. He has the uncanny ability to write up organized, well-written, and thoroughly-linked summaries of events in near-real-time. If you (like me) were unable to get to the conference Jeremy’s site is the place to get the scoop on all the presentations. Thank you, Jeremy.
Conditional CSS
Conditional CSS is a server side script which allows you to target particular browsers within your CSS files. The script detects a visitor’s browser and then parses your css files, removing the conditional statements and any lines that aren’t meant to go to that browser. I think I like this more than traditional browser filters but less than using conditional comments to serve an extra stylesheet with overrides to Internet Explorer. I haven’t tested it to determine how much of an issue the additional processing overhead is, so I’m not sure how usable it is. It’s an interesting technology and is available for multiple platforms including PHP and C. The C version is apparently very fast.
The Problem With Em-Based Layouts
I was recently working on a project and thought it might be interesting to try out an em-based layout (where the layout of the entire site changes based on the font size.) I was hoping to preserve ideal line-length for my copy. The geek cred associated with em-based layouts was also appealing–earlier this year it seemed like they were all the rage. This trend may have been kicked off by the brilliant Mr. Dan Cederholm, a personally hero of mine in the web development community–as silly as that may sound.
It occurred to me, however, that there’s a fundamental flaw in the logic of an em-based layout. As a visitor increases the size of the text on screen, the layout will increase in width so that everything remains in proportion. Now I’m generalizing here, but if a visitor needs to bump up the text size to read it, it’s possible (perhaps even likely) that they could be older and potentially less technical than us web developers with our 20+ inch monitors. As the text size (and therefore layout width) increases, these users with their smaller monitors will run out of room to grow pretty quickly. This causes dreaded horizontal scrolling which no one likes, no matter what designers may have told you in the late 90s.
Roger Johansson acknowledged this flaw on his blog and suggested that by setting a maximum width in pixels you could prevent this issue. The problem that is titular to this post, though, is that this just doesn’t seem to work. It’s possible that it did work at one time, but I’ve tested many layouts online in addition to my own test case and found that in recent versions of Firefox the layout expands unchecked, causing horizontal scrolling. Perhaps this feature was broken during recent updates to Mozilla’s rendering engine. Unless I’m missing something em-based layouts are self-defeating as it stands. So are they anything more than geek-chic?
Dustin Tigner points out in the comments that something has changed in firefox 3. It now uses page zooming by default. If you enable text-only zooming these layouts start to work again. That begs the question, however: With browsers moving toward page zooming by default, how much longer will em-based layouts be a practical use of our time? I think in some cases page zooming provides a worse user experience than a well-coded em based layout (see http://www.456bereastreet.com/ as an example,) and as a default it tends to override those careful layout considerations.