Category: Programming

  • Categories Considered Harmful

    Categories Considered Harmful

    TL;DR – Don’t use categories. They just create different problems. Categories in Obj-C are a way to add (or expose) functionality to a class without subclassing it. You can see why this might be tempting, right? File getting a bit big, too many pragma marks, stick that bit in a category. I want to expose this…

  • Android: Touch to Change Image

    Android: Touch to Change Image

    On iOS I do this using a button (with different pressed state), and I figured it would be the same on Android, but turns out, no. Step 1: Add a second image to the XML, and set the visibility to “gone”. This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently…

  • OCMock and Values

    OCMock and Values

    OCMock is mostly great! And I use it a lot! But there’s one problem with it – handling values. I was debugging some asynchronous tests and having this problem, which I assumed at first came from the asynchronicity but it turns out, no, it’s just CGFloat being CGFloat. Clue for this kind of bug is…

  • Launching: Show & Hide

    Launching: Show & Hide

    I launched a thing. You can buy it for your iThing. Please upvote it on ProductHunt. What is the thing? It’s an image processing app. It allows you to make cool, partially colored images. It’s called Show & Hide. The longer and more personal story is: this has been a long term side project for me, and…

  • Technical Interview Questions and Time Management

    Technical Interview Questions and Time Management

    What Makes a Good Technical Interview Question? Three criteria of  a good interview question: Gives a sense of problem-solving and understanding. Explorable and extendable. Deeply understood by the interviewer. Problem Solving and Understanding What does this look like? The problem presented needs to be decomposed into smaller problems in order to be solved. There are…

  • Further Adventures in Android Development

    Further Adventures in Android Development

    I suspect one of my limitations as a programmer is that I don’t hack. I don’t beat away at something until it works. I read things, and I reason about it, and I write a lot of tests. This makes me very effective on platforms I’m familiar with, but I worry I’m as a result…

  • Replacing KIF Tests with XCUI Tests

    Replacing KIF Tests with XCUI Tests

    I thought about doing this in Swift but decided to take this one thing at a time (I haven’t written any Swift yet). My strategy: 1) get tests working and then 2) convert them to Swift. This post focuses on (1). As for what tests to write, I had a full suite of KIF tests…

  • #ghc15: Natasha Murashev – The Zen Guide to WatchOS

    #ghc15: Natasha Murashev – The Zen Guide to WatchOS

    My friend @NatashaTheRobot gave an awesome talk at GHC about WatchOS. I find a lot of tech talks focus on the how, not the why, but she completely inverted it – tying the technical details to the kind of experience you want to create. I’ve been pretty meh on watches (and glasses) because I want fewer…

  • A Brief Rant about TDD

    A Brief Rant about TDD

    I’ve been giving this talk about unit testing UI code lately and of course when you talk about testing, TDD (test driven development) keeps coming up. The question ranges from “have you embraced TDD as the One True Way Of Testing, and if not why not because you’re doing it wrong” and “I have heard that…