NSConference 2010

I was in Reading UK last week to attend the NSConference 2010. I will not write a full report of what happened there, because others will do that better.

The only thing I want to say is:if you want to improve your skills in Cocoa, for Mac, iPhone or iPad, you should go: you’ll have the best speakers, the best organization you can dream of. And you will come back with new contacts, new ideas, new code to try.

You can (should) read Alex Repty report here.

Tablet, iSlate, iPad, …

If, like me, you are tired seeing all these rumors about the absolutely freaking crazy product that Apple MAY announce tomorrow, and you are tired of reading about these rumors on absolutely every website in the world, I have a solution for you.

It’s a GreaseMonkey (and GreaseKit) script that will obliterate all mentions of the words « Tablet », « iSlate », « iPad », « iTablet » and replace them with « Unicorn », because more people have seen Unicorns than the famous iTablet.

Lire la suite…

PHP is teh suck

The other day, I had to write a PHP script that reads a csv file of addresses and outputs the longitude and latitude of every address in the file.

Since I haven’t done a lot of PHP recently, I had to look in the documentation for the function that reads a file into an array because I couldn’t remember the name.

Lire la suite…

Relative date to now

In my current project, I needed to know if a given NSDate was today, yesterday or earlier. Simple task, I thought. Until I looked at the documentation for NSCalendar, NSDateComponents and NSDate. While these are extremely powerful, I am not proud of the code I’ve written. It should be easier.

Anyway, the code below will take a date and return a formatted version relative from today:

  • Today, 11h35
  • Yesterday, 8h27
  • January 12, 22h27

Lire la suite…