Many a times, in an iPhone application, you might need to format the date relative to today. This code snippet will help you do it. + (NSString *) formattedDateRelativeToNow:(NSDate *)date { NSDateFormatter *mdf = [[NSDateFormatter alloc] init]; [mdf setDateFormat:@"yyyy-MM-dd"]; NSDate *midnight = [mdf dateFromString:[mdf stringFromDate:date]]; [mdf...
Read MoreGod and Religion
PS: This post has nothing to do with Apple, iPhone, programming, Windows, Microsoft. Sometimes, I do pen down my personal thoughts on my blog. Read it if you are an atheist. Read it if you aren’t either This should have been my first blog post. I wrote this on a piece of paper around 7 or 8 years ago, during my college days, when Internet connection was intermittent, I didn’t have a blog let alone a web host. == God == Our...
Read MoreConsuming a RESTful Service (bit.ly) in an iPhone Application
bit-ly-rest-api-objective-c Introduction Of late, many programmers who develop for Windows/Linux have moved to iPhone because of it's runaway success. Among the most successful apps on the Apple AppStore, first comes games (yeah I can hear you, fart apps!!!). Next comes apps like Tweetie and others those consume a web service (REST or otherwise). Games are pretty difficult get started especially if you aren't a game programmer. However,...
Read MoreHelp your visitors with a *useful* 404 Error page
A 404 Error page usually informs visitors that something they were looking for is not found. I wanted to create a useful 404 error page for my blog and site. If it is only for a blog, I would have done with a multitude of plugins available for WordPress like smart 404, AskApache’s Google 404. A quick search for “404″ in wordpress extension site will reveal atleast 6 pages of extensions. But much to my bad luck, they...
Read More