Category Archives: code-level

Objective-C literals and subscripts

If you’re using clang from their website instead of sticking with Apple’s release, you get support for Objective-C literals and object subscripting. I thought I’d take the BrowseOverflow app and apply this new syntax to it. Notice that the code … Continue reading

Posted in code-level, OOP | 2 Comments

Class clusters, placeholder objects, value-oriented programming, and all that good stuff.

Have you ever seen this exception in your crash log? 2012-05-29 17:55:37.240 Untitled 2[5084:707] *** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘*** -length only defined for abstract class. Define -[NSPlaceholderString length]!’ What’s that NSPlaceholderString class? Leaving aside NSMutableString … Continue reading

Posted in code-level, Foundation, software-engineering | Comments Off on Class clusters, placeholder objects, value-oriented programming, and all that good stuff.

BrowseOverflow as a Code Kata

This article was originally posted over at InformIT. My goal in writing Test-Driven iOS Development was to take readers from not knowing how to write a test for their iOS apps, to understanding the TDD workflow and how it could … Continue reading

Posted in advancement of the self, books, code-level, TDD, TDiOSD | Comments Off on BrowseOverflow as a Code Kata

Using GNUstep libraries with Xcode

I was recently asked about building projects that use GNUstep from Xcode. The fact is, it’s incredibly easy. By default, GNUstep on Mac OS X installs its libraries to /usr/local/lib and its frameworks to /Library/Frameworks. Therefore if you want to … Continue reading

Posted in code-level, gnustep, tool-support | 1 Comment

Messing about with Clang

I’ve been reading the Smalltalk-80 blue book (pdf) recently, and started to wonder what a Smalltalk style object browser for Objective-C would look like. Not just from the perspective of presenting the information that makes up Objective-C classes in novel … Continue reading

Posted in code-level, Mac, software-engineering, tool-support | 5 Comments

Classes are globals, too

Software engineers are used to the notion that global variables are a bad idea. Globals are usually accessed by asking, not by telling. They introduce tight coupling between any module that uses the global and the one that declares it, … Continue reading

Posted in code-level, software-engineering, TDD | Comments Off on Classes are globals, too

Software-ICs and a component marketplace

In the previous post, I was talking about Object-Oriented Programming, an Evolutionary Approach. What follows is a thought experiment based on that. Chapter 6 of Brad Cox’s book, once he’s finished explaining how ObjC works (and who to buy it … Continue reading

Posted in Business, code-level, OOP | Comments Off on Software-ICs and a component marketplace

Comparing Objective-C and Objective-C with Objective-C

A while back, I wrote an object-oriented dispatch system for Objective-C. It defines only three things: an object type (the BlockObject), a way to create new objects (the BlockConstructor), and a way to message objects (the dispatch mechanism). That’s all … Continue reading

Posted in code-level, OOP, software-engineering | Comments Off on Comparing Objective-C and Objective-C with Objective-C

The debugger of royalty

We’ve all got little libraries of code or scripts that help us with debugging. Often these are for logging information in a particular way, or wrapping logs/tests such that they’re only invoked in Debug builds but not in production. Or … Continue reading

Posted in code-level, iPad, iPhone, Mac, TDiOSD | 11 Comments

TDD and crypto in one place

Well, I suppose if I’ve written two books, it’s about time I wrote a contorted blog post that references both of the worlds. I recently wrote an encryption module for an app, and thought it’d be useful to share something … Continue reading

Posted in code-level, Crypto, TDD | Comments Off on TDD and crypto in one place