Programming on OSX with Objective-C

Slashdot effect takes center stage again as geeks from all over the world discuss Apple’s Xcode and Objective-C (a variant of C; a quick and dirty how-to here).

It all started with a simple email exchange between one programmer with Steve Jobs:

From: Nitesh Dhanjani
Subject: Re: Will XCode+ObjC ever suck less?
Date: December 25, 2005 5:27:02 PM CST
To: *****@apple.com

I look forward to the improvements! Thanks,

Nitesh.

On Dec 25, 2005, at 5:10 PM, Steve Jobs wrote:

I guess we disagree. First of all, .NET with CLI and managed code runs SLOW, so most serious developers can’t use it because of performance. Second, the libraries in C# are FAR less mature and elegant than those in Cocoa. We are working on a better implementation for garbage collection than we’ve seen out there so far, but in the end its a performance hit and an unpredictable time that is not good for some kinds of apps.

Steve

On Dec 25, 2005, at 2:36 PM, Nitesh Dhanjani wrote:

Objective C is old and clunky. Its almost 2006, and I _still_ have to look out for yucky pointers? I’d love to be able to write native apps with Ruby (or even C#!.) There are open community projects in progress that are trying to bind ruby and C# (mono) with Cocoa, but I’d love for Apple to step in and make this happen faster. Today, Microsoft seems to be _way_ ahead of the development curve – with their .NET implementation, you are allowed to code using a plethora of languages (C#, Python, VB, etc), as long as the interpreter/compiler follows the IL specification – pointers don’t matter, garbage collection is done for you – ah the beautiful world of managed code.

Having said that, most native OSX apps are still beautiful and well designed. Imagine how much better we could do if the developers had a more flexible choice of languages? I can _bet_ you a lot of OSX app developers use Objective C because they have no other choice.

Nitesh.

On Dec 25, 2005, at 3:11 PM, Steve Jobs wrote:

Actually, Objective C is pretty great. Its far nicer than most other ways of writing apps. What don’t you like about it? What do you like better?

Steve

On Dec 25, 2005, at 11:59 AM, Nitesh Dhanjani wrote:

Hi Steve

Will it ever be easy to write native OSX GUI apps? Objective C sucks.

Thanks,
Nitesh.

More geeks talking about it here.

It’s been said that Steve Jobs has a team of secretaries that comb through all his emails on a daily basis. I guess he ain’t taking chances on important messages. But it’s gratifying to see Jobs himself working on Christmas day having replied to this Nitesh guy several times throughout the day. Impressive stuff. Being a geek, a perfectionist and a workaholic at the same time can pay off sometimes.

Dead Printer

Jason and Alicia had an old all-in-one HP OfficeJet G55xi printer. It was retired because Jason couldn’t figure out why it wouldn’t power up.

After inheriting it from Jason, I Googled around and found very little information on it, mainly probably because the printer didn’t really have any issues. The only information I found pointed me to replacing a part on the printer from gray market (and that source was at least a couple of years old).

Not settling with Google search results, I asked Chee-hoi, the electric engineering and DIY wizard, to at least test the power supply so that I could rule out one variable at a time. But it turned out that the power supply was in perfect working condition. He then took apart the printer in hope to identify maybe a faulty component. He said if we could locate what was damaged (most likely the power regulator of some sort), I could’ve bought a replacement chip and have someone solder it back on, and the printer may work just fine. But HP took the precaution of using very tiny specialized screws that Chee-hoi didn’t have the driver for. So we gave up.

I think I am going to post it on Craigslist to see if some other geek wants it for free.

Sorry, Harlows. I tried. πŸ™

Engine Problems

I have been on a streak of bad luck this year. And it hasn’t stopped.

Last night after picking up Grace’s friend (who is a flight attendant stopping over SFO for two days) from her airport hotel, I started to notice the car rattling violently (relatively speaking) as the “check engine” light came on. I said to myself, “GOD! WHAT NOW!“.

Annoyed with fear for bad news, I drove the car to the Precision Tune AutoCare shop I normally go for oil change. But of course, it’s the day before Christmas, it’s closed. Luckily I had one of their coupons and found another one on El Camino (run by an Indian who hired an all-Indian mechanics staff).

After almost two hours of computer diagnostics and testing on the car, they determined it was a “code 51” — fuel injector gone bad. I paid $70 (would have been $90 without the coupon) to find out that I have to pay more to fix it. Later another customer, who was waiting for his oil change, told me that I should’ve brought my car to AAMCO where they do engine diagnostics for, get this, FREE. BASTARDS! The same guy also told me that Jiffy Lube always tops off all of your other fluids when you get your oil and filter changed there. Precision Tune charges for that! ARGH!

Back to the fuel injector… The Indian owner told me it’d take about six hours (a.k.a. whole day) to change the injector. And the break down of the cost is:

Fuel injector: $126.95 (that’s only ONE out of the six cylinders)
Labor: $450 (estimate only)

He also said that Infiniti recommends replacing all 6 injectors, which brings the total up to roughly $1,200 – $1,400!!! ARGH! But he did say most people only replace the malfunctioning one to save some money.

Chinese has a saying: “It will rain for days just when you have a cracked ceiling.” This is certainly true for me this year.

I called AAMCO when I got home. And sure enough, FREE engine diagnostics. A 70-dollar-lesson for me today.

I am taking my poor car in on Wednesday and getting a second opinion on the cost and the repair. Hopefully they won’t find other problems when they open up the engine. Both the Indian owner at Precision Tune and “Rick” at AAMCO told me that fuel injector seems to be a common cause of engine problems on Nissan cars (which Infiniti technically is). The Indian guy went further to state that his shop has never changed a single injector on any Ford, Toyota or Honda cars, but plenty on Nissans and Infinitis.

Guess why Toyota and Honda are among the best selling cars in the world…. ?

This experience reminds me why I became obsessed with certain things, namely computers — it costs for not knowing.

πŸ™

Craziest Computer Mods

I don’t build PCs anymore (ah~ good old days… NOT). But this reminds me of the sleepless days of installing Windows NT on various hand-built PCs. I hated Windows NT with passion. But thanks to Microsoft (and lack of documented compatibilities in the NT days), I also became pretty damn good with Windows systems administration in general.

via [Slashdot]

One of Every Apple Newton Ever Made for Sale

Murdza tipped me off on this eBay auction. The auction is for one of every Apple Newton ever made. Apparently it’s a “Newton Museum” going out of business sale. πŸ™

In case the auction ends when you read this blog entry, a screen shot can be found here (~1MB).

The auction brought back the good old days when Newton was still for sale. Critics said that the Newton was too bulky, heavy and ahead of its time. Well, they are right on all of the points. It was in the market at least two years before anyone even heard of Palm or Windows CE (Microsoft, again, was really late to the game). I owned one and swore by Newton’s hand writing recognition capabilities. Knowing how geeky I am, some people often wondered how come I don’t have an electronic organizer like a Palm… I used one a few years ago, and the hand writing recognition system on both the Palm and Windows CE were just so poor that I gave up trying to own one (and this was a few years after Newton was discontinued).

Apple eMate

Apple Newton MessagePad 2100

Apple was among the first company to have made digital cameras back in the mid 1990s (Apple QuickTake). I also remember seeing an Apple CD player. Before Kyung left for New York, he even gave me his Apple speakers! And of course, this was back in the days when Apple tried making Pippin game console, interactive tv set top box, Macintosh TV and a few other things. Sometimes being ahead of the time and too creative just doesn’t pay.

Good thing for us Mac heads. Steve is back at the helm now.

Name That Tune!

If you are anything like me with the music (who knows very little about), you will appreciate the convenience of being able to know what song is being played on the radio at all times, that is, if you are listening on your Mac or PC.

Name that tune with Tunatic

Tunatic is a tiny software that is capable of identifying pretty much any modern song within seconds of listening to it. It analyzes the music that’s being played, compare the data with a server and fetches the name of the song and the artist. The downside of this software is that it relies on the speaker of the computer (I guess that can be the upside if you are listening to the conventional radio). That means if you speak when it samples the music, it will take your voice into consideration… not good.

All in all, this little app has been able to identify most of the music I threw at it (nothing fancy though; it failed to identify non-English songs as well as Jazz). Another application the company makes is Tunalyzer, which is an app that sits in the background and analyzes everything in your music folder and sends the meta data back to the database that Tunatic uses. The idea is to sample as much music as possible with the right tags that people give to their music.

iTunes Faces Open Source Challenge

iTunes has been dominating the mp3 market in terms of legal music download service. On top of that, I personally also believe that its by far the best music organizing application than most of the software out there. But a new open source challenger just showed up in the scene — SongBird Media Player.

It sports an interface that looks just like iTunes (what isn’t?). But it also includes a few features that’s lacking in iTunes, for good reasons.

SongBird screen shot

Apple Address Book Woes

I have always been a big advocate for Apple’s technologies. But one thing has really annoyed me about Apple’s Address Book. Its import and export utility is simply not well written to import from popular address books used by other companies.

When I was working on PCs, I have always used Yahoo’s Intellisync utility to synchronize contacts between Microsoft Outlook and my address book on Yahoo. The utility works so seamlessly that I’d be happy to pay an annual subscription fee just for that feature. But when I completed dumped Windows and started using my PowerBook full time, I started to experience nightmares trying to keep address books in sync between my cell phone, Yahoo address book and Apple Address Book.

For starters, I’ve always used Yahoo as my master calendar and address book center. Whatever updates I make, I always make it on the master list first. but there are times when I just don’t have access to the web! That’s when things start to get out of sync. To Yahoo’s credit, it exports to several different formats no problem (except when dealing with Chinese characters, which is a complete mess). The problem starts when Apple’s Address Book import utility falls short on its promise.

When importing LDIF files that was exported from Yahoo (which is the most perfect format in that I can finesse the Chinese characters so that they show up correctly), Apple gets it almost right except that it labeled everything as “work” by default. I simply can’t find a way to change that default setting. It’s annoying as hell.

As for importing csv files, first of all, Yahoo messes up the export with garbage Chinese characters. Then upon importing to Address Book, Apple messes up the field mappings, making only a few things match up. I tried once correcting all the mappings, and then Address Book crashed. God damn stupid Apple!

The same goes to Apple’s iCal, its own calendaring software. I so wish it can work seamlessly with Yahoo’s calendar, which has been working just the way I want it to. Apple’s iCal, on the other hand, prints awful, lacks some key features I need (which I use all the time with Yahoo calendar) and doesn’t really sync with anything else.

I guess the point of what Apple’s doing is simple — it wants everyone to use its paid subscription .Mac service. It’s a great service except that I already have a great server that meets all my hosting and emailing needs. Plus at $99 a year (or $179 for a family subscription with up to 4 accounts), I can’t really justify using it simply for calendaring and address book syncing.

I guess I should try using Mozilla Foundation’s ThunderBird and see how that really fares. At least with open source software, everything gets updated much faster. It will take another major OS upgrade for Apple to introduce the next major version of Mail and Address Book. And for me, I am getting increasingly frustrated with both apps. Love live open source!

Reclaim Memory from Firefox

I still keep an eye on the browsers, even though now I have 1GB of RAM installed, for their memory leaks. Firefox and Safari are nortorious for leaking memory when too many tabs are open for too long. But thanks to this blog, there’s now a way to reclaim unused memory space back from Firefox:

If you minimize Firefox, it will (automagically) reclaim memory that itÒ€ℒs no longer using.

IT WORKS! Firefox was using 180+MB of RAM even though only 3 tabs were open at the time. By simply minimizing the window, the memory usage went down to just above 110MB. Nuts.

But seriously, a browser that requires 100+MB of RAM to run is just crazy. When Firefox is first launched, it only takes about 85MB of RAM. It creeps up as more and more tabs are opened/closed… etc. And the longer you run Firefox in one shot straight, the more memory it will take up over time. The same issue applies to Safari. But at least now there’s a work around for Firefox.

Damn you, Apple Safari team.

Apple Could Become More Valuable than Microsoft

Um, right… But thanks anyway, Murdza.

Excerpt from this article:

Cody Willard is the manager of a hedge fund and the author of the Telecom Connection, an investment newsletter. He is also a headliner on TheStreet.com, writes for Razor Magazine, VON Magazine and the Financial Times, is a frequent featured guest on CNBC and has been quoted in many publications, including the New York Post and the Hollywood Reporter.

Willard writes for TheStreet.com, “with Apple having blown by Oracle in market cap already, I wonder how much longer before it catches Cisco. Then Intel. Then Microsoft? Let me go ahead and be the one to throw it out there first: I wouldn’t be shocked to see Apple more valuable than Microsoft sometime in 2007. What a mind-blowing thing to think to ponder.”

“Apple’s market cap has gone from $6 billion to $60 billion in the past two and a half years. Can it keep running? If the company delivers the growth it looks like it will: heck yes it can keep running. I’m sticking with it, although I have trimmed the exposure in the past few weeks, as I’ve noted on the site.”

Some stats according to MacDaily News:

Apple’s market value is currently $59,888,758,930, thanks to recent profit-taking. Dell’s, for one example we’re keeping a very close eye on in relation to Apple for obvious reasons, is currently $78,182,273,298. Microsoft’s current market value stands at $287,850,410,220.

Underdogs can always dream of being the top dog.