Zoom Anywhere

September 14th, 2010

I’ve been in and out of Apple’s iPhone simulator for the past two years, and for the entire time, I’ve been frustrated by what I assumed was an inherent limitation: pinching and zooming and only works in the middle of the screen:

Today I was so supremely frustrated by this that I played around with all manner of double-clicking, alternate modifier keys, etc., until I stumbled on the simple solution. Googling for answers after-the-fact revealed that I’m by no means the first person to discover this, but it’s quite possible I’m the first person who has told you!

To zoom in on an arbitrary point with the iPhone simulator:

  1. Hold down the option key to obtain the familiar “simulation fingertips”.
  2. Move the mouse until the fingertips are the desired “starting width” for your gesture.
  3. Keeping the option key pressed, hold down the shift key to enter “panning” mode.
  4. Move the mouse until the fingertips are at the desired starting position.
  5. Remove the shift key while continuing to hold the option key.
  6. Click and drag to zoom in or out at the selection location.

ZoomAnywhere-3.png

It’s a little cumbersome, but it’s about 1000% more useful than not being able to do it at all.

MarsEdit 3.1

September 14th, 2010

MarsEdit 3.1 is available now, and includes a number of changes for performance, compatibility, and ease of use.

MarsEdit 3.1 – Summary of Changes

  • 64-bit Compatible
  • New per-blog setting to constrain image media to pre-set size
  • Support for Lightroom 3 media libraries
  • Added new “Paste HTML Source” command for e.g. embedding YouTube easily in rich mode
  • Enabled plugins for rich editor so you can e.g. see embedded movies
  • “Send To Weblog” command now works when preview window is front-most
  • Optional support for Google Data API 2.0 with Blogger
  • Bug Fixes
    • Fix issue that prevented ejection of external media volumes
    • Fix some cases where the preview window could turn blank
    • Make sure changes to the preview template save to disk immediately
    • Restore functionality of “send post to blog” scripting command

In more detail…

Media Management Enhancements

Since MarsEdit 3.0, it’s been a lot easier to browse for images on your Mac to upload along with blog posts. But there are still many improvements that would make the job even more streamlined. By far the most common request I get about the media features in MarsEdit is that there should be some way to automatically limit the size of images, both so they don’t take so long for viewers to download, and so that they fit neatly into the visual layout of a particular blog.

With MarsEdit 3.1, just double-click the blog icon in the main window to bring up settings, and look under the “Editing” pane:

Blog Settings Dialog

The constraints you specify here will apply whenever you select an image in the Media Manager “On Your Mac” section, or in the Upload Utility window. The settings can be overridden on a case-by-case basis, just type in a different size as you wish.

Another important change in the Media Manager is updated support for Adobe’s Lightroom 3, which was not compatible with previous releases of MarsEdit 3. I thank Pierre Bernard of Houdah Software for his contributions to the iMedia open source project, which made this possible.

64-Bit Compatible

For most users, it doesn’t make any difference whether a particular application runs in 32 or 64-bit modes. But for applications such as MarsEdit that use Apple’s WebKit framework, it makes a huge difference for one simple reason: Flash runs in its own process. When Flash crashes, as it’s sometimes known to do, it shouldn’t bring down MarsEdit along with it.

Another benefit of 64-bit applications is simply that, as more and more applications switch over to 64-bit, there will be less and less reason for the 32-bit versions of Apple’s operating system libraries to be loaded into memory. In a nutshell: the last 32-bit application on your Mac is the rotten egg that can’t share the libraries already in memory for the benefit of 64-bit applications.

Minor Features and Fixes

People are loving the new rich editor introduced with MarsEdit 3, but occasionally it’s necessary to paste in “raw” HTML text, even if you are in the rich editor. A prime example of this is embedding YouTube videos. When you copy the embed codes from a YouTube page, you used to have to switch to MarsEdit’s HTML text mode in order to paste them into a post. Now, just select Edit -> Paste HTML Source from the main menu bar, and your embedded YouTube movie should show up right there in the rich editor.

I also fixed a number of niggling details that were vexing some folks. I still have plenty to do, so it’s back to work for me. But I hope you’ll enjoy the modest improvements in this free upgrade!

Hold On A Minute

September 9th, 2010

One of the big new features in MarsEdit 3 is a revamped media manager that allows you to easily browse local libraries from iPhoto, Aperture, etc.

Media Manager.png

This functionality is based largely on the great work of the iMedia project, which was spearheaded by Karelia to replicate Apple’s own ubiquitous media browsing interface, some variant of which is available in Pages, iWeb, Mail, etc.

iMedia has been around for a while, but in the past year or more it has been undergoing a significant overhaul as its primary developers gear up to release the official 2.0 milestone. I have been involved in the 2.0 project for a long time now as an “early adopter,” using MarsEdit as a testing ground during the beta phase, and taking (mostly!) only the refined and polished aspects of the product for the final MarsEdit 3.0 release.

We are still ironing out some of the kinks, especially in parts of the project that were not tested in MarsEdit. One of the cool new features is support for the Flickr photo-sharing service. Like MarsEdit’s own Flickr-browser, it shows thumbnails of images on Flickr, and lets you treat them more-or-less like ordinary image files that you’d find on your computer.

iMedia Flickr Support

Things get a little bit complicated when a user selects and drags one of these Flickr image thumbnails to another app, such as the Finder, or Photoshop. Since the image lives in the internet, and not on the local hard disk, it is not something that can be popped over to the application in an instant. Instead, a progress dialog comes up while the image is downloaded to the disk, and then the local copy is passed to the receiving application.

iMedia Flickr Download Panel

I try to contribute back when possible in the form of bug fixes and architectural feedback. Some of the work I did for iMedia 2.0 involved updating its drag-and-drop functionality to take advantage of new features in Mac OS X 10.6. In the process, I became a sort of de facto expert on handling dragging, which is a shame, because we could sure use a real expert, instead!

The other day, an issue came up that relates to the dragging of Flickr files. If the download is taking a while, and the user tries to cancel, mouse clicks are apparently ignored and they are stuck with the progress dialog above. I agreed to look into the issue, but there was just one problem: my network is too fast! Whenever I try to drag a Flickr image to another app, it’s done within a couple seconds, and I don’t have time to play around with clicking the cancel button.

If only I could get a really slow connection to Flickr, then I could easily test this. In the old days of Mac OS 9 or earlier, I may have resorted to plugging in a slow modem to simulate the experience of the less bandwidth-fortunate. In Mac OS X however, I can take advantage of the advanced firewall software that comes bundled with the operating system, and which allows me to configure “traffic shaping” policies on the traffic coming in and out of my computer. I found a great hint from Macworld that got me on the right track.

My goal is to cause Flickr downloads to be artificially slow. In order to achieve this goal I need to find the specific web address that the downloads come from. To do this, I use the standard tcpdump terminal utility, which also comes bundled with Mac OS X:

sudo tcpdump -Atqp -s 0 -ien1

The only part you may want to change is the bit at the end that says “en1”. Depending on the network interface you’re using, you might want en0 or en2 instead. With this running in the terminal, I go back to iMedia and start downloading Flickr files. This lets me see what the addresses of those files look like, and I discover the pertinent host name is “farm5.static.flickr.com”. Using the information I gleaned from the Macworld article, I set up the following firewall traffic shaping rules:

sudo ipfw pipe 1 config bw 15KByte/s
sudo ipfw add 1 pipe 1 src-port 80 src-ip farm5.static.flickr.com

Translation?

  1. Create a pipe (you might prefer to call it a “tube”). A pipe is an artificial pass-through which can be configured to slow down, block, or otherwise alter the network traffic that goes through it.
  2. Configure the pipe to limit bandwidth to a crawling 15KByte/s.
  3. Configure all traffic coming from port 80 (the standard HTTP port), and originating from a specific hostname at Flickr, to pass through that pipe.

As soon as these commands are executed, the pipe is in place, and Flickr download speeds are brought to screeching halt. I can now debug the issue with the download dialog and the cancel button patiently and curiously, instead of racing to try clicking the button while I still have the chance.

When I’m done debugging, I definitely want to delete the pipe, so that download speeds go back to normal:

sudo ipfw delete 1

Mucking around with the built-in firewall on Mac OS X is not for the extremely faint-of-heart. This is why all the commands listed in this entry require “sudo” superuser privileges. Yes, you could seriously screw up your computer’s network connection if you do something wrong. But if you are the type of person whose work requires you to test and debug network related tasks, this traffic shaping functionality can be a real asset when it comes to mimicking the network environments of other people.

Addendum: I should have known I might be doing it the hard way, as usual. Clint Ecker reported on Twitter, and several folks in the comments below, that speedlimit, a Mac OS X preference pane, gets the job done in a much friendlier manner.

Fall Conferences

August 31st, 2010

After the announcement earlier this year that C4 was cancelled, I had a hard time getting too excited about conferences. My feelings about Apple’s WWDC are ambivalent: it’s an impressive production and a great opportunity to meet up with dozens or hundreds of colleagues, but it’s expensive and simply lacks the heart of smaller conferences. I go to WWDC every year with some amount of excitement, but mostly as a point of professional obligation. Attending smaller get-togethers like C4, on the other hand, is pure indulgence.

While I don’t think C4 can be replaced, there are other conferences of a similar scale that can help to fill the void. This Fall offers a full calendar of options for folks who are looking for an opportunity to socialize with peers and learn a few new tricks of the trade:

VTM iPhone Developer’s Conference: October 16-17, Philadelphia, PA.
Voices That Matter has been on a run with iPhone-targeted conferences, putting on a show every 6 months or so at different locations around the country. I spoke at the Boston event a year or so ago, and had a great time.

I am attending the Philadelphia event as a speaker alumni guest, and they have also passed along a discount code to share with you: PHBLOGS. If you use this code before September 10th, it combines with early bird pricing for a total savings of $300.

MacTech Conference: November 3-5, Los Angeles, CA.
For all you hardcore Mac and IT nerds who have had enough of the iPhone-only conferences, this is the place for you. This is the inaugural event and seems to have come at least in part as a reaction to Apple’s substantial omission of Mac and IT content from the WWDC event this year.

I’m speaking at this conference and although I won’t say exactly what my topic is, it just might set me up for a world class showdown with my illustrious friend Wil Shipley, who is also scheduled to appear.

360 iDev: November 7-10, Austin, TX.
Hot on the heels of MacTech, 360 iDev is another iPhone-oriented conference that has been skipping around the country. The Austin, TX location is a big draw for me, but I think with so much other activity and the speaking gig just prior in Los Angeles, I will have to sit this one out.

Apple Developer Tech Talks: November-December? Worldwide.
If you haven’t been lucky enough to live near enough and apply quickly enough for these stellar events, you’ve missed out. For the past several years Apple has sent some of its best communicators to put on what amounts to a micro-WWDC: a day of intensive sessions on the latest and greatest Apple technologies.

I attended last year’s New York event and wrote up the experience for TUAW. Assuming Apple puts this tour on again this year, and I’m eligible to attend, I’ll be scampering to sign up. You should, too!

What else is going on in the Apple-sphere this Fall? If I am overlooking something big, please share with us in the comments below. I’ll update the post later with a more “definitive” list of options to choose from.