Well, this is embarrassing. You might have expected to find my homepage here. In fact I am currently too busy studying, writing iOS apps or working on other projectserver.org projects to create my own homepage. You may return whenever you like to check if that has changed somehow. Up to then, everything you find here is just a sophisticated twitter newsfeed. Enjoy.
—read on a T-Shirt
I really love Byword (bywordapp.com) by metaclassy and the MultiMarkDown (MMD) to LaTeX Export feature is simply awesome.
Here’s one thing that really annoys me though:

—Nick Farina in http://nfarina.com/post/8239634061/ios-to-android
—Bruce A. Tate - Seven Languages in Seven Weeks
April 1st, 2010 by kowsik
We launched pcapr over a year ago now with just a few of us working part time to build and manage the site. pcapr is powered by CouchDB, a NoSQL database written in Erlang with JavaScript as the primary query language. Frankly, this has been a disaster. We are planning on rebuilding the site with Java, Hibernate and MySQL for a number of reasons. [read more]
(Source: nosql-database.org)
—Reuven M. Lerner in “At the Forge - NoSQL? I’d Prefer SomeSQL”
This is just a very quick note about multithreading in iOS 4.0+. If you want to put a long-running task to the background but keep your users updated about the state of the task you can use this snippet.
// start background execution
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
// do background work here (e.g. in a loop)
// everytime you want to update the ui call this
dispatch_async(dispatch_get_main_queue(), ^{
// update your ui here .. e.g.
[myUIProgressView setProgress:myProgress];
// you need to provide these variables yourself of course ;)
});
});

When I came across the Twitter App for iPhone, I saw something I immediately wanted to have for my own app: UITableViewCells acting like ComboBoxes, opening on tap, closing when a new option is chosen. The idea was so nice that I decided to write a small prototype which can now be found at a public github repository of mine. There is also some basic documentation that might be useful for those who want to re-implement this code.
The key facts in a nutshell:
switch ([indexPath row]) {
case 0: {
// return the ComboBox cell here
break;
}
default: {
// return the Option cells here
break;
}
}
If you’re interested, feel welcome to check the full prototype and it’s documentation in the repository.
—Edmund Burke
As I continued to work on my Rumford1797 app I made heavy usage of an Cocoa framework component called NSPredicate. Most of you that have come across NSPredicate have seen it in combination with CoreData when fetching objects from the persistent store. That was my first point of contact with it as well but lately I discovered that it is also useful for cleansing your code when working with any amount of data stored in structures like NSSet or NSArray.
WHAT IS NSPREDICATE?
NSPredicate is basically a predicate to filter objects. The advantage is, that it can be used to filter many collections of objects, e.g. NSSet or NSArray.
// create an array of (ns)strings NSArray *looneyTunes = [NSArray arrayWithObjects:@"Bugs Bunny", @"Daffy Duck", @"Elmer Fudd", nil]; // create a predicate that looks for objects that begin with the character 'B' NSPredicate *beginsWithB = [NSPredicate predicateWithFormat:@"SELF beginswith[c] 'B'"]; // this is where the magic happens NSArray *looneyTunesThatBeginWithB = [looneyTunes filteredArrayUsingPredicate:beginsWithB]; // returns 'Results: 1' NSLog(@"Results: %d", [looneyTunesThatBeginWithB count]);
EXAMPLES
As you can see, filtering an array by a simple predicate is just a single line of code. Even the most complex predicates work like this. So lets pretend we have an objectset of a class called LooneyTune that has the following structure:

Now we want to retrieve these objects from an array that have 'Bunny' as lastName.
NSArray *looneyTunes = [NSArray arrayWithObjects:bugsBunny,honeyBunny,lolaBunny,elmerFudd,nil]; NSPredicate *lastNameBunny = [NSPredicate predicateWithFormat:@"lastName like[c] 'Bunny'"]; NSArray *bunnies = [looneyTunes filteredArrayUsingPredicate:lastNameBunny]; // returns 'Results: 3' NSLog(@"Results: %d", [bunnies count]);
That was again easy, wasn’t it? The next and last example will show you that it is also very easy to use more complex data types as strings like NSDate in you NSPredicates. Let’s say we want to find all LooneyTunes characters that had their first appearance before November 1st, 1966
NSDate *date1966 = [NSDate dateWithNaturalLanguageString:@"November 1, 1966"]; NSPredicate *appearanceBefore1966 = [NSPredicate predicateWithFormat:@"firstAppearance < %@",date1966]; NSArray *firstLooneyTunes = [looneyTunes filteredArrayUsingPredicate:appearanceBefore1966]; // returns 'Results: 2' NSLog(@"Results: %d", [firstLooneyTunes count]);
ONE MORE THING ..
You might have guessed it but I felt the need to emphasize on this: You are able to combine multiple predicates with logical operators like AND and OR. A quick example will show you what I mean:
NSPredicate *filter = [NSPredicate predicateWithFormat:@"(start >= %@) AND (end <= %@)", earlyDate, lateDate];
This simple line of code is able to extract objects (having the properties start and end) that are valid in a given period which is limited by earlyDate and lateDate. In my experience, this method is faster and much more reliable compared to a ‘for’ loop or similar classical approaches for this purpose.
For more information about NSPredicate and its usage please refer to the Predicates Programming Guide.
(The name LooneyTunes and the LooneyTunes characters which have been used for the code examples are property of Warner Bros.)
NIGHTNIGHT by DEDDY