It’s been close to 9 months since I picked my 24″ iMac. Despite the initial scare (yes it was bizarre!), things have turned out to be great. Being a dyed-in-the-wool Windows user, I did tinker with Windows Vista inside Bootcamp but there was something alluring about Leopard (aka Mac OS 10.5) which kept pulling me back. Having mastered the OS for daily tasks, and having overcome the muscle memory of 8+12+ (I am older than I thought) years of Windows usage (from Windows 3.11 all the way to Windows Vista), I decided to tackle the next frontier – developing for the Mac.

After several attempts at using cross-platform frameworks (wxWidgets, Mono, GTK) with unsatisfactory results, I started exploring the native Mac development platform. The biggest hurdle here was Objective C. For someone who is coming from a C#/VB.NET/C++ background (with good exposure to PERL/Javascript thrown in), the syntax stumped me. Then I came across Aaron Hillegass’s brilliant Cocoa Programming book some 3 weeks ago, and it has been a smooth sailing ever since. It reminds me so much of my days in college spent learning Win32 and MFC programming.

Today I came up with a small app which I thought I’d share. This builds on the SpeakLine example presented in Aaron’s book. Instead of using a Text Field to take a string from the user, it uses the sample text which comes with each voice profile on the Mac, and says it when you click the Speak button:

My first native Mac app!

The sample text for a lot of voices is hilarious (just like the voices themselves). It is one of the many small things that add up towards making Macs a fun, playful platform.

p.s. The app, the complete XCode 3.1 project.

Electric Monochromatic Rainbow
Hungry Pigeons + Fries = Chaos
  • http://www.janakiramm.net Jani

    Great to see this! I know how it feels when you start something from the scratch. This reminds me of my attempt of learning TCL/TK to target GTK+ on Linux :-) . Happy Coding (on Mac) :-)

    I have serious plans to invest in a Mac by end of this year. When it comes to Objective C, I look forward to your coaching ;-)

  • http://www.deepakg.com/blog/ deepakg

    Thanks Jani!

    A mac will be totally worth the investment! And if you don’t end up being as excited about Mac OS as I am, it can always make for a great Windows machine.

  • Govind

    Deepak,
    Exploring Carbon might be better if you want to keep your c++/c skillset useful as it covers the same grounds as Cocoa, but may be getting deprecated in long term.
    regards
    Govind

  • http://www.deepakg.com/blog/ deepakg

    Actually I’ve gotten over the Obj C “hump”, so I guess I’ll stick to it. Btw Carbon is 32-bit and with Leopard already coming in 64-bit flavor and with rumors of Snow Leopard being 64-bit only, I am not sure if it is a good investment (as you mention, it may be getting deprecated – it already did). Also, there is no Carbon on the iPhone.

    I guess I’ll have the late starter’s advantage and not worry about having a legacy API baggage :)

  • Govind

    for iphone – I am getting – Opne Iphone dev.. :) supposedly good in demystifying the working. Looks like stripped down BSD after all.