Categories
Programming

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 […]

Categories
Programming

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 […]

Categories
mobile WISE women in computer science

Communities @ GHC

One complaint that I heard a bunch last year – and levelled myself – was that it was so student focused there wasn’t a lot for mid-career women. But last night I went to two events that were really different from other events I’ve attended before at GHC! So exciting. First was Munchies, Mojitos & Making […]

Categories
Programming

Refactoring and Legacy Code

The first iOS project I worked on was a big mess that shipped without unit tests. It was a project that had had a number of different directions taken from a product perspective… and the code was like an archeological record of them. Since then I’ve worked on various things, most of which have been greenfield […]

Categories
Programming

iOS: Getting a Thumbnail for a Video

Between various things being deprecated, and the new Photos framework (which looks cool but seemed a bit heavyweight for this purpose) finding this took me a while! When the image picker returns with a video it has a url in info[UIImagePickerControllerMediaURL]. Then we can use AVAsset and AVAssetGenerator to get a thumbnail. // Gets the asset – […]

Categories
Programming

Unit Testing on iOS

Historically, there hasn’t been a lot of testing done on iOS, and we see the results of that every day—regressions, crashes, consistently reproducible failures. As we build more complex applications, manual testing takes more and more time and automated testing becomes increasingly necessary. The biggest challenge of testing on iOS starts at the UIViewController with […]

Categories
mobile Programming

Launching! iOS Unit Testing: Beyond the Model

I’m super excited to release something that I’ve been working on for a while. Unit testing on iOS is… not common. And part of the problem is that people don’t know where to start. It can be overwhelming. Building on my years of experience leading iOS apps with over 80% test coverage, including at Google, […]

Categories
mobile Programming

Cross-Platform Development Decisions

I’ve started to port Show and Hide to Android. There’s still a lot to do, but I hit a milestone of having it working end to end on the emulator last week, which was exciting. One of my friends asked if I was using any libraries to make it easier, and the short answer is no. But […]

Categories
Programming

Some Things I’ve Learned About Performance on iOS

Filed under “things I didn’t realise anyone else would find useful”. The Hybrid App The second iOS app I worked on was a hybrid app, and I became a master of the UIWebView. It looked native. But it didn’t quite feel native because… performance. We had a bridge that connected the iOS to the Javascript […]

Categories
mobile Programming

Creating Test Images and Comparing UIImages

I’ve been working on this app which relates to my obsession with color. It’s an image processing app, and you can see some pictures made with it on our Tumblr. This involved learning about how to take images apart and put them back together, rewriting a lot of stuff in C for performance, etc. But […]