20 February 2004

libusb and scanners

[Big Job ]

Another new delight in Fedora Core 1 is the libusb library. I wasn't aware of this until I upgraded to VueScan 7.6.78, which can now use libusb instead of the normal USB scanner driver. In fact, the driver no longer worked, but since it's going away with the 2.6 kernel, this seemed a good opportunity to switch to libusb. The linked instructions were mostly sufficient to get it working with my Canon flatbed scanner. One tip: if you're using a 2.4 kernel, you need to rename or otherwise disable the scanner.o module (under /lib/modules/) to stop it conflicting with libusb. Update: VueScan 7.6.80 appears to have fixed this issue.

...It's frightening how much that previous paragraph resembles typical MS-DOS advice from fifteen years ago. Progress, eh?

Posted by Ade at 04:40 PM | Reply

Turning your back on the world

[Big Job ]

Back when I installed Red Hat 9, I mentioned some Unicode-related problems with GTK+ 1.x apps. Following another upgrade to Fedora Core 1 (mostly painless, but once again I had my carefully customised and working CUPS configuration broken), I managed to get to the bottom of this. It's not pretty (in fact, with the wrong font, it's downright ugly).

To run applications with Unicode, you need three things:

  1. A Unicode-aware app;
  2. A Unicode locale set in your environment (e.g. en_GB.UTF-8);
  3. A Unicode font.
My GTK+ apps had the first two but not the last, which is why all the text came out with strange block characters interleaved in it. This turned out to be because a non-Unicode font had been specified in a rogue .gtkrc file left in my home directory by an old version of the KDE theme manager. Removing this file, or fixing the font spec to a Unicode equivalent (one with "iso10646" in the registry field - use xfontsel(1) to find these), resolved the problem.

The other related issue I had with Fedora was getting a normal w3m(1) display. Odd characters would appear in place of graphic lines or in the prompt string. It turns out that Fedora builds the w3m-0.4.1 RPM with the m17n multi-lingualized patch, which adds Unicode capabilities that are enabled by default. Hence, to run it in this mode, you need the prerequisites listed above. In this case, that means starting xterm -u8 (or the GNOME or KDE terminal programs) with a Unicode locale and font. Running w3m in this window makes the odd characters in the prompt resolve to: « ↑ ↓ (if those three characters look odd, your browser isn't using a Unicode-enabled font).

If you'd rather avoid this faff, go into the w3m options screen, scroll to the bottom and set all the charset parameters to a non-Unicode locale (e.g. Latin-9). (Note that w3m post-0.4.2 will have the m17n patch merged.)

Armed with this new, dangerous knowledge, I was all set to convert my system to Unicode. Then I realised that I still lacked a fourth requirement: motivation. Why did I need Unicode? I wasn't Japanese, I didn't need any more odd characters in my life (especially not ☺) and, more to the point, my standard X11 term is rxvt, which isn't yet Unicode-capable (although there are patches and forks that provide this). So I decided to sack it and go with what (currently) works. If Unicode ever becomes the standard, I'll be forewarned. In the meantime, start migrating your font configurations to Unicode-enabled versions (Xft is your Friend).


Other bubbles:

Posted by Ade at 12:30 PM | Reply

18 February 2004

Upload to offload

[Big Noise | Big Words ]

Years of corporate servility and domestic senility have left BB unable to summon the once-legendary rage and venom, not to mention literacy, that sustained whole articles of tilting at windmills. Reduced to soundbites and "boom-boom" punchlines, we can only sigh apathetically about the following:

  • The only way we can conceive that The Darkness manage to sell albums is because all the budget CD shops have sold out of cheap copies of Bon Jovi's Slippery When Wet. Comparing them to Spinal Tap is unfair, because Break Like The Wind is actually a good album.
  • Norah Jones, Katie Melua, Dido, Jamie Cullum and their ilk are the kind of artists who wouldn't even create a ripple if you put them in a weighted sack and threw them in a canal.
  • Speaking of which, Radio 2, who are mainly responsible for the good fortunes of the aforementioned unwanted litter (assisted by the fact that the sum total of all public taste is zero), is so bland it should be sponsored by Otis. BB has a fondness for some 70s music, but the stuff they continually exhume, like a stalker still fixated even after a thirty year sentence for murdering the object of his affections, must have seemed cheesy and naff even then - and that would have been measuring against the high background radiation of cheesy naffness that is synonymous with that decade. Even Supertramp themselves must be ready to complain about over-exposure. Worse, when they play something good that you actually enjoy, it kind of devalues it immediately; like your mother saying, "This is a nice tune, isn't it dear? Who did you say it was? Placebo?"
  • Justin Timberlake: We know he dated Britney and he's boffing Cameron and he can't shave and all that, but has anyone actually listened to his music? Does it exist? We suspect that when you take one of his CD cases off the rack and up to the counter, the assistants merely pretend to search for the disc and then quietly slip the empty case straight in a bag while you're signing the card slip. When you get home, you pretty much forget about it - much like Justin - and just slide it in with your other albums. Every so often, you remember you own it so you figure you must like Justin Timberlake, along with everyone else. And, rather like those "how many errors does this sentence contain?" puzzles, your mind simply blanks out the fact that you've never, ever heard him sing.
    On the other hand, Katie Melua's CD simply evaporates as soon as you open the case. That's a blessing. Maybe she should be vacuum-sealed.
  • Daniel Bedingfield - admit it, you made him up. He's a mass hallucination based on an anonymous car mechanic.
  • Somehow (probably all that Radio 2), we've managed never to hear Beyonce, Outkast, Andre 3000, The White Stripes, The Strokes, The Hives, The Libertines, Basement Jaxx, Busted or 50 Cent. But we have read all about them. On balance, we figure we must be doing something right (apart from the Radio 2 - and the reading).
  • Osama: We're still dreaming about some sort of Munich Olympics scenario involving Coldplay's tour bus.

Posted by Ade at 02:17 PM | Reply

11 February 2004

The glory of normality

[Big Picture ]

The 50mm ("normal") focal length lens is: tack-sharp; immediately rewarding; easy to use; harder work; better than a zoom; boring; ideal for low-light work; required for a natural perspective; not really "normal"; good for learning the value of "foot zoom"; obsolete; underrated; cheap; best value; best for a beginner; the only lens you need; too limiting; made in China. At least according to what I've read in various internet forums and articles. And from my experience, I can state definitively that all those opinions are precisely right/wrong.

I'm a keen 50mm shooter, but to quibble over some of the views represented above:

Low-light
The wide aperture of the 50mm allows it to be used handheld in situations where a tripod would otherwise be required, but remember that wide aperture = shallow depth of field. This can actually be used to advantage in many situations, and may not otherwise be an issue if the subject is a reasonable distance away. However, it's disappointing to hear people say that they keep a 50mm in their camera bag for low-light situations but "never actually use it". Why on earth lug it around if you're not prepared to learn how to use it?
Best for a beginner
Maybe. Some beginners, perhaps, who are dedicated and creative self-starters with singular intent. Others may well find it becomes restrictive and discouraging. Raw beginners lacking defined goals like to play around, try different shots, see what wide angle and telephoto viewpoints are like. They're probably not so aware of the subtleties of subdued lighting and careful composition, and less discerning over image contrast and sharpness (particularly in 6"x4" colour prints). The basic zoom often conforms better to their needs. (On the other hand, beginners also like to avoid using tripods...)
Better quality than a cheap zoom
Indeed, but until you've put that zoom on a tripod and shot it at f/8 with proper technique, it's silly to go dashing out and buy a new lens in hope of resolving any dissatisfactions over "image quality". "Buy a fifty" is the worst answer I've seen to early complaints about poor pictures.
Harder work
Hard in the sense that you have to concentrate more on the actual image, rather than utilising characteristics of the lens to enhance its representation (e.g. the novel distortions that wide angles can introduce)? Actually, the 50mm is in many ways easy to shoot since What You See Is What You Get. It doesn't actually show the same view as your own eyes, but it crops out much of the same distracting surround that your mind does, and thus the image is more likely to correspond with what you wanted. Of course, if you don't see anything exciting then neither will the lens.
Good for foot-zooming
...The thesis being that one focal length forces you to move around and deliberately choose your viewpoint instead of standing still and zooming the lens. But, say opponents, there's nothing to stop you moving around with a zoom. Apart from indisciplined laziness, of course, with which I am amply gifted. Unless you are extremely disciplined (or hyperactive), you probably won't fully understand this argument until you're forced to try it for yourself.
Boring
Maybe 50mm simply doesn't match your personal vision of the world...or maybe you mean that you can only find boring pictures to take with it. Just somethin' to consider, is all I'm saying.
Not really "normal"
Some people claim that 35mm better approximates their own vision. I've never come to terms with this focal length myself, but far be it from me to deride the perceptions of others...you freaks. :-)

Some articles on the 50mm or normal lens:

Exercise

The goal of this exercise is to take some "artistic" pictures that demonstrate the isolation, intimacy and low-light capabilities of the normal lens.

  1. Get a 35mm SLR camera that supports manual operation, and 50mm prime lens with a maximum aperture of at least f/2. DOF preview and aperture-priority mode are also useful but not essential. If you lack one or other of these items and can't afford new, many older manual SLR systems are available secondhand at prices low enough to justify buying one as a second system purely for this purpose (the 50mm was once the standard bundled lens so it should be included). (I bought a Nikon EM plus a 50mm Series E lens for £75 from the secondhand shelves of a small camera shop. Its main mode is aperture-priority, which is ideal because that's the main aspect I need to control. An Olympus OM or Pentax would be good choices too.)
    Alternatively, use a short telephoto lens such as an 85mm or 105mm, providing the aperture goes to at least f/2.8. This won't give the same "normal" viewpoint as the 50mm, but will provide subject isolation.
    DSLR users dealing with a 1.5 crop factor will need to either mount a 35mm length lens, which will be more expensive, or live with the cropped view.
    As a last resort, you can use a standard consumer zoom at 50mm and widest aperture; this lacks much of the spirit of the normal lens, but is sufficient to give the flavour of using one.
  2. Get some chromogenic B&W film such as Ilford XP2, Kodak T400CN or Fuji Neopan 400CN. "Chromogenic" means that it can be developed using the standard C41 colour process used by all high street labs, thus avoiding the need to develop it yourself or rely on (usually unsatisfactory) B&W lab processing. They are also all 400ASA speed films, which is usually fast enough to handhold and, being print films, have plenty of exposure latitude to cover any mistakes.
    By shooting monochrome, you give yourself a head start on producing appealing images. Our culture and history predisposes us to imbue B&W photographs with "retro" or "artistic" associations (this doesn't mean that you can't take a bad B&W picture, of course). You also remove the need to worry about distracting colour contrasts, instead highlighting tones, textures and shapes.
  3. Stick to apertures of f/4 or wider and go shooting. Look for details or objects with interesting surfaces and shapes, and get in close to eliminate surroundings and perhaps frustrate immediate identification (50mm lenses usually focus down to approximately half a metre). Minimal DOF works well when the subject is either distinct enough to be recognisable even if only partly in focus, or consists of a repeated pattern. Alternatively, use it to produce an attractively blurred background around a sharp subject; this gives an almost three-dimensional quality.
    Light is often at its best either side of sunset on a partly cloudly day. I find working under overcast skies the most frustrating, since shadows disappear entirely and there is no directional lighting to pick out details. Nevertheless, the diffuse light helps to prevent strong contrast situations if you can find subject matter that is strong enough on its own.
  4. Remember that DOF varies with subject distance as well as aperture; you can use an online DOF calculator to see how far the zone of acceptable sharpness extends in various situations.
  5. Autofocus is fine if you have it, but try manual focusing as well. At the widest aperture, the image in the viewfinder matches what you will get on the print (no need for DOF preview). By rotating the focus ring through its entire movement, you can watch as various parts of the scene come into and go out of focus, and thus judge the optimum placement of the zone of sharpness.
  6. Try shooting indoors with pets, people and objects, without a flash. You may need some artificial light but at least it won't give a colour cast.
  7. By all means use a tripod and cable release when the light is really poor or sharpness is a critical concern, but try to use the camera handheld at other times, since it frees you up to consider different or unusual angles and spaces and be more spontaneous. The goal here is to take more pictures, even if they're not technically perfect in every aspect. Using the reciprocal rule, you should be safe at shutter speeds of 1/60th or faster, but its worth honing your handholding technique and taking chances at speeds of 1/30th or even 1/15th.
  8. Blurred subjects in motion? Rushed snapshots? Poor framing? An accident or mistake? Great! Stick it in a frame and call it Art(tm).

To help (because hey, you can do better, right?) here's a presentation of some of my own 50mm images.

Posted by Ade at 08:31 PM | Reply

9 February 2004

Cheap thrills

[Big Words ]

Felicity Lawrence in the Guardian, on the scandal of those exploited Chinese immigrant cockle-hunters drowned in Morecombe Bay (yes yes, it's shocking - but you'll be buying cheap seafood at Tesco again this week, just like BB):

...Retailers and manufacturers order "just in time" from wherever is cheapest around the globe, waiting for their barcode scanning to tell them how much consumers are buying. Instant communications allow them to relay what they need at a moment's notice. Modern transport networks enable them to have it delivered with unprecedented speed.

Well if that's how retailers think their systems are working, we suggest they give up now and go back to the barrow in the street market. In BB's vast and unrewarding experience, "just in time" usually translates to "out of stock". (And where are these "modern transport networks"? The rail network runs at 20mph, and all the motorways are jammed.) In fact, one day BB is going to open a shop called "Out Of Stock", and it will contain nothing but empty shelves - acting as a major competitor to every other high street retailer. Tremble, Jessops! Be afraid, HMV, we're going to eat your lunch (although doubtless the queues for bread will be huge).

Over at Debris, Matt excitedly tries to choose and then obtain a decent water heater from the vast range of ONE that's available to him. Meanwhile, I wonder why every camera shop sells the same cheap brand of Graduated Neutral Density filter (the worst one, with the well-known grey cast) and no other. I wonder how hard it can be to buy a Well-Known Brand X printer, and why I foolishly believed PC World's stock check when I drove there on a "day of rest" to no useful result. I wonder why a large book chain doesn't replace its one copy of that new book I'm after when it's been sold. I wonder why the staff can't help. And I wonder why the same stores then issue profit warnings and report that demand has been "soft".

It's bad enough that the Kings of Consumer Dreams are building Jerusalem Inc. on the backs of the oppressed poor (whether migrant or native), risking their lives, paying them buttons and forcing them to live in borderline squats. But the fact that this system can't even adequately serve its intended markets makes you wonder if its sole point isn't simply to spread as much human misery about as possible. Miserable underlings toil half-heartedly at tedious jobs for minimal pay so that miserable consumers can search in vain for the objects they have been told will enrich their empty lives, only to find that the store doesn't have that colour, it's been out of stock for three weeks and nobody knows when the next delivery will be, we don't stock brand B (not enough demand), they only make them in one size, there's a 75% markup to pay for the advertising campaign and branding that made you want one in the first place and the staff are all bored school leavers who don't want to serve you because they're too busy counting down the seconds to closing time so they can erase the sorrows of this negated existence by glugging sickly, fruit-flavoured vodka drinks in a wacky fun bar chain and copping off with Darren or Debbie from Returns.

For chrissakes, exploit the underclass by all means but if, for all your crappy McJobs, temporary employment contracts, short termism and double-dealing, you still can't run an effective business then WHAT'S THE FUCKING POINT?? We are the ALL-CONSUMING GODS OF THE MARKET - we saw the ads, we read the brochures. We have the RIGHT to BUY anything we WANT - you said so. And we want it MAXI-SIZE, in PURPLE, delivered FREE, with a full range of ACCESSORIES, RIGHT NOW. So if you can't even manage that then DON'T BOTHER SINGING HOSANNA FOR NAKED COMMERCE 'COS WE AIN'T JOINING IN THE CHORUS.

It turns out that communism didn't die at all, because capitalism ultimately tends towards the same result anyway, only on a global scale; joyless peasants shopping dejectedly for a limited choice of shoddy goods made to the lowest standard that aren't available anyway. It just comes with a marketing budget as well.

Posted by Ade at 09:20 PM | Reply

6 February 2004

Improving Sun Flash

[Big Job ]

Sun's Flash archiving in Solaris is a great way to clone systems or take OS backups. It ties nicely into JumpStart too. However, the basic flarcreate(1M) command (prior to Solaris 9 Update 2) is somewhat limited; notably, it won't let you exclude multiple files/dirs from the archive because the script only processes one -x argument (bugid 4501772). There are ways around this.

  • Use find(1) to create an exclusive list of the files you want in the archive.
  • flarcreate uses /etc/mnttab(4) as the default list of filesystems to include. Copy and edit the flarcreate script and change the mnttab reference to mnttab.flar. Then copy /etc/mnttab to /etc/mnttab.flar and edit the latter, removing any filesystems you don't want. (This only works for complete filesystems, not individual files or directories.) (See Info Doc #46325.)
  • Recommended: Install patch 109318-34 for Solaris 8, or equivalent (misleadingly labelled as a suninstall patch). This provides a new version of flarcreate that understands multiple excludes and even includes (via the new -y option; reading the code, this appears to add files in addition to the current or default list). Note that the extended options aren't yet documented in the man page. This patch can also be applied to a JumpStart base image using the -R option to patchadd(1M).

Posted by Ade at 12:52 PM | Reply

4 February 2004

Muddafudger

[Big Words ]

In the Guardian today, Alexis Petridis sneers at the new digital musicians union for urging artists to take control of their careers and embrace creative freedom. Apparently, it's a well-known fact that record company interference guidance helps the talent to produce much better work than allowing them to "self-indulgently" pursue their own muse unchecked. Petridis backs this up by countering widely-recognised classics like Sergeant Pepper and What's Goin' On - produced respectively by one of the greatest pop bands and soul singers of a generation - with tawdry rubbish by giants like erm...Lauryn Hill and Finlay Quaye. Oh, and conjuring the faint spectre of Terence Trent D'Arby again (jeez, that clinches it).

So presumably, although you might be able to handle all that freedom if you're a bona-fide artist with complete mastery of your craft, the calibre of today's pop stars (discovered, promoted and guided by those wise old birds at the record companies) means that letting them go their own way is too risky (i.e. it might expose the fact that many of them couldn't even snort cocaine unless an A&R advisor rolled the banknote first and told them to breathe in, not out).

Petridis blames this "ridiculous idea" on the "cerebrally inclined rock star" Peter Gabriel - he appears to feel that Gabriel's rather novel use of intelligence in his work makes this whole scheme suspicious from the start. (He also notes that Gabriel wants to encourage apes to communicate via the Internet, perhaps implying that this new scheme is merely an extension of the same thing.) Why, it's positively elitist! Just because Peter Gabriel is capable of producing thoughtful, stimulating music unassisted by Virgin execs who "know what the kids (and their parents) want", why should he assume that other acts are blessed with the same ability? And even if they are, they may, like Prince, lose their way, fall prey to ego and be overcome by their own genius (rather than collaborating with a suitable producer like perceptive musicians do) - that wouldn't happen with the record company in charge, would it? They always keep their charges' feet planted firmly on the ground, instead of indulging their childlike fantasies of being "rock stars" - look at Oasis (unless you're eating right now). Freed of creative and promotional support, and forced to run their own affairs, they can only go off the rails. Christ, some of these misguided souls even resort to "pandering to their fans" (you know, releasing more material like "official" bootlegs that totally have no place in any proper marketing strategy). I mean, come on, look at the amount of crap weblogs produced by ordinary plebs lacking corporate oversight, exclaims Petridis. Too right - and besides, think how much better and less dreary OK Computer would have been with some smart, snappy pop songs written by a top team of hitmakers hired by EMI - maybe the same ones who did all that great work for Atomic Kitten!

Petridis is bang to rights here - we must never "give music back to the musicians" because they clearly can't be trusted with it and standards will dip (imagine the horror of a bad Coldplay album). Next thing, it'll be "power to the people". Or "editorial freedom to journalists" (even the useless ones). Huh.

Posted by Ade at 10:20 AM | Reply