Archive for August 16, 2016

Tuesday, August 16, 2016 [Tweets] [Favorites]

Xcode’s “Copy Qualified Symbol Name” Command

Joar Wingfors:

Xcode Tip Of The Day:

[Xcode > Edit > Copy Qualified Symbol Name]

Or: Cmd+Shift+Option+Ctrl+C

It’s hard to type with one hand but rather useful. For example, you can put the cursor anywhere in a method definition or call, and it will copy the full name to the clipboard, e.g.:

-[NSArray(NSExtendedArray) enumerateObjectsWithOptions:usingBlock:]
removeAll(keepCapacity:)

You don’t have to select any of the pieces.

Joar Wingfors:

Now, if only Open Quickly supported qualified symbols…

For sure: 10450773. Pile on!

My most recent Radar number is 27865953, so I guess people have been wanting this for a long time.

Update (2016-09-20): Felix Schwarz:

In Xcode 8, place the cursor above a method or function & press “⌥ + ⌘ + /” to auto-generate a doc comment.

Colorized Man Pages: Understood and Customized

Peter Hosey:

So when we want something underlined (for example), the us and ue entries in our terminal’s termcap record are what we need to send to the terminal to start and end underlining that section of text.

And less, it seems, provides this handy way to override those entries using environment variables. We can make us and ue and any other termcap string do whatever we want!

[…]

The \e[ essentially tells the terminal to start listening for a command that will change its behavior. m is actually the command here; all the inputs to the command come before it. The m command tells the terminal to change how it renders subsequent text until further notice.

iTunes Connect Reporter

Apple just sent me an e-mail about its Reporter tool:

Reporter is a Java-based, command-line tool you can use to download your Sales and Trends and Payments and Financial reports. Autoingestion is an older tool that works like Reporter. But newer and expanded functionality will only be available in Reporter, so we recommend using this tool from now on.

Craig Hockenberry:

Alex, I’ll take Bad Ideas for $1000:

“Requires a cleartext Apple ID password in a file.”

The thing that’s most frustrating about all of this is that we really want a RESTful API for this info. Would be easier to harden, too.

Update (2016-08-18): fedoco:

This script mimics the official iTunes Connect Reporter by Apple which is used to automatically retrieve Sales- and Financial Reports for your App Store sales. It is written in pure Python and doesn’t need a Java runtime installation. Opposed to Apple’s tool, it can fetch iTunes Connect login credentials from the macOS Keychain in order to tighten security a bit. Also, it goes the extra mile and unzips the downloaded reports.

Python’s attrs Library

@glyph:

You know what? I’m done. 20 lines of code so far and we don’t even have a class that does anything; the hard part of this problem was supposed to be the quaternion solver, not “make a data structure which can be printed and compared”. I’m all in on piles of undocumented garbage tuples, lists, and dictionaries it is; defining proper data structures well is way too hard in Python.

[…]

So here’s where my favorite mandatory Python library comes in.

[…]

import attr
@attr.s
class Point3D(object):
    x = attr.ib()
    y = attr.ib()
    z = attr.ib()

This is also a big pain in Objective-C. Swift structs are better, although you do need to make them Equatable.

Amazon Locker

Dr. Drang:

I had to return an order, and after going through the usual steps, I was presented with three options for sending the package back. Two of them, UPS pickup and UPS dropoff, were the options I was familiar with. The new one was Amazon Locker. These are the sort of lockers you’d see at a bus terminal—or, more likely, the sort of lockers you’d see in a bus terminal in a black-and-white movie—but they’re owned by Amazon and set up in places to make it easy for customers to pick up and return orders (and for Amazon to avoid paying UPS).

[…]

Truth to tell, the UPS Store is closer to my office than this Amazon Locker, but I always have to talk to a person at the UPS Store (ew) and there’s usually a line. An interaction with a touchscreen and cold sheet metal seems much more Amazon-like.

I was not able to find any lockers in my state.