stillbreathing.co.uk http://www.stillbreathing.co.uk/blog website design, development and consultancy Sat, 26 Apr 2008 23:05:30 +0000 http://wordpress.org/?v=2.5 en Unobtrusive JavaScript password strength checker http://www.stillbreathing.co.uk/blog/2008/04/25/unobtrusive-javascript-password-strength-checker/ http://www.stillbreathing.co.uk/blog/2008/04/25/unobtrusive-javascript-password-strength-checker/#comments Fri, 25 Apr 2008 23:11:11 +0000 chris http://www.stillbreathing.co.uk/blog/?p=642 I’ve added a couple of new functions to Performer - my easy to use JavaScript library. The two new functions allow you to check the strength of a password as it’s typed into a text box, and also check if a password and its confirmation match. Both update a notification element with a suitable message.

But that’s not all. Some of the older functions, such as the AJAX loader and tabbing functions, have got a little love as well. They now add extra classes to the elements they affect so you can style them easily. This stuff isn’t documented yet, but in a nutshell:

  • When loading some data from a remote page using the Loader function the element which is being updated will have the class ‘loaderloading’ while the loading is happening. Phew, a few too many ‘loader’s there.
  • When using the Tabber function to switch the visibility between different elements in a tag group, the link to the selected tab will have an additional class of ‘tabbercurrent’.
  • UPDATE: the Toggler function adds the class ‘toggleropen’ when the toggled element is being shown. That means you can easily do ‘open’ and ‘close’ CSS styles.

I’ve got lots more ideas for Performer, but time is short at the moment. However this little library - and the fantastic prototype library it’s built on - continue to make my life better.

]]>
http://www.stillbreathing.co.uk/blog/2008/04/25/unobtrusive-javascript-password-strength-checker/feed/
HTML is still where it’s at http://www.stillbreathing.co.uk/blog/2008/04/21/html-is-still-where-its-at/ http://www.stillbreathing.co.uk/blog/2008/04/21/html-is-still-where-its-at/#comments Mon, 21 Apr 2008 08:25:13 +0000 chris http://www.stillbreathing.co.uk/blog/?p=641 I just read a ridiculous thing at NetworkWorld about the “demise” of HTML skills. It’s in the conext of an article discussing “5 IT skills that won’t boost your salary”. I’ll quote the passage and highlight the relevent parts to save your eyeballs from being assailed by their ad-heavy pages:

Technical skills may never die, but areas of expertise wane in importance as technology advances force companies to evolve and IT staff to forsake yesterday’s craft in favor of tomorrow’s must-have talent …

As companies embrace Web 2.0 technologies such AJAX, demand for skills in HTML programming are taking a back seat. According to Foote Partners, pay for skills in technologies such as Ajax and XML increased by 12.5% in the last six months of 2007, while IT managers say they don’t see a demand for technology predecessors such as HTML. “I’m not seeing requirements for general Web 1.0 skills — HTML programming skills,” says Debbie Joy, lead solution architect for CSC in Phoenix.

Is it just me, or does anyone else find that ridicuous? AJAX requires HTML, just like cars need roads, or boats need water. Without HTML skills all the flashy new AJAX development wouldn’t work.

Tell your managers, we need to keep the plain old semantic HTML skills. Without them the web is dead.

]]>
http://www.stillbreathing.co.uk/blog/2008/04/21/html-is-still-where-its-at/feed/
HTML, PHP and JavaScript Experiments http://www.stillbreathing.co.uk/blog/2008/04/20/html-php-and-javascript-experiments/ http://www.stillbreathing.co.uk/blog/2008/04/20/html-php-and-javascript-experiments/#comments Sun, 20 Apr 2008 20:10:34 +0000 chris http://www.stillbreathing.co.uk/blog/?p=636 I was browsing through some stats for my website tonight and noticed a few people were visiting for my Automatic Image Replacement Engine (AIRE) which I did a long while ago. So I thought I’d do a quick post about some of the other experiments I’ve worked on which are all free for any use (just credit me as the original author).

3hive player - playing the sharing!

A If nifty Greasemonkey script for Firefox which adds a little player for every track found on the excellent 3hive music sharing website. Keep up the good work, boys.

CSS Gantt chart

Show a Gannt chart with just HTML and CSS, no need for images. There’s even fixed-width and fluid-width versions.

Datatable class

A simple datatable class for PHP which will allow you to pass an array of values which will then be displayed as a table. Format cells almost anyhow you like, add optional alternating CSS classes, and lots more options. There’s also a simple explanation of object-oriented programming on that page in case you’ve found it as difficult as me to understand the concept.

Refresher function

Update a part of your webpage with JavaScript the easy way, so now anyone can do that clever AJAX stuff.

Clean URL Capability Checker

If you want to know if your server supports mod_rewrite, the fantastic way to rewrite URLs, then use this little tool.

Zoom Boxes

An experiment with multiple boxes that zoom in and out when clicked. Not much more I can say about that, really.

AIRE - automatic image replacement engine

Fonts are limited on the web, so I wrote this little PHP function that will render single-line text using any font you want as an image. Before you say “but images aren’t accessible!” it writes the images in as backgrouns, leaving accessible text in the HTML. Hoorah.

]]>
http://www.stillbreathing.co.uk/blog/2008/04/20/html-php-and-javascript-experiments/feed/
Confessions of a compulsive view-sourcer http://www.stillbreathing.co.uk/blog/2008/04/16/confessions-of-a-compulsive-view-sourcer/ http://www.stillbreathing.co.uk/blog/2008/04/16/confessions-of-a-compulsive-view-sourcer/#comments Wed, 16 Apr 2008 22:46:53 +0000 chris http://www.stillbreathing.co.uk/blog/2008/04/16/confessions-of-a-compulsive-view-sourcer/ Hi, my name’s Chris and I’m a compulsive view-sourcer. I’ve been a compulsive view-sourcer for several years, but most of the time I keep it to myself and try not to let it affect my family and friends. Sometimes I have a bad episode and then I feel guilty afterwards. Those bad episodes are happening more frequently.

You see, other people might favour crack or LSD, I prefer HTML. It gives me a real high to get some quality semantic HTML - I’m happy for hours. But there’s a lot of bad stuff out there that will just give you a headache; dirty HTML with all sorts of other crud added to it. I try to stay away from dirty code but it’s so much easier to find than the clean stuff.

Take last week. A website I used to be a regular visitor to relaunched with a new design. I went to have a look, but before I knew what I was doing I had right-clicked and viewed the source. Bad mistake. It was HTML, but only barely. Full of tables for layout, spacer GIFs, all the worst additives. I know I shouldn’t have done it, I just couldn’t stop myself.

I felt so dirty and guilty, not to mention ashamed. I had to do something about it, so I cleaned up the HTML. You can see the original version here, and my cleaned up version here.

This is where my compulsion to view sourcing gets hard to handle. I mean, it’s not enough that I see bad code, I just have to do something about it. The website I rewrote is now over 60% lighter when you count code and images, and has a clean and semantic HTML structure. If they get 250,000 visitors a month (but I think they get a lot more than that) with their old dirty homepage HTML that would be 59.6 gigabytes of data transferred. With the new clean HTML it’s cut down to 22.9 gigabytes.

But that doesn’t matter, because I’m never satisfied. I’ll always need another hit of HTML, and while the clean stuff is great, it’s the dirty stuff that’s much easier to find. Still, I suppose the first step is realising I have a problem.

If you’ve been affected by any of the issues raised by Chris’ confession there is help available. Visit one of the excellent online support groups and get involved. Together we can stop the supply of dirty HTML to our screens.

]]>
http://www.stillbreathing.co.uk/blog/2008/04/16/confessions-of-a-compulsive-view-sourcer/feed/
Web capital = social capital http://www.stillbreathing.co.uk/blog/2008/04/06/web-capital-social-capital/ http://www.stillbreathing.co.uk/blog/2008/04/06/web-capital-social-capital/#comments Sun, 06 Apr 2008 21:05:44 +0000 chris http://www.stillbreathing.co.uk/blog/2008/04/06/web-capital-social-capital/ We all know that “social capital” is a phrase used to describe the influence, reputation and connections a person has in a particular social context. Like money, it’s something that’s hard to come by but easy to lose. Tara Hunt, a person with greater than average insight into the social web, explores this area in ‘Social Capital and the Influence of Social Networks‘. I suggest you read it as it will help you to understand my slant on this subject. I’ll wait.

Back? Good. It appears to me after reading that, and much more written about the rise of social networks and the blogosphere, that we’re not talking about anything new. In fact this stuff is as old as Google itself. Why? Here’s why:

Social Capital is … complex and includes … the Social Capital of those who you have relationships with

So if you have a relationship with someone of high social capital (related trivia: my second ever subscriber on FriendFeed was Hugh Macleod) that raises your social capital. Where have we heard that before? Oh yes, search engines.

Search engines, at least the traditional ones such as Google, have a fairly simple method of working out how important you are. Let’s say someone searched for the word “trombone”. If you have the word “trombone” then you’re almost certainly going to appear somewhere in the search results. How high up depends on how important and relevent you are - your “web capital”, if you will. Let’s look at both these parts.

Relevance

The relevence is dependent on a) the searched words appearing on your web page and b) how often the appear and c) where they appear. Actually it’s a lot more complex than that, but for this simple illustration it’s enough. And I want to move onto the more important topic:

Importance

On the web not all websites are created equal. Those which have few links going to them are, to put it bluntly, less important than those to which many people have linked. So sites such as BBC and Amazon are massively important, as they have been linked by so many people. A link to a website is like a vote of confidence in that site - it translates almost directly into pure importance. OK, it’s more complex than that, but you get the idea.

So if you’re a little unimportant site, and you get linked from an important site, it has a positive effect. Suddenly Google says “Well, I thought that little site was unimportant, but look who has just linked to it! I’d better push it up the search results a bit.” And a few links from a few high-profile sites is like a Hollywood A-lister calling round your house and saying “Hey, come on, I’m taking you out drinking with my A-lister buddies”. It has a positive effect.

So what has this to do with social networks? A lot, as it’s exactly how social networks operate as well. The more people you have as “friends” and have you as a “friend” the more important you are. Great, fame and fortune awaits.

Except it’s all bullshiitake (to borrow a phrase from Guy). For more information on that see my recent post about social engineering.

]]>
http://www.stillbreathing.co.uk/blog/2008/04/06/web-capital-social-capital/feed/
Save the Developers http://www.stillbreathing.co.uk/blog/2008/03/28/save-the-developers/ http://www.stillbreathing.co.uk/blog/2008/03/28/save-the-developers/#comments Fri, 28 Mar 2008 07:53:59 +0000 chris http://www.stillbreathing.co.uk/blog/2008/03/28/save-the-developers/ With the vast difference in standards compliance between Internet Explorer 6 and 7, and the recent announcements about even greater things to come in Internet Explorer 8, the time has come to get rid of the bane of web developers once and for all. That’s right: save a developer; don’t use Internet Explorer 6.

I wouldn’t even be able to start to count the number of hours I’ve spent fixing things for IE6, and as it’s been 18 months since it’s replacement was released it really is time to get rid of the old dinosaur. There are plenty of great alternatives out there, so make sure you upgrade - and make sure your family and friends (who you act as “tech support guy” for) upgrade as well.

Together we can fix the web.

]]>
http://www.stillbreathing.co.uk/blog/2008/03/28/save-the-developers/feed/
What the cool kids are arguing about http://www.stillbreathing.co.uk/blog/2008/03/18/what-the-cool-kids-are-arguing-about/ http://www.stillbreathing.co.uk/blog/2008/03/18/what-the-cool-kids-are-arguing-about/#comments Tue, 18 Mar 2008 12:21:39 +0000 chris http://www.stillbreathing.co.uk/blog/2008/03/18/what-the-cool-kids-are-arguing-about/ A long but worthwhile read on the history (and histrionics) surrounding the current great New Web War by the estimable Joel Splosky.

]]>
http://www.stillbreathing.co.uk/blog/2008/03/18/what-the-cool-kids-are-arguing-about/feed/
IE8 WebSlices http://www.stillbreathing.co.uk/blog/2008/03/06/ie8-webslices/ http://www.stillbreathing.co.uk/blog/2008/03/06/ie8-webslices/#comments Thu, 06 Mar 2008 07:35:24 +0000 chris http://www.stillbreathing.co.uk/blog/2008/03/06/ie8-webslices/ The web world is currently alight with discussion around the new Microsoft Internet Explorer 8 software slated to be released later this year. The bulk of this conversation has been about whether IE8 will display pages with its much improved (it passes the Acid2 test) standards-complianct rendering engine. It seemed that we would have had to do some fiddling to get this to work but now it appear we don’t have to. That’s a good move, well done Microsoft.

I’ve just been and had a look at the website for the IE8 developer beta, and noticed something pretty interesting. they’re introduing a new feature called WebSlices which are like feeds for certain parts of web pages. Developers who add the required code to their pages will allow visitors to subscribe to updates of those sections of the page, which many of the same facilities afforded to RSS publishers.

My initial thought was that they’d have used some horrible proprietary syntax to make this happen, completely ignoring the established ways of doing this. But I was wrong. Almost.

Looking at the whitepaper for WebSlices it appears the IE8 team have taken large slices (excuse the pun) of the hAtom format to build their new feature. The main change being using a “hslice” rather than “hatom” class on the parent element of the feed. I’m not sure why they’ve done this, hAtom seems to do everything they need. Maybe it’s just Microsoft wanting to keep some level of control, maybe there’s something more to the story.

At any rate, this is is going to make it easier for developers to provide subscribable content on their web pages. Hopefully it will bring microformats - and web standards in general - to the attention of people traditionally deep inside the Microsoft world.

]]>
http://www.stillbreathing.co.uk/blog/2008/03/06/ie8-webslices/feed/
Social engineering http://www.stillbreathing.co.uk/blog/2008/02/21/social-engineering/ http://www.stillbreathing.co.uk/blog/2008/02/21/social-engineering/#comments Thu, 21 Feb 2008 23:53:58 +0000 chris http://www.stillbreathing.co.uk/blog/2008/02/21/social-engineering/ A few weeks ago I had a message from one of the popular social networking websites of which, for some reason, I’ve found myself a member. The message stated that someone wanted to be my friend - someone whose name I recognised. I read the message and for a brief moment was happy that this person had contacted me after several years.

But then I read the message carefully and realised something was wrong. It was an automated message; there was nothing personal in it at all. My friend, who I haven’t spoken too in a few years, simply pressed a button and a series of digital widgets started the process to make us “friends”.

It would be easy to blame my friend, but he’s only doing what thousands if not millions of people are doing every day. These social networking sites make it very easy to create these digital connections, and the very fact that the numbers of friends that a user has on these sites is displayed turns it into a kind of competition. Remember, human beings are by nature competitive - it’s how we’ve survived for tens of thousands of years. But online social networking websites, on the whole, are putting quantity above quality when it comes to relationships.

The fact is that social networking is a poor substitute for real, tangible friendships. Can anyone really have hundreds or thousands of friends with whom they have a meaningful relationship? I doubt it, even if you discount a large percentage as being the online equivalent of those people you know by sight but wouldn’t necessarily say more than “alright?” to them if you saw them in the street.

The problem lies in the glut of information available online about people. If you’re a fully committed member of a social networking site then the chances are you’ve added details such as your name, age, sex, location, education, likes, dislikes, recent experiences and much more. That will be all there in searchable, copyable format, possibly in the public domain. Rather than evenings spent chatting and comparing upbringings over a few pints, you can get to know the basics about someone by reading an online crib sheet on them without ever having met them. In my view that doesn’t make for quality friendships, but rather shallow connections.

You may think I’m entirely against social networking sites, but that is far from the truth. I’m a big believer in the Internet acting as the conduit along which real relationships can be forged and grow. After all, I’ve created several social networking sites and I continue to write on this blog which invites comments from any reader. However I do believe that any online system can only act as one of the threads tying people together in friendship. While the global nature of the Internet means that friendships can occur across potentially insurmountable physical distances, the danger is that physical distance will mean emotional distance as well.

Anyone can create a profile on the Internet and with judicious writing and careful management present a “face” to the Internet which is entirely incorrect. That’s not unheard of in the physical world, of course, but it’s a whole lot easier to do online. So your collection of hundreds of friends may contain duds, and who knows how many?

In the past I’ve not been as careful as I might have with what I have said online. Even with the most rudimentary searching skills it’s possible to find things I’ve written going back over 10 years, not all of it necessarily words I would endorse now. On the whole, however, I’ve been careful about what connections I make - and many of my online friends I’ve met in person several times. Bearing in mind my recent experiences with the friend-who-nearly-was I’m going to continue to be careful who I forge relationships with online. Perhaps the word “friend” should not be bandied around so lightly.

]]>
http://www.stillbreathing.co.uk/blog/2008/02/21/social-engineering/feed/
The Jazz Programmer http://www.stillbreathing.co.uk/blog/2008/02/03/the-jazz-programmer/ http://www.stillbreathing.co.uk/blog/2008/02/03/the-jazz-programmer/#comments Sun, 03 Feb 2008 23:14:50 +0000 chris http://www.stillbreathing.co.uk/blog/2008/02/03/the-jazz-programmer/ It seems everyone these days wants to be famous. However the vast majority of them don’t want to do the work required to be famous for anything worthwhile. They want to be famous for, well, being famous. They want to be rock stars.

The programming world seems to have been taken over by this attitude, with an increasing number of job adverts looking for a “rock star” developers. But is that really what the web and business in general, needs? I’m not so sure.

Ron Evans at Dead Programmers Society compares rock stars to jazz musicians, and I think the parallels can be easily seen with developers. I like to think I have a bit of insight into this area, being both a developer and having a degree in jazz (yes, really).

There are three basic ways in which programming and being a jazz player are similar:

The great thing about being a jazz player is the more you know the more you know you have to learn. The tough thing about being a jazz player is the more you know the more you know you have to learn. It’s the same with programming - there is no end to learning because programming, like music, is not a static thing. It changes, evolves, continually and you have to keep up if you want to succeed.

The great thing about being a jazz player is there are few rules. The tough thing about being a jazz player is there are few rules. Just like programming, the rules you follow are reasonably simple at heart. In jazz if you break the rules it doesn’t sound right; in programming if you break the rules then the application doesn’t compile. But even within those rules there is huge freedom of expression, a thousand ways to say/do the same thing.

The great thing about being a jazz player is the fact you can play “off” other people. The tough thing about being a jazz player is the fact you can play “off” other people. I work in a team of 6 developers, we all have our own styles and experience. We all share the strengths we have, and we create good stuff. Just like a band who gig together regularly, there’s an appreciation there of each other - even if we sometimes disagree about some things.

I owe a huge debt of gratitude to the many fantastically talented and graciously generous people around the web who have shared code, understanding and insight with the world. So too I owe a huge debt of gratitude to those people who through their music have shared much that is both tangible and ethereal with the world.

This entry is in memory of the late, great Oscar Peterson. Rest in peace, Oscar.

]]>
http://www.stillbreathing.co.uk/blog/2008/02/03/the-jazz-programmer/feed/