Rick's Random Ramblings

Month

September 2010

2 posts

Operating System Competition

I grew up with PCs.  So much so, that I remember at one point thinking motherboards came with DOS installed on them (shut up, I was young! :P).  By the time I became really interested in software the OS wars were largely over, and Windows was the winner.  I knew that Macs were different, and always assumed they were inferior.  I was perfectly happy with my “re-format every 30 days” system, writing little apps in Visual Basic.  

Then one day my world was rocked.  I was shown something different, a world I didn’t know.  Linux.  Well.. a mostly booting Linux system that would launch X11 then just hang, as was typical back in the day (gotta put something in ~/.xinitrc, yaknow).  That gray/white checkered pattern and its weird cursor.  It’ll haunt me forever.  I wanted to learn everything about this thing.  The fact that a PC could run something other than an OS provided by Microsoft was a new concept to me.  It took me weeks to get the thing to install correctly on my PC so that I could really play around and learn.  Whoever wrote those early Linux (Red Hat in this case) installers should be taken out back for torturing users the way it did.

While exploring Linux I discovered other operating systems, like Solaris, BeOS, QNX, and then the hobby OS world with awesome projects like V2_OS, SkyOS, Unununium (which I worked heavily on), MenuetOS, AROS, etc…  This was well before OS X was released.  I remember reading about NeXTSTEP, and how consistent the raving was : this thing was amazing, but the company never made money.  I never got BeOS running on any of my systems, not for lack of trying, the thing just didn’t like me and my machines.  But it was undeniably incredibly cool, again the company had trouble making money with the thing (understandably).  And QNX always seemed to be a pet project or dev kit intro for developers, they clearly had no real interest in trying to get the mass market, even though they had an amazingly easy to use and rock solid OS.

The war was over when I got there.  Though I likely argued more than a few times that Linux was going to take over Windows on the desktop, it was pretty clear that it would take something pretty big to bring MS down.  Eventually I switched to OS X (oddly enough, for the PowerPC, I hated Intel _that_ much), and discovered how truly awesome that NeXT stuff was via Cocoa.  But I always felt cheated out of experiencing the days of multiple operating systems fighting and constantly one-upping each other.  

I think I’m finally getting a second chance at this.  The smartphone and tablet space is becoming a very exciting area for OS development with a lot of interesting players.  Apple’s got iOS (NeXTSTEP for handhelds).  Palm had WebOS, which seemed pretty cool, but that wasn’t doing too well.  Now that HP has bought them, there seems to be hope that we’ll see more WebOS devices.  Google and its partners have Android, which so far has been rather lame due to carriers doing what they do best: screwing over their customers.  But that’s not Android’s fault, and I’m confident that sooner or later we’ll see really good Android devices.  Microsoft finally went back to the drawing board before creating Windows Phone 7 and that could be interesting.  And now RIM has started showing off their first device running QNX since they bought the company behind it, and that’s looking pretty slick.  

We’re at an interesting point in time for those devices.  The barrier of entry for a new operating system is relatively low.  iOS users will surely laugh at Windows Phone 7 users about the fact that the first version won’t have copy/paste, but that’s OK.  I lived a few years without copy/paste on my iPhone and I didn’t die of embarrassment.  With web apps being as strong and popular as they are, someone who makes an OS that does little more than load up a quality browser has a real chance at success (Hello Google ChromeOS).

As a developer, all of this excites me.  It means companies are trying new things, they’re coming up with new development toolkits for developers.  And I really hope that this time there isn’t one winner, but a whole group of companies that can each have a chunk of the market.  This way we can make document formats king, and not the apps that produce them.  Giving users more flexibility in what device or apps they use.

For the first time in a very long time, I’m truly excited to see where operating systems go.

Sep 28, 20102 notes
Pretroducing... MapKit for Mac

I’ve been spending bits of time over the last few months working on a little project that I’ve not told too many people about.  I’m finally at a point where I’m ready to talk about it and start showing it.  I’ve been working on a clean-room re-implementation of iOS’s MapKit, but for Mac OS X.

What’s MapKit?

MapKit is a framework Apple provides with iOS that gives developers tools to easily make map based applications.  It powers the Maps application, and just about every app that includes a map on iPhone/iPad.  It integrates with Location Services to show where the user is, and can easily add pins to the map.  It can do a lot more than that, but that’s the basics.

What do I mean by clean-room reimplementation?

I looked at the documentation available for the MapKit framework, and built a set of classes with the same names, methods, properties, etc that should work nearly identically to Apple’s MK* classes (it should be source-compatible).  I’ve never worked at Apple, nor do I know any developers there, so I’ve never seen how they actually implemented MapKit.  I have suspicions that mine is built quite differently than theirs though, judging by some of the issues that came up during development.  

Why did I build this?

In an Mac app I’m building I wanted a Map view, and so I started exploring what kind of interaction I could get out of Google Maps and my ObjC code.  Turns out I could get a lot.  I quickly realized that to make this map view, I’d end up recreating about half of MapKit, so I thought “if I’m going to do half of it, I might as well do it all, and see if I can release that separately.”

What’s done so far?

The vast majority of it.  All classes are there, most of them are 100% functional.  All I can think of that I’m missing are the left/right accessory views on MKAnnotationView callouts, and a few delegate methods on MKMapView never get called (I can’t decide when to call mapViewWillStartLoadingMap: and friends).  I have an IBPlugin for it to make it nice and easy to use.  

What’s the plan?

My plan is to release this as BSD licensed code.  I’m hoping that other developers can make us of it…but my intention is to have this Mac app I’m working on be the first released app with it included.  At that point I’ll be making the code available, likely on GitHub for public consumption.  If you’d like access to it before then (end of year), give me a shout.

Can I… can I see it?

Sure, why not.  I recorded a quick little screen cast of it in action.  Have a look.

Technical Information

It’s based on a WebView and Google Maps V3.  It makes very heavy use of the Objective-C to Javascript scripting bridge that exists with WebKit.  Google Maps doesn’t let annotations be draggable, so my annotations are actually a mix of overlays and annotations together.  Annotation callouts are drawn using a canvas, and all animations you see are WebKit CSS animations.

Sep 16, 20101 note
Next page →
2011 2012
  • January
  • February
  • March 1
  • April 1
  • May
  • June
  • July
  • August 1
  • September 1
  • October
  • November
  • December
2010 2011 2012
  • January 3
  • February 2
  • March 1
  • April
  • May 1
  • June 2
  • July 1
  • August 1
  • September
  • October
  • November
  • December 1
2009 2010 2011
  • January 7
  • February 3
  • March 2
  • April 5
  • May 1
  • June 1
  • July 1
  • August
  • September 2
  • October 1
  • November 1
  • December
2009 2010
  • January
  • February
  • March
  • April
  • May
  • June
  • July
  • August
  • September 4
  • October 3
  • November
  • December 1