May 13th, 2008
This post was inspired by a recent twitter that I thought I might elaborate on a bit more. One of the nice new features of Objective-C 2.0 is dot-syntax for read/write proprerties. For example:
Person *person = [[Person alloc] init];
person.mobileNumber = @"1-555-123-1234";
This is uber nifty, and can save you a load of time and redundant code. However it’s often the case that I want to hide access to certain private member variables, but still expose accessors/mutators to attributes on those private variables. Let’s say mobileNumber is actually an accessor/mutator on a sub-object, let’s call it PhoneBook. Under the hood, this is implemented like so:
@interface Person {
PhoneBook *phoneBook;
}
@property (nonatomic, rertain) NSString *mobileNumber;
@end
@implementation Person
- (void)setMobileNumber:(NSString *)number {
phoneBook.mobileNumber = number;
}
- (NSString *)mobileNumber {
return phoneBook.mobileNumber;
}
@end
This seems far from ideal, when really I just want to pass through the implementation of this accessor/mutator to one of my instance variables. A more clean and hypothetical implementation could look like this:
@interface Person {
PhoneBook *phoneBook;
}
@property (nonatomic, retain) NSString *mobileNumber;
@end
@implementation Person
@synthesize mobileNumber=phoneNumber.mobileNumber;
@end
April 9th, 2008
Well, something I had suspected and maybe secretly known for awhile was in the works landed yesterday! Flickr Video! This is a natural feature addition to FlickrBooth that I’ll eventually be supporting. I don’t have much time these days and lets face it, FlickrBooth being free isn’t much of a cashcow. Is this feature something people really want? Put your money where your mouth is and donate! I’m not saying I won’t do this without donations or that I’m holding my FlickrBooth users hostage, but I certainly up the priority of work based on the interest of my users. I’d be interested to hear what sort of feature(s) surrounding the new addition you guys would like. Should uploading videos allow going to YouTube and Flickr at the same time? What if the video is over 90 seconds, should I clip at 90 seconds or split it into X number of videos? (The latter might actually be pretty tricky…). As an aside, I’ve also tossed around the idea of FlickrBooth for the iPhone, especially with some big names asking for it.
March 28th, 2008
Hot on the heels of my recent ObjectiveYouTube release, I bring you two for one! ObjectiveYouTube 0.2 for developers and FlickrBooth 2.0 for users. As you can probably guess, the big new feature for this release is YouTube uploading of videos. YouTube videos are big, and take awhile to upload? No problem! I’ve also added a handy little upload progress window to view the status of your YouTube uploads as well as the ability to cancel them should you change your mind :). To top it all off, FlickrBooth now automatically checks for updates. Head on over to the download page and give it a spin.
March 18th, 2008
So I had time tonight to package what I’ve got working, and would like to get some more eyeballs looking at it.
Please check it out! Download available at Google Code.
March 18th, 2008
So after going through all the trouble of writing a generic multipart form generator, and screen scraping youtube, etc I’ve completely rewritten it to use the new spiffy YouTube write apis that came out literally a day after I completed all that prior work. Oh well, the good news is this library will be shielded from things like YouTube updating their website since I no longer have to screen scrape. So the downsides are the lib will only handle authentication and uploading, mostly because those are all I need right now. I may let the community fix that problem if anyone else needs that functionality. Look out for a post in the next couple days while I finish up the readme/licensing.
March 8th, 2008
So awhile back (just after macworld) Quynh’s iPhone mysteriously cracked. We didn’t drop it, we didn’t step on it, it just spiderwebbed in the corner for no apparent reason. Needless to say we were hesitant to take it to an Apple genius because anything involving what appears to be user-inflicted-damage is shrugged off. Well, we were browsing the mall today and said screw it lets give it a try. 20 minutes later we were blessed with a brand spanking new phone! I had a similar experience with Ikea, in which we actually brought in an photo of a broken drawer shelf (on our iPhones of course) and they didn’t even ask questions! They just went into the back room and gave us the new board we needed to repair the drawer. Not to go off into too much of a tangent, but I think these two companies share a lot in common.
March 7th, 2008
(Most) everyone knows about the iPhone SDK, so I’ll try not to be redundant. In short, I think what was delivered was awesome. It’s a pretty good compromise on almost all levels. If you want to distribute software on the app store for free, you can. If you want to charge, they take a pretty fair percentage. The enterprise additions were all icing on the cake to me. Normally I wouldn’t care, but I’ll directly benefit from Exchange support since VMware is an Exchange company (ugh). It’s increasingly depressing that no one seems to be giving Microsoft Exchange competition, still, and it’s the year 2008 but that’s another blog post all together. Another thing that has me pleased and amazed is the $100 million iFund. This is a drop in the bucket for Apple, with nearly $18 billion in the bank. Yet that’s a lot of money. I’m frightened, in a good way, to think what can come out of this initiative.
Frankly I wasn’t quite surprised that they chose not to make a Windows compatible SDK. The entire iPhone development suite, from building tools (gcc, xcode, ib) to debug tools (instruments, which depends on dtrace) are just entirely incompatible with Windows. Even if Apple did keep Yellow Box alive in secret, it would be a monumental effort to port all those tools. So I guess that’s that — in order to code for the most popular mobile device within the next few years, you’re going to need a Mac. If that doesn’t pull in a whole new class of switchers, I don’t know what will.
February 26th, 2008
After many many months of putting it off, I finally integrated my new spiffy blog theme! HUGE thanks to my friend Brett Lavalla who made it for me, sorry it took me so long to install it
January 25th, 2008
So I know I shouldn’t complain too much, coming from Safari not too long ago, but I felt I must rant about something. In my quest to bring YouTube support to FlickrBooth (is that app name even going to make sense after such a feature?) I’ve come to the sad realization that NSURL sucks. It doesn’t have a feature-rich enough API, making you have to break down to CF functions. It makes you use important to forget string functions like [NSString stringByAddingPercentEscapes] which have fun ways of creating bugs you didn’t anticipate. It lacks any sort of GET/POST automatic query generation. It has no helper functions for cookies, which are this entirely separate-but-shared entity. I feel like Apple ported (or did they write it from scratch?) it on top of WebKit for Panther and basically let it wither without any substantial feature additions since. I suppose on one hand you could argue that it means the API will remain stable, making it easier for future development but Apple does seem to have a hit and run policy of releasing a new awesome library, then basically never touching it again except for bug fixes. WebKit in particular I would not account such harsh words to. The API adapts quite rapidly, despite many additional functions winding up on the “Unofficial but available” headers. But this is by virtue of it’s OpenSource facing policy. AppKit/Foundation doesn’t exactly have the same liberal policy.
January 14th, 2008
So after inviting suggestions the other day about additions to FlickrBooth someone game me a great idea. Photo Booth in Leopard now supports videos, so why not offer direct uploading to YouTube as well? Turns out this shouldn’t be too difficult, so I’ve begun writing a small framework to upload to YouTube as a demo app. Add that to my list of things to release separately as a download. I never did get a chance to post my generic “Photo Booth plugin” example project, but mostly because I need to clean it up some more. After writing the example plugin first, then porting Tiger FlickrBooth to using it I ran into quite a few snags along the way that will necessitate updating the example plugin project. So, that’s on hold for now. I think getting something like YouTube support in the hands of the mac community will be more beneficial though