Bug Writing Season

It’s that time of year: Apple has just released a bunch of amazing new things and we start poking at them. And of course, we encounter things that don’t work like we’d want or expect.

Apple’s engineers like to remind us that there’s a good way to handle that situation. You’ll also see a lot of bug report numbers pass by on the Twitter and Facebook feeds as your colleagues ask for duplicates. We’ll all be spending a lot of time writing Radars.

Now’s the perfect time to start using QuickRadar. As its name suggests, this project run by Amy Worrall, makes creating or duplicating bug reports much quicker. You’ll also find that a native Mac user interface is much easier to deal with than some web form pretending to be iOS 6.

The QuickRadar icon can be shown in your dock or in the menu bar. When you click on the icon or use the global hot key, you’ll be presented with the following UI:

QuickRadar_UI

Note: Since Apple doesn’t provide an API for Radar, the app works by scraping web pages. You’ll need to enter your Apple ID and password in Preferences before you can submit a bug report (and you have the source, so you know exactly how those credentials are being stored and used—it’s all done securely.)

Just fill in the fields and hit Submit. If you have your own internal bug tracker or want to document a workaround, you’ll probably want to copy the Radar number to the clipboard. Sending the bug to Open Radar is awesome if you want to let other developers know about the issue and/or get some duplicate bug reports.

If you want to duplicate a Radar, all you need is the bug report number. For example, say you want to complain about the new developer website being a huge pain in the ass. Just select File a Duplicate… from the QuickRadar menu and you’ll be presented with:

FileDuplicate_UI

After entering the bug number, the user interface will be pre-populated with the information from Open Radar along with a header saying “This is a duplicate of rdar://21372721″. Click Submit and you’re done.

We all know that writing bugs takes time away from doing more interesting things, but it’s still our best way to affect change from within Apple. With these tips, you’ll be able to get back to coding as soon as possible!

Fifteen

A lot can happen in fifteen years, especially on the web. At the turn of the millennium, many of us were coming to terms with the dynamic nature of a new medium that connected our world. I was honored to be a part of this collection of thoughts and reflections of that time.

I’m a firm believer of moving forward in your work and not relying on past accomplishments. The best way to find the path into the future is to look for clues from where we’ve been. A collection of thoughts from people I admire is priceless.

And before you dismiss this as information that’s only relevant for “web designers”, look at how your apps rely on web infrastructure to do something meaningful. Then think about how difficult it is to build an interface that works well on all screen sizes. These are the same things we struggled with as the web entered adolescence.

Paste Without Style

I agree with Buzz Anderson: “Paste-with-styling is one of the worst software inventions of all time.” Every time I mention the workaround shown below, there are many retweets and favorites. Clearly, there are a lot of people that feel the same as Buzz and me.

The solution is surprisingly simple: make Paste and Match Style the default for pasting by mapping the menu item to the ⌘V keyboard shortcut:

KeyboardShortcuts

These settings are available in the System Preferences > Keyboard > Shortcuts > App Shortcuts panel. Count the number of clicks required to get to that screen and it should be clear why so many people don’t know about this trick. Another reason for the confusion is that “and Match Style” really means “Without Style”.

You’ll also note that that I have Paste & Match Style mapped. I use some older apps which have an ampersand in the menu item instead of the word “and”. Since app shortcuts work by matching text exactly, this duplicate is needed.

After you’ve made this change, you might find that the keyboard shortcut sometimes doesn’t work. The one that gets me the most is when I try to ⌘V in the “To:” field while composing a message in Mail. When you try to use the shortcut, you’ll hear a beep because the control doesn’t accept styled text and Paste and Match Style is disabled. When this happens, it’s easy enough to right-click and use the context menu or select Paste from the menu bar.

There are some apps where I do want a keyboard shortcut for pasting styled text. The screenshot above shows one: TextEdit. Most of the time I’ll rely on ⌘V to paste text without styling, but if I do want to keep the text’s attributes, ⇧⌘V is just a keystroke away.

If you’ve found this trick useful, be sure to share it. There are a lot of people who don’t know how simple it is to fix this little annoyance.

Clearing the Icon Services cache in Yosemite

After installing or updating a system to Yosemite, I have seen blank (missing) icons on several Macs. I have also seen cases where the desktop doesn’t get updated after a change to the document icons in the application itself (which happens as developers update their apps to use the new icon guidelines.)

This is an example of just another cut:

xScope_IconBug

If you’re seeing any weird behavior with icons in Yosemite, the chances are good that the Icon Services cache is corrupted and needs to be reset. Here’s how you do it using the Terminal:

$ sudo find /private/var/folders/ \
  -name com.apple.dock.iconcache -exec rm {} \;

$ sudo find /private/var/folders/ \
  -name com.apple.iconservices -exec rm -rf {} \;

$ sudo rm -rf /Library/Caches/com.apple.iconservices.store

After running those commands, you’ll need to restart your Mac.

Ideally, there would be some way to do this using the underlying iconservicesd or iconservicesagent commands, but that didn’t work out too well. Hopefully Apple will find a better way to do this than using a Terminal.

Bezel and xScope

Look at your wrist: notice something missing?

Yeah, it’s “Early 2015″ and you still don’t have an Apple Watch. Damn!

Luckily, my colleague Troy Gaul has just released something that can tide you over while you work on your wrist apps: a developer tool called Bezel. Things get even better when you display Bezel’s window with the Mirror in xScope. You’ll have a development environment where you can get instant feedback about the physical aspects of your design.

It’s very likely that the display on the Apple Watch is 326 ppi and that’s conveniently the same as the iPhone’s Retina Display. That means you can get a pixel perfect layout of your wrist app on your iOS device. Here is a photo comparing a printout of Thibaut Sailly’s layout PDF with an image generated by Bezel:

PDF Comparison

You can even take it a step further and pretend that your app is running on your wrist:

PDF Comparison

Don’t be afraid to get creative with rubber bands or other types of fasteners to attach your phone to your arm. Note that xScope’s Mirror works fine in landscape orientation if you’re experimenting like this.

And if you’re wondering why xScope doesn’t send taps back to Bezel or the iOS Simulator, I only have two words to say about that: Application Sandbox.