Posts Tagged ‘Frustration’

iPhone OS 3.0 Predictions

Monday, March 16th, 2009

Some well-respected and some not-so-well-respected weblogs are linking to predictions about Apple’s iPhone OS announcement tomorrow. These predictions are sourced by the same person who said this about the original iPhone:

It’ll be coming out in January …All phone providers… Small as shit… Two batteries… Slide keyboard… Touch screen on the “outside”.

Predictions are valued asymmetrically. If you predict correctly you will treated as prophetic. On the other hand, if you predict incorrectly you will not be held accountable, regardless of how wrong you are.

I resolve to make more public predictions.

FTP Considered Harmful

Monday, February 2nd, 2009

Suppose, for the sake of argument, that you went completely crazy one day, and decided to build a MacFUSE file system that gives you access to the files stored on an FTP server somewhere.  

Leaving aside the inarguable fact that anybody who took on such a project must be stark raving mad—if not before the project, then certainly afterward—it turns out that FTP has several qualities (so-called) that make it particularly unsuited to such a task. For the sake of curiosity, and possibly posterity, I would like to catalogue a few of these.

Persons of sensitive digestion or a strong belief in moral clarity might wish to leave the room or avert their eyes. Caveat lector.

Essential Truths

Like a mortgage broker after the bailout, MacFUSE is going to demand all kinds of invasive personal information about each of the files and folders you are ostensibly providing access to. Of course, any program needs the name of each file, but MacFUSE in addition demands to know all kinds of other things as well:

  • The type of each file (e.g., file, directory, or symbolic link),
  • The size of each file (how many bytes of storage it occupies),
  • The ownership of the file (to whom it belongs),
  • The permissions of the file (who is permitted to read or write the file), and
  • Various timestamps for the file (most importantly, when it was last modified).

Unless you can fill in all these details (and more), you don’t get to play with the other filesystems. File transfer applications like Fetch or Transmit, like the loan officers at Freddie Mac before the collapse, take a somewhat more lenient approach: They’ll use whatever personal details you provide them, but all they really need to do business is a name, and they’re good to go. As a filesystem, you have the watchful eye of the law upon you, so you have to fill in all the blanks.

To answer these questions, the FTP server provides you with exactly one tool. It is called the LIST command, and it’s supposed to tell you what files are available on the server. Unfortunately for you, the FTP Protocol does not say anything precise about what the LIST command should give you back: Most FTP servers run whatever program is used to generate directory listings on their particular operating system, and dump the results back over the network to you.

Since most FTP servers run on Unix-like operating systems, this is usually the output from the ls command. Even then, there is considerable variation in what the ls command spits out, from one Unix-like operating system to another. Windows-based FTP servers often use the dir command, but some of them emulate the output of ls instead. So, you might get this (Unix):


drwxr-sr-x   5 1            512 Jun 29  2001 admin
lrwxrwxrwx   1 0              1 Jun 29  2001 archive -> .
drwx--s--x   2 1            512 Jun 28  2001 bin
drwxr-xr-x   2 1            512 Jun 29  2001 cas
-rw-r--r--   1 21         90112 Jun 29  2001 compress.tar
drwxr-sr-x   3 1           1024 Jun 28  2001 doc
d-wx--s--x   6 1            512 Jun 28  2001 etc
drwxr-sr-x   2 1            512 Jun 29  2001 government
-rw-r--r--   1 21        798720 Jun 29  2001 gzip.tar

Or, you might get this (Windows):


Volume in drive C has no label.
Volume Serial Number is 987F-84C0
Directory of C:\Documents and Settings\Administrator
09/27/2008 03:23 PM <DIR> . 09/27/2008 03:23 PM <DIR> .. 12/22/2008 02:44 AM <DIR> Desktop 09/24/2007 02:05 PM <DIR> Favorites 09/28/2008 02:08 PM <DIR> My Documents 09/05/2007 07:32 PM <DIR> Start Menu 0 File(s) 0 bytes 6 Dir(s) 21,312,827,392 bytes free

Or, you might even get this (OpenVMS):


Directory DISK$USR_THINGY:[TEST]
TCPIP$FTP_SERVER.LOG;1 0/35 18-DEC-2008 14:02:31 [TEST] (RWED,RWED,RE,) ALPHA.TXT;1 582/595 20-FEB-1995 17:15:05 [TEST] (RWED,RWED,RE,) MYTOYS.DIR;1 1/35 18-DEC-2008 14:01:00 [TEST] (RWE,RWE,RE,E) X.COM;1 1/35 20-JUN-1995 10:21:09 [TEST] (RWED,RWED,RE,) X.PS;3 1/35 12-JUN-2007 14:29:17 [TEST] (RWED,RWED,RE,)

And lest you think I’m making things up, these are excerpts from the responses given by real FTP servers. The output of the LIST command is intended to be read by human beings, not by other programs, so no effort is made to keep things consistent from one server to another.

From this mess, you have to figure out a way to extract the name, type, size, owner, permissions, and timestamp for each file on the server. Solving this little problem occupies nearly 10% of the code that comprises the FTPFS implementation in ExpanDrive. That doesn’t even count the code that obtains the LIST output from the FTP server. And, this code has been implicated in virtually every customer-facing bug we have fixed so far with ExpanDrive’s FTP filesystem. It’s carefully written, beautiful code, and I detest every line of it personally.

The Worst of Times

So now you’ve figured out the names of your files, and their types, sizes, permissions, and ownership. But don’t sit back just yet—now you’re in for a real treat. Almost nothing compares to the thrilling excitement of trying to get an FTP server to answer the question, “when was this file last modified, anyway?”

At first glance, this looks pretty easy. Each line of a typical ls output contains a modification date, something like this:

Dec 15 11:45

Parsing a date and time written like that is no problem; it’s basically one line of Python code. But before you get too comfortable, please consider the following simple question: December 27th of what year?

If you answered anything other than “it depends,” then I find your freshly-scrubbed naïveté to be quite charming. In particular, if you assumed any date without a year must mean “this year,” you’re living in a dream world. (I lived there too, for a while—it was quite a pleasant fantasy). Because, you see, if today were December 19th, 2008, then “Dec 15 11:45″ means a quarter till noon on December 15th, 2008. But it also means that if today is February 2nd, 2009, because clearly a file cannot have been modified in December 2009 yet, right?

So, to interpret a date without a year correctly, you can start out by assuming that it is “this year,” and then check to see if that yields a time in the future. If it does, you know it must really means “last year.” Isn’t this fun?

Don’t relax now. There’s more!

Because, you see, it turns out that some dates do have a year, such as:

Apr 11  2004

In this case, you don’t have to guess about the year. However, because you are extremely observant, you will have immediately noticed that while this date does include a year, it does not include a time. So, you know on what day the file was modified, but not the time of day. Like most file systems, MacFUSE wants modification times that are accurate to the nearest second, so this is a bit of a conundrum. Unfortunately, you can’t do much better than to pick some arbitrary time on that date (say, midnight), and hope it’s all right. The FTP server knows the real modification time, but it’s not saying.

“That’s okay,” you say. “We’ll just say it’s midnight, and nobody will notice.” Oh, but they will. Your customers will log into the FTP server and check the timestamps manually against the values you reported, and they will file a bug against your software when the two do not match. This is perfectly fair: They don’t match, after all! But you can’t do a damned thing about it. Even the dates that do include a time generally only give it to the nearest minute.

So Let it Be Written

Having scaled the mountains of madness, you are now prepared to tackle the most essential tasks in a filesystem’s life—the reading and writing actual file data. Since it is, by nature, a protocol for transferring whole files, FTP provides basically two commands for this purpose: The RETR command, to retrieve a file from the server to the client, and the STOR command, to store a file from the client onto the server. By intent, these commands transfer an entire file at a time. But, since files can be very big, computers sometimes crash and networks are occasionally subject to disconnection, FTP also has a command called REST that lets you pick up a failed STOR or RETR command from where it left off.

This model is actually pretty good for file transfer. Most filesystems, however, take a slightly different approach. The “read” operation on a file generally takes a starting starting position and a number of bytes, and fetches that many bytes starting at the given position in the file. The “write” operation, in turn, takes a starting position and a list of bytes, and writes the bytes into the file starting at that location, extending the file as necessary to accommodate them. Turning a filesystem-style “read” into a FTP RETR command is a little tricky. If the filesystem asked you for 32000 bytes starting at position 25 of a file that is 2.5 gigabytes long, and you simply start fetching from position 25, it will be a long time before you can return those bytes. Users get cranky when they have to wait so long for such a small amount of data. And other programs get cranky too—if the MacOS Finder has to wait “too long” for a read or write to be completed, it may force-quit your filesystem completely.

To work around this, you have one more tool at your disposal. FTP also provides an ABOR command, allowing the client to “abort” a RETR that it has started but does not want to finish. To read 32000 bytes starting at position 25, you can resume from position 25, retrieve the file, and then after you have read the 32000 bytes you want, abort the transaction. Easy!

Well, almost.

Something you need to know about FTP is that it uses multiple separate network connections for each session. That’s part of the reason why it’s so hard to configure network firewalls for it. One connection, the “control channel,” is for sending commands like LIST, STOR and RETR; all the other connections (”data channels”) are for sending file and file-listing data back and forth. In theory, the control channel is independent from the data channels, but in practise many FTP servers do not really pay attention to the control channel while they are sending or receiving file data. As you can imagine, this makes it hard to get your ABOR command processed correctly. What’s worse, the exact response that an FTP server is supposed to give upon receiving an ABOR command is not terribly well-defined, so different servers handle it in different ways.

What follows, therefore, is an incredibly delicate dance, evolved over many years of ad hoc FTP client and server design, for the handling of abort requests. The exact effect varies widely: Some servers handle the abort promptly and without complaint. Others throw up their hands in disgust that a client would dare to abort a transfer, and boot them from the server. On servers that do the latter, you may find that each time you read data from a file, you are forced to completely re-establish your connection to the FTP server. I’m not naming any names, but Microsoft knows who they are.

Keeping Up to Date

Take heart, you are not alone! While you are reading and writing all these files, somebody else is out there doing it too! And, if you’re especially fortunate, they’re doing it to the very same files and folders you are using.

Now, I can hear you asking, “Michael, if that’s true, then how will I know if somebody has created a new file, or deleted an existing file, or modified one of the files I am using?” My answer to you is, “that’s an excellent question, now get me a drink.”

The only way you can find out if files or folders have been created, destroyed, or changed, is to ask the server for up-to-date listings of files. That’s right, the LIST command again. The FTP server does not provide any way you can get updated information about individual files; you can only get updates if you re-load the whole directory containing the file you’re interested in. This might be time-consuming, but you have to do it, or you’ll never notice changes somebody else might have made, and wouldn’t you be confused if you tried to open a file that didn’t exist anymore?

Don’t worry. Your customers will understand when it takes a long time to browse through their files and folders because you are using the LIST command so often. I promise.

Wearing your Password on Your Sleeve

Probably the best feature of FTP is that it avoids all the messy complications of encryption and security. When you sign in to a typical FTP server, you just send your password right over the Internet in clear, unencrypted text. What could be easier than that? There’s no need to muck about with public keys, site certificates, trust roots, or any of that other nonsense. Of course, just about any yahoo with a copy of tcpdump could read your password, but that seems a small price to pay for the convenience of software developers, doesn’t it?

Many users were predictably unsatisfied with this excellent “zero-security” design of FTP, and became so agitated about it that many sites now implement a modified version of the FTP protocol called “FTPS”. This is supposed to stand for “FTP Secure,” but it shouldn’t be confused with SFTP, which is a completely unrelated protocol that is actually secure. FTPS comes in a couple of different incompatible varieties, the more common of which requires that you install custom FTP software that supports some extra security-related commands.

With FTPS, you no longer get to send your password over the network in clear text. That is, provided your FTP server supports the extensions (most don’t), and that it does so correctly (most don’t), and that you are using client software that understands FTPS (most do).

Fortunately, despite the loss of cleartext password transmission, you can still have some fun with FTPS, because once you have encrypted the FTP control channel, many network firewalls will no longer be able to handle the FTP data connections, causing your program to hang when it tries to transfer data. Some clever mensch tried to solve this problem by adding a command to disable encryption on the FTP control channel after you have sent your password, but fortunately for you, plenty of servers don’t implement it correctly, so you will have some wild times coping with the connection failures that result.

Sites that still don’t support SFTP have defended their users’ right to have their passwords compromised on a public network by keeping FTP instead. Modifying their servers to support FTPS was probably a lot more work than installing SFTP would have been, but for some hosting sites, no effort is too much for their loyal customers. So, while you may have some difficulties in implementing FTPS support for your MacFUSE filesystem, you can take comfort from the fact that your own customers will appreciate your efforts to safeguard their traditional folkways.

Reflections and Conclusions

For those of you who, in open defiance of all reason, have made the stimulating choice to implement a filesystem based on FTP, I hope that my little discussions may help you along your path. If you are in need of any further assistance, I can also recommend several excellent varieties of single-malt Scotch whisky that will provide incalculable benefit to your efforts.

Despite the sage words of Steve Frank and other upstarts, who advocate switching from FTP to SFTP, many sites continue to cling doggedly to FTP as a primary means of access to their customers’ data. Indeed, one could argue they are giving excellent access—to anyone in the world who might conceivably want it. Furthermore, these hosts break the chains of traditional patriarchalist Western rationality, which would ordinarily insist upon such details as accurate file timestamps, machine-readable status information, good performance, and the ability to play nicely with network firewalls.

Everybody’s got their little rebellions.

Setup Gmail IMAP, Mail.app, and the iPhone with Archive

Monday, November 17th, 2008

If you’re happy using gmail.com as your user interface, then there’s no need to read further into this blog post. The Gmail web interface is the best I’ve ever used, but it’s not as good as a native, desktop app. If you wail on your applications like I do, then you need fast and local. Apple’s Mail.app isn’t prefect (no email client is), but it’s good enough. The interface is snappy, the search is fast and reliable, and I can drag and drop attachment files onto it.

I’m going to explain how to setup Gmail to work the right way with Mail.app and the iPhone. “Right”, of course, means “the way I want it to work.” In particular, this means that I want “deleting” something in my client to make it “archived” in Gmail for eternity. I almost never want an email to be deleted forever. I also want Sent Messages and Drafts to work in a reasonable way, but delete -> archive is the big one for me.

NB: This guide is a work in progress, a living document. Check back for updates. Feedback is actively solicited.

Setting up Mail.app

  1. Follow the directions at the Gmail Help Center. Make sure you enable IMAP in the Gmail web interface before you play with Mail.app. Also, when Mail.app notices you’re setting up a Gmail account and offers to do it for you automatically, don’t fall for it. It will setup and POP3 account, which is worthless, and you’ll have to start over. Finally, note that every time you’re ever asked for a “User Name:” you’re going to have to enter your whole Gmail address username@gmail.com.

  2. As always, the devil is in the details. In this case, the details are the “Mailbox Behaviors” panel for the account in Mail.app preferences. Google has Recommended IMAP client settings, an obscure Gmail Help Center page, and the Mail.app settings are unlinkably hidden by Javascript. I believe Google’s recommended settings are wrong. Well, I think their “Sent” recommendation is wrong, I agree with the other ones. Here is my recommendation.

mailapp_settings.png

If you match these settings then your Drafts, Sent, and Junk folders will automatically sync with the corresponding Gmail folders. Your local Trash folder will remain empty, and your deleted messages will get archived in Gmail’s “All Mail” folder.

If “Sent” is not checked, then Gmail stores a copy in its Sent Mail folder, and Mail.app will store a copy in its Sent folder. These two copies will be different, and deleting one will not delete the other. The ”Delete sent messages when:” setting will only apply to the Mail.app copy. If that’s what you’re into, then go for it.

A few caveats

Gmail Folders in Mail.app

Gmail Folders in Mail.app

After following the above directions, Mail.app may or may not have figured out how to merge the the Gmail tags with the corresponding Mail.app folder. For example, the Gmail “Spam” tag and the Mail.app “Trash” folder. In the worst case, if Mail.app figures out nothing, then your Gmail setup in Mail.app’s main window will look like the image to the left. If this is the case, then click on a folder that Mail.app did not figure out for you. Let’s start with “Drafts”. Click on the “Mailbox” menu, pull down to “Use This Mailbox For”, and select “Drafts”. Repeat as necessary for “Sent Mail”, and “Spam”. Do not do this for “Trash”. If you do, then Mail.app will silently turn on “Move deleted messages to the Trash mailbox”__ and your archived mail will start getting silently deleted. Oofta. Also, for some reason my copy of Mail usually won’t merge “Spam” with it’s “Junk” folder. I’ve given up on trying to make it work, because it doesn’t really matter anyway.

You may have noticed that with the above settings you lose the Trash folder in Mail.app. That is, you will have no record of your recently deleted messages except for Gmail’s “All Mail” folder (Mail.app’s Trash will be forever empty). I’m fine with that, since deleted messages are the overwhelming majority of my “All Mail” folder. Another option is to make a costume tag in Gmail like “[Deleted Messages]”, and then set this to be the Trash folder in Mail.app. Then, when you delete the message Mail.app will remove all existing tags, and add a [Deleted Messages] tag. If you delete it againOther option. Make a [Deleted Messages] folder yourself.

Setting the “IMAP Prefix”

In the Mail.app sidebar your Gmail tags will appear as folders. The built in Gmail tags (All Mail, Spam, Starred, Trash) appear nested in a folder named [Gmail]. The rest of your tags appear as folders at the same level as the [Gmail] folder. Some people recommend that you set your IMAP path prefix (in Preferences -> Accounts -> Advanced -> IMAP path prefix:) to Gmail. I don not recommend this. It will make your built in Gmail tags appear at the top level, but it will make your personal tags disappear entirely. Also, if you fiddle with it Mail.app will re-download your entire mailbox. Fair warning.

Setting up iPhone Mail

First, and important FYI: there are two different and barely distinguishable types of Gmail accounts on the iPhone. If you go to “Mail, Contacts, Calendar” settings, then “Add account…”, and select “Gmail” then you will get an account type that I will call “POP3”, even though I’n not certain it is POP3. This potentially out of date video calls it POP3, though the obscure page calls it IMAP. Regardless of what it is, you can’t make it work the way we want.

Amazingly, if you let iTunes sync your Mail.app Gmail IMAP account to the iPhone, the iPhone will turn it into a maybe-POP3 account. Furthermore, if you have a mail account on the iPhone that looks like an account in Mail.app, but isn’t quite the same, then iTunes will be unhappy about syncing. So the first order of business is to stop iTunes from trying to sync your Mail.app Gmail account to your iPhone. Plug in your iPhone, find it in iTunes, click on the Info tab, scroll down to Mail Accounts, and uncheck your gmail account. Then, since you can’t plug in an iPod without it syncing, go delete the account from your iPhone.

Bad Gmail probably-POP3 Account

Gmail non-IMAP “Auto-G” Type Account

The only way to get a Gmail IMAP account on the iPhone is to instead select “Other” at the account creation screen, and fill out the settings by hand. Instructions are on this page, or you can follow the above previously linked video. Note once again that you need to type out the full username@gmail.com each time.

After you’ve added your account information, quit the Settings app, then fire up Mail and let it download at least your folder structure. If you don’t do this, then the iPhone will let you fiddle with settings using only a fake INBOX folder that it assumes your account will have. Then, after it downloads your real folders, it will silently throw out the settings you put on the fake INBOX folder and replace them with its own defaults. I kid you not.

iPhone Gmail “IMAP” account

iPhone Gmail “IMAP” account

Once again, Google recommends that you keep a separate copy your sent messages on the iPhone on its Recommended IMAP client settings page, and I disagree. My settings are in the image below.

My recommended Gmail settings

My recommended Gmail settings

Also, while Mail.app will let you live your life without any Trash folder at all, the iPhone isn’t so understanding. It demands somewhere that it can put a Deleted Mailbox. Put it “On My iPhone” and it will make a separate Trash completely independent from Gmail. You can delete these message on your iPhone whenever you want, and it will not effect Gmail at all.


Other notes

This is a lightly tested theory: if you enter username instead of username@gmail.com then you will download new messages ok, but your deletes and folder moves will not propagate to the server correctly. Oofta.

Heinous iPhone Bug: If you make a new account with the same settings as an existing account, then the client will merge the two accounts with the new one’s blank settings, and erase the data in the old one. If you delete one, then it will delete both.

Advanced IMAP Settings

Google Labs recently released Advanced IMAP Controls for Gmail. If you activate advanced IMAP controls then you can choose to make some folders “invisible” to the IMAP interface. Some people are really excited about this, because they don’t want to download their huge “All Mail” folder. Mail.app will only download it once anyway (and then you have an offline copy), and the iPhone only downloadss 50 at a time, so I don’t see what the big deal is.

The advanced controls also expose a completely incomprehensible feature to let you “turn off auto-expunge”. When this came out about 100 people reblogged it, and it’s pretty clear that no one knows what it does or how it’s supposed to work. According to the official Google post:

The IMAP protocol allows messages to be marked for deletion, a sort of limbo state where a message is still present in the folder but slated to be deleted the next time the folder is expunged. In our standard IMAP implementation, when you mark a message as deleted, Gmail doesn’t let it linger in that state — it deletes (or auto-expunges) it from the folder right away. If you want the two-stage delete process, after you’ve enabled this Lab, just select ‘Do not automatically expunge messages’ under the ‘Forwarding and POP/IMAP’ tab in Settings.

Um, ok. First off, what is “expunge” supposed to mean, and what does it mean to Google? Second, if deleted messages aren’t immediately expunged, then when are they expunged? Once a month? When you click the “expunge” button? (There is no expunge button). Third, that option to “Do not automatically expunge messages” followed by “When a message is expunged from the last visible IMAP folder: Archive the message” is pretty tempting. It’s a trap! As far as I can tell, with every other permutation of settings this will make deleted messages go to the Trash and then disappear forever.

I held out a long time before making the move to Gmail. I got an invite soon enough to get my second favorite username, but then I sat on it for years without using it. At first it was because I was too hardcore to let the gRobot read my email. Later, when I’d become less of an idealist and more of a pragmatist, it was because Gmail didn’t support IMAP. When IMAP support was added last year, I didn’t move because I was to lazy to migrate. Eventually my other mail server went down at an inopportune time, and I decided to make the leap.

Pages with potentially useful information

Deleting IMAP Messages

Apple iPhone and Gmail deleted messages

IMAP Actions

Gmail Archiving and deleting on iPhones

Advanced IMAP Controls

Advice that doesn’t quite work

Other iPhone tips we’ve written about

Double tap for iPod Controls

Mac Retrogaming on your iPhone with minivMac.app

Turn Your iPhone 3g into a Wireless Hard Drive

iPhone: Charge while your Mac sleeps

OpenSolaris Package Management

Tuesday, October 28th, 2008

OpenSolaris is both great and horrible. Horrible in the sense that it is nearly impossible to get anything other than a basic LAMP stack to install/compile without 30 minutes of Googling around and 20 minutes of tweaking environment variable, shared libraries, or make files. After endless [weeks] of banging my head against the desk, Jon came about this solution:

$ pkg set-authority -O http://pkg.sunfreeware.com:9000 sunfreeware
$ pkg refresh

This sets the default pkg authority to the SunFreeware site – full of pre-compiled binaries that are to actually INSTALL and WORK on OpenSolaris/Solaris 10. How novel?

Test it out by installing sudo

$ pkg install -v IPSFWsudo

I’m tagging this post with as many keywords as possible in hopes that people come across this post via Google. I want to love OpenSolaris, but it is such a nightmare to use with open source software. You’d think that out of Sun’s 34,909 employees they could construct a team of 20-30 people whose sole job was to make OpenSolaris usable and competitive with Linux for those trying to host websites.

Converting AVI and WMV to iPod or iPhone

Friday, September 19th, 2008

Ok, so forget the last post. You love Cover Flow. You’re a law-abiding citizen who would never take any digital media off a peer-to-peer network.

You’re just a regular joe, who, back when they used a PC, ripped a lot of their DVDs into AVI files, and some of those AVI files had to be broken into two separate CD-sized files because your old laptop didn’t have a DVD player and you couldn’t buy a trillion-byte hard drive down at the corner store. Don’t worry, everyone believes you; no one is calling the MPAA in on your IP address just because you’re reading this article.

Anyway, now you’ve got a Mac, and all these movies are in a format you can’t play on either your iPhone or your iPod. In fact, some of them don’t even seem to play on your Macbook. Solutions?

In my experience, if something won’t run on Quicktime, just turn to MPlayer or VLC. They look sloppy and decidedly non-Mac, but both are free and extremely effective. MPlayer is a little bit more straightforward, VLC covers more formats and lets you do more cool stuff. If neither of these programs can run a video file on your Mac, the movie is probably corrupted.

handbrake.png

Getting movies into a format an iPod/iPhone won’t choke on is a bit tougher. If you haven’t sold the DVD you originally ripped the movie from on eBay, Handbrake is an awesome DVD ripping solution. It has an amazing array of settings for the power user/control freak, but also some basic presets (iPod, iPhone, AppleTV, etc.) for people who want things to “just work”.

But no, I hear you. All you have is an AVI that won’t even open in Quicktime, and you need to make it iPhone-compatible m4v or mp4. My pick in 90% of cases would be iSquint, the dumbed-down (but free!) version of VisualHub from Techspansion It has the same fire-and-forget feel as Handbrake, with a fair array of output options for the technically ambitious, and smart-alec alert windows to boot.

isquint.png

For those other 10% of cases, when the AVI is split into chunks, do yourself a favor and do NOT buy Quicktime Pro to join the files. For some reason, it takes the pinnacle of Macintosh media playing prowess HOURS to join a couple 700MB files. D-Vision (why are all these video geeks French, anyhow?) does it faster, cleaner, and for free. Just click the big button that says “Tools” and you’re ready to rock. It’ll also fix up crummy AVIs for you.

dvision.png

In some cases, very rarely, you’ll run across video files that simply won’t work. I had an .mp4 of Batman Begins that just would not run on my iPhone. After hours of banging my head against the wall, I opened it in Quicktime and checked out “Movie Properties” under the Window menu. Turns out the voice track was a few fractions of a second shorter than the video. A tiny error, imperceptible in playback, but enough for my phone to reject it. I cropped a half-second off the beginning and end of the file, and all was well.

In even rarer situations, you’ll find a movie in your collection that some weird, Linux-using friend must have ripped for you (from your DVD, of course) in .mkv format with FLAC audio or some other bizarre combination of open-source formats. VLC is your best bet for these. It can (slowly, painfully, and unstably) export an MPEG file that iSquint can usually make iPod-worthy. It’s “Streaming/Exporting Wizard” under the File menu.

VLC.png

Good luck, and may the Force be with you.

Two Years Later, Cover Flow Still Sucks

Monday, September 8th, 2008

It’s September, folks, and we all know that means: football, free stuff on the sidewalks, and yet another batch of shiny new iPods from Apple. While people who do that sort of thing for a living are prognosticating all sorts of fancy crap for the new lines, there’s really only one thing I want to see: the quick and painful death of Cover Flow.

While it may seem like just another example of Jobs buying and/or stealing someone else’s idea and pawning it off as “innovation” (see also: Dashboard, Spaces and pretty much everything else), Cover Flow is unique among Apple’s line in that it’s complete and utter garbage.

Now before you get your irrationally-tight blue jeans in a knot over how awesomely retro cover flow is, stop and act like you’re a useful human being. Do a cost benefit analysis. Benefits of cover flow: You get top sift through postage stamp-sized images of your favorite album covers. That’s it. Costs? Where do I begin…

First of all, it kills your ability to quickly parse a list of music. While the mind scans images more quickly than words (this is why favicons are so awesome), Cover Flow lets you see nine albums at a time, tops. Of these 9 albums, you can maybe tell what 3 or 4 of them are. No problem if you’ve got every corner of every album cover in your 20,000 song collection memorized, but for those of us who aren’t idiot savants, it’s a real thorn in the grundle.

peas.jpg
Awesome! Three copies of Elephunk! But what the hell is that off to the left?

This problem is complicated by the fact that iTunes is just way too stupid to have the responsibility of assigning songs to albums. Miss a hyphen? A capital letter? Misspell a band name? You’re gonna get three different albums. It’s not that iTunes can’t figure out what art to assign; it just can’t tell that three discs with the same art, title, and band name belong to the same freakin’ album.

blanks.jpg
Ok, sweet. I finally found Van Morrison. But what’s all this other crap?

This is, of course, assuming you have art in the first place. But if you’re below age 30 or so, I’m gonna go out on a limb and say you came into a fair chunk of your collection via Napster, Scour, Limewire, BitTorrent, or what have you. Over 30, and you’ve probably brought everything in from CD. Either way, That means lots of ugly, useless space-holding images in your Cover Flow. It’s as if Steve Jobs and his evil cabal convened in their Cupertino War Room and asked “how can we shame self-conscious yuppies into paying us money for music that they already have?”

library.jpg
Wow, this is almost as fun as looking through identical, unlabeled folders in real life!

Apple’s real crime with Cover Flow, though, was bringing it into the OS. Maybe, if Preview were somehow disabled and you had a folder entirely filled entirely with images, Cover Flow would be an acceptable means of sorting through it. But for the most part, it’s just a slow, inconvenient bit of eye candy that brings to mind the condescending, overdone metaphor of Microsoft BOB.

Cover Flow is Apple at its worst: shiny, overpacked, and buggy. Sure, it looks real cool on TV ads, and if the compugods are smiling on His Jobsness, it’ll look fly when unveils it for the fanboys. But Apple’s recent purple patch is fueled largely by the popular perception that its stuff just works; by any standard you can imagine, Cover Flow just doesn’t.

git-fu: Git for the lazy

Tuesday, July 29th, 2008

Getting started with Git? Git for the lazy is one of the better starting points we’ve seen [via SvN].

There are a million Git cheat-sheets out there, but this one does a pretty good job at picking the more intuitive way of performing a particular task, and showing some sample commands to get it done. The How To Fix Mistakes section is particularly useful, and succint:

Haven't committed yet, but don't want to save the changes? 
You can throw them away:   
git reset --hard   

You can also do it for individual files, but it's a bit different:   
git checkout myfile.txt   

Forgot something in your last commit? That's easy to fix.   
git reset --soft HEAD^   

Then write over the last commit:   
git commit --amend   

Don't make a habit of overwriting/changing history if 
it's a public repo you're working with, though.

If I read another post with a laundry list of why git is useful, each bullet linking me to the man page, I’m going to scream. How much time do you think I have?

There is no shortage programmers coming over from Subversion who feel confused and perplexed by all that Git has to offer. My biggest complaint about Git is that there are quite a number of ways to accomplish a specific task, and it’s not always clear that the best practices are.

Bizarre: Address Book -> Google Sync

Thursday, May 29th, 2008

The situation with Address Book / Google Contacts sync is completely bizarre. The Google Mac Blog says that OS X 10.5.3 “now lets iPhone users sync their Address Book with Google Contacts.”

Awesome, but what’s up with iPhone requirement? Is there some special technology in the iPhone, a technology that doesn’t exist in full-sized computers, that makes the sync possible? Is this a business ploy to attract gmail users to the iPhone who might otherwise use a Google -> Address Book -> iSync double-bridge to get their gmail contacts on their Razr?

But then you can enable sync, without an iPhone or iPod touch, if you’re willing to brave a simple .plist hack? I’m very confused about what the logic is behind all of this.

Subscribe:

Add to Google
RSS
Try ExpanDrive

If you’ve heard of SSH then you need ExpanDrive.