Alex Hardy


Hello there!

Archive for ‘Toolbox’

A little something is under wraps

Monday, April 2nd, 2007

As a web developer I’m asked to build the ubiquitous “contact us” form on a regular basis. As I sit at my desk reinventing the wheel, thoughts occur to me:

  • Most people want to capture the usual suspects, information-wise
  • There are plenty of formmail scripts out there, which are fine for what they do – but they don’t do very much
  • If you’re not familiar with programming, these things can be hard work to build. Even if you are, the time it takes could be better spent

There are lots of things to consider, and mere scripts don’t cut the mustard. It’s really not rocket science to write a few lines of code that send some posted values to an email address. But what about input validation? Database storage of information? Personalised automatic responses?

A web-based interface with user login would be nice :)

I’m at work building a system to handle all these tasks and more besides for web designers like myself. It will be easy to set up without programming: no more work in fact than installing a tool like WordPress.

Development of this system is well underway, and I intend to release it publicly as donationware through this website on May 1st. This is an experiment for me on many levels, so please check back around that time and try it for yourself.

Computer switcheroo

Tuesday, March 27th, 2007

We’ve just had a bit of a techno swaparound, and now I’m getting used to the rather compact keyboard of a Core Duo MacBook Pro. It’s a very nice machine, and will be even nicer wen i gET USed t0 typng n iT.

We’re going to install Parallels Desktop and Windows XP on it. I look forward to finding out how good a solution that really is, or whether I’ll be scampering off with the Acer off Ian’s desk every so often.

Mint inclusion fix for WordPress

Friday, March 23rd, 2007

I continue to have difficulty with wildly different numbers reported by Mint and Google Analytics. I’m using the Google plugin by Semiologic for WordPress because it tracks outbound links in a handy way, but I just added the Mint JavaScript include code to header.php of my theme.

So far so good, the Google plugin even disables itself when I’m logged in. Alas, the same cannot be said for my Mint include. So all the time I have been logged in to WordPress, writing my fevered thoughts, Mint has been diligently recording pageviews that Google has not. D’oh!

A little poking around in the WordPress source finds my solution: the global variable that holds your user ID while logged in. So a little bit of PHP like so…

global $user_ID;

if (!$user_ID) {
	// Put the Mint JS include here
}

… and presto, one more discrepancy sorted.

I expect it will take a month or two for the stats to even out and for me to be able to confirm that.

Mint 2 and Google Analytics

Wednesday, March 21st, 2007

I installed Mint 2 on this website in January, so I thought I’d post my observations.

“Why have you waited so long to post?” one might ask. Well, I’ve actually been using Mint for rather longer than that. At the last count I’d put it on four websites and it’s one of the best browser-based applications that it’s been my pleasure to use.

Shaun Inman is a very talented developer and, based on a couple of exchanges I’ve had with him, a jolly nice chap. His following of web designers who lavish praise upon his every pixel and line of code is quite large enough without my joining it however, so I decided to wait and post something more objective than “I heart Mint.”

I’m using Mint in tandem with Google Analytics. Each has its pros and cons:

Mint

The most immediate difference is that it costs $30, but that’s peanuts. Get over it, and get your credit card out.

Mint is hosted on your own website, recording its data in a MySQL database. This means that the numbers you see are up to the moment, rather than generated on a schedule. It also means that you need to install and maintain it yourself, but that is a simple matter.

It is supported by an enthusiastic and creative group of users and developers, who create plugins (called “Peppers” thanks to Inman’s penchant for puns) and other tools as well as providing advice. This community vibe is entirely absent from Google, and will probably always remain so.

The user interface is clean, considered and understated. Compared to the complexity and ugliness of Google, it’s a breath of fresh air. It also makes it strangely addictive to take a peak at your stats on a frequent basis.

Another reason why I wanted to wait was that I felt rather hasty in buying Mint 2. Compared to installs of Mint 1.2 that I made, I experienced a short-term loss of functionality as Peppers that I’d come to rely on hadn’t been updated (this is now resolved).

At the time of writing I’m using Mint 2.02 with the following additional Peppers:

I plan to give it another couple of months before I update again, to be fairly sure that the initial flurry of changes and fixes is done and dusted…

Google Analytics

Firstly, Google is free. One of its primary functions is to track the success of your AdWords, and the revenue from this scheme supports the Analytics project (which is based on the Urchin software that Google acquired).

I mainly use it for its graphing capabilities and superior geo location reporting. I have plans to implement goal tracking, but that is something for the future.

Compared to Mint, it is powerful but ungainly. I tend to open Mint when I want to have a quick glance, and Google to see stats in more detail.

After originally setting up some filters (I set Mint to ignore my visits and Google to ignore my work IP address), I have removed them. I found it too problematic to reconcile the data between the two applications. Since they don’t seem to track figures in quite the same terms, I now just take the data as a ballpark indicator of activity.

Horses for courses. I recommend using both.

Postscript: I’ve also applied to the beta test programme for Reinvigorate, another free analytics tool. When I receive my invite, I’ll post about what I find.

WordPress made a scapegoat for unambitious design

Monday, March 5th, 2007

Joe Trotter, in post entitled “God I Hate WordPress”, writes:

I have a penchant for knowing - just, well, knowing - when a blog or website is powered by Wordpress. You know? Way too many links in the sidebar or header, usually styled the same way? Info all over the place? A candidly modified Kubrick theme? Referring to static pages as, omigod, Pages?

*Looks around my blog design. Hmm.*

WordPress sites tend to be a bit simple and standardised in layout, but I would have said the same of CSS-based sites in general a couple of years ago. At the time, I remembered the learning curve and put this down to designers getting to grips with new techniques.

WordPress, like Movable Type is just a database and a set of tools for content creation and presentation. It can’t be held accountable for the shortcomings of a site’s design. That would just be a poor workman blaming his tools.

Templates also have their place. They allow people who lack the design skills, or perhaps simply the time, to get a site up and running. I have valued my first few months using the standard Kubrick theme because it was a discovery phase. It removed the barrier to writing, and allowed the content of my site to develop organically.

When I released this design for my site, I made no bones about the fact that this is Version 1.0 and that I had been modest in my attempts to customise the standard layout. As I observe trends in what I choose to write about, future redesigns of this site will support that to greater degree.

If Trotter chooses to abandon WordPress as a backlash against its ubiquity, I think that’s a bizarre decision. If as he says, he seriously aspires to have a blog as highly regarded as John Gruber’s Daring Fireball, it will be the quality of his writing that achieves that. It will have nothing to do with his blogging platform of choice.

Wait for a year and a half before upgrading to Vista

Friday, March 2nd, 2007

… says MacUser, inaccurately quoting the BBC’s business editor, Tim Weber. He clearly says “Wait for half a year until the driver issues are settled and then buy a new PC.”

In my opinion this is good advice for the average user. Irrespective of the pros and cons of Windows Vista, the average user would do well to sit out the teething troubles that any major OS upgrade is liable to have.

Weber’s advice isn’t for people like me. If I had a PC I’d be trying Vista out by now and I’m not shy of taking a screwdriver to my computer if needs be. It does make me wonder though – upgradeability is considered a selling point of a computer, but is it really such a big deal? Decent PCs are cheap these days.

My iMac’s graphics, processor or motherboard can’t be upgraded. However, it is capable, small, quiet and beautifully designed – which is what a modern computer ought to be.

I wonder how may people actually do go to the expense and hassle of upgrading a machine. Don’t most people just buy a new one?

Zap those apps

Tuesday, February 27th, 2007

I use Firefox as my primary web browser. This is partly down to it doing a satisfactory job of rendering web pages, but also because I use Chris Pederick’s Web Developer Extension and Google Browser Sync to keep my bookmarks in step between work and home Macs.

Lately though, my Firefox had kinda lost the plot. Browser Sync had stopped working properly and I was even getting rendering problems on webpages that I wasn’t seeing on other computers.

So it was time to un-holster AppZapper for the first time. We all love the drag and drop simplicity of installing most software under Mac OS X, but removing it is another matter. Apps distribute preferences and other support files around your system that aren’t removed just by trashing the app.

AppZapper bills itself as “the uninstaller Apple forgot” – drag an application onto its window and it will identify the related components. A press of the “Zap” button causes a cute screen flash and all that junk is moved to the trash.

$12.95 promises free upgrades for life, for when a fresh start isn’t so simple.

My newly installed copy of Firefox 2.0.0.2 is working fine.

A solution to Mac “Save For Web” colour discrepancies

Thursday, February 22nd, 2007

An example of the colour shift when saving for web

I’ve been trying to find an explanation for the colour shifts we experience when exporting from Photoshop. When we preview graphics in ImageReady or open them in our Mac browsers, they appear noticeably washed out. We found the process tremendously frustrating when building the John Smith’s website, and we needed a solution.

To be honest we’d blamed Photoshop, but it turns out the Mac itself is behind it. Ironically the problem does not arise because Photoshop is stupid, but because it is clever.

Now, professional colour management is a black art that I do not claim to know. I’ve been able to gather some information, and I’ll relate my understanding:

The Problem

  • Gamma is a colour setting that is most noticeable in the mid-tones.
  • The Mac ships to this day with a display gamma of 1.8. This is due to its print heritage which predates the dominance of Windows and widespread use of the Internet.
  • Windows displays colours in sRGB (standard Red Green Blue) with a gamma of 2.2. This setting is a de facto standard shared by TV, scanners, digital cameras and the vast majority of computers on the Internet - which are not colour managed. This is why graphics on Windows appear darker and with more contrast than on the Mac.
  • Photoshop is clever enough to display an image in 2.2 gamma for editing.
  • However, it can’t possibly know how to preview your image when saving for web, because there is no single display profile for the web.
  • So it takes its best guess, which is to render the image to your monitor profile (if you are on a Mac, the odds are its gamma setting is 1.8).
  • You will observe a colour shift in the Save For Web window, but confusingly not when you reopen the image in Photoshop (see fourth point).
  • Open the graphic in a non colour managed application (like a web browser) and the shift is visible.

The Solution

As is often the case with technology, there is no 100% Right Answer, but a series of steps and choices. You have to decide for yourself which you consider to be the lesser of evils.

Firstly, you must ensure that the working RGB space in Photoshop is sRGB IEC61966-2.1 (Edit menu / Colour Settings). The easiest way to do this would be to select an Internet preset. I’m using “Europe Web/Internet.”

Work away! What you see is what Windows users will see (barring monitor variances which can’t be accounted for). You can preview how your work will appear to Mac users by selecting (View menu / Proof Setup / Macintosh RGB) and turning Proof Colours on. There’s our colour shift…

Now we come to export and where we make our choice. There are those, such as Don MacAskill of SmugMug, who recommend setting your monitor profile to sRGB IEC61966-2.1 for an easy life. Your monitor profile will match your working space, so hey presto! No shift!

In practise, I don’t like this method. It produces an undesirable blue cast on my iMac’s screen. Buried away in Aperture’s online support docs, Apple’s recommendation is:

Unless you have a color management expert instructing you otherwise, select a 2.2 gamma and a D65 white point.

I did this – From (System Preferences / Displays / Colour) I walked through the “Display Calibrator Assistant” and created another monitor profile called “iMac calibrated.”

This is a hotly debated step. Print professionals argue that this is not a solution for them. They go on to contend that sacrificing colour quality on your Mac screen to see things in the same way that the masses do is unwise. Better to accept the colour shift.

I agree with MacAskill, that Apple is pleasing an expert minority at the majority’s expense. Print professionals are skilled at tweaking their colour settings, while the public in general are not – they just want things to work. It all seems a bit pointless if you can’t view your own work the way you intended it. I’ve retained the new profile subject to further experiments.

As Apple gets more consumer focused I expect they’ll quietly start to ship with 2.2 gamma by default.

A resolution

Wednesday, February 21st, 2007

I’ve not been shy in the past where it comes to making derogatory remarks about Microsoft, their products or the PC in general. My preferences are evident. Going forward though, I want to use this website as a professional vehicle and for it to have some worth.

I don’t want to host a forum for propaganda and bickering. So I’ve made up my mind: I’ll continue to post observations on the tools of my industry, but I won’t stoop to pointless pro-Mac or anti-Windows rhetoric. If I ever do, by all means comment and remind me of this.

If you think that PCs suck or that Macs suck then I offer you Google as a starting point in your quest for like-minded discussion. Enjoy.

30-day trial of Adobe Photoshop Lightroom

Monday, February 19th, 2007

It seems that my wishes have been answered…

Adobe have released version 1.0 of Photoshop Lightroom, along with a trial version which replaces the downloadable beta. Prospective users would be wise to download the Aperture trial and put them through their paces in comparison to each other.

I plan to do just that and will report my observations. If anyone else cares to do the same, your comments will be most welcome.