1. Booleans are free. Use them.

    Last week a co-worker asked me how I implemented a certain feature in our product. I couldn’t really remember all the fine details of the implementation so I loaded the file into the editor and we sat to read it together.

    The code was actually good and I didn’t feel I had to “protect” it by saying it was done under pressure and other excuses I use often. He read the code and said “Oh, I see what you’re doing here. Thanks!”.

    The one thing that made the code super readable can be summarized by this programming tip:

    Booleans are free. Use them.

    Here’s an example:

    Read More

  2. Backbone.js global notifications

    I was looking for a way to allow two Backbone.Views to exchange information between them.

    Here are some solutions to this problem:

    1. The bad idea

    We could just let them reference each other. Then view1 could say this.view2.doSomething() and it’s the easiest way to solve this.

    However simple it may be, this will lead to a very tight coupling and a very bad design for our web app. If we have a circular dependency, we should probably rethink our design.

    2. The good idea (that doesn’t always work)

    Read More

  3. Adding custom Getters and Setters to Backbone models

    I started using Backbone.js for web development. It’s a really great framework for structuring your javascript code.

    After digging in further, I figured out Backbone models are missing one important feature: custom Setters and Getters.

    Read More

  4. Export your AppAnnie data

    I love AppAnnie. If you don’t know them, you should.

    Here’s what AppAnnie say:

    More than 75,000 Apple App Store apps trust App Annie Analytics to track their downloads, sales and reviews completely for free. 

    I am one of those 75,000 App owners who trust them with my data.

    And if it is in fact my data, then I should have the ability to export it to my computer, right?

    Well, not really. App Annie doesn’t have this option. It doesn’t even have an API.

    So let’s hack together an “Export API” for them, shall we?

    Read More

  5. Don’t be a liar! and 4 other tips for iOS graphic designers

    As an iOS developer I had the pleasure of teaming up with awesome graphic designers to create iPhone and iPad apps.

    I try not waste their time, and make sure they don’t waste mine. So I came up with a list of tips that will keep us productive and happy.

    If you’re a designing for iOS, the following tips I shared with them will probably save you hours of work as well.

    1. Don’t be a liar!

    Read More

Tal Bereznitskey