Archive for December 10, 2012

Monday, December 10, 2012

reStructuredText Codeless Language Module

Eric Knibbe has written a BBEdit codeless language module for reStructuredText. It seems to accurately find the functions (headings), comments, and hyperlinks. However, it suffers from the same problem I ran into when building my own CLM for reStructuredText: on certain files, it is incredibly slow, to the point of making typing unpleasant. This is probably due to pathological regular expression matching.

I ended up building my CLM to not look for functions at all. Instead, I use an attachment script on documentWillSave to find the headings and create markers for them. On the plus side, this is much faster and allows me to indent the markers according to the document structure. Unfortunately, since BBEdit does not see the headings as actual functions, it does not allow me to fold them.


Mattt Thompson:

instancetype is a contextual keyword that can be used as a result type to signal that a method returns a related result type.


With instancetype, the compiler will correctly infer that the result of +personWithName: is an instance of a Person.

Teaching Kids Regular Expressions

Cory Doctorow:

I think that technical people underestimate how useful regexps are for “normal” people, whether a receptionist labouriously copy-pasting all the surnames from a word-processor document into a spreadsheet, a school administrator trying to import an old set of school records into a new system, or a mechanic hunting through a parts list for specific numbers.

ARC Gotcha: Unexpectedly Short Lifetimes

Mark Dalrymple (via Matt Drance):

ARC variables are released as soon as the optimizer decides that they are no longer referenced, so the compiler is free to release uicolor after fetching the CGColor. Current compiler implementations do seem to wait until the end of scope, but that’s not guaranteed.

The result is that it’s trickier to use CF and CG objects with ARC than with manual reference counting. It seems to me that Apple could fix this by marking the method as returning an interior pointer, as it does in some other APIs. Drance disagrees, but I’m not sure what makes this case more complicated.

Apple’s Flawed Burn-In Test

Matthew Cleevely (via Dan Wood):

I bought a retina-MBP, it had serious and annoying ghosting (a common problem). I asked apple to repair it (I have Apple care), they administered a spurious test (my opinion, see results below), said it was within their tolerances and refused. I, rather disappointed, complained at every possible level to no avail.

This is a real problem with my laptop that affects my use of the device every day. I am now having to pay myself to have the screen ‘replaced’—not ‘repaired’ as Apple's representatives are keen to point out.

See also my previous post on Retina MacBook Pro Burn-In.

Credit Card Statement Design

Matt Henderson:

Of those essentials, one thing we learn is that you don’t need to put boxes around and lines under everything on the page. As an example, the book suggests printing an Excel spreadsheet with and without the grid-lines enabled. The difference in readability is striking!

I second his recommendation for The Non-Designer’s Design Book.

Fears of a Charlatan Girl

Serenity Caldwell:

When the fraud police come knocking down your door, however, it’s a different matter. Your fears, perfectly manageable when limited to your own self-critique and determination, become altogether something else when someone calls you on them. I can say honestly that if a member of the Incomparable’s audience ever insinuated that I was some sort of “fake geek girl,” I’d raise hell on Twitter—but inside? I don’t know if I’d ever be able to do another episode of the podcast again. That’s the kind of insult that turns what was an enjoyable hobby into a miserable experience.

Twitterrific 5 for iOS

Twitterrific 5 has an entirely new design. I like the minimalism and how fast the app feels. I’m not really a fan of the new tweet layout, which puts the avatar, the full name, and the username all above the tweet text itself. This seems to take up a lot of space for no good reason. Despite getting rid of a lot of chrome, Twitterrific 5 shows fewer tweets on screen at once. It feels like someone shrunk my iPhone’s screen.