Google have written an excellent Objective-C Style Guide. It is very comprehensive. I prefer this over the less prescriptive guide from Apple.
On Wednesday night I attended the NSManchester Cocoa programming meeting organized by Dave Verwer of Shiny Developments. NSManchester is a sort-of Cocoaheads Manchester chapter. I was fortunate enough to meet Dave and Andrew at WWDC earlier this year.
The venue was MDDA in Portland Street (1 minute up from the McDonald’s on Oxford Road). Its a very nice contemporary venue.
Dave gave a good presentation on iPhone development. He presented a simple app show Twitter posts in a UITableView. We also talked about publishing to the AppStore. Unfortunately I haggled/added/cross-examined more than the other attendees (sorry Dave). Most of us went to the pub afterwards. We geeked out, debugged a bit, and I demonstrated my iPhone game Zombies to a few people.
I must admit I don’t use the fashionable social networking tools on the web much, but I do love meeting people in real life. Its fun to gauge reactions, bounce ideas around, see other sides of the coin.
The plan is to make NSManchester a regular event for the first Thursday each month, so if you’re in the North of England and interested in iPhone or Mac development please come along. The next one is Thursday 4 December 2008. Have a look at the group’s Google Group and Upcoming pages.
I've had a great time at WWDC this year. The sessions and labs were great, but for me the best part of it was meeting plenty of people. Some I had spoken with on the mailing lists, but mostly I spoke to new people I bumped into the keynote queue or at parties. Plenty of events happened in the evenings. I assumed I would be doing some coding, but I would slump gratefully into my bed each night.
A Mac is set up to do web development out of the box, but I decided to build PHP 5 and MySQL 5 from source for a number of reasons. I prefer to use PHP’s PDO wrapper in my data access layer, not those database specific
mysql_* functions. So I followed the instructions at HiveLogic and others.
But when I updated my Mac OS X to 10.5.3 I lost the MySQL PDO configuration. This had also happened when I installed previous 10.5 updates. Fortunately I had kept my configuration in a script. So if you too want to re-configure the PHP PDO for MySQL on your Mac, here is what to do.
Open terminal and
cd to you php directory. then run
'./configure' \ '--prefix=/Users/matt/php' '--with-xsl=/usr' \ '--with-apxs2=/usr/sbin/apxs' '--with-ldap=/usr' \ '--with-kerberos=/usr' '--enable-cli' \ '--with-zlib-dir=/usr' '--enable-trans-sid' \ '--with-xml' '--enable-exif' '--enable-ftp' \ '--enable-mbstring' '--enable-mbregex' \ '--enable-dbx' '--enable-sockets' \ '--with-iodbc=/usr' '--with-curl=/usr' \ '--with-config-file-path=/etc' \ '--sysconfdir=/private/etc' \ '--with-pdo' \ '--with-pdo-mysql=/usr/local/mysql/bin/mysql_config' \ '--with-mysql=/usr/local/mysql' \ '--with-mysql-sock=/tmp/mysql.sock' \ '--with-openssl' '--with-xmlrpc' \ '--without-pear' \ '--with-soap'
You might want to put that mouthful in a shell script and call it something witty like
config-php-pdo.sh. Now run:
sudo make install
Now you should be able to restart apache (from either the command line or from System Preferences > Sharing panel) but that has not worked for me. I had to restart the OS.
Hello. I’m Matt West. I’m a programmer living in West Yorkshire in the UK. I am learning how to write applications for the iPhone and iPod Touch, but I want to explain why I want to do that, and how I came to begin that.
An iPod Shuffle
A few years ago I was fortunate enough to receive a first generation iPod Shuffle as a gift. This was the third MP3 player I had had, but the two earlier ones were awful to use. The Shuffle’s good physical design, ease-of-use, and reliability first turned me on to Apple products.
Around that same time I came across Rails and attended RailsConf in London and saw first hand how people with Mac computers were a happy bunch. So I bought a MacBook, and have enjoyed using it since then.
Cocoa training course
Spurred on by the inspirational writing of Mac developers such as Wil Shipley and Daniel Jalkut, I began learning Cocoa but found it quite tough to learn in snatched moments out of life with my wife and our two young children. I would not say Cocoa is hard, it is a graceful framework. But there is a lot to learn when starting out in Mac development. So I took a week off work (unusual for a contractor I know) in November 2007 to attend the brilliant Cocoa development course run by Paul and Liz Lynch down in beautiful Old Beaconsfield in Buckinghamshire. The course was a week long, and very intense – there was just me attending. Paul is a good lecturer, and is very knowledgeable and approachable so makes for a good tutor. I cross-examined him at every stage of the day, every day (the poor man!). Thanks Paul. I recommend this course; I found out about it through seeing the ads on the ADC mailing list.
Leopard Tech Talk
Even though many people are excited about Core Animation, my favourite Leopard feature is the super-fast Spotlight search facility to launch applications, look up words in the dictionary, oh and search for things too. Under Tiger, I used to use LaunchBar and QuickSilver to launch applications using keyboard shortcuts. I have not bothered to install those apps, because I just use Spotlight. It is possible to integrate in to Spotlight by writing an importer for your app. This is called by Spotlight when a user searches for something. Like so much of Mac programming, it nostalgically reminds me of coding for the Palm OS; you would write a routine in your Palm app to respond to a Find launch code.
By the beginning of 2008 I had a small Mac application in development but hadn’t got as far as I’d like to with it. Then I was delighted when Apple announced the SDK for the iPhone and iPod Touch. So I have been busy since then. I must admit its a bit of a struggle because I am still doing Enterprise Java systems for a living during the day.
So I am going to abandon my family once again for a week by going to this year’s Apple WWDC. I am over the moon about it. It will be my first time to California.