I’m really happy to be able to say that TouchCode won the “Best Open Source Project” at iPhoneDevCamp this weekend. The prize was a gift certificate for an iPhone 3G (a big thank you to Apple Phone Show for sponsoring this award). Very awesome.
While it was really gratifying to be recognised by the judges of the competition, it was even more gratifying to see portions of TouchCode in use by the some of other winning contestants. The Taxi application in particular stood out as a great use-case for TouchJSON and I really expect Taxi to sell like hot cakes when it gets uploaded to the AppStore.
I had a great time talking to other iPhoneDevCamp attendees, some of which wanted to thank me for parts of TouchCode. Other attendees were interested in the project and I relished the chance to tell them all about. Hopefully I’ll be able to add more projects to my “who uses TouchCode” blog post.
Tags:iPhone·iPhoneDevCamp·Open Source·touchcode
I’m at iPhoneDevCamp and am entering all three of my TouchCode libaries (TouchJSON, TouchXML and TouchSQL) into the development contest.
This is a great chance for consumers of these three libraries to show their appreciation by voting for them on iUseThis.com. Please go to the tag page iUseThis.com and mark the libraries you use (or plan on using, or just really dig then).
As you can see there are a few well known users of TouchCode already. I know of a few other well known apps that use TouchCode but for various reasons have not been able to comment in that post.
Thanks!
Vote here: http://iphone.iusethis.com/tag/touchcode
Tags:iPhoneDevCamp·TouchCode iPhone

Online friend Seth Dillingham this weekend is “riding across the state of Massachusetts in the PMC, along with about 5500 other riders. Riding the bike for 300 miles is the easy part. The real challenge is meeting my $10,000 goal for this cancer-care-and-treatment charity.”
Much like Mike Zornek’s Child’s Play Day auction back in 2006 Seth is asking for Indie software developers to donate licenses of their software to him. Seth will then auction off the software on ebay to help raise $10,000 for the charity.
I’m leaving it a little late to blog about this event, and I’m sure most of the indie developers already know about the event (there are 126 applications already donated right now) but any more eyeballs I can send Seth’s way would be appreciated.
Even if you’re a developer you can help by donating directly (follow link here) or by buying the donated software when it is auctioned, see Seth’s blog for more information.
Tags:seth pmc charity software auction
My former co-worker and good friend Raven Zachary is hosting the second iPhoneDevCamp event in San Francisco this weekend. I’m making the trip out to be there. Should be fun. My contact info is still in place from WWDC.
Tags:iPhoneDevCamp
TouchCode is my iPhone Open Source umbrella project encompassing a bunch of technologies that for various reasons Apple decided not to include with Cocoa Touch.
TouchCode is made up of:
TouchXML - A document tree XML library with XPath support (based on Cocoa’s NSXMLDocument)
TouchJSON - An extremely fast and memory efficient library for processing and creating JSON data.
TouchSQL - Yet another Objective-C lightweight sqlite wrapper.
I’m going to be adding more sub-projects to TouchCode now that the iPhone developer NDA seems to be lifted. But I’m curious, how many applications on the appstore are using parts of TouchCode? I know of a handful of applications using parts of TouchCode but would like to find out about the rest.
If you use any part of TouchCode in an iPhone application that is either on or about to uploaded to the AppStore I would love to know about it. Please feel free to email me (schwa at this domain) the name of the application and what parts of TouchCode you use, or add a comment to this blog post.
Tags:TouchCode iPhone
Anne at random non sequitur tagged me to write up a “How I got started programming” blog post. I don’t normally do this kind of thing, but I was very flattered to be included in her list of bloggers tagged and Anne is a really nice person, so I thought what the heck…
How old were you when you started programming?
About 10. My teacher in Middle School hauled out a Sinclair ZX-80 hooked up to a black & white TV and we entered a very simple BASIC program. This was probably the first time I had ever touched a real computer in my life. I also remember arguing with my classmates about how to enter the program using the ZX-80’s symbol based keyboard, I was obviously a big proponent of egoless programming even then.
How did you get started in programming?
No Apple II here! My parents bought me a ZX-81 in 1981/1982 into which I faithfully typed programs from magazines and books. I ended up doing a lot of tweaking of these programs. First trying to shrink the larger, more complex programs into my meagre 1KB of RAM (later on I got a 16KB RAM pack!). And then changing the gameplay and adding features. This soon evolved into writing my own simple games. I remember writing little text based lunar lander games which then evolved into text based flight sims (no, really). I also had great fun writing some rather complex Kingdom/Hammuribi style games (one of which, running on an Amstrad PCW word processor became rather huge and involved and was probably several thousand lines of CP/M pascal).
What was your first language?
Sinclair Basic. I was a big Sinclair fan, going from ZX-81 to ZX-Spectrum+ to ZX-Spectrum 128. Fortunately I skipped the QL and the C5.
What was the first real program you wrote?
The first real program that I wrote for other people’s consumption was a tool for finding the distance between two points on a map of the United Kingdom. I guess I’ve been writing geographical based programs for a really really long time now. This was my O-Level project at Secondary and was written on the BBC Model B computer. I wonder what kids do for their final year projects in GCSEs now in the UK, program full games written in C++ with OpenGL?
What languages have you used since you started programming?
In chronological order: Sinclair Basic, Acorn Basic (it had procedures!) Z-80 Assembly (without an assembler I might add, I would translate the program into hex by hand. Slow and tedious.), LISP, COBOL (on VAX VMS and then SCO Xenix box), Pascal (many varieties), 68K Assembly, ADA, C, C++, Python, Objective-C. And lots more that I either can’t remember, didn’t get much beyond “hello world” level competency, have been trying go forget or don’t really qualify as a language (javascript! snark).
If there is one thing you learned along the way that you would tell new developers, what would it be?
Oh god. How about this? Kind of like how travel is said to broaden the mind, I think learning (or at least dabbling) in a lot of different languages broadens a developer’s mind. Even if you don’t end up writing software in a new language it will at least change your perspective a little and stop you from getting stuck in a single language rut.
What’s the most fun you’ve ever had programming?
Not sure there’s a single most fun moment. And if there is, it would be due to the people I was working with, or the situation and so on. I have a lot of great stories about the 15+ years I’ve been doing this professionally, but that’s the kind of thing that needs telling over a beer. I do find programming to (generally) be one of the most fun things I can do. External factors aside, I always get a kick out of programming, there’s something about it that just nourishes my mind. So it’s always fun, or at least engaging.
Tags:
Off to WWDC in a few hours. I’ve updated my contact page with my mobile phone number in case anyone wants to get ahold of me directly.
I’m going to try attending most of the events conveniently compiled here by iPhoneDevCamp. Hope to see to see you there.
Tags:2008·Event·iPhone·wwdc
I don’t need to say too much about the iPhone and the newly released SDK. I have however created a Google source code repository for iPhone/Cocoa Touch related projects.
So far I’ve added three projects to the repository:
TouchXML: A Foundation NSXML style API for parsing XML files (based on libxml2)
TouchSQL: Yet another library for talking to sqlite databases. This is actually old code that I’m bringing up to date for 10.5, the iPhone and objc-2.0
TouchJSON: My [CocoaJSON] project brought up to date.
I’m trying to add Unit Tests and documentation to all three projects so they’ll be suitable for public consumption.
Tim Burks has also graciously added nu makefiles and unit tests for each project too. Thanks Tim.
Oh and…
Yes I am potentially interested in iPhone related consulting work. jwight@mac.com
Tags:iPhone·nu·Open Source·sqlite·touchcode·touchxml
It was just your typical InterfaceBuilder 3 window…

with your vanilla NSImageView…

referring to an image file within an Xcode project…

Holy Cow! An Acorn file? Does that mean I can use Acorn files directly in Interface Builder 3? Does that mean you’ve written an NSCustomImageRep that understands the Acorn file format? Does that mean I can use Acorn files directly in my Cocoa projects? And that means I no longer have to keep exporting these bloody files as pngs so I can use them in Cocoa, right? Will this give rixstep some ammunition to go apeshit insane about?
Yes! Yes!! Yes!!! Yes!!!! Yes!!!!! Almost certainly.
Not only does Gus Mueller generously provide details about the Acorn file format, he has even released the source code to his Acorn Quicklook plugin. This gives me everything I need to convince NSImage to load Acorn files.
You might well be asking yourself why. I was getting annoyed with having to constantly keep exporting original Acorn images as pngs or TIFFs so I could use them in Xcode. I’m prototyping a new application that uses a lot of custom UI elements. These elements are made up of one or more pngs, some of which needed a lot of tweaking and attention to detail to get right. Acorn is perfect for UI work (although it needs more than 2000% zoom! cough) but having to export as png (or another format that Cocoa understands natively) and manage two sets of images (original Acorn, exported png) was turning into a pain.
I’ve taken Gus’ QuickLook code and wrapped a small NSCustomImageRep around it. Very small. I’ve repackaged it up as a Framework so you can refer to it from an Interface Builder 3 plugin. This gives you the ability to do this:
[NSImage imageNamed:@"IAmAnAcornFile"];
You should be able to use Acorn files anywhere an NSImage is used. Just embed your Acorn files in your XCode project resources and refer to them by name in your NIBs or in code.
I’ve put the code on my public googlecode.com subversion repository.
I’m currently on the fence about whether it is a good idea or not to ship your application with Acorn images. It certainly makes sense to me to use them during the interface design stage of application development. Once the user interface churn settles down I should be able to finalize the images and convert them to pngs or whatever (keeping the originals of course).
A best of both worlds solution might be to make a little command line tool that can convert Acorn files:
#!/usr/bin/python
from AcornImage import *
# Everything else is an exercise for the reader.
And then automatically convert from Acorn to whatever during the Xcode build process. I might investigate this technique at a later date. But for now - have at it.
Tags:Acorn·Cocoa·Flying Meat·gus mueller has a posse·Source Code
I’ve taken the plunge and am in the middle of switching from Subversion to Mercurial for revision control. Subversion has served me relatively faithfully for many years (I’ve even championed/led the adoption of subversion at two companies I’ve worked for in the past) but some of the warts and shortcomings were beginning to annoy me (. directories everywhere for example). Dave Dribin’s series of posts about the Mercurial DVCS software piqued my interest and I was soon switching repositories to hg.
One feature that added recently that hg lacked was the ability to store repository passwords in the Mac OS X keychain. In fact mercurial lacks the ability to store a repository password anywhere other than in the url used to access the repository (i.e. http://user:password@example.com/path). I think this is a bit of security flaw. The password is stored as plain text within the repository config file (’.hg/hgrc’) file.
Fortunately Mercurial provides a simple interface for extension modules. After a little bit of hacking I was able to write an hg extension that stores and retrieves the password from the keychain. I’ve put the code online for anyone to use. hgkeychain:
And yes the source code is currently hosted in a Subversion repository :-) I did mention I’m in the middle of transitioning to Mercurial didn’t I?
Tags:hg·Mac OS X·mercurial·Python·rcs·sourc code