Tuesday, August 30, 2005

Delirium Tremens




I've tried out a new beer today called Delirium Tremens. It's brewed in Melle (Belgium) which is actually only 10km from where I live. I must say it's a real shame that I didn't try it out any sooner. This is really A-class beer.

I like it so much I decided to do some research on it, and it turns out that this beer has been elected as best beer in the word in 1997. The description in the image is true poetry and I could only say amen to that.

Monday, August 29, 2005

Logging method invocations in Objective C

Here is a code fragment I use to log method invocations in Objective-C. The great advantage of Objective-C is that you can find out what the name of the method is that is executing. I don't believe this is possible in a language like Java.

QSLogMethodInvocation macro
// Prints a line in the console stating the name of the
// method that is invoked.
//
// For example if class Foo has a method bar, the definition
// of bar in the class Foo could contain QSLogMethodInvocation().
// The following message will be logged: Invoked bar from class Foo
#define QSLogMethodInvocation()\
NSLog(@"[LOG] Invoked %@ from class %@",\
[NSString stringWithCString:(char *)_cmd], [self class])


QSLogAbstractMethodInvocationError macro
// Prints a line in the console stating an abstract method
// was invoked.
//
// For example if class Foo has an abstract method bar,
// the definition of bar in the class Foo should contain
// QSLogAbstractMethodInvocationError().
// The following message will be logged:
// Error (Foo): abstract method bar invoked
#define QSLogAbstractMethodInvocationError()\
NSLog(@"[LOG] Error (%@): abstract method %@ invoked",\
[self class], [NSString stringWithCString:(char *)_cmd])

First post

Here is the classical first post.

Welcome to my blog! I will be writing some information about my private and professional life on this blog. This will mainly be about development of Cocoa applications and my studies.

Hopefully this will grow out to be a fun and resourceful venture for me and you readers.

I am pleasantly surprised by the clean interface of blogger.com. Last year I had a project to develop a blogging application, as a project for my studies, with a group. The results are visible on this site: se5_2005. Upon request I could start up the blog portal application itself on the server.