Xkcd Now. Animated.

Credits: http://xkcd.com/now

Facebook SDK May Cause Your App to Be Rejected From the App Store.

Scenario

You just finished coding the coolest app ever. A well-deserved cold beer is awaiting for you. Archive… Validate….

Validation passed with warnings:

The app references non-public selector in id

My Feelings About Auto Layout in Xcode 5

Type Inference for Everyone in iOS 7! (Yes, I’m Breaking Apple’s NDA)

DISCLAIMER

Ok, I’m about to do a crazy thing nobody has ever done before: I’ll break Apple’s NDA! If you’re about to yell me, whining “You cannot talk about this, iOS 7 is not out yet and it’s under NDA”, well, here’s my super politically correct answer for you: “who cares”. NDAs are made to be broken, and in Apple’s specific case it can also be purchased for 99$/year. On the other hand, if you work as a lawyer at Apple Inc, forget what I just said. Have I ever told you that I LOVE the new icons in iOS 7? We can be best friends!

instancetype for everyone!

I already talked about the instancetype keyword in my previous article.

I’m proud to “announce” that, as per iOS 7.0 API diffs, finally Apple is making use of instancetype across the Foundation framework (and not only that). What does it mean?

Type Inference for Everyone in iOS 7! (Yes, I’m Breaking Apple’s NDA)

DISCLAIMER

Ok, I’m about to do a crazy thing nobody has ever done before: I’ll break Apple’s NDA! If you’re about to yell me, whining “You cannot talk about this, iOS 7 is not out yet and it’s under NDA”, well, here’s my super politically correct answer for you: “who cares”. NDAs are made to be broken, and in Apple’s specific case it can also be purchased for 99$/year. On the other hand, if you work as a lawyer at Apple Inc, forget what I just said. Have I ever told you that I LOVE the new icons in iOS 7? We can be best friends!

instancetype for everyone!

I already talked about the instancetype keyword in my previous article.

I’m proud to “announce” that, as per iOS 7.0 API diffs, finally Apple is making use of instancetype across the Foundation framework (and not only that). What does it mean?

Filter a NSArray Using a Block

A quick post just to point out a minor thing.

If you have ever had the need of filtering an array in Objective-C you know that Apple provides a method called filteredArrayUsingPredicate:, that takes a NSPredicate and returns a NSArray containing only the objects from the original array that satisfy that predicate.

I personally find the NSPredicate format really annoying and error prone.

Obj-C: Infer Types Like a Man, Man

The Objective-C type system, in brief

From a type system point of view Objective-C can be seen as hybrid language: it both allows dynamic typing, therefore achieving a great flexibility, and static typing, turning the compiler into a precious ally.

When coding you can explicitly declare the types of all your variables or decide to use the keywork id, which - in short - is a sort of a hint to the compiler telling him: ”Look, I know what I’m doing. Just trust me and everything will work out just fine.”.

Sometimes using id comes in very handy, for instance id is the type of any object hold by a generic container (as NSArray) eliminating altogether the need for templates or generics (like you see in C++ or Java).

Haskell Data Declaration Constraints, the Right Way

Recently I’ve been using the Haskell language to implement the solutions to the Coursera’s Algorithms 2 online course.

The idea of using Haskell came talking with Mario who was already using it for the very same purpose.

In such context Mario started developing a purely functional Union-Find data structure an he eventually run into an interesting problem concerning algebraic data types that inspired this post.

The Root of All Tex

Hi everyone!

Recently we talked about how to set-up a delightful working environment for LaTeX using Sublime Text 2.

Today I want to share with you a trick that will help you while dealing with multi-part LaTeX documents using the \input or the \include commands.

LaTeX Is Now Sublime

Hi everyone!

I can safely guess that many of you use or have used LaTeX, the beautiful markup language by Leslie Lamport.

If you don’t and you have some aesthetic taste I suggest you to check it out and stop producing ugly Word documents. If instead you know what I’m talking about, I’d like to share with you all my LaTeX configuration, which makes use of the awesome editor Sublime Text 2 and its plug-in LaTeXTools.