CocoaJobs.info - the Cocoa community job site
As the organiser of CocoaHeads Sydney I wanted a way to better connect Cocoa developers and employers here in Australia. The result is CocoaJobs.info - a free job post site exclusively for Cocoa and Cocoa Touch positions.
It is available for use globally so please feel free to let any companies or recruiters know about it, as well as your own CocoaHeads chapters of course. 06:46 PM, 13 Feb 2010 by Mark Aufflick Permalink | Comments (0) iPad gets back to the priorities of the first Macintosh
The first Mac I ever used was a Mac 128, when my Dad brought one home as part of the ground breaking Apple Test Drive promotion. It booted into the Finder quickly even though it used a floppy. It only ran one program at once, so programs (mostly) started and exited quickly and didn't interact. It had a fixed screen size so everyone's experience was the same. There were desk accessories that gave access to limited functionality while applications were running.
Sounds a lot like the iPad (except bigger and black and white - and of course no 3G ;). Seriously, it's Steve Job's core vision all over again. Steve Jobs didn't want the Apple ][ to have any expandability, it was Steve Wozniak who convinced him (correctly) that computers were still very much a hobbyist device and need expandability. The original Mac wasn't supposed to have upgradeable ram - it was the engineers (Burrell Smith I think) who secretly made the circuit board easily upgradeable. Only now, the hardware and connectivity reality has caught up with Jobs' reality: hardware is cheap, expendable and compact - and Apple makes the best. Once again another insanely great device is going to change the place computers have in our lives. 11:08 AM, 28 Jan 2010 by Mark Aufflick Permalink | Comments (1) Debugging release/autorelease issues in Cocoa
So your code crashes with an EXC_BAD_ACCESS in objc_msgSend and there
is *none* of your own code in the stack trace. Bummer. Since all we
know from objc_msgSend is that it's trying to call a method on an
object. Since we got EXC_BAD_ACCESS you can bet your bottom dollar
that it's attempting to call a method on a freed pointer, so there's
no obvious way of finding out what the object was. We can, though,
easily find the method. Read Greg Parker's excellent post So you crashed in objc_msgSend(). For the iPhone
simulator on my Mac I need to do this at the gdb prompt to decode the
eax register:
(gdb) x/s $ecx 0x980530c4: "release"you can see that the selector in the second argument is "release". Now we're getting somewhere, we know an already freed object is trying to be released. Since there is none of our code in the stack trace it's a fair bet that it's happening when the autorelease pool is releasing. There are a few tricks in your toolbox for tracking down over-released objects. There's the NSZombieEnabled, NSAutoreleaseFreedObjectCheckEnabled and other environment variables which will give you better logging rather than just crashing. I've found this is not always reliable (logs from the above builtin debug options showed that the over-release was on an NSCFDate object, when in fact it was an NSNumber). Sometimes you also just want to trace through exactly what is happening with your retain/release/autorelease cycles. That's what we're about to achieve here. Ok, so you have a unit test that replicates this problem right? I use the excellent GHUnit by Gabriel Handford. If not you'll have to play around a bit to narrow down your problem code. In my case, I wanted to confirm that a particular unit test was failing during the autorelease pool release. Best way is to wrap the offending code in a new autorelease pool. Then it will be freed inside your code, which you will see in the stack trace, and confirm you have found the reason. My unit test now looks like: (Note that the code examples, embedded in github gists, are not showing up in my RSS feed. I'll fix that later, but for now please read the original post) Now when I fail with EXC_BAD_ACCESS my stack trace looks like this: Where line 91 of CJTestCJCard.m is the [pool release] call above. So something is being added to the autorelease pool, and is *also* being fully released, or maybe it's being added to the pool more times than it is being retained. There doesn't seem to be a way to interrogate the contents of the autorelease pool (which is a shame) but we log some really useful info by overriding a few methods, like NSObject's release and autorelease methods, so we can see when things are being added to the pool and when things are being released. This is some funky stuff, but since we're only doing it in our unit test class, not code we're going to release you can sleep soundly at night. Here's how I effected logging in release and autorelease. Add this to the top of your unit test class, before your current @implementation: Now in your unit test class @implementation, you can use the setupClass method to effect the method implementation switcharoo: Now your log will be filled with log lines like: This can help when tracking down tricky releasing bugs. Note that not all classes seem to comply. For instance I see plenty of log lines for NSCFString, but never any release lines. I assume that NSCFString release implementation is a bit different since it's a toll free bridged object - getting that to log is an exercise left for the reader! If you're interested in the functions I used above to interact with the runtime, check out the Introduction to The Objective-C Programming Language and Objective-C Runtime Reference. Note that the code above works fine in the iPhone simulator. It should be fine on 64 bit Mac apps, but you may need to diddle the method structs manually in 32 bit Mac apps since they use the legacy Objective-C runtime (which you can read about in the Objective-C 1 Runtime Reference). Also note it won't work on the iPhone itself, so to save constantly commenting out code, you can wrap the offending code in #if TARGET_IPHONE_SIMULATOR #endif pairs.
12:38 PM, 14 Jan 2010 by Mark Aufflick Permalink | Comments (0) Book Review: iPhone SDK 3 Visual Quickstart Guide![]() CocoaHeads Sydney member Duncan Campbell has just published a book with PeachPit press titled "iPhone SDK 3 Visual Quickstart Guide". Like all of Peachpit's "Visual Quickstart Guides", the book is mostly broken into two columns - text and images. At first I thought it would suck! As soon as I got into it though, I quite liked the thin column. It has readability like a newspaper, although it did make following inline code a little tedious. The book covered all the basics you need for making a great app, and made some tricky tasks simple - like custom cells and multi-touch. It avoids a common approach of many intro books where they continually build into an ever evolving single app. Instead, each example is short and entirely standalone. I have to say it was refreshing - it avoided wasting time in frivolities and allowed the author to introduce concepts at the time he chose, rather than the time it was needed to continue building the app. I also appreciated the time spent on one of the most important rools - the Xcode interface. Even I learned a handy Xcode shortcut! The choice to use code for UI layout instead of interface builder makes the writing easier to follow, no enless 'click here, control click and drag here...' and also avoids those madenning bugs where you've missed a step but can't easily compare the compound result. Similarly, the continual tweaks to IB won't invalidate the examples. I also appreciated how each example was standalone - building and running an interesting looking example didn't rely on carefully building examples stretching back through previous chapters. Two extra chapters can be downloaded as PDFs from the Peachpit press website once you have the book covering the Address Book api and the Media apis. The latter is very useful - covering saved images, using the camera and playing audio and video. While this is a book for people starting out with iPhone programming, it's not for people who have never programmed before. If you have programmed before but don't know at least the bare basics of one of C, C++, Objective-C then I would suggest completing an introduction to Objective-C first. Apple has one and there are lots of great books. One of the positives above is that the use of code to create UI controls is repeatable, easy to error check and shows how it all works. Once you start building apps, though, you'll use Interface Builder a lot. You'll need to brush up on that after completing this book. Again, Apple has one and there are lots of great books! Aaron Hillegass's Cocoa Programming for Mac OS X will cover both Objective-C and Interface Builder really well - and you'll learn how to write MacOS X apps to boot! So in summary, it's a great book. I enjoyed it and you hopefully will too! Available at Amazon and all good bookstores :) 07:33 PM, 25 Oct 2009 by Mark Aufflick Permalink | Comments (2) CocoaHeads Sydney October Meetup - Thursday October 1st - Blocks and Beer!
Hooray - it's that time of month again!
Chris Suter will be giving a talk on Blocks and perhaps some other shiny things he learnt at WWDC. It promises to be a great topic so come and heckle! There are a few new people coming so please be welcoming :) As always, bring along any Mac related projects you want to show off IMPORTANT! Room has changed. It will now be in CB02.05.32. That's Building 2, Level 5, Room 32. You can access building 2 via the main entrance. This will be our room for the rest of the year. You might find the UTS Broadway campus map useful: http://is.gd/3l1iu Thanks to David Morrison for sorting this out. A gleaming pile of laptops will surely guide you, else call me on my mobile: 0438 700 647. The Australian CocoaHeads mailing list is at http://groups.google.com/group/cocoaheadsau 10:49 PM, 16 Sep 2009 by Mark Aufflick Permalink | Comments (0) CocoaHeads Sydney - room change for tonight (August)
It will now be in CB04.02.33.
Thats Building 4, Level 2, Room 33. Its the new refurbished Science You might find the UTS campus map useful: http://is.gd/228P5 Thanks to David Morrison for sorting this out. Mark. 04:47 PM, 06 Aug 2009 by Mark Aufflick Permalink | Comments (0) CocoaHeads Sydney - Meetup This Thursday August 4th
After last month's shemozzle we're back on track with our usual moderate level of organisation for CocoaHeads.
The August meet is this coming Thursday (we always meet the first Thursday). Venue is the same as the last three months: UTS Broadway CB10.07.114 ie. Building 10, Level 7, Room 114 Google map: http://is.gd/228MG Time: 6:30pm or whenever We have a couple of short/lightning talks in planning - one is confirmed that I am excited to share with you. Continuing our great tradition of cross-pollonating with fpsyd, Alan Rogers is going to give us a lightning talk about Objective-J and Cappacino. Objective-J is a language inspired by Objective-C and implemented on top of JavaScript. Cappacino is a framework based on that. Alan met up with the guys behind Objective-J at WWDC this year. As always we will be retiring for beers once the formal part of proceedings has finished. Look forward to seeing you all there! 11:25 PM, 04 Aug 2009 by Mark Aufflick Permalink | Comments (0) Adding Apple Remote Support to your Cocoa AppHere is the presentation I gave at last month's CocoaHeads: Or you can download the pdf from the CocoaHeads AU Google group: apple_remote.pdf. 10:24 AM, 05 May 2009 by Mark Aufflick Permalink | Comments (0) CocoaHeads Sydney - May 7th 2009 CocoaHeads Sydney is steaming along with our fourth monthly meeting on the trot this Thursday.Last month at CocoaHeads Sydney I gave a lightning talk showing how to add Apple IR support to your Cocoa app. I have uploaded the slides to the files section of the google group. In the presentation I also showed how I used the LaTeX beamer class to make pdf slides, and I used the open source SplitShow application to give the presentation (using my Apple IR support of course!) You can get SplitShow from the google code project but you'll have to build from the trunk to get the IR support which has not yet been included in a release. We also had Ben Hill show us the impressive prototype of an OpenGL iPhone game he put together using cocos2d. This month our very own Jude Sutton will be giving us a presentation on the Authorisation Services and related APIs. This month's details:
When: Thursday May 7th, 6:30pm All details are published monthly on the CocoaHeads AU google group. Hope to see you there! 10:12 PM, 03 May 2009 by Mark Aufflick Permalink | Comments (0) CocoaHeads Sydney - March 5th 2009 I'm excited our Sydney CocoaHeads meetup next week, looking forward to expanding on our great start of 20 odd people (that is 20 or so people, although many of us may also be odd...).
AndrĂ©'s talk last month was an interesting delve into Objective-C internals and creative ways to make use of that knowledge. (slides). This month I am pleased to announce that Nathan Day, who was in our meeting last month, will be presenting something that instead saves you from having to know about some of the nastier internals of the Cocoa framework—his extensive collection of public frameworks. Nathan was guest speaker at Brisbane CocoaHeads last Thursday and has agreed to make a repeat performance for us. The location will again be UTS although the room may be different as the semester is approaching, stay tuned for details. There are details about subscribing to the google calendar on a page in our group: http://is.gd/kEtW Or you can use this link to add the March meeting to your own calendar: http://is.gd/kEud I'll update the calendar meeting with the room details etc. when I have them and will also email the cocoadev list etc. closer to the day. Looking forward to seeing you all there! 10:59 PM, 24 Feb 2009 by Mark Aufflick Permalink | Comments (0) CocoaHeads Sydney - February 5th 2009After the very successful, and inaugural, Christmas beers event held by Sydney CocoaHeads in December, our first meetup for 2009 will occur on Thrusday February 5th. What is CocoaHeads? CocoaHeads is a global collection of groups devoted to discussion of Apple Computer's Cocoa Framework for programming on MacOS X. During monthly meetings, members present on their projects and offer tutorials on various programming topics. February, the ever interesting André Pang will be speaking. You can find more details about the Sydney meetup by joining our Google Group: Sydney CocoaHeads. There is also a calendar you can subscribe to: Or add just this upcoming meeting to your calendar: 01:06 AM, 22 Jan 2009 by Mark Aufflick Permalink | Comments (0) heads up 'tunes featured on iLoveMacApps.com
James Powell has featured heads up 'tunes on his iLoveMacApps.com and also has some neat feature suggestions.
I'm not sure where the slowdown he is seeing is coming from so I'll quiz him on that, but clicking the song and hiding the dock icon are good ideas. He has a pretty eclectic playlist :)
10:51 AM, 20 Jan 2009 by Mark Aufflick Permalink | Comments (0) |
Archive
January 2010 October 2009 September 2009 August 2009 July 2009 June 2009 May 2009 April 2009 February 2009 January 2009 December 2008 November 2008 October 2008 September 2008 August 2008 July 2008 June 2008 May 2008 March 2008 February 2008 January 2008 December 2007 November 2007 October 2007 September 2007 August 2007 July 2007 June 2007 May 2007 April 2007 March 2007 February 2007 January 2007 December 2006 November 2006 October 2006 September 2006 August 2006 July 2006 June 2006 May 2006 April 2006 March 2006 February 2006 January 2006 December 2005 November 2005 October 2005 September 2005 August 2005 July 2005 June 2005 May 2005 April 2005 March 2005 February 2005 January 2005 December 2004 November 2004 October 2004 September 2004 August 2004 July 2004 June 2004 May 2004 April 2004 March 2004 February 2004 January 2004 December 2003 November 2003 October 2003 September 2003 August 2003 Blog Categoriessoftware (24)..cocoa (12) ..heads up 'tunes (5) ..ruby (4) ..lisp (1) ..perl (2) ..openacs (1) mac (18) embedded (2) ..microprocessor (2) ..avr (1) electronics (3) design (1) Notifications Request notifications
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||








CocoaHeads Sydney is steaming along with our fourth monthly meeting on the trot this Thursday.





Request notifications