Tuesday, November 13, 2007

Zip.framework version 0.1

Today I released my first version of Zip.framework. The framework aims at providing functionality to work with archives directly in Objective-c. A small example:

ZipArchive *zip = [[ZipArchive alloc] initWithFile:@"/path/to/archive.zip"];
FILE *file = [zip entryNamed:@"some/file.txt"];
// do some reading on file

So no need to extract to intermediate files using command line tools or any sign of NSTask anymore. This first version only supports reading, writing to zip files is planned for future versions.

The framework is available as binary or source version. To get the complete Xcode project use svn checkout http://zip-framework.googlecode.com/svn/tags/version-0.1 zip-framework.

Code is released under the (new)BSD license.

Tuesday, October 30, 2007

Leopard Developer features

Matt Legend Gemmell posted a fairly long overview of all Leopard developer improvements. Since I didn't receive my Leopard DVD yet and Apple still needs some time to post new documentation this is what I waited for!

API improvements I find interesting:

  • The Automator framework to run automator workflows from within my own applications
  • Core Data and Sync Services now work together which makes syncing data stored in Core Data much easier
  • Source lists and rule editors


It looks like Apple finally opened up a lot of API's they were using all along in Tiger which we now can use too. With Leopard it looks like OS X matured a long way for developers with way better API's. All improvements let developers create applications that look much more like the Apple applications (think iLife and SafarI) while in Tiger we had to create all Apple like features (think HUD windows) ourselves. We are now even officially allowed to use some Images that are used everywhere in applications by Apple (like the gear icon in almost every preference window).

Sunday, October 28, 2007

Leopard Developer information

Almost two full days since Leopard was released. Loads of first impressions, screenshot galleries and even vista comparisons have been published. What's lacking is developer feedback and publications. No new API's have been published by Apple yet. The developer.apple.com website is actually offline at the moment. I also expected developers with Leopard beta access to publish their experiences from the past few months. The NDA for the Leopard Beta can be ignored now right, since the OS is released?

I expect my Leopard DVD to arrive in a few days, but in the mean time I would like to browse through the final version of frameworks like the RSS.framework for example (which was demonstrated to me at WWDC 2006). Guess Apple needs a few days to publish all the documentation so even Student developers can study the new Leopard features and API's.

Friday, October 26, 2007

Student developer membership

Today I renewed my Apple Student Developer membership! After not developing for the mac for a while and with Leopard being launched in 1.5 hours I thought it was time for a new membership. I've got loads of ideas for applications so expect more regular posts on this website soon.

Monday, September 17, 2007

Starting Cocoa programming: The books

Another article to learn how to start Cocoa programming: MacApper lists the books you might find usefull.

Friday, September 14, 2007

Start Cocoa programming

Found a nice article on how to start Cocoa programming. Wish I had this a few years back!

Thursday, April 12, 2007

Accepted to Google Summer of Code 2007!

I just got the email congratulating me on my future participation in Google Summer of Code 2007. My application for the Swarm Development Group was accepted!

I just created a GSoC 2007 .Mac page to which I'll post my accepted and declined applications over the next few days.

Saturday, April 07, 2007

OCUnit test reports

Unit testing not only is quite usefull to make my code better but I also really like the visual feedback in the form of the junit generated html reports. The reports automatically generated by the Ant build script provide a nice overview what test cases work or don't work. More important, it shows me what I might have broken by adding a feature. The console results are just fine during development, the HTML reports are better suitable for publishing on the web for example.

These html reports are generated based on xml output from junit. This is all easy in an Ant based java project where tests are run using junit.

The problem is I mainly develop in Objective-C in which case I test using the OCUnit framework. The OCUnit framework nicely integrates with Xcode and displays failures the way Xcode displays compile errors. This is nice during development but pretty useless when builds are run automated on a remote machine.

So to publish test results from an automated xcode build I wrote a ruby script that transforms the console output from OCUnit to a junit compatible XML format. See the following Ant target how this works:

<target name="test" depends="build"
description="Builds the project, runs the unit tests, generates a report">

<exec executable="xcodebuild" dir="zip-framework" failonerror="false" outputproperty="xcodebuild.out">
<arg line="-target Test -configuration release build" />
</exec>

<mkdir dir="reports" />
<mkdir dir="reports/raw" />
<exec executable="OCUnitReport" errorproperty="report-error.out" inputstring="${xcodebuild.out}" searchpath="true" resolveexecutable="true">
<arg line="-d reports/raw" />
</exec>
<echo message="${report-error.out}" />

<mkdir dir="reports/html" />
<junitreport todir="reports">
<fileset dir="reports/raw">
<include name="TEST-*.xml" />
</fileset>
<report format="noframes" todir="reports/html" />
</junitreport>
</target>


The first exec task executes the OCUnit target called Test and saves the result in the xcodebuild.out property. The second exec task transforms this output to xml using the OCUnitReport script. Finally a junitreport task is used to transform this xml to a html report in the reports/html directory.

Why use Ant to build a Xcode project? For one, the only way for the automated build tool CruiseControl to build a Xcode project is to wrap the the command line tool xcodebuild in an exec task. Ant also contains a lot of useful build-in tasks like ftp which can be used for example to upload the build reports to an external server.

Download (ruby script, 5kb)

Wednesday, March 28, 2007

Let the waiting begin!

From the Google Code weblog:

It's shaping up to be another exciting Google Summer of Code this year! As of the deadline, we've received 6,179 student applications from over 3,000 students. The list of accepted student proposals will be published on April 11, 2007 on the Google Summer of Code page.

6,179 student applications from over 3000 students, nice. That's an average of about 2 applications per student. Just wondering how many students actually reached their application limit of 20. Since only 1 in 5 students or 1 in 10 applications (around 600) will be accepted, this should be a long wait for most students :)

Update:
It seems google is accepting around 800 students, instead of the number stated in their faq.

Monday, March 26, 2007

Google Summer of Code

A few more minutes and the Google Summer of Code 2007 (GSoC 2007) student application deadline will pass! I submitted three applications in total for the following organizations:


For the Swarm Development Group I applied to integrate the Swarm library with the Cocoa framework. This is one of the ideas proposed by the Swarm developers.

For the other two organizations I came up with my own project of which I think the project communities will benefit from.

More information on my reasons for choosing the proposed projects and the full project applications as submitted to google will be posted online soon. Accepted student applications will be published by google on the GSoC 2007 homepage on April 11.

Update:
The student application deadline has been extended to 16:00 UTC march 27.

Update 2:
Because of the extended deadline I decided to submit another application, this time for the Eclipse foundation. This brings the total amount of my applications to 4, which I think is a reasonable amount (even though 20 are allowed by google).

C Puzzles

A list of small C programming puzzles. Allthough most of them are easy and some are quite lame, it's a good opportunity to test your C knowledge.