<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>NSBlog</title><link>http://www.mikeash.com/pyblog/</link><description>Mac OS X and Cocoa programming</description><lastBuildDate>Wed, 19 Jun 2013 20:38:54 GMT</lastBuildDate><generator>PyRSS2Gen-1.0.0</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Friday Q&amp;amp;A 2013-06-14: Reachability
</title><link>http://www.mikeash.com/pyblog/friday-qa-2013-06-14-reachability.html</link><description>Networking is playing an ever more important role in application development, and Apple's reachability API is a valuable tool in making network-centric apps play nicely with varying real-world conditions. Today I'm going to give an overview of the reachability API, what it does, and how to use it, a suggestion from reader Manuel Diaz.&lt;br&gt;&lt;a href="http://www.mikeash.com/pyblog/friday-qa-2013-06-14-reachability.html"&gt;(Read More)&lt;/a&gt;</description><author>Mike Ash</author><guid isPermaLink="true">http://www.mikeash.com/?page=pyblog/friday-qa-2013-06-14-reachability.html</guid><pubDate>Fri, 14 Jun 2013 13:49:00 GMT</pubDate></item><item><title>Friday Q&amp;amp;A 2013-05-31: C Quiz
</title><link>http://www.mikeash.com/pyblog/friday-qa-2013-05-31-c-quiz.html</link><description>I thought I'd mix things up a bit today and give my readers a quiz. The C language is perhaps the most popular computer language in existence, but it's also quite odd, and because of that often poorly understood. I'd like to give you a quiz to see how much you know about some of the odd but useful corners of the language.&lt;br&gt;&lt;a href="http://www.mikeash.com/pyblog/friday-qa-2013-05-31-c-quiz.html"&gt;(Read More)&lt;/a&gt;</description><author>Mike Ash</author><guid isPermaLink="true">http://www.mikeash.com/?page=pyblog/friday-qa-2013-05-31-c-quiz.html</guid><pubDate>Fri, 31 May 2013 13:46:00 GMT</pubDate></item><item><title>Friday Q&amp;amp;A 2013-05-17: Let's Build stringWithFormat:
</title><link>http://www.mikeash.com/pyblog/friday-qa-2013-05-17-lets-build-stringwithformat.html</link><description>Our long effort to rebuild Cocoa piece by piece continues. For today, reader Nate Heagy has suggested building &lt;code&gt;NSString&lt;/code&gt;'s &lt;code&gt;stringWithFormat:&lt;/code&gt; method.&lt;br&gt;&lt;a href="http://www.mikeash.com/pyblog/friday-qa-2013-05-17-lets-build-stringwithformat.html"&gt;(Read More)&lt;/a&gt;</description><author>Mike Ash</author><guid isPermaLink="true">http://www.mikeash.com/?page=pyblog/friday-qa-2013-05-17-lets-build-stringwithformat.html</guid><pubDate>Fri, 17 May 2013 14:40:00 GMT</pubDate></item><item><title>Friday Q&amp;amp;A 2013-05-03: Proper Use of Asserts
</title><link>http://www.mikeash.com/pyblog/friday-qa-2013-05-03-proper-use-of-asserts.html</link><description>Asserts are a powerful tool for building quality code, but they're often poorly understood. Today, I want to discuss the various options for writing asserts in Cocoa apps and the best ways to use them, a topic suggested by reader Ed Wynne.&lt;br&gt;&lt;a href="http://www.mikeash.com/pyblog/friday-qa-2013-05-03-proper-use-of-asserts.html"&gt;(Read More)&lt;/a&gt;</description><author>Mike Ash</author><guid isPermaLink="true">http://www.mikeash.com/?page=pyblog/friday-qa-2013-05-03-proper-use-of-asserts.html</guid><pubDate>Fri, 03 May 2013 13:03:00 GMT</pubDate></item><item><title>Friday Q&amp;amp;A Is On Vacation
</title><link>http://www.mikeash.com/pyblog/friday-qa-is-on-vacation.html</link><description>Friday Q&amp;amp;A is on vacation at the moment, so there will be no article today. Never fear: although he's busy relaxing today, Friday Q&amp;amp;A will return, and soon. To keep my loyal readers from being too upset, here is a collection of links to interesting articles to keep you occupied.&lt;br&gt;&lt;a href="http://www.mikeash.com/pyblog/friday-qa-is-on-vacation.html"&gt;(Read More)&lt;/a&gt;</description><author>Mike Ash</author><guid isPermaLink="true">http://www.mikeash.com/?page=pyblog/friday-qa-is-on-vacation.html</guid><pubDate>Fri, 19 Apr 2013 14:24:00 GMT</pubDate></item><item><title>Friday Q&amp;amp;A 2013-04-05: Windows and Window Controllers
</title><link>http://www.mikeash.com/pyblog/friday-qa-2013-04-05-windows-and-window-controllers.html</link><description>It's time to take a turn to some lighter fare, but to a subject that's near and dear to my heart. The fundamental UI component of a Cocoa app is the NSWindow, and there are many different ways to instantiate and manage them, but there is only one correct way: for each type of window, there should be a separate nib file, and a specialized &lt;code&gt;NSWindowController&lt;/code&gt; subclass. I'll walk through what this means and how to do it, a topic suggested by reader Mike Shields.&lt;br&gt;&lt;a href="http://www.mikeash.com/pyblog/friday-qa-2013-04-05-windows-and-window-controllers.html"&gt;(Read More)&lt;/a&gt;</description><author>Mike Ash</author><guid isPermaLink="true">http://www.mikeash.com/?page=pyblog/friday-qa-2013-04-05-windows-and-window-controllers.html</guid><pubDate>Fri, 05 Apr 2013 13:36:00 GMT</pubDate></item><item><title>Objective-C Literals in Serbo-Croatian
</title><link>http://www.mikeash.com/pyblog/objective-c-literals-in-serbo-croatian.html</link><description>Reader Anja Skrba from &lt;a href="http://webhostinggeeks.com/"&gt; Webhostinggeeks.com&lt;/a&gt; has translated my &lt;a href="friday-qa-2012-06-22-objective-c-literals.html"&gt;Objective-C Literals&lt;/a&gt; article into Serbo-Croatian. It's always fun to see translations of my writing, even when I can't understand them at all. If you do understand Serbo-Croatian, or know someone who does, check it out. &lt;a href="http://science.webhostinggeeks.com/objective-c-literals"&gt;The Serbo-Croatian version of Objective-C Literals is available on Webhostinggeeks.com&lt;/a&gt;.&lt;br&gt;&lt;a href="http://www.mikeash.com/pyblog/objective-c-literals-in-serbo-croatian.html"&gt;(Read More)&lt;/a&gt;</description><author>Mike Ash</author><guid isPermaLink="true">http://www.mikeash.com/?page=pyblog/objective-c-literals-in-serbo-croatian.html</guid><pubDate>Tue, 26 Mar 2013 23:48:00 GMT</pubDate></item><item><title>Friday Q&amp;amp;A 2013-03-22: Let's Build NSInvocation, Part II
</title><link>http://www.mikeash.com/pyblog/friday-qa-2013-03-22-lets-build-nsinvocation-part-ii.html</link><description>&lt;a href="friday-qa-2013-03-08-lets-build-nsinvocation-part-i.html"&gt;Last time on Friday Q&amp;amp;A&lt;/a&gt;, I began the reimplementation of parts of &lt;code&gt;NSInvocation&lt;/code&gt; as &lt;code&gt;MAInvocation&lt;/code&gt;. In that article, I discussed the basic theory, the architecture calling conventions, and presented the assembly language glue code needed for the implementation. Today, I present the Objective-C part of &lt;code&gt;MAInvocation&lt;/code&gt;.&lt;br&gt;&lt;a href="http://www.mikeash.com/pyblog/friday-qa-2013-03-22-lets-build-nsinvocation-part-ii.html"&gt;(Read More)&lt;/a&gt;</description><author>Mike Ash</author><guid isPermaLink="true">http://www.mikeash.com/?page=pyblog/friday-qa-2013-03-22-lets-build-nsinvocation-part-ii.html</guid><pubDate>Fri, 22 Mar 2013 14:57:00 GMT</pubDate></item><item><title>Friday Q&amp;amp;A 2013-03-08: Let's Build NSInvocation, Part I
</title><link>http://www.mikeash.com/pyblog/friday-qa-2013-03-08-lets-build-nsinvocation-part-i.html</link><description>It's time for another trip into the nether regions of the soul. Reader Robby Walker suggested an article about &lt;code&gt;NSInvocation&lt;/code&gt;, and I have obliged, implementing it from scratch for your amusement. Today I'll start on a guided tour down the hall of horrors that is &lt;code&gt;MAInvocation&lt;/code&gt;, my reimplementation of the &lt;code&gt;NSInvocation&lt;/code&gt; API. It's a big project, so today I'm going to focus on the basic principles and the assembly language glue code, with the rest of the implementation to follow.&lt;br&gt;&lt;a href="http://www.mikeash.com/pyblog/friday-qa-2013-03-08-lets-build-nsinvocation-part-i.html"&gt;(Read More)&lt;/a&gt;</description><author>Mike Ash</author><guid isPermaLink="true">http://www.mikeash.com/?page=pyblog/friday-qa-2013-03-08-lets-build-nsinvocation-part-i.html</guid><pubDate>Fri, 08 Mar 2013 14:33:00 GMT</pubDate></item><item><title>Friday Q&amp;amp;A 2013-02-22: Let's Build UITableView
</title><link>http://www.mikeash.com/pyblog/friday-qa-2013-02-22-lets-build-uitableview.html</link><description>Friday Q&amp;amp;A is driven by the readers, and that's especially true today. Reader &lt;a href="http://obliquely.org.uk/"&gt;Matthew Elton&lt;/a&gt; thought that "Let's Build UITableView" would make a good topic for Friday Q&amp;amp;A, but he decided he'd rather implement it himself and write it up rather than wait for me to do it (good move, Matthew). Without further ado, here is Matthew's article an building &lt;code&gt;UITableView&lt;/code&gt;.&lt;br&gt;&lt;a href="http://www.mikeash.com/pyblog/friday-qa-2013-02-22-lets-build-uitableview.html"&gt;(Read More)&lt;/a&gt;</description><author>Matthew Elton</author><guid isPermaLink="true">http://www.mikeash.com/?page=pyblog/friday-qa-2013-02-22-lets-build-uitableview.html</guid><pubDate>Fri, 22 Feb 2013 15:35:00 GMT</pubDate></item><item><title>Friday Q&amp;amp;A 2013-02-08: Let's Build Key-Value Coding
</title><link>http://www.mikeash.com/pyblog/friday-qa-2013-02-08-lets-build-key-value-coding.html</link><description>&lt;a href="friday-qa-2013-01-25-lets-build-nsobject.html"&gt;Last time&lt;/a&gt;, I showed how to build the basic functionality of &lt;code&gt;NSObject&lt;/code&gt;. I left out key-value coding, because the implementation of &lt;code&gt;valueForKey:&lt;/code&gt; and &lt;code&gt;setValue:forKey:&lt;/code&gt; is complex enough to need its own article. This is that article.&lt;br&gt;&lt;a href="http://www.mikeash.com/pyblog/friday-qa-2013-02-08-lets-build-key-value-coding.html"&gt;(Read More)&lt;/a&gt;</description><author>Mike Ash</author><guid isPermaLink="true">http://www.mikeash.com/?page=pyblog/friday-qa-2013-02-08-lets-build-key-value-coding.html</guid><pubDate>Fri, 08 Feb 2013 14:17:00 GMT</pubDate></item><item><title>Friday Q&amp;amp;A 2013-01-25: Let's Build NSObject
</title><link>http://www.mikeash.com/pyblog/friday-qa-2013-01-25-lets-build-nsobject.html</link><description>The &lt;code&gt;NSObject&lt;/code&gt; class lies at the root of (almost) all classes we build and use as part of Cocoa programming. What does it actually do, though, and how does it do it? Today, I'm going to rebuild &lt;code&gt;NSObject&lt;/code&gt; from scratch, as suggested by friend of the blog and occasional guest author Gwynne Raskind.&lt;br&gt;&lt;a href="http://www.mikeash.com/pyblog/friday-qa-2013-01-25-lets-build-nsobject.html"&gt;(Read More)&lt;/a&gt;</description><author>Mike Ash</author><guid isPermaLink="true">http://www.mikeash.com/?page=pyblog/friday-qa-2013-01-25-lets-build-nsobject.html</guid><pubDate>Fri, 25 Jan 2013 15:32:00 GMT</pubDate></item><item><title>Friday Q&amp;amp;A 2013-01-11: Mach Exception Handlers
</title><link>http://www.mikeash.com/pyblog/friday-qa-2013-01-11-mach-exception-handlers.html</link><description>This is my first guest Friday Q&amp;amp;A article, dear readers, and I hope it will withstand your scrutiny. Today's topic is on Mach exception handlers, something I've recently spent some time exploring on Mac OS X and iOS for the purpose of &lt;a href="http://code.google.com/p/plcrashreporter"&gt;crash reporting&lt;/a&gt;. 
While there is surprisingly little documentation available about Mach exception handlers, and they're considered by some to be a mystical source of mystery and power, the fact is that they're actually pretty simple to understand at a high level - something I hope to elucidate here. Unfortunately, they're also partially private API on iOS, despite being used in a number of new crash reporting solutions - something I'll touch on in the conclusion.&lt;br&gt;&lt;a href="http://www.mikeash.com/pyblog/friday-qa-2013-01-11-mach-exception-handlers.html"&gt;(Read More)&lt;/a&gt;</description><author>Landon Fuller</author><guid isPermaLink="true">http://www.mikeash.com/?page=pyblog/friday-qa-2013-01-11-mach-exception-handlers.html</guid><pubDate>Fri, 11 Jan 2013 14:44:00 GMT</pubDate></item><item><title>Friday Q&amp;amp;A 2012-12-28: What Happens When You Load a Byte of Memory
</title><link>http://www.mikeash.com/pyblog/friday-qa-2012-12-28-what-happens-when-you-load-a-byte-of-memory.html</link><description>The hardware and software that our apps run on is almost frighteningly complicated, and there's no better place to see that than in the contortions that the system goes through when we load data from memory. What exactly happens when we load a byte of memory? Reader and friend of the blog Guy English suggested I dedicate an article to answering that question.&lt;br&gt;&lt;a href="http://www.mikeash.com/pyblog/friday-qa-2012-12-28-what-happens-when-you-load-a-byte-of-memory.html"&gt;(Read More)&lt;/a&gt;</description><author>Mike Ash</author><guid isPermaLink="true">http://www.mikeash.com/?page=pyblog/friday-qa-2012-12-28-what-happens-when-you-load-a-byte-of-memory.html</guid><pubDate>Fri, 28 Dec 2012 14:45:00 GMT</pubDate></item><item><title>Friday Q&amp;amp;A 2012-12-14: Objective-C Pitfalls
</title><link>http://www.mikeash.com/pyblog/friday-qa-2012-12-14-objective-c-pitfalls.html</link><description>Objective-C is a powerful and extremely useful language, but it's also a bit dangerous. For today's article, my colleague Chris Denter suggested that I talk about pitfalls in Objective-C and Cocoa, inspired by Cay S. Horstmann's &lt;a href="http://www.horstmann.com/cpp/pitfalls.html"&gt;article on C++ pitfalls&lt;/a&gt;.&lt;br&gt;&lt;a href="http://www.mikeash.com/pyblog/friday-qa-2012-12-14-objective-c-pitfalls.html"&gt;(Read More)&lt;/a&gt;</description><author>Mike Ash</author><guid isPermaLink="true">http://www.mikeash.com/?page=pyblog/friday-qa-2012-12-14-objective-c-pitfalls.html</guid><pubDate>Fri, 14 Dec 2012 14:38:00 GMT</pubDate></item><item><title>Friday Q&amp;amp;A 2012-11-30: Let's Build A Mach-O Executable
</title><link>http://www.mikeash.com/pyblog/friday-qa-2012-11-30-lets-build-a-mach-o-executable.html</link><description>This is something of a followup to my last article, &lt;a href="friday-qa-2012-11-09-dyld-dynamic-linking-on-os-x.html"&gt;dyld: Dynamic Linking On OS X&lt;/a&gt;, in which I explored how the dynamic linker &lt;code&gt;dyld&lt;/code&gt; does its job. This week, I'm going to recreate the function of both the compiler and the &lt;em&gt;static&lt;/em&gt; linker, building a Mach-O binary completely from scratch with only the help of the assembler.&lt;br&gt;&lt;a href="http://www.mikeash.com/pyblog/friday-qa-2012-11-30-lets-build-a-mach-o-executable.html"&gt;(Read More)&lt;/a&gt;</description><author>Gwynne Raskind</author><guid isPermaLink="true">http://www.mikeash.com/?page=pyblog/friday-qa-2012-11-30-lets-build-a-mach-o-executable.html</guid><pubDate>Fri, 30 Nov 2012 17:59:00 GMT</pubDate></item><item><title>Friday Q&amp;amp;A 2012-11-16: Let's Build objc_msgSend
</title><link>http://www.mikeash.com/pyblog/friday-qa-2012-11-16-lets-build-objc_msgsend.html</link><description>The &lt;code&gt;objc_msgSend&lt;/code&gt; function underlies everything we do in Objective-C. Gwynne Raskind, reader and occasional Friday Q&amp;amp;A guest contributor, suggested that I talk about how &lt;code&gt;objc_msgSend&lt;/code&gt; works on the inside. What better way to understand how something works than to build it from scratch? Let's build &lt;code&gt;objc_msgSend&lt;/code&gt;.&lt;br&gt;&lt;a href="http://www.mikeash.com/pyblog/friday-qa-2012-11-16-lets-build-objc_msgsend.html"&gt;(Read More)&lt;/a&gt;</description><author>Mike Ash</author><guid isPermaLink="true">http://www.mikeash.com/?page=pyblog/friday-qa-2012-11-16-lets-build-objc_msgsend.html</guid><pubDate>Fri, 16 Nov 2012 14:27:00 GMT</pubDate></item><item><title>Friday Q&amp;amp;A 2012-11-09: dyld: Dynamic Linking On OS X
</title><link>http://www.mikeash.com/pyblog/friday-qa-2012-11-09-dyld-dynamic-linking-on-os-x.html</link><description>In the course of a recent job interview, I had an opportunity to study some of the internals of &lt;code&gt;dyld&lt;/code&gt;, the OS X dynamic linker. I found this particular corner of the system interesting, and I see a lot of people having trouble with linking issues, so I decided to do an article about the basics of dynamic linking. Some of the deeper logic is new to me, so sorry in advance for any inaccuracies.&lt;br&gt;&lt;a href="http://www.mikeash.com/pyblog/friday-qa-2012-11-09-dyld-dynamic-linking-on-os-x.html"&gt;(Read More)&lt;/a&gt;</description><author>Gwynne Raskind</author><guid isPermaLink="true">http://www.mikeash.com/?page=pyblog/friday-qa-2012-11-09-dyld-dynamic-linking-on-os-x.html</guid><pubDate>Fri, 09 Nov 2012 15:51:00 GMT</pubDate></item><item><title>Friday Q&amp;amp;A 2012-11-02: Building the FFT
</title><link>http://www.mikeash.com/pyblog/friday-qa-2012-11-02-building-the-fft.html</link><description>In the &lt;a href="friday-qa-2012-10-26-fourier-transforms-and-ffts.html"&gt;last post in this mini-series&lt;/a&gt;, Mike gave an overview of the Fourier Transform and then showed you how to use Apple's implementation of the Fast Fourier Transform (FFT).&lt;br&gt;&lt;a href="http://www.mikeash.com/pyblog/friday-qa-2012-11-02-building-the-fft.html"&gt;(Read More)&lt;/a&gt;</description><author>Chris Liscio</author><guid isPermaLink="true">http://www.mikeash.com/?page=pyblog/friday-qa-2012-11-02-building-the-fft.html</guid><pubDate>Fri, 02 Nov 2012 14:29:00 GMT</pubDate></item><item><title>Friday Q&amp;amp;A 2012-10-26: Fourier Transforms and FFTs
</title><link>http://www.mikeash.com/pyblog/friday-qa-2012-10-26-fourier-transforms-and-ffts.html</link><description>&lt;a href="friday-qa-2012-10-12-obtaining-and-interpreting-audio-data.html"&gt;Last time around&lt;/a&gt; I discussed the basics of audio data, how to get it, and how to understand it. Today, I'm going to go into some detail about one of the fundamental tools for more complex audio analysis, the fourier transform, and the FFT algorithm that makes it practical to use on computers.&lt;br&gt;&lt;a href="http://www.mikeash.com/pyblog/friday-qa-2012-10-26-fourier-transforms-and-ffts.html"&gt;(Read More)&lt;/a&gt;</description><author>Mike Ash</author><guid isPermaLink="true">http://www.mikeash.com/?page=pyblog/friday-qa-2012-10-26-fourier-transforms-and-ffts.html</guid><pubDate>Fri, 26 Oct 2012 13:25:00 GMT</pubDate></item></channel></rss>
