content top

Formatting Dates relative to Now – Objective C (iPhone)

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 More

God and Religion

God 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 More

Consuming a RESTful Service (bit.ly) in an iPhone Application

Consuming 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 More

Help your visitors with a *useful* 404 Error page

Help 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

Tip: Displaying a banner (or crash IE) when people visit your site using IE6

Tip: Displaying a banner (or crash IE) when people visit your site using IE6

You must be knowing that Youtube, displays a subtle warning when users visit it from IE6 browser. Though everyone knows that IE6 is the most crappy browser on planet Earth, corporates are still hesistant to migrate to other Microsoft browsers or from other Vendors like Mozilla/Google/Apple. To make more and more people aware of the security risks involved with IE, a whole lot of campaign started on Twitter, including  adding a Twibbon to...

Read More
content top