Archive for May 1, 2015

Friday, May 1, 2015 [Tweets] [Favorites]

Moving Averages and the iPad

Dr. Drang:

I think this way of presenting the data makes the iPad’s situation much clearer. Sales are not “flattening”, nor are they “flat.” They were flat in 2013, but now they’re going down, and they have been for a year. What’s most interesting to me is how the upward trend, still very strong in 2012, just stopped dead in 2013. This is something you can’t see—or at least I can’t see it—in the graphs of raw data.

[…]

The sales decline can’t be explained by cannibalization from the iPhone. The problem with the iPad started when iPhone sales were one of its slowest growth periods.

[…]

The real questions are when will iPad sales level off again—this time coming down from above instead of up from below—and what are Apple’s plans to reverse the trend. There’s no reason to get hysterical and start thinking the iPad will turn into the iPod, but iPad sales have been in this state for two years, and there are no outward signs of any change from Cupertino. I do wonder if the iPad has been starved of attention because of the iPhone (which must be tended to because it’s 70% of revenue) and the march to bring out the Apple Watch.

Spicing up Xcode

Zev Eisenberg (via Hoà V. DINH):

But remember, I wanted the xib. I could press the down arrow key twice, or use the mouse to double click the third result, but there’s an easier way. Since the file extension is taken into account in this dialog box, I can just add an additional “x” to my search in order to highlight the correct file, and then press Return to open it.

[…]

Most menus in Xcode are fully searchable. Just start typing, and a search field will appear, filtering the menu down by the characters you’ve typed. And the best part is that searchable menus employ the same fuzzy matching as the Open Quickly dialog.

[…]

I feel like I can sometimes get a “back” navigation action to go back to where I was editing, but I just tried and couldn’t get it to work. Here’s what I do as a workaround: if I’m somewhere in a file and I know I need to jump to the top for an import, I write some garbage or leave a line unfinished, so that I get an inline compiler error. After I make my edit at the top of the file, I use ⌘’ (Command-apostrophe) to Jump to Next Issue, which brings me back to the line of code that I broke.

Zoreslav:

You can also use ^@ to set a mark and then ^X^X to go back to it when needed (only moves cursor, cmd-shift-L to scroll to cursor).

Still a far cry from BBEdit’s Jump Points feature, and you have to Jump to Selection afterwards, but it does work.

NSShowUnalignedViews

Ken Ferry:

pass -NSShowUnalignedViews YES to get colored drawing around non-px-integral views

LLVM’s New libFuzzer

Kostya Serebryany:

Fuzzing (or fuzz testing) is becoming increasingly popular. Fuzzing Clang and fuzzing with Clang is not new: Clang-based AddressSanitizer has been used for fuzz-testing the Chrome browser for several years and Clang itself has been extensively fuzzed using csmithand, more recently, using AFL. Now we’ve closed the loop and started to fuzz parts of LLVM (including Clang) using LLVM itself.

LibFuzzer, recently added to the LLVM tree, is a library for in-process fuzzing that uses Sanitizer Coverage instrumentation to guide test generation. With LibFuzzer one can implement a guided fuzzer for some library by writing one simple function:

extern "C" void TestOneInput(const uint8_t *Data, size_t Size);

Update (2015-05-02): Mike Ash:

With computer security high on everyone’s minds these days, tools that help assess and improve the security of our code are extremely useful. Today I’m going to talk about one such tool, afl-fuzz, which has seen a lot of attention lately and produces some interesting results. I’ll discuss how it works and how to use it on your own code.

Update (2015-05-04): John Regehr:

American fuzzy lop is a polished and effective fuzzing tool. It has found tons of bugs and there are any number of blog posts talking about that. Here we’re going to take a quick look at what it isn’t good at. For example, here’s a program that’s trivial to crash by hand, that afl-fuzz isn’t likely to crash in an amount of time you’re prepared to wait[…]