iTunes and Audiobook CDs

As iTunes has evolved, it’s gotten easier to import audiobook CDs for later listening on your iPhone. It’s especially handy for library audiobooks, freeing one from the overhang of a due date. This is a guide to one way of doing it that’s worked well for me over the years. It’s written for iTunes 12.

There are three tasks: rip the CDs, put them in a smart playlist, and fix up the metadata. We’ll go over each one. My example is Ann Patchett’s State of Wonder, on 11 CDs.

Rip the CDs

Pro tip: library CDs tend to be mishandled, and sometimes don’t get read correctly. If that happens, try washing them. Warm water, a little dish detergent, rinse well, dry well, and try again.

1. Insert the first CD into your reader. iTunes will open it look up its metadata. Most audiobooks have metadata available, and some have more than one version. Choose the most likely-looking one if there’s more than one. We’ll clean it up later.

2. Select all the tracks, and choose the “Join CD Tracks” item from the Options menu, top right of the window. If you don’t see that item, try clicking the top of the leftmost column, the one with the track numbers in it, such that the tracks are ordered from 1 on.

3. Click the Import CD button, top right. You’ll need to choose Import Settings; I generally use the AAC encoder, and Spoken Podcast. Up to you…

4. Repeat steps 1–3 for the remaining CDs.

Create playlist

5. Once the first CD is imported, create a new smart playlist (File > New > Smart Playlist), with Album set to the album name, and a second criterion of “Plays is 0”.

Fix up metadata

6. When the CDs are first imported, they’re classified as music, so they’ll show up in iTunes’ My Music section, in case you need to track down any that (perhaps because of a bad album name) didn’t show up in your playlist. If the audiobook had no beta-data available in step 1, you’ll need to give them all an album name (the name of the book) first. Once everything is there, the playlist is where will be working on metadata.

7. Edit each ripped CD using Get Info on an individual CD, or for metadata that’s the same for every CD (like the album name), selected them all and then Get Info.

8. Metadata fields that should be the same (and correct) for all CDs: album (title of book), artist (author), composer (reader), genre (I use ‘audiobook’), year, track x of y (empty), number of disks. Uncheck the compilation box if it’s not already unchecked. If iTunes won’t let you edit one of these fields, do it on a CD-by-CD basis instead.

9. Metadata fields that are different for each CD: song name (I’ll name these “State of Wonder 1” through “State of Wonder 11”), and disk number. Use the forward button in the Info window to move from CD to CD.

10. Artwork. If iTunes doesn’t find the right artwork for the book, try Google Images. It’s generally pretty good at finding a usable image.

That’s it. Read books!

iPad Mini: idle conjecture

(You probably don’t care about this; move along…)

There’s some awfully specific rumor-mongering going on about a 7.85″ iPad (vs the current 9.7″ models). I’m all for it (an iPad Mini, that is), so why not join the rumorati?

I’m mildly skeptical of the 7.85″ number. The rationale appears to be that that’s what you get if you do a 1024×768 screen (same as iPad 1 & 2) with the pixel pitch of an iPhone 3GS. I suppose that 7.85″ is as good as any number in that range (though it seems just a tad large to me), but I don’t buy for a second the argument that there’s some major advantage to Apple in sticking with the legacy iPhone pixel pitch. The Mini will undoubtedly use much more modern screen technology, with a physical size driven by usability concerns.

The pixel pitch implied by 7.85″ (or implying 7.85″, as the case may be) is also, at 163, on the low side in a world of Retina displays. Another reason to shrink it a bit more, if we’re sticking with the same pixel count (seems very, very likely).

My guess: somewhat smaller than 7.85″, but at least a little different from Amazon’s and Google’s 7″ offerings. Let’s say 7.25-7.5″, OK?

4G/LTE vs 3G? Dunno. Don’t care. But let’s say so, for competitive reasons.

What I would like, though, is a telephone. Not because I have a lot of use for telephony, but rather because I don’t. I could see abandoning a phone entirely in favor of an iPad Mini with an Apple-design Bluetooth headset accessory, especially if it handled music well. Even with an iPhone and a wired headset I rarely hold the phone to my ear (hell, I rarely talk on the phone, period). And the ability to use Messages for SMS/MMS would be a nice side benefit.

Of course, this makes as much sense for a full-size iPad as a Mini. No problem; let’s do both.

And a new docking connector. Magnetic. Implying that we’re going to see at least a minor bump to the iPad 3 (new display technology too?), and, ho-hum, the iPhone 5.

(See, I told you not to read it. Don’t come crying to me.)

Afterthought: consider that a voice-capable iPad, Mini or no, needn’t be sold on the carrier-subsidized contract terms of an iPhone. Think of it as more like an unlocked iPhone, at unsubsidized iPad 3G prices. BYO SIM.

Eject!

EjectEject is a little dingus you can keep in your Mac’s Dock. Click it, and it’ll eject all disks except the startup disk, as well as an iPod if iTunes has one connected. It’s just a little AppleScript packaged as an application with a nice ejectish icon. Download this, unzip it, drag it to Applications, and then drag it into your Dock.

I use it to eject external drives (mainly my Time Machine drive) before I pack up my MacBook Pro to take it on the road.

(I could have sworn that I posted this before, but I can’t find it, so… )

Against semantic markup

@siracusa tweeted this a little while ago

Hypercritical #33 correction: <em> and <strong> … not <b> and <i>. Apologies to @gruber and semantic markup sticklers.

(Hypercritical is a podcast he does with Dan Benjamin at 5×5.com; go listen, but there’s nothing in the podcast relevant to what follows here.)

The idea here is that the <b> & <i> tags (bold & italic) are typographical, or display, instructions, and as such should be left up to the page designer. We should supply semantic markup instead to give the designer enough information about what we want displayed that the italic or bold typeface can be chosen as appropriate. For our purposes, those tags are <em> and <strong>, short for “stress emphasis” and “strong importance”. <strong> can be nested to indicate stronger and stronger importance.

This kind of semantic markup is fine in its place, but HTML isn’t the place to enforce it. A sufficient reason is that HTML doesn’t have a rich enough set of tags to do the work. The APA Style Manual lists seven reasons to use italics:

  • Titles of books, periodicals, and microfilm publications
  • Genera, species and varieties
  • Introduction of a new, technical, or key term
  • Emphasis
  • A letter, word, or phrase referred to as such
  • Letters use as statistical symbols or algebraic variables
  • Anchors of a scale

Sure, “emphasis” is on the list…along with six others that HTML has no tag for. And that’s not an exhaustive list.

One of the WordPress themes I use oddly inverts the representation of em/strong from i/b to b/i. It must have seemed like a good idea to someone at some time, but the only way I could use it on my site was to “fix” the CSS, which fortunately I was in a position to do. The thing is, there’s nothing technically wrong with doing that: “emphasis” is nowhere defined as “italics”.

So (except for cases where you’ve already taken care of things via CSS and classes), if you want italics, go ahead and use <i>. Ditto <b> for bold. And don’t apologize for it.

And now for a slight digression. HTML5 adds a bunch of new “semantic tags”, like <header> and <section>. Notice that “semantics” ends up referring to at least two rather distinct categories. The new HTML5 tags describe document structure, a kind of containerization where the container names aren’t all “div”. But the kind of semantic reference we’re talking about in the above list-of-reasons-to-italicize have nothing to do with document structure; they have to do with the connection between the pieces of the document and the great outside world: movie names, species, name-vs-use.

I mention this as an introduction to an oldish essay by John Allsopp, Semantics in HTML5. It’s the kind of thing that’s just as well to keep in the back of your mind when you start creating The Semantic Web.

Oh, the title. I’m not against semantic markup. Really. Just against using em/strong as fancified ways of saying italic/bold and then calling it “semantic markup”.

Time Machine is not version control

If your response to the title is, “Well, duh!”, you may stop reading here.

If you’re wondering, “What’s Time Machine?”, it’s OS X’s built-in automatic backup capability. You can pretend the title is “Periodic backup is not version control”.

If you’re wondering, “What’s version control?”, it’s a mechanism, formal or informal, that preserves copies of earlier versions of a document, with an eye to be able to undo changes if necessary, or at least go back and see the history of changes to a document. Programmers will think of version control systems like Git or Mercurial or Subversion. If you keep backup copies of your important Word documents at various stages in their life, that’s informal version control. OS X 10.7 (Lion) has a form of built-in version control for some applications.

Time Machine effectively backs up your entire system once an hour. If you mess up a document, it’s possible to go back to a previous version and restore it to its previous state. This capability makes Time Machine temptingly resemble version control. But treating it as such is hazardous (which is not to deny that it can be very handy, even a life saver, when it works). Why?

A secondary reason first. Time Machine does a backup every hour, but it doesn’t save all of those backups. It saves the hourly backups for the past 24 hours, daily backups for the past month, and weekly backups for everything older than a month. So it’s entirely likely that the versions of your document that Time Machine has available are not the ones you’re interested in.

The primary reason is this. A document’s previous versions are themselves documents, and potentially important ones. Important documents need to be backed up, which is to say that you need at least one redundant copy. But if you’re relying on the Time Machine copy (or any backup, for that matter), you have only one copy of the historical version of the document: the one on the backup disk. If that disk fails, you have no backup at all.

So keep using Time Machine as a safety net. But if the thought of all those old versions disappearing completely makes you nervous, start thinking about some other means of version control, one in which the old versions are backed up.

iPhone & iPad vs hotel wifi

Not for the first time, I found myself at a hotel last weekend at which neither my iPhone nor iPad would connect to their wifi, while my MacBook Pro connected just fine. (Why did I have all that gear? I had a reason, not relevant here. Trust me.)

The details: both iDevices were running iOS 4.3.5. The hotel was a Best Western, and the network login page mentioned colubris.com. Colubris is in the network management business, and was acquired a while back by HP. When I’d try to connect, a login page would appear, and when I entered the username and password that worked on my MBP, I got a blank page in return, with no relevant recourse but a Cancel button.

(I’m told that this kind of authentication goes by the term captive portal.)

Anyway. If you find yourself in this situation and really must connect, here’s what worked for me. Go to your devices’s Settings app’s Wi-Fi page. Find the network you’re trying to connect to (in my case it was named SpeedLinks), and tap the blue detail disclosure button. There, along with some other stuff, you’ll see an Auto-Login switch. Turn it off.

Now connect again, and use Safari to browse to some website. You’ll be presented with the login page (which you may have to zoom bigger in order to complete), and this time the login should work.

Update (August 2012): iOS seems to be getting better at this kind of thing. With the current version (5.1.1), I haven’t seen this problem, even at sites that used to cause trouble (though I haven’t been back to the offending Best Western yet).

Misconceptions about science

Not long ago (29 April) an article titled “AAAS Testing Web Site Probes Students’ Misconceptions About Science” appeared in Science. The website is assessment.aaas.org (free registration required). Science matter

It includes this graphic, with the caption, “The answer is D. Nearly 70% of students tested by Project 2061 answered correctly, but 17% chose answer A. By offering insight on students’ misconceptions, the new assessments Web site can help shape more effective teaching.”

Do you find this question as annoying as I do? I take D to say that all matter is atoms, which is plainly not the case.

The test-wise student will realize that it’s the answer they’re going for, of course, though a case can be made for A (read it like this: “Atoms are not [identical with] matter, but they are contained in [the the set of all] matter”).

Introducing Nearest Contacts

Nearest ContactWell, two apps in one month. This one is Nearest Contacts, a travel-related app for iPhone and iPad.

Nearest Contacts delivers a list of your Address Book contacts, sorted by how near they are to you (or to some other point that you choose).

What’s it good for? First, when you’re on the road, it’s a quick reminder of which of your friends, family and colleagues are nearby. That’s handy.

But Nearest Contacts really shines when you use your Address Book to record your favorite restaurants, hotels, and other points of interest. If you’re like us, this kind of information, if it gets recorded at all, tends to be randomly distributed across notes, calendars and what-not. But your iPhone’s address book works great for this, having space for addresses, phone numbers, URLs, and your own notes.

So get in the habit of using your address book to remember your favorite sites, and then use Nearest Contacts to help you find them when you happen to be in the area.

Visit the App Store and snag a copy.

Any day is a good day to start a journal

Any Day JournalThe aforementioned Any Day Journal (for iPhone) is now up to version 1.1, with a website and everything.

The changes are in the interest of making the user experience more efficient: fewer touches or other actions are needed to get the most common tasks done. I’m quite pleased with the improvements.

An example: in version 1.0, after adding a photo to the journal, you’d add a caption by tapping an Edit button at the top of the screen, then a “disclosure” button to the right of the photo, and finally tapping the text area of the resulting screen to bring up the keyboard.

In version 1.1, you simply touch the space to the right of the photo (which is where the caption appears) and start typing. That’s one touch instead of three, but the real difference is at once more subtle and more important: you directly touch the thing you want to change (the caption area) rather than touching a sequence of control buttons. That’s an essential aspect of the iPhone’s touch interface, and it’s not just fewer touches, but more intuitive ones.

Been thinking of starting a journal? Today is a good day for it.

Solving iPad/iPhone Wi-Fi dropouts

If you’re wondering what this post is about, you should probably just skip it.

Last week I was reconfiguring my home network, mainly to get better signal distribution and to enable Apple’s guest network facility. As part of the reconfiguration, I added a WPA2 password to the previously unsecured main network (we’re talking a recent dual-band AirPort Extreme here).

When I was done, everything was working fine, except that while both my iPad (iOS 3.2.2) and iPhone 4 (iOS 4.1) would connect OK, after a minute or three they’d drop off the network, and fail to reconnect. If I reconnected manually, sometimes I’d have to reenter the password, sometimes not. Disabling WPA2 (so no password) made everything work.

I googled up several proposed solutions, but they weren’t applicable, or didn’t help. Eventually, though, I found the iPhone solution: in the Settings app, under Wi-Fi, display the details for the current network and press the “Forget this Network” button. Reestablish the connection, and all is well.

On my iPad, though, there was no “Forget this Network” button. Instead, there was a slide switch labelled “Auto-Join” that was turned off. I could turn it on, but the setting never stuck; it was always off when I returned to the page. This, it turns out, was a hot clue, but I didn’t know enough to recognize it.

Some more googling, and I found a suggestion to go to the General tab of the Settings app, and thence to the Reset page and click “Reset Network Settings”. After that, back on the Settings Wi-Fi tab network details, the Auto-Join switch had disappeared, replaced by the same “Forget this Network” button I saw on the iPhone.

I reestablished the connection, and it’s been fine ever since.

Clearly there’s some kind of problem associated with one of the firmware upgrades from 3.2 to 3.2.1 to 3.2.2. My suggestion, even if you’re not seeing my symptom, is to make sure you’ve got a “Forget this Network” button rather than an “Auto-Join” switch, and if you don’t, reset your network settings. It’s a minor pain, since you’ll have to reenter Wi-Fi network settings, but it likely will prevent future problems. (It has no apparent effect on the AT&T network connection; at least I didn’t have to do anything special; it just kept working.)

One more note, only tangentially related. The Wi-Fi signal strength indicator on a MacBook Pro shows full strength even with rather weak signals. I used iStumbler, along with option-clicking on the Wi-Fi fan icon, to see the actual signal strength. Getting a stronger signal solved another problem I was having—random, infrequent loss of Wi-Fi connection on one of our MBPs, the one farthest from the base station.

C Compilers Disprove Fermat’s Last Theorem

This is from John Regehr, University of Utah. High wonk factor. You already know whether you’re interested; go with your instinct.

C Compilers Disprove Fermat’s Last Theorem

Obviously I’m not serious: compilers are bad at solving high-level math problems and also there is good reason to believe this theorem cannot be disproved. But I’m getting ahead of myself. Recently — for reasons that do not matter here — I wanted to write C code for an infinite loop, but where the compiler was not to understand that the loop was infinite.  In contrast, if I had merely written

while (1) { }

(via Danny Yee)

Java as COBOL

I don’t really know why I keep an eye on /., but from time to time … this seems just about right.

The Struggle To Keep Java Relevant

snydeq writes “Fatal Exception’s Neil McAllister questions Oracle’s ability to revive interest in Java in the wake of Oracle VP Jeet Kaul’s announcement at EclipseCon that he would ‘like to see people with piercings doing Java programming.’ ‘If Kaul is hoping Java will once again attract youthful, cutting-edge developers, as it did when it debuted in 1995, [Kaul] may be in for a long wait,’ McAllister writes. ‘Java has evolved from a groundbreaking, revolutionary language platform to something closer to a modern-day version of Cobol.’ And, as McAllister sees it, ‘Nothing screams “get off my lawn” like a language controlled by Oracle, the world’s largest enterprise software vendor. The chances that Java can attract the mohawks-and-tattoos set today seem slimmer than ever.'”

Teach to the back of the envelope

(I have a draft post on “teaching to the test” rattling around somewhere, hence the title of this one.)

RCA AirnergyThe gadget shown here was displayed at the recent Consumer Electronics Show. Cnet reported:

The device, called the Airnergy, uses an antenna and circuitry to harvest the energy and an internal battery to store the electrical charge. A company representative told OhGizmo that they were able to charge a BlackBerry from 30 percent to full charge in about 90 minutes using the ambient Wi-Fi signal at CES, although the charge time varies depending on how close the battery is to the original signal.

Now, this doesn’t really pass the sniff test, but, after all, it’s RCA, and they “demonstrated” it, so what the hell? The point of this post is that a judgement like this can be informed by a little back-of-the-envelope calculating, and that this is an example of the kind of skill that I’ll argue elsewhere, eventually, ought to be possessed by any graduate of a high school physics class.

We need some basic facts first. Wikipedia tells us that wifi base stations are limited by the FCC to 4 watts output. My cellphone battery is labeled: 3.7VDC 1150mAH. Assuming 100% charging efficiency, that’s 4.255 watt-hours required for a full charge. I’ll guess from the picture that the receiving antenna is 100 cm2 and that we put it a meter from the transmitter. How much power does the charger “see”?

We know (or can easily look up) that the surface of sphere is 4πr2, so the surface of a sphere with a radius of a meter is about 12m2, or 120,000cm2. Our 100cm2 antenna represents 100/120,000 or 1/1200 of the sphere, which is 4mW.

So at a distance of a meter, we’re looking at 1000 hours to fully charge my Palm Centro battery.

Notice that we’ve erred on the side of generosity to the RCA device. Neither the antenna nor the charger nor the battery charging system is going to be 100% efficient, and the device itself looks to be smaller than 10x10cm. And we’re not going to be within a meter of the wifi box at our local Starbucks.

It’s apparent that, to the extent that the device actually works, it does so only by being in very close proximity to the wifi transmitter.

Now, I suppose there’s a test question here that we could (and should) teach to. Quote the Cnet article and ask, “Is this device practical? Justify your conclusion.” Trouble is, that question requires the kind of answer that’s impossible to grade automatically, and in general, it seems to me that the same thing is true whenever we test practical skills—knowing how, rather than knowing that.

More Real Soon Now.

Addendum: If I were grading the answers to that question, here are some of the elements I’d be looking for.

  • We’re interested in how much power is available from the wifi transmitter, and how much energy (power times time) is required.
  • We’re interested in the area of the surface of a sphere, and the notion that the power available to the device drops with the square of the distance from the transmitter.
  • Assumptions ought to be conservative. If the answer claims that the device is practical, then it should make conservative assumptions about efficiency and size; if not, then (as above) the conservative assumptions go the other way, giving the device the benefit of the doubt.
  • If the answer concludes that the device is not practical, it would be a plus to suggest what RCA is up to, and how it might have been “demonstrated”.

Incandescent lights forever

edison_light_bulb.jpgAs I was listening to a friend discuss the early days of digital computer design, and how much things had changed, it struck me that there is one common technology of similar age that would be instantly recognizable to its inventor: the Edison incandescent light bulb.

Edison was only one of many, of course, but he’ll serve our purposes. Edison built the bulb on the right around 1880, give or take. What I find interesting is that, while we’ve all got CFLs and LEDs around the house these days, most likely we’ve also got copper wire bringing electricity into our house and through the walls, mechanical-contact switches, and glass bulbs with white-hot glowing filaments. Edison would be completely familiar with the entire technology (using a tungsten filament and filling the envelope with an inert gas were incremental improvements that Edison would have been familiar with, and didn’t fundamentally change things).

The panoply of other technological inventions from the end of the 19th and beginning of the 20th centuries (automobile engines, computers, flying machines, etc) have evolved to the point where their inventors would be lost trying to explain them. Otto would understand the principle of my Honda Civic’s engine, of course, but it lives in a nest of high tech that’s well beyond his time.

Not so the lighting system that illuminates me as I type. It’s instantly recognizable in all respects by any techie from 100 years ago. And for longer than we might care to think, I’m guessing.

U.S. enables Chinese hacking of Google

Bruce Schneier. Emphasis mine.

U.S. enables Chinese hacking of Google

… China’s hackers subverted the access system Google put in place to comply with U.S. intercept orders. Why does anyone think criminals won’t be able to use the same system to steal bank account and credit card information, use it to launch other attacks or turn it into a massive spam-sending network? Why does anyone think that only authorized law enforcement can mine collected Internet data or eavesdrop on phone and IM conversations?

These risks are not merely theoretical. After September 11, the NSA built a surveillance infrastructure to eavesdrop on telephone calls and e-mails within the U.S. Although procedural rules stated that only non-Americans and international phone calls were to be listened to, actual practice didn’t match those rules. NSA analysts collected more data than they were authorized to and used the system to spy on wives, girlfriends and notables such as President Clinton.

And surveillance infrastructure can be exported, which also aids totalitarianism around the world. Western companies like Siemens and Nokia built Iran’s surveillance. U.S. companies helped build China’s electronic police state. Just last year, Twitter’s anonymity saved the lives of Iranian dissidents, anonymity that many governments want to eliminate.

In the aftermath of Google’s announcement, some members of Congress are reviving a bill banning U.S. tech companies from working with governments that digitally spy on their citizens. Presumably, those legislators don’t understand that their own government is on the list. …

A series of tubes

I most sincerely hope that it’s possible to get a look at this system. I’m completely fascinated.

Gone with the wind: Tubes are whisking samples across hospital

tubes3-011110.jpgEvery day, 7,000 times a day, Stanford Hospital staff turn to pneumatic tubes, cutting-edge technology in the 19th century, for a transport network that the Internet and all the latest Silicon Valley wizardry can’t match: A tubular system to transport a lab sample across the medical center in the blink of an eye.

In four miles of tubing laced behind walls from basement to rooftop, the pneumatic tube system shuttles foot-long containers carrying everything from blood to medication. In a hospital the size of Stanford, where a quarter-mile’s distance might separate a tissue specimen from its destination lab, making good time means better medicine.

“Approximately 70 percent of the information on a patient’s chart is lab data,” said David Myrick, quality coordinator for the hospital’s clinical labs. “We conduct about 8 million tests a year, serving thousands of patients. We are going full blast, 24-7, at the highest level of testing. The tube system is part of a complex chain of events that ultimately give doctors the essential lab results they need to make decisions about our patients.”

Google in China

Wow.

A new approach to China

… These attacks and the surveillance they have uncovered–combined with the attempts over the past year to further limit free speech on the web–have led us to conclude that we should review the feasibility of our business operations in China. We have decided we are no longer willing to continue censoring our results on Google.cn, and so over the next few weeks we will be discussing with the Chinese government the basis on which we could operate an unfiltered search engine within the law, if at all. We recognize that this may well mean having to shut down Google.cn, and potentially our offices in China.

The decision to review our business operations in China has been incredibly hard, and we know that it will have potentially far-reaching consequences. We want to make clear that this move was driven by our executives in the United States, without the knowledge or involvement of our employees in China who have worked incredibly hard to make Google.cn the success it is today. We are committed to working responsibly to resolve the very difficult issues raised.

Posted by David Drummond, SVP, Corporate Development and Chief Legal Officer

Trawling The Brain

The trouble with fMRI.

Science News: Trawling The Brain

Trawling_the_brain.jpgThe 18-inch-long Atlantic salmon lay perfectly still for its brain scan. Emotional pictures—a triumphant young girl just out of a somersault, a distressed waiter who had just dropped a plate—flashed in front of the fish as a scientist read the standard instruction script aloud. The hulking machine clunked and whirred, capturing minute changes in the salmon’s brain as it assessed the images. Millions of data points capturing the fluctuations in brain activity streamed into a powerful computer, which performed herculean number crunching, sorting out which data to pay attention to and which to ignore.

By the end of the experiment, neuroscientist Craig Bennett and his colleagues at Dartmouth College could clearly discern in the scan of the salmon’s brain a beautiful, red-hot area of activity that lit up during emotional scenes.

An Atlantic salmon that responded to human emotions would have been an astounding discovery, guaranteeing publication in a top-tier journal and a life of scientific glory for the researchers. Except for one thing. The fish was dead.