We would want to find the commit that changed the contents of the file to make this block of code into its final shape. […] Note that we are not interested in commits for which “git show” output contains the given string. We are only interested in a commit whose tree has this string in the file literally, but whose parent’s tree does not. In other words, we do not have to (nor want to) run textual diff and grep in the result. We count the number of occurences of the given string in the file in the tree of the commit, and the same for the commit’s parent. If we get different number, the commit chnages the string, which is what we wanted to find. Counting occurrences of substring is much cheaper than first generating textual diff and grepping in it (which is not what we want to do anyway).
Archive for June 2009
Chris Hanson explains why
@synthesize is not enough; you also have to implement some KVO methods if you want efficiency. I tend to agree with the comment from Jens Alfke that this is too much boilerplate.
The Applers were able to do this by bonding this oleophobic polymer to glass. The polymer is an organic (from organisms) compound, carbon-based. The glass is nominally inorganic, silicon-based…solid rock. The trick is getting the one to stick to the other. Although it is nominally proprietary, this is probably done with a third molecule that sticks to silicon on one side and to carbon-based polymers on the other side. Chemical engineers get it to stay stuck by inducing compounds to diffuse or “inter-penetrate” into the polymer. The intermediate chemical is a “silane,” a molecule that has silicon and alkanes (chains of carbon atoms).
I was surprised and pleased to find that it really does work. Now, about the back of the phone…
I have been thinking for some time of eliminating FastScripts Lite. Customers found it confusing to differentiate between the versions, and I found it tedious to artificially maintain two versions. With the new, liberal evaluation terms in FastScripts 2.4, all of the old Lite functionality and much more is now included for free in the full version.
Originally we were talking about carrying the art history into the crawl with 20th century art – cubism, Pollock, etc. but then Alex and Scott Morse had the idea to design the crawl as 8-bit. At first I wasn’t sure the style would work after Van Gogh but I guess since the “they survive” narrative was done with the cards we had license to play with a new thing. I also didn’t know until it was pretty much irreversible if this would work with Peter Gabriel’s song. But it is amazing how our minds associate images with what information we are given, auditory, visual, and just makes a connection.
RPRVT can be useful as a rough indicator for watching if the total amount of memory your program has allocated is going up or down. This is dangerous to rely on, however. Because this only tracks resident memory, if your program has started to swap then your RPRVT will no longer increase, even though you’re still allocating more and more memory. (To detect this, you can watch to see if VPRVT is going up, and the number of pageouts listed at the top of the screen is going up.) Conversely, the memory allocator doesn’t always give memory back to the system right away, so this number may not go down if your program is freeing memory.
I must say that this discovery leaves me mightily impressed. There is just no comparison with how Safari 4 scales pages and how it used to be in previous versions of the browser, or how it still is with several other browsers.
One of the most perplexing things about Snow Leopard has got to be what’s happening to QuickTime.
Sounds like a big improvement, but there’s some strangeness.
The stop/reload button doesn’t immediately switch from one state to the other anymore. Instead, there is a quick fade between the two states. During the fade, clicks on the button are ignored, so when you want to stop loading right when the button switches from «stop» to «reload», the click is mercifully ignored.
The majority of the audience was clearly there for the Q&A. As people lined up at the microphones around the room, the presenter abruptly showed a simple slide with only “WWDC” in plain lettering, thanked us for coming, and bolted off the stage. The Apple engineers, usually staying around the stage for one-on-one questions, were gone. The lights came up instantly, and it was the only session that didn’t end in music. The audience was stunned.
The Nitpicker: A unit test which compares a complete output when it’s really only interested in small parts of it, so the test has to continually be kept in line with otherwise unimportant details. Endemic in web application testing.
The way it works is it essentially runs your program inside an emulator. By doing this, it has total control over everything your program does. Something that's undetectable when running on the processor, like reading from a memory location that was never initialized, suddenly becomes easy to see.
The June issue of ATPM is out:
- MacMuser: Sitting on the Font Fence
- MacMuser: Switching to ADSL2+
- Next Actions: Master List, June 2009
- How To: Controlling Your Mac: Multiple Computers and Monitors, One Keyboard, No Switches
- Desktop Pictures: Tanzania Safari, Part 2
- Qaptain Qwerty
- Software Review: iBloodTracker 2.0
- Software Review: Posterino 1.5.1
- Software Review: Smashing Tennis
- Accessory Reviews: ZoFunk Cases
- FAQ: Frequently Asked Questions
But it seems risky and unbecoming for a company of Palm’s stature. It’s a hack, and if they’re really using Apple’s USB vendor and/or device IDs, it’s a duplicitous hack. It could well break with a future iTunes upgrade. (For all I know, it’s already broken with the iTunes 8.2 update released earlier today.) If Apple finds a way that Palm’s iTunes integration hack differs from that of the actual iPod it is masquerading as, Apple could change iTunes to block it. At that point, an advertised Pre feature would be broken. What does Palm do then? Start a cat-and-mouse game? Advise Pre users against updating their copies of iTunes?
What authentication code do you think is harder for a bad guy to hack, the 7 character strong password “1Ea.$]/”, or the pneumonic for the first 3 characters, “One Elvis Amazon”? Certainly “1Ea.$]/” is harder for a person to remember. It feels like it should be harder to break. But a computer, not a person, is going to be doing the guessing, and all it cares about is how big the search space is.