Sunday, 7 October 2012

Known Linux issues re: Lifetime of low-power USB hard drives

[I originally posted this on the Raspberry PI forum].

This could affect anyone with an ARM computer running *nix and a low-power USB hard drive.  Here's what my drive looked like when I realized I needed to check it. It's been spun up for about half a year:

$ MY_DRIVE_OPTS="-d sat /dev/sda"
$ sudo smartctl -a $MY_DRIVE_OPTS | grep Load_Cycle_Count
193 Load_Cycle_Count        0x0032   109   109   000    Old_age   Always       -       273664

For those not familiar with smartctl, some explanation may be needed.

Monday, 9 July 2012

How to block annoying cookie popups without accepting a cookie

Problem: website cookie notices

I. Some of us don't particularly want random websites to remember us.

I don't particularly care if that means e.g. not remembering my preferred language.  (If I need to, I can always bookmark the English home page). I don't particularly appreciate the modern creeping intrusions on privacy either... But mainly - probably for technical reasons - I just prefer browsing an un-personalized Web.

II. Some of us reject cookies.

Or set them to expire after a short time. Or configure the browser to forget them all when it's closed. 

Friday, 13 January 2012

viewport meta tag: An alternative to "width=device-width"

Update: the viewport guru ppk discovered at least one substantial difference in practice, between the popular "width=device-width" and my ideological preference for "initial-scale=1".  It is described concisely in presentation slides, or you can read the original blog posts.

The viewport meta tag is used in modern "mobile" browsers. (iOS/Safari, Android/Chrome, Mobile Firefox, Opera). It lets developers say "this is a properly-designed website, not desktop-specific crud". Without it, the mobile browsers assume your website is designed with an unspecified min-width, somewhere around 960 pixels.

Many articles about mobile viewports recommend the following approach:
<meta name="viewport" content="width=device-width">
But I have a philosophical objection. I don't like device-width. Hypothetically, if I connect a N900 running Mobile Firefox to a big screen, I won't be using full-screen windows.

Looking at the original Apple documentation, the W3C draft (based on the initial iOS implementation), and the Android and Opera documentation, there's another way:
<meta name="viewport" content="initial-scale=1">
This avoids mentioning device-width. The documentation for the mobile browsers say that this is effectively the same as the first approach. But the W3 draft says it's equivalent to this CSS version:
@viewport {
    zoom: 1.0;
    width: auto;
And "width: auto" is not defined in terms of device-width. If you can resize the browser window, the content should respond as you'd expect.

In practice, if it's a major problem I'm sure browsers will invent another hack. The current answer is "desktop browsers don't implement @viewport". In the future it might be changed, e.g. to "browsers only apply @viewport if their window is maximized, filling the screen". But it's interesting to anticipate such problems :).