Swift init()

With Swift strong typing and immutability, there are rules that prevent you from accesing variables until an object is fully initialized.

I do not like having a function do more than one thing, so I like to split my initializers into multiple functions, this becomes problematic.

Tips for Interface Builder

Young developers are happy when they write a lot of code, they like to brag about that project that has tens of thousands lines of code they wrote.

As we get more experienced, we realize that code is expensive. It’s expensive to maintain, debug and reason about.

That’s why we should aim to use tools that can help us avoid writing boilerplate code, one of those tools is Interface Builder.

Here are a few of my favourite tips & tricks.

Prototyping floating burger menu with CAShapeLayer

Reproducing above effect is very simple with CAShapeLayer and CoreAnimation…

Simple way to scrape web with Ruby

MyFitnessPal didn’t give me API access, so I wrote some Ruby to get it anyway.

Playgrounds for Objective C

Playgrounds are one of the niftiest features of Swift.

They allow you to quickly test out bits of code and see results in real time without going through the traditional edit-compile-run-debug cycle.

“But surely playgrounds aren’t possible in Objective-C?” you say… Think again.


  • Faster than Swift playgrounds (a lot)
  • Extra controls for tweaking:
  • Adjustable values
  • Autoanimated values
  • Buttons
  • IDE agnostic, once you run it, you can modify the code even from vim.
  • Full iOS simulator and access to all iOS features, so you can prototype production ready code.
  • Nice DSL for rapid prototyping
  • CocoaPods support, so you can add it to existing projects to experiment
  • Open source, anyone can contribute to make them better!

Source code on GitHub

iOS Project Bootstrap

If you are looking for some good quality project settings and scripts, I’ve open-sources my bootstrap for upcoming 2015.

Check it out on github.

How do I work?

I’ve been programming for 18 years now, doing commercial work for the last 6.

Over the years I’ve been exposed to different ideas and experiences that have constantly affect the way I work.

What matters and how I go about working for my clients?

A Swift introduction into fitness

Many people think getting fit is hard, the fitness industry is full of myths and unnecessary complications.

Doesn’t matter if your goal is to lose weight or gain it, what matter is Physics and law of energy:

If you burn more calories than you eat you will lose weight

Two questions arise:

  1. how to estimate our caloric needs?
  2. how fast should we lose or gain weight?

We’ll use Swift Playgrounds to explain it.

Writing less code

What are some of my favorite techniques for cleaner and more readable code?

Improving development speed

I wrote a blogpost about improving iteration speed and why code injection is awesome when you work on small changes.

Read it on Lextech blog