Archive for the 'Apple' Category

An iPhone SDK guess

Wednesday, January 10th, 2007

Maybe it will come with Xcode 3?

UPDATE 20:55: Never mind.

All known Keynote Bingoes for MWSF 2007

Tuesday, January 9th, 2007

iTunes smart playlists: Recent podcasts

Sunday, January 7th, 2007

This is a response to Daniel Jalkut's iTunes Script: Recent Podcasts.

It is possible to do what he does with scripts with smart playlists. The result requires no user action to update, since the playlists will update automatically. You can even use them to sync recent podcasts to your iPod.

We start with a playlist for all podcasts:

The rules in the “Recent podcasts (played or not)” playlist are: Category is not (empty); Kind does not contain “stream”; Date Added is in the last 3 days.

This smart playlist provides the same function as the script with its kIgnoreAlreadyPlayedPodcasts property set to its default value of false. If you like kIgnoreAlreadyPlayedPodcasts set to true:

The rules in the “Recent podcasts (never played)” playlist are: Playlist is “Podcasts (played or not)”; Play Count is 0.

This playlist derives from the first one, and you can replace the Playlist rule with the three rules of the other playlist if you don't want a played-or-not playlist hanging around.

UPDATE 2007-01-08: Daniel Jalkut pointed out that there's a Podcast criterion that I could have used. I completely missed it. This makes the solution much simpler:

The rules in the “Recent podcasts (never played), Daniel Jalkut edition” playlist are: Podcast is true; Play Count is 0.

Free stuff on iTunes: PBS science pilots

Thursday, January 4th, 2007

PBS is looking at three science-show pilots, and can't decide which one to order as a full series. So they've made all three pilots available, for free, and ask your opinions on them (perhaps by iTunes commenting — I haven't watched the videos; there may be instructions within them or something). Each show is a full hour. They are:

  • “Wired Science”, from KCET (channel 28 in Los Angeles — have I mentioned that I'm in the LA TV market?) and Wired Magazine.
  • “Science Investigators”, from WGBH. Possibly related to History Detectives?
  • “22nd Century”, from Towers Productions and Twin Cities Public Television.

John Hodgman’s new book, free on iTunes

Tuesday, December 19th, 2006

The Areas of My Expertise by John Hodgman (aka a PC, aka The Daily Show's resident expert), read by the author. All six hours, 58 minutes of it. Free.

Screencast codec showdown

Friday, December 8th, 2006

So I'm looking at making some screencasts in iShowU. I noticed that, thanks to QuickTime, it supports rather a lot of codecs:

iShowU's codecs pop-up menu, showing 29 different codecs of various suitability.

Dizzying, isn't it?

So I asked the Goog about some of the codecs, and also more generically about screencast codecs. H.264 is a popular choice, but I found no comparison to other codecs nor any discussion of what any of the codecs is particularly good at.

I also had a small amount of previous experience with the difference between codecs. I've watched two of rentzsch's screencasts: “Introduction to Core Data” and “Embedded Cocoa Frameworks”. The former is 1024×768 using H.264; the latter is 800×600 using Sorenson 3. “Introduction to Core Data” looked flawless; “Embedded Cocoa Frameworks”, OTOH, had noticeable artifacts. I wondered at first what the difference was, and after I found out, whether there wasn't a better codec with which to implement screencasts.

Part of the problem is that there really isn't a codec that's been well-optimized for screencasting. Video codecs have historically been optimized for, well, video — that is, video shot with a camera. Screen images usually don't change much except to follow mouse movements; a compressor specifically optimized for recording the screen should make a big difference in screencast file sizes. Are you listening, Apple? (Or Ambrosia?)

Anyway. In order to find the perfect (so far) screencast codec, I recorded a brief screencast using iShowU in demo mode using the None (no-compression) codec, and used QTAmateur by Michael Ash to export it to all the other codecs.

The results? Well, you'll just have to read the screencast codec showdown for yourself. ☺

Instant replay in iTunes

Friday, December 1st, 2006

While flipping through Michael McCracken's blog, I found his blog post about his instant replay in QuickTime Player script, and decided that that would be a good thing to have in iTunes (especially when I want to quote some George Carlin to somebody).

So here it is. It's in source-code-only format; you should probably compile it using Script Editor before using it. It uses iTunes' own rewind function, which will jump back four seconds; play with the “delay 0.1” line if you want to jump back farther. I bound it to ctrl-⌘-⇠ using Quicksilver's Triggers feature.

The best developer tool since Interface Builder

Tuesday, October 31st, 2006

Yesterday, wootest created an app called ThisService. I'll put this disclaimer right up front: He is a reader of this blog, and he allowed me to test a prerelease version of ThisService. But neither of these facts affects the opinion that I'm about to state.

ThisService is the greatest developer tool since Interface Builder.

UNIX has an interface paradigm called the “filter”. This is an application that reads zero or more input from its standard input special-file, operates on or with the data in some way, and writes zero or more output to its standard output special-file. This simple design is amazingly versatile, and highly conducive to simple but effective IPC.

NeXT took the same concept and extended it to the GUI with what it called System Services. Some of you may have seen these; they live on in OS X, more or less unchanged as far as I've seen. And their operation is pretty much the same: take some input (or not), do something to or with it, and emit some output (or not).

So John Gruber, according to himself, had the idea for an application that takes a filter program and makes a system service from it, and put this idea to wootest. Didn't take him long, apparently; I beta-tested it last night, and the app is now at 1.0.

ThisService 1.0 main window.

Pretty simple. You give ThisService the filter's name, location, behavior, and an optional hotkey, and it will create a system service application for you.

Services are very versatile. Consider the Objective-C service, or the Copy File Path service, or CalcService, or Tidy Service. Quite a range of functions, no? But Apple does not make a very big deal of the Services system's existence, and so the feature sits unused by most users. When's the last time you visited the Services menu?

And yes, this is despite the fact that many Apple applications — some of them big-name, some of them more quiet necessities — provide services. In fact, core OS X apps provide most of the services on most people's systems. This, of course, is because on the whole, nobody else knows about Services.

I think that ThisService will change all that. The fact you can now write an OS X service in Python/Perl/awk/C/$FAD_LANGUAGE in exactly the same way that you would write a UNIX filter makes creating services now trivial. So I think that we'll see plenty of applications in the future built with ThisService, perhaps with a badge somewhere on the webpage proclaiming that fact, with instructions like this:

This application is an OS X “system service”.

  • To install it, simply drag it to your Home/Library/Services folder (first creating that folder if necessary). It will then be available in most applications.
  • To use it, choose “service-name” from the Services menu in the Application menu (the menu just to the right of the Apple menu).
  • To remove it, take it out of the Library/Services folder, e.g. to the Trash.

(Feel free to copy the above instructions, even if you don't use ThisService to create your service.)

The first wave or two of these new services will be geek-oriented. Programmers will take their existing stashes of filters that they've created (such as mine) and make services out of them and put them on their websites. Thus, the first influx of service users will be geeks (including, but not limited to, other programmers).

But then I predict a larger resurgence in services. People will start making new services from other filters that have broader utility, like sort. There may even be a new attraction to making services directly, either from scratch, or from a UNIX filter but with a GUI on top to specify options (i.e. not using ThisService). And then I think the larger, non-technical userbase will start using services.

It will be a great day.

Free stuff on iTunes: The Million Hit Lowdown

Thursday, September 14th, 2006

The iTunes Store has a new feature as of today called the Million Hit Lowdown. They have the season finales of Lost, Desperate Housewives, and Grey's Anatomy, as well as a documentary special relating to each show, available for free. All told, about six hours of video. The catch is, each season finale will only be free until it has been downloaded one million times. So if you want any of these, you should snap 'em up before they go away. (You can always pause the download if you don't want to download it immediately.)

If you want all the episodes in one list, here's an iTunes search for them.

iTunes 7, and the new iTunes Store

Wednesday, September 13th, 2006

The good.

  • Power Search is finally linked from the front page of every iTMS section. This isn't a complete fix to iTunes 6's ruined search field that doesn't let you select a criterion before searching (I haven't tried 7 yet), but it's nice to have anyway. I will definitely make a webloc with the itms: URL for it.

  • The borders and backgrounds on the TV Shows section are nice.

  • Hooray for movies! Pretty small selection, but the TV Shows section started out small too. Hopefully some other studios will get on board with the idea of selling their movies through iTunes.

  • I like the new top-level pane for an iPod.

  • They finally added a downloads viewer! Woo-hoo!

    iTunes 7 downloads viewer.

  • Speaking of which, iTunes now downloads up to three of your pending downloads (e.g. season pass episodes) at once. This also applies to shopping-cart downloads. There's no obvious pref to change the maximum number of concurrent downloads.

    Cropped screenshot of iTunes 7's downloads viewer, showing two downloads at the same time.

  • You can pause a download and resume it later. IMO, this is a necessary feature, especially with the huge new 640×480 downloads. As an example, this Lost episode is only 920.4 MB, according to iTunes' downloads viewer.

  • You can now get album art from iTMS for songs that don't have any (because you ripped them from CDs, downloaded them from eMusic, recorded them from TV or radio, etc.).

  • I'm going to say this in font-size: 120% because it's just so huge. THEY FIXED VIDEO FRAME-RATES IN iTUNES! I can now play MacBreak (which is HD) at half-size with an acceptable frame-rate and The Daily Show (in the old 320×240 size) at double-size with a smooth frame-rate!

The bad.

  • SHOUTING IS BAD!

  • Helvetica is ugly. What was wrong with Lucida Grande? Can we now expect a return to Helvetica in Leopard? (Strangely, this only applies to iTMS. iTunes itself still uses Lucida Grande.)

  • They got rid of the “Free Downloads” sections on the Music and TV Shows pages. Why? I liked knowing at a glance what I could get for free. There isn't even any indication on the iTMS front page that there's still a Discovery Download (and there is, as you'll find if you search for it).

    UPDATE 2006-09-19: Simone found that if you turn off “Just for You”, a “Free Downloads” section appears on the front page of iTMS. If you then click “See All” in that section, it takes you to this page. Unfortunately, the list there is incomplete; it, too, is missing the Discovery Download.

  • Some of the heading borders look like a rather plain web page — just a basic border around some text (consider this example). The old headings looked much better.

  • Another new version of QuickTime? What exactly is wrong with the one I have?

  • Some pages have hyperlinks, but they aren't underlined. When I see a hyperlink like this one, my first thought is “how?”.

    Screenshot of iTunes Store page for Solitary, season 1. Includes a run of text (“Visit the official Solitary site.”) that is linked, but not underlined unless moused over, thereby giving no indication that it is a link unless you are lucky.

  • $5 a game? Do cell-phone people pay these prices?

  • Could they have made the new UI any uglier and more non-standard?

    • It does not respect Appearance preferences. I already chose a selection color and turned on double-arrows-at-both-ends. iTunes uses neither of these. (UPDATE 2006-09-20: Simone has filed both of these as bugs.) And its scroll thumbs (which look almost, but not quite, like Dashboard's) are some funky cross between Aqua and Graphite. Pick one!

    • The outline view, scroll bars, column video headers, buttons, checkboxes, radio buttons, and iPod tabs look nothing like any other app. (Only in the main window, though; not the preferences.)

  • iTunes is paranoid about showing dialog boxes for perfectly harmless and easily reversible actions.

    Screenshot of iTunes dialog box to confirm hiding the “Movies” item in the source list.

    Yes! Of course I do! That's why I unchecked the checkbox! And if I didn't, I could simply check it again!

  • STILL with the UI preemption! Please, Apple, let us do two things at once! (I'm referring now to the “Updating library…” dialog, as well as to the old “Buffering stream…” dialog that appears when you listen to a preview or when a stream lags. These operations cannot be canceled or postponed or backgrounded, except that you can switch out of iTunes and use some other app while it churns.) UPDATE 2006-09-20: Also filed as a bug by Simone.

  • The new “Cover Browser” (which I think is what used to be called CoverFlow) is nice. But it only works in the Library, not on iPods. Why?

  • No more Browse view. I miss this because it was a much faster way to navigate the TV shows.

    UPDATE 2006-09-14 23:47 PDT: Not so! m2e points out in a comment that the Browse view is still around; simply press ⌘B. You can also choose “Show Browser” from the View menu. Thanks!

    UPDATE 2006-09-20 00:31 PDT: Also, klarno points out in a comment that you can invoke it by clicking the eye button at the bottom-right of the window. That's how I used to invoke it: by clicking the eye button. But in 6, that button was in the top-right, and was colored, and had the word “Browse” under it. I thought that the new one invoked the Visualizer (which would have been welcome; an eye makes much more sense to me as a symbol for “Visualize” than for “Browse”).

  • iTunes takes 20% CPU (40% if the downloads viewer is visible) to download something. This is worse even than Safari or OmniWeb.

The indifferent.

  • The icon's beamed eighth note (♫) is blue again.

    iTunes 2.0's icon: A CD with a blue musical note in front of it.
    iTunes 7.0's icon: A CD with a shiny blue musical note in front of it.
  • The new rewind/playpause/fast-forward buttons are nice.

  • The chasing arrows are back!

    Screenshot of chasing arrows on an iPod having its gapless-playback information updated.

  • The iTunes Music Store is now the iTunes Store.

  • You now only get the jump-to-iTunes-Store buttons for the selected item in a list of songs, not all of them. Slightly distracting to see buttons appear and disappear as the selection changes. But I don't think they were clickable for non-selected items anyway, so it doesn't matter much.

I don't like the new interface, but I can tolerate it in exchange for the greatly improved video performance, the higher resolution, and the concurrent and resumable downloads. On the whole, I like the new iTunes.

Oh, and the new iPods look awesome. The new shuffle redefines the nano's old slogan, “impossibly small”, and the new nano brings back the great (and non-scratch-prone) aesthetics of the iPod mini. Good work, Apple iPod division!

UNIX commands that are also questions

Friday, September 8th, 2006

Just because I find sets like this amusing.

what
“show what versions of object modules were used to construct a file”
whence
“For each name, indicate how it would be interpreted if used as a command name.”
where
“Equivalent to whence -ca.” (-c: “Print the results in a csh-like format.” -a: “Do a search for all occurrences of name throughout the command path. Normally only the first occurrence is printed.”)
which
“Equivalent to whence -c.”
who
“show who is logged on”
who
“show who is logged on”
wtf
Defines acronyms.

Missing, of course, are why, when, whom, and wherefore. Somebody please write these utilities. ☺

UPDATE 2006-11-02: wootest pointed out that “why” was missing from the missing list, and this caused me to remember that “wtf” was missing from the main list. Both omissions are now fixed. Thanks!

John Hodgman on Net Neutrality

Wednesday, September 6th, 2006

From the Daily Show, 2006-07-19 (starting at 10m28s in the actual episode). Small context note: Prior to this excerpt, he'd critiqued Senator Stevens' choice of “a series of tubes” as his analogy of the internet, recommending instead “oh, I don't know, off the top of my head, a net?!”, and then also calling it a “mesh”.

HODGMAN: So, what is Net Neutrality? Well, let's say we're both computers here on the mesh.
STEWART [interrupting]: Uh — what kind of computer would you be?
HODGMAN: Uh… [audience applauds]
STEWART: In uh, in uh…
HODGMAN: I could be a home computer, or network servers…
STEWART: Uh-huh. What kind of operating system would you use?
HODGMAN: Well, statistically speaking, it would probably be a Windows operating system. So, definition —
STEWART: So, you'd be like a, uh, like a personal computer, or do you say I guess the common abbreviation…
HODGMAN [resigned]: OK.
HODGMAN: I'm a PC. [audience applauds]
STEWART: OK. All right. So, uh I guess I would then be a different type of computer.
HODGMAN: OK, that's uh, that's enough of that.
STEWART: OK.

A Terminal quickie

Thursday, August 17th, 2006

I've been reading Jeff Atwood's Coding Horror blog (love the favicon, BTW). I got to the post where he talks about the Consolas font as compared to Lucida Console, and shows it with and without ClearType (anti-aliasing). You can download Consolas (and a few other fonts) from this post on Jeff Milner's blog.

Looks good, so I wanted to try it in Terminal (even though I use xterm — yes, I'm like that). Looks good in Terminal, too, but I was reminded of a problem with Terminal and box-drawing characters:

Terminal, showing a box drawn by a shell script. Each box-drawing character (that is, line segment or corner character) is twice as wide as it needs to be, which is throwing off spacing and causing each of the lines with a box-drawing character on them to overrun the width of the terminal.

That box is supposed to fit within my screen and be centered in its horizon. Not working so well.

The culprit is the “Enable wide glyphs for Japanese/Chinese/etc.” checkbox on the Display pane of the Terminal Inspector. Apparently box-drawing characters count as “etc.”. Turn that off, and sanity is restored:

Terminal, showing the same box drawn by the same shell script, with “Enable wide glyphs for Japanese/Chinese/etc.” turned off. Each box-drawing character is now the same width each of the other (non-box-drawing) characters.

Don't forget to Save Default Settings after you frob the checkbox. Unless you do, the new value will not be applied to future Terminals.

Technorati tags: .

Whoa, what happened to Monaco 9?

Thursday, July 6th, 2006

A C source file, viewed in Monaco 9, in SimpleText in Mac OS 9.2.1. The same C source file, viewed in Monaco 9, in TextEdit in Mac OS X 10.4.6.

I think they got rid of the screen font. It's just using the outline font now.

Wow. Just… wow.

Technorati tags: , .

Apple bug Friday! 44

Friday, June 30th, 2006

This bug is PackageMaker's keyboard shortcuts are not consistent with Xcode's. It was filed on 2006-05-19 at 02:28 PDT.

The list in the Notes section is adapted from another blog post of mine, Know your Xcode.


Summary:

PackageMaker's keyboard shortcuts for Build, Build Log, Run, and Run Log do not match up with Xcode's shortcuts for the same commands.

Steps to Reproduce:

  1. Press ⇧⌘B.

Expected Results:

The Build Log appears.

Actual Results:

*Beep*

Regression:

None known.

Notes:

Xcode has a simple and elegant system for its keyboard shortcuts:

  • ⌘_ builds, then performs the action.
  • ⌘⌥_ performs the action without building. (Exception: Build's keyboard shortcut is ⌘B, presumably because it is impossible to build without building.)
  • ⇧⌘_ shows the log for the action.

PackageMaker should adopt the same schema, both for its elegance and for uniformity with Xcode.


Technorati tags: ,

Call to action

Thursday, June 29th, 2006

I want to see Mac OS X Tiger (or Leopard) running on a NeXT Cube. :)

And NeXTStations only count for half points. They're too modern. I want to see it on a NeXT Cube, grayscale and all.

If you make it happen, or find somebody who has made it happen, please post a link in the comments.

Technorati tags: , NeXT.

Report-an-Apple-bug Friday! 43

Friday, June 2nd, 2006

This bug is CrashReporter dialog has “Close” button. It was filed on 2006-06-02 at 03:17 PDT.


Summary:

The “unexpectedly quit” dialog has a “Close” button.

Steps to Reproduce:

  1. Crash an application.

Expected Results:

A dialog box comes up, saying that the application has unexpectedly quit, showing the backtrace, and offering me the option to either “Report” the crash or one of:

  • Quit [the application]
  • Cancel [reporting]
  • Don't Report

Actual Results:

A dialog box comes up, saying that the application has unexpectedly quit, showing the backtrace, and offering me the option to either “Report” the crash or “Close” something.

Regression:

None known.

Notes:

It is not clear what is being closed. I think the immediate guess is the application; only on further reflection does one realize that if the application has already quit, it must not be available to be “closed”. It could refer to the window, but isn't that what the red widget is for? But there is no red widget, because this is a dialog box.

The button's title should be changed, to one of the three names listed in Expected Results. Of those, my favorite is “Don't Report”.

The CrashReporter dialog box, with its “Close” button.


Technorati tags: ,

New MacBooks, but…

Tuesday, May 16th, 2006

The new MacBook is out, replacing the iBook. The upside, besides now being an ICBM, is that it now comes in black. The downside is that the screen is glossy.

MacBook webpage, with “13-inch glossy widescreen display” highlighted in red.

You see this a lot on PC laptops made in the last few years. Sure, the colors are beautiful on such a display — but there's so much glare! If I wanted a mirror in my computer, I'd just launch iChat and use the iSight as one.

This in addition to my usual lack of desire for a laptop. I won't be buying one.

Technorati tags: .

Why iTunes videos are not widescreen

Tuesday, May 9th, 2006

One of the most frequent complaints about the iTunes Video Store is the resolution. All videos are 320×240.

The reason why lies on Apple's iPod specifications page:

Display

  • 2.5 inch (diagonal) QVGA transflective, over 65,000-color liquid crystal display with white LED backlight
  • 320 x 240 pixel resolution, .156-mm dot pitch

Let's say that iTVS sold shows in their native resolution. Joe User buys a show that comes in 720p HD (a 16:9 resolution). He transfers this to his iPod, and watches it on the train. What does he say as soon as the title screen comes on?

"Wow, this sucks. They cut off the top and bottom of the video. I won't be buying any more TV shows from iTunes again."

What happened?

Well, remember that the iPod's screen has a 4:3 aspect ratio. If you show all of a 16:9 video frame on it, you have empty vertical space — usually manifest as black matte above and below the frame, called "letterboxing" (because it's like looking through a mail slot). Joe User has a screen of a certain height, and the video is not filling that height, so he assumes that the video has been cut.

The other solution is to cut off part of the frame, so that the height is filled, at the expense of the left and/or right end(s) of the frame (called "pan and scan" because the crop must be moved back and forth to keep the important part in-frame). This, in fact, is what Apple does: the videos you buy from Apple have been pre-cut to fit the iPod's screen. Joe User is happy, even though he is in fact seeing fewer pixels than before.

Aspect ratio isn't the only issue; there's also the sheer number of pixels to put on the screen. You can't fit all of a 720-line-high frame onto a 240-line-high screen, unless you scale it. That takes CPU power, which in turn uses up battery life and may reduce the framerate. Apple does that heavy lifting in advance, so that your iPod doesn't have to.

There's a third solution: Make the iPod's LCD widescreen. This means doing one of two things to it:

  1. Cut off 60 vertical pixels, changing the iPod's resolution to 320×180.
  2. Add 106+⅔ horizontal pixels, further reducing the size of each pixel. One advantage would be that it would further help hide compression artifacts.

The problem with both solutions is that they make it harder to browse music. Vertical space counts here (for scrolling menus); horizontal space is not as important. And the iPod is still a music player first.

I think that Steve Jobs looked at all of this and decided that the iPod Video as implemented is the best way he could come up with. And if so, I agree.

Technorati tags: , , , , , .

How to create a RAM disk

Tuesday, May 9th, 2006

Added 2007-09-29: This is the hard way. The easy way is my free app Make RAM Disk. It does the same process shown here, but with a lot less effort from you.

I just posted to this lisppaste with a punt solution. Since this solution really has nothing to do directly with the problem stated, I thought I'd share it with you as well, with HTMLization and some editing from the original.

  1. hdiutil attach -nomount ram://num_sectors (sector = 512 bytes = 0.5 K)

    This outputs a device path (/dev/foo) on stdout.

  2. newfs_hfs -v volume_name device_path

    Formats the RAM disk as HFS+. See the manpage for other options.

    [Added 2007-09-23] If you want a case-sensitive file-system (HFS+ being case-insensitive by default), add the -s flag before the device_path.

    [Added 2007-10-14] If you'd rather not use HFS+, then you can use newfs_msdos to get FAT12, FAT16, or FAT32 (you choose which with the -F option), or newfs to get UFS.

  3. diskutil mount device_path

    The RAM disk will be mounted at /Volumes/volume_name.

You could also do something involving mount(8) instead of diskutil if you wanted to mount it inside NSTemporaryDirectory(). Remember to unmount it (hdiutil detach device_path, or the Eject command in the Finder or Dock) when you're done.

UPDATE 2007-08-07: Changed from hdid to hdiutil attach, since hdid is deprecated and hdiutil works just as well.

UPDATE 2007-09-29: Added link to Make RAM Disk.

UPDATE 2007-10-14: Added references to other commands in the newfs family (specifically, newfs_msdos and newfs).