TheJoyOfHack

For people who like to make things

The Concept of Predestination

There was some interest in a quick presentation about the concept of Qadr in Islam (Predestination). As the sixth pillar of Imaan, it is imperative that we are familiar with it, and believe in it. I have come up with a presentation on this topic that I used for our local halaqah (study group).

more ...

Goodbye, Twitter

After more than nine years on Twitter, I finally deactivated my account.I refuse to contribute to the success of any platform that promotes the hatred of the villainous Donald Trump. I hope Twitter CEO Jack Dorsey never has to face the persecution that the vile Trump is trying to inflict on people like me. However, if anyone deserves it for enabling hatred, it is him.

You can find me here, and on micro.blog.

more ...


What Happens to your Passwords when you Die

This is a guest article I wrote for the newsletter of a friend of mine who’s an Estate Planner.

Almost every digital or monetary asset you own is protected by a password. Some service providers, like investment brokers require multiple pieces of information, like your social security number, account number, date of birth, etc. These are all things that a provider assumes only you know. Once these secrets are known to others your asset is compromised. So in order to keep these secrets safe, you need to do two things: prevent others from being able to view these secrets, and prevent others from being able to guess them.

more ...

Running External Commands in LLDB via Python

Many iOS apps today are clients of some sort. They request data from a remote server. Typically this data is served over HTTP (with SSL) and formatted as JSON. At FastModel Sports our iOS app is constantly requesting large amounts of JSON data. While debugging the app I inevitably have to compare what I’m displaying in my views to what the server sent me.

This meant saving the server response into an NSString, printing it out to the console with NSLog, copying that output, switching to Terminal, pasting that output into a file and then running jq on that file. That’s a lot of steps. In this post I’ll show you how to do all of that directly from the LLDB command prompt.

more ...

Rotation and Adaptive Layouts

Another in a series of posts documenting my process of updating an aging app.

For this rewrite of Qur’an Memorizer I’m using Auto Layout. This is the first time I’ve used Auto Layout for this app. You know when the Apple Engineers said Auto Layout makes things easy? They weren’t kidding. Even though Qur’an Memorizer has some unique behaviors for autorotation, I was able to implement this in a few hours with Auto Layout and about 25 lines of code. Read on to see what I did.

more ...

Code Coverage Without Pod Files

Another in a series of posts documenting my process of updating an aging app.

I noticed that the code coverage reports from XCode 8 recently started showing me coverage for .m files that were in the CocoaPods that I’m using. In this post I document how I fixed that.

more ...


Examining JSON Data With jq

Earlier tonight I spoke at NSCoder Chicago about how to use jq to examine JSON data. This post contains links and information that I would like to share with the attendees.

more ...