News for hackers. Stuff that matters.
Re:Happy with incomplete understanding of API provided your ... by lhorie on Monday March 23, 2009 @08:40PM (#529481)
The title is a bit confusing... perhaps it should read: "Are you happy with incomplete understanding of API, provided that your app seems to work?"

For me, the answer is "not always". When the topic is security or performance, I definitely prefer to have as much knowledge of the API as possible.

I remember reading an interesting article about Java's File and how the internal implementation used null terminated strings (which ultimately meant that you could bypass a string-based check (such as 'filename.endsWith(".jpg")' and have the subsequent new File(filename) call open a different file than you'd expect.

On a different story, I was able to speed-up a web-app speed significantly because I knew (from reading the js library's source code) that the DOM querying functions we were using so extensively were very inefficient.

With those anedoctes out of the way, I'll say that knowing how every single function in every single API ticks is probably overkill. I usually only dig deeper when

a) I have to because something needs to be fixed b) It's a very specific area of expertise that happens to interest me

There are no comments on this comment yet.