Cocoa
Hate is such a strong word, but I think I can verifiably say that I hate Mac OS X (Leopard). In a past life I wrote Mac software on Mac OS X (Tiger) and everything was wonderful, I enjoyed using Mail, iCal, Xcode, Safari and even iTunes sometimes. I liked using my computer, I enjoyed using the tools handed to me by the gods on high in the mountains of Cupertino.
Now a couple months since upgrading to Leopard certain that everything was going to be even more awesome than before, I type this from my openSUSE 10.3 workstation, running Opera, Thunderbird, Sunbird, Banshee and Gnome Terminals open all over the place. The tipping point was an afternoon at a coffee shop with my lovely MacBook Pro (code named "cherry") when I closed Safari entirely because it was leaking memory, only to open it again for about an hour, and notice that it had started leaking again and in the course of an hour had a memory footprint of 1.3GB.
Using Mail.app in Leopard has been nothing but a complete and total nightmare, somehow Mail.app's internal IMAP implementation can lock up the entire machine causing the Finder, Safari and Terminal all to beachball while Mail.app takes 15 minutes only to end up crashing. Too many stack traces I've watched Mail.app emit have all been rooted in their IMAP support. Thunderbird is also a miserable piece of software, I'm convinced that everybody except the one engineer I know at Mozilla is a complete and utter idiot, but when Thunderbird locks up, I can still use the rest of my system. Somehow Apple has munged the lines between userland and kernel space so much that userland applications can take control of the machine leaving the user on the sidelines while applications compete for resources and bicker amongst themselves.
I had mentioned previously that iChatAgent in Leopard leaks, I'm going to take that statement back. iChatAgent in Leopard hemorrhages memory, and I think I know why now.
While I was napping, there was a network hiccup causing iChat to get
disconnected, when the network connectivity returned, it first tried to sign on a couple of Jabber accounts, both of which use self-signed SSL certificates. Being the lovely old chap that iChat is it prompted the user (napping at the time) to accept the self-signed certificate. While the dialog box was up, iChat sat waiting around before it signed on the other accounts and spun and spun and spun.
iChat spun and spun and spun until all the available disk space for virtual memory was used up by every process that had to swap out to make space for iChatAgent's demands on real memory, and then by iChatAgent itself swapping out.

God fucking damnit.
I really don't have much that I can say about this, I came into the office after leaving my Mac on (as per usual) for about 12 hours and found that I was out of space on my startup disk, out of all available system memory, and things were crashing left and right.
What the fuck right?
Well, after I recovered the system enough to pop open "Activity Monitor" I found the exact culprit.
Scott Stevenson beat me to the punch in announcing it, but I might as well reflect the sentiment and invite you all (even those of you who actually don't live in Silicon Valley) to come out to Cupertino tomorrow (thursday) night to see if I can actually pull off a Windows-esque presentation in front of a room full of Mac developers.
I will be discussing a lot of the latest developments in .NET 3.0 and Visual Studio 2005 and contrasting them where appropriate to the state of Mac development with Xcode, Cocoa, Objective-C and all the other niceties that Leopard's developer tools offer. If possible I will also try to work in a bit about Mono as another alternative in the sea of options for developers these days.
I'll make sure that I either post my slides to my flickr stream or the PDF of the slides to this blog after the fact. If I don't however post before Saturday that means I've probably been beaten up and left for dead by a room full of angry Mac developers.
Ever since coming across the (draft) specification for NAT-PMP I've been almost in love with the absurdly simple NAT port mapping protocol. The unfortunate downside is that NAT-PMP isn't well supported except on Airport base stations, one of which I recently acquired, so as is customary when I welcome a new device into my apartment, I had to write some code for it. I hate to sound like a fan-boy, but like Bonjour, Stuart Cheshire's other baby, NAT-PMP is sickeningly simple. A series of straight-forward UDP packets is all that is needed for a local (inside the NAT) device to create a mapping on the NAT device itself.
Steve Scott of Late Night Cocoa asked me a couple weeks ago if I wanted to come on and talk about BuildFactory and continuous integration, and then that slowly morphed into talking about webservices and Dumbarton as he noticed I posted some WebServicesCore gripes. We got to chatting a bit about why Mac developers don't seem to "appreciate" webservices as much as those in the .NET world, etc and eventually got together to record Web Services with R. Tyler Ballance.
If you've not checked out Late Night Cocoa, I highly recommend it, it's already shaping up to be a good (technical) podcast about Mac development (the Core Data with Marcus Zarra interview was fantastic, a hard one to follow). If nothing else I hope most developers can use my interview to get a better feel for what's available in the growing webservices (2.0!) landscape. A more active discussion about the strengths and weaknesses in the Cocoa frameworks can do nothing but make the Mac development community stronger, check it out!
Todd Ditchendorf is the man I have to thank now, not only for his fantastic SOAP Client, but now for "showing me the way" in terms of using CFNetwork to handle basic HTTP authentication with SOAP webservices in Cocoa. Performing the basic HTTP authentication is still an absolute pain in the ass, but it is possible nonetheless.
Without further ado, take it away Todd.
A little birdie chirped into my email wondering what the radar number for my previous gripings about WebServicesCore, and I figured that for all one of the Apple employees that actually read my inane bullshit, behold:
Radar #4945073 ("WebServicesCore lacks support for basic HTTP authentication")
Let's all cross our fingers and hope for a much needed update to WebServicesCore. If all else fails, we can tap our shoes together and wish for a new web services API right?
(What's that weird rdar url?)
I've been hacking around with more webservices-based applications recently (Twitterer for example) and I've also reminded myself what an utter pain in the ass they can be in Cocoa. With twitter, they make available both JSON and XML-based webservices, which is good since they use basic HTTP authentication for their user-specific webservices (i.e. everything but retrieving the public timeline). The XML-based webservices are more or less straight-forward to hack up with Cocoa, all one really needs to do is write a parser (NSXMLDocument) and then make use of the URL loading classes (NSURLConnection, NSMutableURLRequest) to retrieve and process, or POST data. This method of interacting with "webservices" (more wgetting than anything else) is rudimentary at best, and in my personal opinion, isn't as robust as SOAP webservices are. It does however, work. Regardless of the framework, programming language, or geo-orbital location of the moon, they will work because all you're doing is making an HTTP GET and then parsing the results.
Through some twist of fate, I was interviewed on Cocoa Radio. I think I managed to maintain some semblance of competence throughout the interview until some random fellow sat really close to Blake and I and threw my concentration.
It was pretty fun, Blake and I hung out most of the week (I even rescued him from the airport in blue lightning on thursday) so doing the interview was a bit weird, as we talk regularly.
And thus begins my long hard trek into the public consciousness; I'll be super-famous, just like Sting, you'll see.
As some of you (both rather) may have noticed, the bleepsoft.com homepage is a bit different these days.
In the very near future bleep will be releasing an application called "Emission" that, besides the cool icon, will certainly change how I work with the wide array of people across the globe that I deal with on a daily basis.
As a lot of the network core is still unwritten (yes, it's very network-ey), so I'm not going to disclose too many details, but check out the site, Fernando Lins has done a fantastic job on the icon.
