Archive for April, 2006

The incredible disappearing, reappearing developer

Monday, April 24th, 2006

You may have noticed I’ve not posted anything to our blog for the past couple of weeks. Unfortunately, my wife’s grandmother died about two weeks ago, and we’ve spent the intervening time preparing for a trip back to the UK (Yorkshire) for the funeral.

Given that we’d already planned a trip back to Northern Ireland for July (and a subsequent trip to Disneyland Paris for the kids), we decided it would be best for my wife just to stay in N.I. until I could come out and join her. At the last moment, she felt very uncomfortable about the whole thing and I’ve ended up coming with her.

The upshot of all this activity is that I’m on leave from my day job, and in Lisburn (that not-so-well-known market village pretending to be a suburb of Belfast). I met up with MJ on Saturday for the first time in almost three years (and he’s not become _that_ fat) and we’ve kicked off the activities necessary to turn infurious into a limited company.

Also, while offline for about two weeks, I started work on our second product, and I’m pleased to say it’s come on very well - to the extent that we may be able to launch it around the same time as SyncBridge (although it has less broad appeal).

Apple and mach.

Tuesday, April 18th, 2006

James Stoup has written a long-winded bit of speculative fiction about how, with the departure of Avi Tevanian from Apple, Mac OS X might be switched to the monolithic Linux kernel.

Of course, xnu, the hybrid kernel used in Mac OS X is derived from the mach microkernel but is not strictly a microkernel and has many monolithic kernel features.

The licensing of the Linux kernel is also a serious stumbling block.

I suppose it would be bad not to give the link of the article so I’ve added it in. Everyone’s a pundit.

What exactly is SyncServices

Tuesday, April 18th, 2006

Easter was a very quiet weekend for many. Certainly the roads were empty and everywhere important was closed. For my part I spent the weekend with the kids and also building a new workshop for the day job so it was busy.

John Welch also posted an article about SyncServices which will help people understand the magic that Aidan has woven - more importantly it may help people with making some feature requests now that we’re accelerating quickly towards release.

Aidan was also talking about his next visit to Northern Ireland which might be sooner than expected which is cool. But more on that when I know more.

CL2

Thursday, April 13th, 2006

Google CL2 was released today and ushered in a new age of fun and frolics for Google critics. Now they not only know what you want (Google Search), they know what you have (Google Desktop), what you buy (Froogle) and where you are (Google Maps) but now when you’re going to be there (Google Calendar). Privacy loons and criminals are again shouting about how this will…uh…be scary and stuff.

Why do I care?

Well, SyncBridge works with calendars of course. Google hasn’t released their API yet but we’ll see what we can do about synchronising it. There’s also not much provision for secure transfers of private calendars in CL2. I’m sure this is all stuff they’ll fix.

Standalone it’s not bad at all. Its pretty - long URLs in public calendars look ugly but that’s a minor niggle. If they get with the program and manage to release an API sometime soon, we’ll work with them

RubyCocoa (and SyncServices)

Tuesday, April 11th, 2006

In case it hasn’t become obvious by now, SyncBridge 1.0 is partially implemented using the RubyCocoa library (for all the usual reasons that one would choose Ruby over Objective-C). I’ve had to wrap the SyncServices API such that Ruby understands it (and I’ll be releasing that very soon as open source - Fuji-san is aware that I’m going to be doing that).

The single biggest issue that I had to debug was in type mismatches. SyncSchemas and Client Descriptions are what SyncServices use for determining what properties need syncing between clients, devices, servers, etc. These properties are specified using fairly generic names (”number”, “array”, “calendar date”) but they map directly to very specific Cocoa foundation types. RubyCocoa handles most of these just fine, but some aren’t quite right.

The two main culprits I’ve found so far are Fixnum and Date. A Fixnum gets translated to an Obj-C NSDecimalNumber, but SyncServices expects an NSNumber. Likewise, a Date becomes an NSDate, but SyncServices expects an NSCalendarDate.

Now for the really annoying part. SyncServices exception handling seems a bit spotty - when I passed a (RubyCocoa-converted) NSDate, it threw me an error that made it easy to see I needed to change the type of the variable (and SyncroSpector allowed me to determine which type). But when I pass an NSDecimalNumber instead of an NSNumber, the SyncServer didn’t throw any warning at all, it just didn’t update correctly (or at least this is the symptom I’m still seeing).

I’ll post more as I get to the bottom of this, possibly with a conversion table/script to make the SyncServices/RubyCocoa wrapper a bit more intuitive to use. It might be that RubyCocoa makes assumptions about types that I can override in the wrapper.

Syncrospector (and show-stopper bugs)

Tuesday, April 11th, 2006

This relates to MJ’s “Almost done” post earlier.

The actual problem was one of poor coincidental timing. I upgraded to 10.4.6, I started using Syncrospector, and I changed some code, all within a few hours of each other.

Syncrospector is a developer tool from Apple which allows great insight into the whole Sync process. I turned on some debugging info when I first started it. I then started running and debugging the code and started getting weird untraceable errors:


ISyncConcreteSession#pushChangesFromRecord:withIdentifier: - NSInvalidArgumentException - *** -[NSProxy forwardInvocation:] called!

failed to save the call history: NSInvalidArgumentException *** -[NSProxy forwardInvocation:] called!

I tried to track down this error, and eventually decided to switch on “Save call history very frequently” in Syncrospector’s preferences. This option comes with a warning about a performance hit of “catastrophic proportions”, which is why I hadn’t turned it on at this point. Sure enough, I got the above error a lot more times. The astute reader will think this obvious, but I hadn’t read the names of the preferences for Syncrospector, just the descriptions of what they did.

Turning off the call history saving made the error go away.

I’ll detail the other show-stopper bug in the next blog post, mostly because the information contained in each of these posts is good search engine fodder.

Turning code into product

Tuesday, April 11th, 2006

Joel Spolsky has a fabbo article on why your software company needs more than just programmers. The rest of a software company is there to support the programmers. It’s there to make sure the most complex stuff they have to worry about is solving the really hard problems they enjoy solving. They’ll get distracted from their mission by a leaky faucet, they’ll lose valuable sleep over P.A.Y.E. and V.A.T., they’ll lose part of their beard when they have to keep track of rent, rates, insurances, etc.

His example of Dolly Parton is a great one. No-one expects Dolly to be able to set up an amp, hawk records to distributors, paste up posters about her next tour. She sings. And we listen. She may not be your cup of tea, but the machine that enables her performance on your iPod is undeniable. As another example, modern armies run at a ratio of 7:1 for support staff: fighting men.

Joel has a list of things he identifies as ways to make programmers productive. Pay attention.

Almost done

Tuesday, April 11th, 2006

Seems we’re almost done.

Aidan warned me about a show-stopper bug or two the other day and me, not being a coder, took it as game over. Then two hours later he tells me he’s sorted it. I’m still unsure where the problem was - something to do with the SyncServices schema or even with the reporting of Synchrospector - something that was tickled by the 10.4.6 update.

But everything is fine now.

On a slightly related subject, Daniel Jalkut has an article on Pride of Ownership as related to software developers being proud of the work they do. He touches on the veil of secrecy at Apple and it’s interesting, reading Scobleizer, how transparent Microsoft seems to be.

We’ve been pretty open so far - I’m standing on the shoulders of giants :)

I’ve not spoken face to face with Aidan in a couple of years and I’m looking forward to it, and not a little nervous about it. I know he’s just going to say “Man, you got fat….”

Develop for PPC AND Intel.

Sunday, April 9th, 2006

One of the biggest problems with the Intel Transition is the possibility of marginalisation of PowerPC-based computers. This didn’t occur much with the transition from MOT 680×0 processors. It took time for applications to be PowerPC-only and there were very few that appeared to be PowerPC-only and completely changed the face of the market.

With the Mac OS X transition, there were immediately a lot of apps that were simply not possible on Mac OS 9. But these were the features that we wanted Mac OS X for and we saw it as “cheap” because it was just software. Nevermind that we had to eventually re-buy most of our software and for some people it was very expensive.

Now we have PPC-based and Intel-based Macs in the channel and we’re seeing all sorts of new software appearing. We have x86 virtualisation from Parallels, statements from VMWare that they will be supporting the Mac, Apple producing Boot Camp software which permits Intel-based Macs to boot into Windows XP.

There will be more and more applications which will be Intel-only. This isn’t a bad thing per se - there were lots of apps that were Mac OS X-only though we didn’t see this as bad with the PPC transition just over a decade ago.

All of this fuels new hardware purchases. It fuels upgrades. Apple loves transitions as a result. What is more evident is that Apple attracts people who enjoy having the latest and greatest. Intel has said they enjoy working with Apple because even with 5% of the market, Apple customers buy new hardware. Look at the sales of Intel-based machines. They’re flying out the door. I’m looking forward to the Apple Earnings Conference Call on April 19th. We’ll know then how many have shipped. And I’l bet that just after that, we’ll see the replacement for the iBook.

It is important for developers to target the PPC market as well. For the last 5 years, Apple has been selling between 3-4 million computers a year, all running Mac OS X. Ignoring upgrade customers, that’s a market of nearly 20 million computers and, unlike the Windows market, very few of them are dumb terminals, cash registers, automated teller machines and word processing appliances. In comparison, the Intel Mac market is going to be a twentieth of the size this quarter. It’ll increase quickly but we’ll see growth limited by demand for the chips. I’d love to see figures for Intel shipping their Core Solo/Duo chip range to find out what percentage of their Core business is going to Apple. Just like it will be interesting to see the adoption of their next-generation dual-core/quad-core/64-bit chips.

Anyway, it’s Sunday morning. I need to get out of bed

Apps I use

Wednesday, April 5th, 2006

This post comes about for two reasons:

1) My MacBook Pro arrived (yay!)
2) Mike (among others) in work has installed OS X on his Intel laptop.

So here is the list of apps I use every day, and ones that I use frequently enough to always have available (in no particular order).

Everything else either comes with the OS, or is very specific to my work (e.g. Subversion, Eclipse)

If you’re a Mac user, leave a comment or a trackback about what apps you use.