Faryar Fathi

Composer, Coder, Entrepreneur


Hold fast to dreams
For if dreams die
Life is a broken-winged bird
That cannot fly.
Hold fast to dreams
For when dreams go
Life is a barren field
Frozen with snow.

Langston Hughes

A Look at Swift Optionals

In programming, there are times that you need to represent the concept of no value. Take a form field for example where you ask users to enter their age. Assuming that response represents the entered text, you can use the toInt() method of the String class to store the user’s age in a constant:

Swift’s Typing Model

Safety is one of the core features of Swift. Apple has incorporated many safe programming patterns into the language to save you from making some common programmer mistakes. A safer type system is one of the ways that Swift helps you write code that’s safer and less error-prone.

Let’s look at a few features…

Just How Much an Idea Is Worth?

As a follow-up on my previous post:

This might be an oldie but still a goodie, and perhaps the best way of looking at ideas that I’ve seen.

Imma Let You Finish but I Have One of the Best Ideas of All Time!

Sometimes that’s exactly how I feel when I am interrupted by a passionate entrepreneur when I’m trying to explain why ideas are dime a dozen! Ok, now that I got that out of my chest, let’s move on.

We all have idea and often a lot of them. And of course, we tend to think our ideas are generally better, smarter and more valuable than other people’s. But in reality ideas on their own are indeed worthless, or at least, have little value. What matters most is how you execute an idea.


Out of the night that covers me,
Black as the Pit from pole to pole,
I thank whatever gods may be
For my unconquerable soul.

In the fell clutch of circumstance
I have not winced nor cried aloud.
Under the bludgeonings of chance
My head is bloody, but unbowed.

Beyond this place of wrath and tears
Looms but the Horror of the shade,
And yet the menace of the years
Finds, and shall find, me unafraid.

It matters not how strait the gate,
How charged with punishments the scroll.
I am the master of my fate:
I am the captain of my soul.

William Ernest Henley

My New App: Enso Meditation Timer

It’s been a while that I’ve been working on a little side project of mine: a meditation timer and bell app called: Ensō.

I have spent quite a bit of of time on Ensō, trying to make it as best as I possibly could. But of course, things are never as perfect as you’d like them to be. So, rather than obsessing over minor details, I decided to release the v1.0 knowing that I could improve a thing or two if I spent more time on it. But hey, there is a v1.0.1 for a reason!

Sneak Peak!

Here’s a sneak peek of my new song for Piano, Violin and Cello, sans violin and cello!

Hope you like it!

Organizing Import Directives in Xcode

When writing code, I often end up with quite a few (sometimes repetitive) #import directives on top of my implementation files. Blame it on trying to write good, modular code!

Xcode doesn’t have an Organize Imports feature by default . But I picked up a nice tip in “Working Effectively with Xcode” WWDC video a while ago on how to create an organize imports service with a little bit of help from Automator.