Blog

My blog covers a massive range- from charity methodology and project management, right through to web based design, typography, and the weather/state of the roads. Here are the most recent posts.

Most Recent Tags:

Chrome vs. IE8

September 10th, 2008

Economist.com are pushing the angle that Chrome is an aggressive move by Google against Microsoft (and Windows Exploder). IE killed Netscape, Microsoft never cared about Mac users anyway (still don’t), and if it wasn’t for Mozilla Firefox the way would have been clear for Microsoft to own the internet. That is, own the languages it was written in, the features it had, the development model for pages and sites, the browsers, and doubtless, if they had their way, the servers too. It really was the stability and security of *nix and Apache, and the tenacity of the Mozilla user base that saved the web. Not because they did anything particularly virtuous, but just because they were there. And Microsoft wasn’t on it’s own. Otherwise, there would have been ASP.NET style web-apps as standard (prohibitively difficult to develop, and requiring Microsoft platform), typically awful rendering and performance and everything else we’ve come to expect dread from Redmond.

Luckily Apache had what IIS on Windows didn’t- fewer holes than a colander.

Luckily Mozilla had what Internet Explorer developers didn’t have- friends, some good ideas and some ideals. (Ok, that was a swipe, but for the purpose of this article we’re going on the evidence of the finished products, which in IE’s case have been an embarrassment to the talent of the myriad of employees at M’soft. Sorry guys, find some socks, and pull ‘em up).

Google, its life dependent on online apps being as accessible and reliable as peoples’ desktops, need a friendly platform to operate on. It’s therefore obvious, that an IE monopoly is bad news. Is Microsoft going to work with competitors in mind when developing a browser? No way. Are they going to put glitches and bugs to put others development methods off the rails, and force others to use Microsoft development tools? You bet!

In a way, the IE effort has let the whole Microsoft side down- if it was a better product, people would have been happy, Mozilla would be a curious novelty with 1% market share, and Microsoft would retain the monopoly on consumer internet access and add usage.

So, for the first time ever, thank goodness IE is awful. It’s the hollow, wood-worm infested legs in Microsoft’s towering stack.

Google Chrome has been in development for something like 2 years. They could have brought out an Alpha earlier. It still isn’t (anywhere near) perfect- they could have left it another few development cycles. So why now? Well call me cynical, but I think it’s because right now, Windows Update is pushing out IE8 B2.

Google is saying; “Hi. In the time it’s taken you to patch a few holes, nick a few superficial features and learn how to spell ACID, just to keep your browser on the road, we’ve built a whole new one. It has multi-threading, a whole new JavaScript engine (no small feat), we’ve used Apple’s rendering engine just to spite you (well, and also because it works), instead of calling it “ultimate experience vista great” we’ve called it Chrome and marketed it with a cartoon, just to really give you the picture; by the time you get IE8 decent enough to release, we’ll have built from the ground up, something better in every way.”

Chrome aint perfect. Not right now, probably not ever. Not by a long way. I think it was released too early. But the difference is, I’ve found myself using it. I have used IE8B2 once, (not out of choice, to test) and not only did it crash, it hung Windows.

Symlinks under windows

September 10th, 2008

I thought Symlinks were a preserve of *nix alone. But I was wrong! They can be done in Windows (well, NTFS, at least), where they’re called junctions.

Impatient? Jump to the how.

What is a symlink/junction?

Symbolic links are file system pointers, where one folder points to another, and all paths beneath the first folder are transparently translated to paths beneath the second. As an example, lets create a sym-link from /usr/http to /usr/mydocs/websites/ws1/current-ver this means that if you ask for /usr/http/html/page1.html, you get given /usr/mydocs/websites/ws1/current-ver/html/page1.html.

The beauty is that as they are an actual part of the file system, programs don’t realise they are pointing to a symlink (this is abstracted by the operating system).

Why are they so useful?

Imagine you want to re-arrange you folders on your web server? Every time you want to change the hierarchy, you have to update you http.config file and possibly restart the server. Instead, point your root at a symlink, and set the symlink to point to the file repository. Want to rearrange? Copy across, make your changes, and then just update the symlink- apache instantly loads the files from the new location (and doesn’t even know they’ve moved underneath).

I develop websites with a local webserver running on my machine. Each project I have on the go lives in a new folder, and needs it’s own root. Instead of updating http.conf all the time, I just repoint the symlink. I can also put a local shortcut on my desktop to “current web project files” which points to the symlink- I’m left with a single point of change.

How Windows made the symlink into a Junction

Junctions are Windows versions of symlinks. The caveats are; they only work on NTFS, and Windows don’t by default ship a junction creator. Step in Mark Russinovich of SysInternals. Mark is a serial hacker, whose main accomplishments centre around his debugging and monitoring tools for app development on Windows. What he developed was so superior to Microsoft’s stuff, they adopted it and you can now get all his tools via TechNet. In particular, a wee program called Junction.

How to do it

  1. Check the file system you want to use is NTFS. File systems can be converted from FAT32 to NTFS (but not back) without loosing files. Try the convert command from the windows command line.
  2. Download the Junction creator from Microsoft.
  3. Get making some junctions, and save yourself a lot of effort!

Howies

September 9th, 2008

A long while back I discovered what was then Cardigan’s third largest clothing company; a pair of crazy entrepreneurs and a mad bunch of skaters and bikers trying to sell t-shirts. Marked by enchanting catalogues, an un-flinching focus on eco-friendly (even if I’m not too sure how sustainable organic jeans are) and a focus on out-door-ness, they’re a pretty cool company.

This blog entry is unreserved link-love. In particular, the Janitor (re-designed and re-named to scrambler) trousers are something special. I am convinced I could live my entire life without needing another pair of trousers.

Check ‘em out, their site is here: http://www.howies.co.uk/

Samsung G600- Synching with a PC

April 7th, 2008

Sometimes, when you spend ages trying to work something out, you promise yourself you’ll write it down, in the hope that it’ll help someone else… so, this post is in exactly that spirit.

This post is useful to Windows XP users who have problems with connecting up their Samsung mobiles. Everyone else- this article will be useless!

A review of the phone will follow once I’ve had more time to check it out, but for now, here’s a synopsis of the problem I had trying to connect my new Samsung G600 to a PC with a USB cable.

If you plug in a Samsung G600 to your computer using a USB cable, even if you’ve installed the sync software, you’ll probably be confronted with a nice error: the data is invalid. The Samsung software that comes on the disk with the phone wont recognise the phone, and Windows will try and install it, but will fail.

Having been pleased with my new phone thus far, I was disappointed. I assumes a quick Google would fix it. It did, but the bizarre problem, which 90% of users will never bother working out how to fix, renders the PC-phone connections facilities useless. I was disappointed with Samsung. Anyway, I worked out how to fix it.

  1. Install the latest software from the Samsung website
    I wont link to it, because it looks like the kind of site that changes its permalink structure along with its webmaster’s socks- just give it a quick google, it’s easy to find. I don’t know if the new version is vital, but it has some features that aren’t on the disc that comes with the phone, and that software wont auto update to the new version.
  2. Fixed the ballsed up registry entry
    The problem I had was rooted in the registry- a bad place to make mistakes.

    Damaging the system registry is the fastest way to transform your PC into a novelty CD player. Don’t blame me if you breaks everything! Probably a good idea to make backups and all the other good things you ought to do but always forget to now, then.

    Open up the registry editor by hitting Win+R, typing regedit and hitting enter. Once inside you need to find the appropriate keys: navigate to:
    HKEY_LOCAL_MACHINE » SYSTEM » ControlSet001 » Enum » USB and open that key up to reveal the set of keys inside.

    You will see lots of Keys- (they look like folders) all of them have unintelligible names like Vid_04cb&Pid_016&MI_00. (The top few have sensible names like “Root_HUB”). Each of these keys refer to a device that the computer recognises when the device is plugged into it. We need to find the Samsung ones. Easiest way: expand the first level of each of these keys by working from the bottom of the list up; hitting all the [+] icons. Each key has a set of values inside; were’ interested in LocationInformation- scroll through all the keys you’ve just opened up by selecting the top one in the left hand pane of the registry editor, and using the arrow keys to scroll down until the LocationInformation entry has the word SAMSUNG in it. When you’ve found the right key (folder); right click on it (the one that’s called Vid_xyz) and click Permissions…. Check both Allow boxes, and then click the Advanced button. In the dialog that comes up check the box “Replace permission entries on all child objects…” and press OK. Confirm that choice, and then press OK.
    Repeat this process for all the Keys which refer to your phone functions (if you have other Samsung stuff installed that works ok, leave it alone).

    Click OK and close whatever you opened, to get yourself back into the real world. Now try connecting your phone.

That should fix it!

Photography and Child Protection

March 23rd, 2008
This post is about taking photos of children (or vulnerable adults) in a child-protection friendly manner for briefs such as documenting school events.

Click to continue reading “Photography and Child Protection”

MooJax Comment Posting: Moved

March 23rd, 2008

This post has been moved to a new location at:

http://handsandfeetdesign.com/mcp/

MooTools versus jQuery

March 21st, 2008

MooTools and jQuery are both JavaScript libraries- frameworks which make JavaScript easier, faster and more reliable. Although they are slightly different, it’s very much a one-or-the-other decision as to which one you’ll use to build a site.

To get rid of the suspense, here’s my judgement:

Sorry, jQuery- you’re just too cumbersome to get to grips with, and your homepage is just plain ugly.

And that’s despite jQuery being the weapon of choice for both the BBC and apple.
Let me explain why.

It’s worth pointing out that in my experience jQuery and MooTools are horses for slightly different courses. jQuery is about instantly giving a developer nice easy functions- fade this in, fade that out, AJAX-ify that. It’s a set of ‘products’ you can apply to your page. MooTools is more strictly a framework- the functions that come with it and the documentation place emphasis on delivering code functionality- more fundamental pieces like building blocks to build into the end packages that you might get in one go from jQuery.
You might wonder why that makes MooTools better in my opinion- well I guess it’s that unlike many people, I’ve a lot of experience with JavaScript, and I like using it to do unusual and uncommon stuff. And I also like to customise. jQuery takes the apple approach to design- it bests guesses your preference, and just gives you a fade out. MooTools much more obviously gives you opportunities to customise, to decide the exact transition, time frame, colours, ad infinitum.

MooTools, though you often need a few more lines to get what you want done, just makes way more sense. jQuery might accomplish something with one line, but it tends to be a long complicated line, where you can’t see which bits do what. MooTools might need three lines- but three lines which each make perfect intuitive sense, where you can see how to modify your code to get a longer transition, or add another function to some effect.

It’s worth pointing out that MooTools is a bit quicker, but jQuery is a lot nicer in terms of namespace- it’s only footprint is (optionally) the dollar ($) function. So in theory, jQuery will site nicely with any other JavaScript or libraries without colliding. In my experience, however, I’ve found that using jQuery will invariably break anything I’ve done with MooTools- yah boo sucks.

At the moment, despite a shocking lack of decent documentation jQuery is very much more popular. One day I’ll sit down and learn how to use it- but for now I’m much happier with my MooTools.

Improved MooJax Comment Posting

March 16th, 2008

A while back I posted my MooTools powered Wordpress-comment AJAX-ify-er. That is, a Wordpress plugin that uses the MooTools library to make your blog comment form all swooshy. (I’ve discussed why I built it for MooTools and not jQuery in my JavaScript library discussion)

I wrote it because I was suprised no-one else had. And as a first effort, it wasn’t bad. But it could be a lot better- and now it is- I’ve completely remade it for version 1.0 and it now has a smaller namespace footprint, it’s more reliable, and has better failover behaviour.


Here’s some of it’s features:

  • It utilises the MooTools JavaScript framework- there’s a 90% guarantee it wont work if you’re using a jQuery powered plugin.
  • The new version features a much smaller namespace- it only registers the object MCP and so it much less likely to collide with other functions.
  • It’s better than the old version. In every way, under the hood.

As before, it’s available for download from the Wordpress site


The instruction installations:

  • Unzip and install to your wordpress folder/wp-content/plugins
  • Enable from your admin panel. If you’re not yet using MooTools it should work fine.
  • You can use CSS directives to style the throbber: just set a directive for the form.throbbing class.


The support instructions:

  • Post a comment here- don’t forget to leave your address!

The ‘gratuity’ beg:

  • Find a local charity. Volunteer for them, preferably. If not, give them money. Go home. Look after your kids and your wife. Maybe turn on the computer again after a few days.