As a programmer I like to automate stuff, I love being able to extract the data I’m tracking and visualise and analyze it in many different ways.

I’ve been using MyFitnessPal for years, and I’ve collected a big amount of nutrition / weight data, as such I wanted to be able to play with that data in my own environment, unfortunately MyFitnessPal did not give me API access, even though I’ve asked twice.

As such I’ve decided to get that data in other means, Web crawling with Ruby and Mechanize is one option.

Let’s see how we can extract nutrition summary and weight data, meaning calories/macros and weight measurements.

Read on →

Everyone loves Swift playgrounds, they are awesome, Apple has made amazing job with Xcode 6 and Playgrounds were the icying on the cake.

But since most of us still need to write Objective-C I’ve created Playgrounds for Objective-C:


  • 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!

And it’s just a start.

Source code on GitHub

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 write code, what matters and how I go about working for my clients. I’d like to share some insights in what is my current approach to few common topics.

Read on →

Download this article as Playground for XCode 6 to be able to experiment with calculations.

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

Same goes for bulking, eat more and you gain weight.

Two questions arise:

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

It’s easy enough to explain both, but since I’m a programmer and I really like Swift playgrounds, let’s use some swift to do express math for us.

Read on →

Use it or not, KVO has been integral part of Cocoa programming, yet if you decide to use only native Swift code you are loosing ability to observe other object properties.

There is a way to add Observable properties back to your own codebase with generics in a way they won’t have ripple effect on remaining code, it’s actually pretty cool.

Read on →