Wednesday 25 March 2009

How to disable Ad Blockers

Last week I posted an article about Ad Blocker Detection. Once you have an estimate of the potential advertising impressions lost, you can decide if you want to address it and how you wish to do that.

Some websites think of visitors employing ad blockers as content thieves. Some sites even go as far as forcing users to accept adverts to browse their pages. Personally I believe most sites don't have strong enough content to warrant this and they will only alienate users.

I believe the only way to get visitors to disable their Ad Blocker on your site is to ask them, nicely. All you can do is encourage them to support your site.

Have a look at these two banners. If you have an Ad Blocker currently enabled, then they will be identical. If not, then you will see an old Amazon banner I exhumed, and then a clear and polite message asking for support.

Ancient Amazon Advert

Both banner slots have the message set as the background image, but it is not visible for top slot as the Amazon banner is in the foreground.

To ensure the the background message is not displayed to users when no Ad Blocker is employed, the first frame of the image is transparent and is displayed for 5 seconds. Even the slowest advertisement should load within that timeframe.

If you are concerned that this message might be displayed to the user when no advertising inventory is available for this slot, then I would suggest you address the lack of ad availability before you try and reclaim more impressions. Beyond that, the prudent approach would be to set the background property for the banner slot with JavaScript only after you have detected the user is using ABP.

Monday 23 March 2009

Emotional Investment

A few years ago I was working for an internet startup. One of the developers there had a bit of a prickly temperament. He was fine if everything was going as he expected, if his efforts were noticed or rewarded, but when he had to fix other people's mistakes, or disagreed with decisions made by management team, he vented pure vitriol.

Some of the staff started to avoid dealing with him, the management team started wondering about his loyalty. His skills were never in doubt, but his attitude was causing problems. There are enough politics in a small startup without this kind of behaviour.

The problem was that he was taking it all too personally. He'd heavily invested emotionally into this business idea and wanted it to succeed, so when others made decisions he judged as incorrect, he took it as an affront to the extra effort and the time he'd poured in.

I know that's what the problem was, because a few years ago that guy was me. Luckily, I managed to snap out of that mindset before I got too bitter about things, or before got fired.

I am a perfectionist, and sometimes a bit of a control-freak because of that, coupled with my natural directness, you can imagine how I had reached that state of mind. The trouble is it's often hard to see it when you are there. The interesting thing for me is the number of times I've seen similar behaviour in others.

It's strange that over-commitment can result in such negative impacts. Emotionally based over-reacting can cause bad decisions.

In companies where the product is heavily dependant on the technical team (common in internet startups), it is easy to assume your opinion should carry more weight. But business decisions may often overrule - technical excellence alone won't stop a business from failing. The best you can hope for is that any advice you offer is considered. Those other departments exist because they are required to some degree. A successful company is a machine of many parts working together.

Being commited to what you're doing is important, but we need to remember that ultimately it is just a job. That can be hard to do when so many of us measure who we are by what we do. We're paid for the time we put in, that should be enough.

Friday 20 March 2009

FontSoup Screensaver

One weekend back in the middle of 2008, I spent a little bit of time rewriting the FontSoup Screensaver that I created back in 2001. It was long overdue for a revamp. The new incarnation is a lot more polished and now has two configurable display modes (Rainbow or Muted Tones).

This version displays your TrueType fonts in an elegant Win32 screensaver. You can download FontSoup 2.0 now for free.

Thursday 19 March 2009

Making A List

Low-tech solutions are often underrated by developers and their technically minded brethren. We tend to look down on things that aren't bleeding edge, or are designed for the technically inept. It's true that I have little respect for Frontpage, or Powerpoint or anybody who saves HTML from Word.

But low-tech is the wildcard that always trips us up. How many times have you spent hours debugging a hardware/software problem, only to finally find the cause was less technical than you imagined?

Oh, the stories I could tell: Cache files ate all the drive space.., The LAN cable fell out.., They rebooted the wrong server... Twice!, We've been Slashdotted...

One of the simplest and most effective tools that is often overlooked by developers is a daily To Do List - on paper, right next to your keyboard.

Electronic To-Do lists have their place. They really shine when you want to look back at what you did and when, and for logging chargeable time, and automated reminders, but for managing just today's tasks, I don't think you can beat a real lined page on your desk.

Here's my top reasons why I think you should adopt this practice:
  • Quick glance access avoids Alt-Tab disruptions
  • Less stuff to hold in your head - don't rely on your memory, write it down and then you can fully concentrate on what you're doing
  • Helps you set an appropriate work-pace for today's tasks
  • It doubles an idea scribble space
  • Doodling can help you concentrate
  • It's a great prop for declining new tasks, "Sorry, I can't fit that in today, I've got to get through all this..."
  • The tactile satisfaction of drawing a line through completed items

And here's some tips on making the most of your list:
  • Don't spend more than 20 minutes planning your day
  • Don't use too much detail
  • Create sub tasks for complex tasks
  • Prioritize tasks in groups
  • Note which tasks depend on others
  • Quickly reprioritize after completing each task
  • Start a new list each day. Transfer uncompleted tasks from the previous day

Wednesday 18 March 2009

Ad Blocker Detection

Late last week I mentioned Adblock Plus in my list of Essential Add-on Tools for Firefox. Here's the description again, just in case you missed it:

Adblock Plus allows you to browse without ads. It works very well and is incredibly popular because of that. Users love it, advertisers and websites dependant on ad revenue hate it. As long as flash banners keep soaking up CPU cycles, I'll keep using it.

Just about all websites rely on advertising revenue to some degree. The problem is, how do you measure the number of potential impressions you're losing to ABP?

A couple of weeks ago I cooked up a very simple solution that seems to perform quite well. In this example I'll track it with Google Analytics, but you could easily rework it to your own system.

ABP blocks items based on a list of exception rules. This detection script relies on a javascript file specifically named to be blocked by these rules. According to this script you have ABP enabled on this page (assuming you're viewing this on something that supports javascript).

Here's the code:

<script type="text/javascript">var hasABP='ABP';</script>
<script type="text/javascript" src="/js/advertising.adserver.bannerad.js"></script>
<script type="text/javascript">pageTracker._setVar(hasABP);</script>

The contents of the file /js/advertising.adserver.bannerad.js are:

var hasABP = '';

So after running this for a few hours, you should spot ABP users as 'ABP' in the Google Analytics User Defined section. In theory you could get some false positives, but the rate reported for me was so low that I think it's performing well.

Once you have some data collected, you can set up Custom Segment in Analytics' Advanced Segments and try and estimate the lost impressions based on page views.

Tuesday 17 March 2009

How to beat Jetlag

Every few months I make a 5,456 mile pilgrimage to Head Office. That's a twelve hour flight going against the clock and arriving four hours after I left, relatively speaking. That extra eight hours in the day can really screw up your body clock.

I've worked out a system to beat desynchronosis that works well for me, so I thought I'd share it here:
  • Direct Flight: Get a direct flight. Changing planes and layovers will just make transit time longer and jetlag harder to deal with.

  • Don't Sleep: Keep yourself awake on the plane. Cram in as many movies as you can, or if books are your thing, take a real page turner. Don't get drunk in the lounge or on the plane, it'll just make it worse.

  • Arrival Time: Arrive in the late afternoon or early evening and keep yourself awake until at least 9PM. This shouldn't be too difficult with the process of getting from airport to hotel, if you get the arrival time right.

  • Eat Before You Sleep: Once you have arrived and checked in to your hotel, eat a proper meal. This is crucial to success. Your body-clock will still think it's 4AM at this point, but if you eat a decent meal and then go to bed, the meal can trigger a reset in your circadian rhythm. You should sleep a good eight hours and be ready to face the world the next day.

Admittedly, westward jetlag is easier to deal with than eastward, and I am still learning to best way to combat that. Ultimately the same principals should still apply.

Monday 16 March 2009

User Segmentation in Google Analytics

You're probably using Google's free webstats product Analytics on at least one site. And to be honest, unless you're an anti-Google-domination zealot, there's little reason not to. It's easy to install and the tools are pretty good.

It's a shame there's no simple hourly traffic graph, and the Advanced Segments produce some fairly questionable results, but they are still in Beta and they do clearly state the "report is based on sampled data."

Aside from that, it's very easy to set it up, give the marketing guys "user" access and forget about it - which is what many of us do. This is where we fail. There is a lot of useful segmentation data Google Analytics collects that can give us technical insights.

Web-stats are so much more than unique visitors and page views. Analytics can give you a good grasp of your customers' browser version, operating system, screen resolution, java support, Flash version and even connection speed.

Geolocation stats can help you decide if your global reach warrants employing a Content Delivery Network.

You can even create your own segmentation using User Defined values. I like to use it to identify users as Anonymous, LoggedIn and Admins, but you can pretty much set any value you like using this statement after the usual tracking script:

<script type="text/javascript">pageTracker._setVar('SegmentX');</script>

As long as you don't go crazy inserting a unique id per user (remember this is a segmentation tool), you should be able to get some useful data back.

Friday 13 March 2009

LYCOS Email service withdrawn

Email bounce rates could be spiking all over Europe this month as LYCOS stopped it's email service on the 2009-02-15. Apparently this was communicated in the press and on their websites over the past few weeks, but I don't know anybody who heard about it.

In fact, the first I heard about it was today when a friend directed me to after spotting consistent bounces for that domain - "The server isn't even taking connections". The further information page doesn't really tell us much more.

Further investigation suggests this is a pan-european service withdrawl. I'm not much of a multilinguist but these pages all seem to be saying the same thing:

I couldn't find any information on either. Curiously this seems to have not affected which is still offering email services.

You may have already heard of this and taken appropriate steps. If not, and you're using a mailing service with a strict bounce policy, I'd avoid sending to these domains until you've discussed it with your service provider.

Essential Add-on Tools for Firefox

Any good developer should have a few different browsers installed in order to check things are working properly in all of them. I currently have Firefox 2 and 3, Opera and IE6 installed and have IE7 on another box. I haven't gotten around to installing Chrome yet, but I guess I will have to sooner or later.

Firefox 3 is my browser of choice and here's why:
  • Tabbed browsing
  • Decent rendering engine
  • Live Bookmarks (Feeds)
  • Ctrl+U access to Page Source
  • Useful Add-ons

I don't like how much memory Firefox hogs, but it's much better than it used to be and maybe I should curb my tab usage. Sometimes the Shockwave Flash plugin flakes out and won't play until I disable/enable it or restart the browser, but that could also be related to tab usage too.

The following Add-ons are the reason Firefox is the first browser I'll turn to. They are incredibly valuable additions to your development toolbox. You've probably already got many of them installed.

Firebug allows you to "edit, debug, and monitor CSS, HTML, and JavaScript live in any web page." I couldn't count the number of times I've right-clicked to Inspect Element. It has a tiny footprint in your status bar when you're not using it. This is the best web debugging tool I've used.

Web Developer adds a toolbar and menu that allow you to manage cookies, CSS, Forms, Images, Outline elements along with a host of other tools. Highlights for me are the Cookie management, Outlining elements (to help debug layout issues) and the Error Console for debugging Javascript.

NoScript is a security add-on that allows you to protect yourself against XSS and Clickjacking attacks by only allowing active content to run from sites that you trust. It's this flexible script blocking approach that also makes it a useful debugging tool. You probably should have it installed to see how borked your sites are - it has a huge user base.

ScreenGrab lets you save webpages as images. You can grab the whole page or just the visible portion, or even copy it to the clipboard. No more copy+pasting sections together to screenshot a long page.

Adblock Plus allows you to browse without ads. It works very well and is incredibly popular because of that. Users love it, advertisers and websites dependant on ad revenue hate it. As long as flash banners keep soaking up CPU cycles, I'll keep using it.

YSlow for Firebug analyzes your web pages and tells you why they're slow (based on Yahoo's rules for high performance web sites). Some of the criteria is a bit subjective or inapproriate for smaller sites, but generally it offers some good tips.

SeoQuake SEO extension helps you "deal with search engine optimization(SEO) and internet promotion of web sites." It's possibly a little bloated for some users, but it does cover a lot of bases. It's worth checking out if you're doing any SEO work.

Thursday 12 March 2009

The "3 Times" Rule

I like breaking new ground. Making new things is exciting and engaging, sometimes it's challenging, but it's generally rewarding and fun.

What I don't like is doing the same thing more than once, particularly when it's because somebody couldn't be bothered articulating what they wanted properly. Usually taking a zero-assumption approach and asking a couple of carefully worded questions will avoid this.

But sometimes it's a long and involved task that just keeps landing on your desk. That's the reason I developed the "3 Times" rule (actually I might have stolen it from my brother-in-law).
  • The First time you have to do the task, it's an adhoc task.

  • The Second time you have to do the task, it's still adhoc, it's just an anomaly.

  • The Third time you have to do the task, it's likely you'll have to do it again, so build a tool, or automate all the parts that you can.

Let me clarify that I'm not talking about doing something three times because somebody made a mistake. I'm talking about running the same process on three different sets of data on three separate occasions.

This approach seems to work especially well with reports. Often it only takes a little more effort to throw the results into a webpage that the user can access on their own. The great thing about this approach is that the user feels empowered, and the task doesn't land on your desk again.

Wednesday 11 March 2009

What you don't know CAN hurt you

I'd be very surprised if you didn't know that Google offers a range of web products beyond their search engine. You've probably got a Gmail account, will have seen Google Adwords and may even already use Google's Calendar, Docs, RSS Reader, Analytics or Ad Manager. Even is part of the Google family now.

There is one application that nobody seems to talk about much. It's not as sexy as some of the other apps, but it can have great value for devs like us. I'm talking about Webmaster Tools.

Webmaster Tools can tell you about the things going wrong on your site that you never dreamed were happening. The functionality is organised into Diagnostics, Statistics, Links, Sitemaps and Tools.

  • Diagnostics will detail any errors and problems encountered by Google's web crawlers and mobile cell phone crawlers while accessing pages on your site. It also gives a Content Analysis that identifies potential problems with site metadata, such as title and meta description information.

  • Statistics include the Top search queries returning pages from your site and which of them were clicked, 'What Googlebot sees', Crawl Stats including the current PageRank for pages on your site, Index Stats and Subscriber Stats based on products such as iGoogle, Google Reader, or Orkut.

  • Links details the pages on your site that have external links, internal links, and which links on your site have been identified as candidates for appearing directly in Google search results.

  • Sitemaps allow you to submit and manage sitemaps.

  • Tools allow you to Generate and Analyze a robots.txt file, Remove URLs from Google's indexes, Enhance 404 pages, or install the Webmaster Tools gadget on iGoogle.

Together these tools make a cohesive suite that can highlight a whole slew of problems to tackle that you never knew you had. This might sound like a nightmare, but realistically you need to know which pages on your site have broken links, or HTTP errors, or missing title tags, or even 404s.

I've only discovered one gotcha to date, which is that Google Analytics data seems to be intertwined with the results. If you have been a bit clever with renamed pageviews, you could get some extra errors reported.

Webmaster Tools takes minutes to set up, and after a day or so will probably give you a raft of "measurable wins" to chase. Most of the problems highlighted are easy fixes, but depending on the traffic on your site can have a significant impact. At worst, even if you get no problems reported, it's worth the minimal set up time to get a clean bill of health from Google's crawlers.

Tuesday 10 March 2009

So, what is it that you do again?

Being a developer is a mixed bag. Generally we like to create, invent or fix things, but we often end up spending a lot of time maintaining, or optimising, or fire-fighting, or planning, or evaluating, or discussing. Although these things are all engaging tasks too, they are commonly not what drive us, and worse, they are pretty much un-measurable.

So what's the big problem with that? In a nutshell, most managerial types don't get what we do, and when it comes to performance review time it really makes it hard to shine when most of your work can't have a valid metric applied. This is easy to understand when you try to compare measuring a dev or sysadmin role to measuring a role with monthly sales target. "99% server up-time" doesn't cut it anymore.

Obviously meeting deadlines for project milestones are measurable and carry significant weight, but in reality many startups have a more fluid development path, and many of us are not working on projects where we can control or are responsible for milestones.

So what can we do about it? In short, not a lot. Try and set as many realistic measurable goals as you can, keep a log of anything adhoc you do that will look like a measurable win, so you'll be ready when review time comes along (or if you want to push for a pay rise).

Since the daily trials and task lists of most of us are out of our control, I thought I'd start this blog to suggest ideas over the coming weeks that can help you define your role in a tangible way, or maybe just have a "look what I did" moment. Hopefully they will also be "measurable wins", or at least interesting to read.