Categories
Web 0.1

Web 0.1: Canon USA

FAIL #1: Website denies existence of products, broken cookie-“cleverness”

Canon recently (last few months) launched a new “prosumer” DSLR – the EOS 550D, a.k.a. Rebel T2i (because Americans need to feel “cool” and “rebellious”, apparently. Hmm. Marketing fail there too, perhaps?).

According to Canon’s website, this does not exist. Try for yourself:

http://www.usa.canon.com/cusa/consumer/products

…UNLESS you’ve been to the site before. Second time you go to the site, you get an entirely different “product” page. First version is a list of approx 7 cameras, second version is a grid showing 11 cameras – which does include the Rebel T2i.

FAIL.

FAIL #2: Javascript navigation: webpage has “no content”

So, you finally find the camera page, and select the “Drivers and Software” tab, e.g.:

http://www.usa.canon.com/cusa/consumer/products/cameras/slr_cameras/eos_rebel_t2i_ef_s_18_55mm_is_kit?selectedName=DriversAndSoftware

What do you see?

1 firmware update, and no drivers, and no software. How come?

Well, you have to select a value in the tiny dropdown near the top of the page, and only then will the page magically update itself in-situ with the ACTUAL list of “Drivers and Software”.

Is the resulting page bookmarkable? Nope; it’s not actuall a “webpage”, it’s a temporary piece of javascript. ARGH!

FAIL

FAIL #3: Javascript navigation, breaking basic web standards

Fine. So, for Windows, or for OS X, there’s a dozen or so downloads – once you spot the “trick” to reveal them.

Ah, but – are you allowed to simply click and download them? “NOOO!”, says Canon USA.

If you try to follow any of the links, you discover they aren’t actually links, but instead are proprietary Javascript routines that are masquerading as links. (BAD web designer! Why did they do this? What possible advantage is there? Where the heck did Canon’s web team learn to write HTML?)

I wouldn’t mind, except … they implemented the Javascript so badly that each download link isn’t even a URL.

Which means … when you click on a download, and download it, then hit “Back” in your web browser … you get put back to the page BEFORE you even went to the Canon website.

FAIL.

Go to JAIL. Do not pass GO. Do NOT collect $200

Yep – that’s right, time to use that stupid drop-down again, before you’re “allowed” to see the list of files.

And then, for each file, you’ll have to repeat:

  1. click file link
  2. scroll to download link
  3. click download link (3 clicks to download – Amazon, eat your heart out!)
  4. click Back (NB: Canon’s web team couldn’t be bothered to provide a javascript “back” function)
  5. click Forwards
  6. select your OS from the drop-down list
  7. scroll back to where you started

SEVEN steps to download each file? For half a dozen files? Canon USA, congratulations – that’s Web 0.1!

UPDATE: … I worked out a trick. If, after you download each file by clicking the “I Accept these terms and conditions” button, you then click the “No, I reject these terms and conditions”, it surreptitiously puts you back to the previous page. Canon’s web team apparently has no issue with you simultaneously Accepting and Rejecting their legal documents – I wonder what Canon’s lawfirm would say about that?

Categories
fixing your desktop

Macbook Air: how to disable the Swap file (run your laptop faster)

NB: This technique is useful in precisely TWO situations:

  1. EITHER: you have a lot more RAM than you need (on OS X / Apple computers: at least 4Gb, more likely 8Gb), and you want your computer to run faster
  2. OR: you have an expensive SSD hard disk in your laptop, and you want it to last a couple of years or more

Symptoms of a dangerous swap file on the Air

I’ve got a new digital camera, takes very large photos (18 MP). If I load up more than 5 photos in Apple’s Preview, there’s a high chance that Preview *and the whole computer* will seize-up for about 5 seconds. Then it runs normally again.

Preview is a very simple app – it’s not doing anything complex (like, say, Photoshop), it’s just reading images from the disk. If Preview hangs – and hangs the whole OS – there’s something very deeply wrong with your laptop.

There’s no spike in CPU usage – just the OS seems to hang. OS X often does this when it’s waiting for transfer of data to/from somewhere – either the network, or the hard disk. (this is a flaw in OS X’s design – in most cases, the OS shouldn’t hang, but Apple hasn’t coded it that well)

So … I’m fairly sure this is a sign that the SSD drive is being asked to do something it really doesn’t like, and because Apple’s code is imperfect, the OS is being forced – at a very low level – to “hang” while it waits for the hard drive.

Remember: SSD drives are very fast, the drive should have dealt with this in 0.005 seconds, not 5 seconds. That exceptional slowness is what you’re looking for as a sign that something is “wrong”.

Disabling it … permanently

I researched this extensively, and found a lot of interesting stuff about 3 different ways of achieving this. Most of them were from OS X 10.5 (Leopard), where Apple’s swapfile code was a lot weaker. Snow Leopard (10.6) has massive improvements in Apple’s code, and it seems you can get away with this extremely easy technique:

In the Terminal, enter the following command. This will unload the dynamic pager from the Mac OS X kernel:

   sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist

Again, this completely disables the Mac OS X paging ability, do not mess around with this for fun.

And then … reboot. I found a couple of useful tips elsewhere on how to check the swap status:

sysctl vm.swapusage

Outputs something like this:

   vm.swapusage: total = 0.00M  used = 0.00M  free = 0.00M

Re-enabling it…

In the Terminal, enter the following command:

   sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist

Why / (not) disable the swap file?

Actually, I didn’t really want to – I have a 1st-gen Air, and it only has 2GB Ram. With OS X, that’s *not enough* to forego a swap file (NB: Windows applications tend to be slightly less memory hungry, and linux apps a LOT less mem hungry. With Linux, 2 Gb is plenty, with Windows it’s “probably” OK)

BUT … when my Air’s hard disk got fried, I replaced it with an SSD drive. The change is enormous – the Air runs literally 2-3 times as fast on many operations (basically: if you buy an Air without SSD, you are wasting your money, and you’re getting ripped-off)

However … SSD drives are *destroyed* by swap files (literally – the hardware gets worn down and soon breaks, permanently). Interestingly, MS Windows will automatically disable lots of its own behaviour to reduce the chances of this happening. As does Linux. Apple (as ever) appears to be behind the times: allegedly, OS X doesn’t do this (even though Apple sells Air’s with SSD drives!) … but then again, no-one seems to know for sure.

Ultimately, the bizarre OS hangs scared me into doing this – I know that the cheap SSD drives have very short lifespans if you don’t use them properly – measured in months, rather than decades. And by “cheap” I mean “anything costing less than $5,000”. That definitely includes anything I could afford, then ;).