The Compiler is Your Friend

Posted on May 30, 2013
Filed under Featured, iOS, Mac, Programming, Talks

Which compiler warnings should I enable for my iOS/Mac app project? How do I enable warnings that Xcode doesn’t have a checkbox for? How do I disable warnings (either completely, for specific files, or in specific sections of code?) Where do I go to find out what warnings are available? How do I enable warnings for my own code, but disable them for third-party code that I compile into my bundle? What about warnings that are triggered in third-party headers?

I did a talk on compiler warnings at the HelsinkiOS/CocoaHeads April 2013 meetup that answers all of the above questions. The slides are available at Speaker Deck, and embedded in this post below.

→   Read more…

Handling NSStrings Like a Boss

Posted on May 28, 2013
Filed under Featured, iOS, Mac, Programming, Talks

Strings are arguably the most common data structures used by practicing programmers. They’re easy to conceptualize as “sequences of characters,” but it’s important to note the leakiness of this abstraction, and to know how (and when) to consider the details of how what we think of as “characters” are represented in modern software.

I did a talk on this topic at the HelsinkiOS/CocoaHeads February 2013 meetup — obviously from the point of view of Apple’s platform APIs. The slides are available at Speaker Deck, and embedded in this post below.

→   Read more…

iOS & OS X Localization Practicum

Posted on May 28, 2013
Filed under Featured, iOS, Mac, Programming, Talks

I did a talk on the localization of iOS and OS X projects at the HelsinkiOS February 2012 meetup. The slides are available at Speaker Deck, and embedded in this post below.

→   Read more…

Use Unicode Emoji as Icons in Native iOS Apps

Posted on April 29, 2012
Filed under Featured, iOS, Programming

A while back, I wrote about using unicode emoji characters as icons in web apps. The big caveat with that was that these characters were only available on iOS devices, which made the trick much less useful in a web app, which of course are generally meant to be more or less cross-platform. If you’re developing a native iOS app, though, using these standard colorful bitmap emoji characters as icons is a much more realistic proposition, because you can be sure that all the devices your app runs on will have them available. In this post I will show how to easily do this.

→   Read more…

jEdit Syntax Highlighting Mode for the Peg/Leg Parser Generator ‘Leg’ Syntax

Posted on April 4, 2011
Filed under jEdit, Programming

jedit icon I’ve been working on a fast and embeddable Markdown parser that can be used for syntax highlighting in editors, based on the PEG grammar from John MacFarlane’s peg-markdown compiler project. The grammar is written in leg, a syntax for the peg/leg parser generator by Ian Piumarta, and to make my work with this new syntax a bit more pleasant I implemented a jEdit mode for it.

→   Read more…

jEdit Macro for Opening the File Browser at Current Buffer’s “Project Root” Directory

Posted on October 13, 2010
Filed under jEdit, Programming, Scripts

When I’m working with code in jEdit, my editor of choice, I like to keep the file browser open and docked to the left side of my editor window. When I’m switching between files — often belonging to different projects — I find myself reaching for the mouse in order to manually navigate the file browser to the root folder of the project the currently open file belongs to. I started doing this so often that I decided to whip up a small macro to do it for me.

Update (April 4, 2011): Set file browser to directory of current buffer if version control root cannot be found.

→   Read more…

Getting Events/Tasks From the OS X Calendar Store in a Custom Format like XML, CSV or LaTeX

Posted on October 13, 2010
Filed under Mac, Programming, Scripts

Over the past couple of years I’ve gotten a few emails from users of icalBuddy who would like to somehow automate the task of generating CSV, XML/HTML or LaTeX output from the items in their calendar. Unfortunately icalBuddy isn’t set up to provide any kind of arbitrary output format (and I didn’t want to re-architect it to do that) but a while ago I finally had the time and motivation to figure out a small solution for this: a Python helper class for writing scripts that produce whatever type of output your heart desires.

→   Read more…

Use Unicode Emoji as Image-Free Icons in iOS Web Apps

Posted on July 20, 2010
Filed under iOS, Programming, Scripts

In version 2.2 of iOS — Apple’s “mobile” operating system used in the iPhone, iPod Touch and iPad — support for Emoji was added. These small 12×12 pixel icons are meant to be used in text messaging in Japan but because they’re implemented simply as unicode symbols in the device they can be used as icons when we know they’re available.

→   Read more…

How to Display Events or Tasks on Your Desktop With icalBuddy

Posted on July 13, 2010
Filed under Featured, Mac, Miscallaneous

icalBuddy, GeekTool, NerdTool icons I don’t really have any statistics about this but I’m quite sure that an overwhelming majority of the users of my icalBuddy program are using it to display calendar data on their desktop via GeekTool. Several tutorials on how to get this done have been written by different people, mainly for relatively non-technical users, which I think is great. The problem seems to be that many people don’t know how to configure icalBuddy to give them the kind of output they’d like and end up copy-pasting the commands from these blogs (some of these blog posts also contain outdated information about a bunch of things). Hopefully this short tutorial (and the usage examples page) will offer an easy way to make a more informed decision about how to get this done.

→   Read more…

Getting a List of Installed Fonts with Flash and Javascript

Posted on July 13, 2010
Filed under ActionScript 3, Flex, Miscallaneous, Programming

When implementing the feature in the icalBuddy examples page where the font used for the output examples could be changed interactively I needed to get a list of all the fonts installed on the current user’s computer. This blog post from 2006 explains how to do it, but it refers to the deprecated ActionScript 2 API so I had to figure out how to do it with AS3.

→   Read more…


Earlier Posts »