Archive for January, 2008

A Regular Expression for Stripping HTML Tags

January 18th, 2008

Here’s a regex I wrote yesterday for stripping specific html tags from a string:

<[^>]*(table|tr|td|th)[^<]*>

Here’s an example in AS3 that removes <p> and <b> tags:

var testString:String = “<p><b>Hello</b> world!</p>”;
var regEx:RegExp = new RegExp(“<[^>]*(p|b)[^<]*>”,”gi”)
trace(testString.replace(regEx,”"));

Enjoy.

Switched from Google Checkout to PayPal for donations

January 18th, 2008

I’ve switched to PayPal from Google Checkout for donations, in order to allow people to donate a custom amount. The fees are higher, but it allows for more flexible configuration – in the end, I think that’s better. What do you think?

What's the right approach for blog monetization?

January 18th, 2008

Lately I’ve been experimenting with this blog a little bit to learn more about how AdSense works, so you’ve no doubt noticed the ads. I personally dislike ads, but they do have the potential to be a money-maker under the right circumstances. The nice thing about them is that the money doesn’t come from the pocket of the viewer, it comes from the people who advertise. For this blog, however, I don’t think they’re a good fit. Here are a few reasons why:

The content of this blog doesn’t lend itself to pulling quality ads. I’ve been seeing ads for “Fix Flash Player Errors” – I sincerely hope no one clicked on that thing. It takes you to a registry scanner of some sort, and strikes me as being a bit nefarious. Also, the ads are only pulling in (at most) a few cents per click. For over 2700 visits, I made a whopping total of 73 cents.

The people who view this blog are not given to clicking on ads. Clearly, whatever my blog is advertising, you’re not interested in. For over 2700 visits, my ads were clicked around 10 times.

In terms of a money-making proposition, I think it’s safe to say ads are not a good fit. I have removed most of the ads on the site. I still want to watch how Google AdSense analyzes my content though, so I’m leaving one small ad in the footer. Instead of the ads, I’m going to try a donation model. I’m going with 3 donation levels: $1.23, $5.33, and $10.63. I started with $1, $5, and $10, and then added a few cents to offset Google Checkout fees. These donations will help me write more useful content, and will allow me to devote more time to finishing up some of those lingering projects that people have expressed interest in.

I really want your feedback on this. Do you think the donations are appropriate? Is the Buy button unobtrusive enough? Are the amounts right? I’m looking forward to your input.

What browsers do you test against?

January 17th, 2008

I’m in the final testing phase of a new website, and I’m wondering what browsers folks commonly test against these days. Since it’s new, I have no user agent data to go by. I’m presently testing against the following:

Windows

  • IE: 6, 7
  • Firefox: Newest

Mac

  • Safari:Newest
  • Firefox:Newest

This is a pretty small matrix, but has been pretty successful in the past. I give priority to fixes on the Windows platform, and Safari on the Mac. I’ll probably test in IE 5.5 as well, even though IE 5.x users make up only about 1% overall (according to some stats I’m seeing). Are there any particular browsers & versions that you pay special attention to?

IE Standalone Installations

January 17th, 2008

I always have to look this up when I need it, so I’m posting here for my own reference and yours.

Get standalone IE installations (for testing purposes) here:

http://browsers.evolt.org/?ie/32bit/standalone

Some things will cause these browsers to crash – I vaguely recall a problem with the address bar, and cookies were also problematic.

See the following article for solutions to some issues:

http://www.positioniseverything.net/articles/multiIE.html

categories: Uncategorized | Comments Off

The best web page development tool there is.

January 16th, 2008

If you create web pages and you haven’t heard about this tool yet, you need to get it ASAP. It will make your life so much easier. How I went this long without hearing about this is a mystery to me, but I guess you can’t know everything. The tool is called Firebug (http://www.getfirebug.com), and it’s a toolbar for Firefox that allows you to make live modifications to CSS and see the changes instantly in the browser. Also, the JavaScript debugging is spectacular (by JavaScript standards). Inspect mode has been a life-saver for me – it lets you click on an element in the web page, and takes you to the relevant HTML. Other tools, like the IE Developer Toolbar, have some of the features – but nothing else has them all.

Sorry if this is old news to you, but if you haven’t tried it yet, you should. I wouldn’t want to be without it.

categories: Uncategorized | Comments Off

Macworld 2008 – What am I buying?

January 16th, 2008

No doubt this has already been covered to death elsewhere on the interwebs, but I thought I’d chime in with my takeaways on Macworld ’08.

You can’t announce an industry-changer like the iPhone every year. So it’s no surprise that this year’s Macworld left many with an empty place inside where their anticipation once lived. But if the new Apple product lineup didn’t live up to the hype, it’s not Apple’s fault. Although the blogosphere was abuzz with conjecture months in advance, I didn’t hear Apple saying they were going to change the world. And they didn’t. What they did was announce solid upgrades to their product line

The much-needed refresh for the Apple TV set-top box with the major overhaul of movies on iTunes is a powerful combination, and may prove formidable competition for the existing players in the online movie rental space. Those who don’t wish to shell out $230 for the set-top box will still end up renting a few movies for mobile viewing on their iPods. For those who do buy the Apple TV, keeping a Netflix subscription around looks less appealing (although in many cases, it’s still cheaper) and ordering pay-per-view on cable and satellite would just make no sense at all.

The iPhone 1.1.3 software update was the single thing that I looked forward to the most, and so it was also the most disappointing. It could have been so much more, particularly given my low expectations. I want a few basic things from my iPhone that it doesn’t do now:

  1. A way to edit my notes on my Mac
  2. Select, copy and paste text
  3. A few simple games. I’ll even pay for them.
  4. Flash. Preferably Flash Player 9.

Ok, so the last one isn’t so basic. But the first 3 are no-brainers.

The 1.1.3 iPhone update does have some cool stuff though. The location finder in Google Maps is pretty cool, at least in theory. It triangulates your position based on the location of nearby cell towers and wifi hotspots. A really clever idea – but accuracy varies wildly. In Alexandria, VA it found my location to within a mile – in my office in DC, it found my exact building.

Since I’m a UI designer (among other things) and this blog is supposed to be focused on the presentation layer (although it often deviates), I’d be remiss not to talk about the new interaction the iPhone has for re-arranging icons. This is one area where I think they nailed it. Here’s how it works: just press and hold an icon until it starts to wiggle. When the icons are wiggling, you can drag them around the screen. How great is that? The ‘wiggle’ effect is a perfect gut-level visual cue that the icons are in a fluid state. It’s the kind of simple, intuitive design that people who create UIs should strive for. I think when it’s all said and done, Apple is going to get the credit for defining how multi-touch interfaces behave (even if Jeff Han and others did the homework).

Apple also announce the Time Capsule, an Airport Extreme with a 1 terabyte hard drive inside, meant for performing wireless backups with Time Machine in Leopard. This is a real kick in the crotch for anyone who recently (6 months ago) purchased an Airport Extreme with the intent of using it with a USB drive. It turns out, you actually can’t use a USB drive attached to last year’s Airport Extreme for your Time Machine backups. Until Apple releases firmware to resolve that issue, I’m going to assume that this was their plan all along. Jerks.

Finally, there was the MacBook Air. I think this will be very popular for the airborne businessperson. It will fit nicely into that little pouch on the back of the seat that holds the Skymall catalog. Also, for the fashion-minded student. But, not for me. I have thick, manly arms that can withstand the weight of 5.4 lbs of computing power. I’ll bet I could even handle 6.8 lbs.

categories: Uncategorized | Comments Off