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. 🙁

Chipped Tooth

On the way back from the airport after dropping Chee-hoi off, I wanted to open the door in the back of the car to check on Bryan (Grace took Michelle’s car to drop her friend off at SFO), but I opened the door before my face was out of the way, and WHAM! I heard a crack and felt a splash of my front tooth shattering in my mouth. I looked at the mirror — it was chipped like some yahoo’s tooth.

Some luck I am having this year.

Now I am stuck with a fricking upside down Nike logo in my front tooth. I hope that dentist from 1800-dentist is any good…

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]

Inurances in America

Insurance seems to be a big deal in America. The inurance industry makes sure that you understand the consequences of NOT having an insurance (any kind). But seriously, what did people do before the notion of insurance was even conceived?

The insurance industry wants you to have insurance on at least three of the following:

  • life
  • car
  • health
  • home owner’s (or renter’s)
  • business
  • property
  • travel

I am sure I am leaving out a lot more. But the fact is, you don’t really know if that insurance you are paying big bucks for is useful until the day you actually use it. And in America, insurance is sure as hell not cheap. Take for example, health insurance. I paid $500+ a month for Grace and myself at my last job. And that’s after the company paid for half of my own insurance (here’s the math: $125 [me] + $375[Grace]).

In all fairness, hospital visits in the United States are expensive. Having insurance (plus copays) dramatically cuts down the cost those visits would other wise incur on typical visits (just a regular check up costs roughly $700 per visit depending on your doctor, an expensive proposition compared to $25 or so of copyments with healthcare insurance). And that’s not including shots, outpatient visits, toxic waste disposal charges (something like $20 to dispose your saliva, or that needle head the nurse used to poke your arm with).

It’s all a vicious cycle, really. The health insurance wouldn’t be so expensive if the doctor’s visits weren’t so expensive. The doctor’s visits wouldn’t be so expensive if they didn’t have to cough up so much money on their medical (read:malpractice) insurance. And medical/malpractice insurance premiums wouldn’t be so high if there weren’t so many malpractice lawsuits and that if the rewards to those lawsuits werent’ so high (sometimes in millions of dollars). That’s the healthcare industry.

Now apply similar logic to the other insurance types, except maybe replace “lawsuits” with something more relevant, like, highly paid skill workers (in the case of auto shops).

Whoever said insurance is for the rainy days probably didn’t expect the insurance company to give you the round-arounds when you call them. I have had the unfortunate “blessing” to test almost every one of companies I have insured with thus far. And clearly, all insurance companies are not created equal.

For car insurance in the California San Francisco Bay Area, I personally would avoid insuring with Mercury Insurance or Century 21, who make themselves known for saving their customers most money. Yeah, but at what cost? With Mercury, we have had to deal with rude and inefficient case agents in such a way that I even started an Excel spreadsheet to keep track of call logs so that I could later have proof on just how awful its agents were. As for Century 21, it was also pretty taxing on the time and efforts it took to communicate with them. Just the constant repeat of information call after call. It gets to your nerves about the 3rd time you are asked exactly the same question to which you already gave very detailed answers to two times before. I had to do that several times with both companies. It made me feel they were extremely disorganized. Granted each case agent has more than a few cases to handle at any given time, but there’s no excuse in not calling your customers back when you promised to, or that you don’t keep your customers in the loop on what’s going on with your case if more than a couple of days have lapsed. Common sense.

In contrast, when I had to call on Progressive back in Savannah, Georgia for my car problems, they responded immediately. The general feeling was that my case agent was ALWAYS ahead of me on every aspect of my case. I couldn’t vouch that for Mercury or Century 21. The lesson is, cheaper is not always better. Being cheap could cost you more in the end.

Shopping for insurance, especially car insurance, can also be a pain. Companies like Progressive makes the process a little simpler by offering cross-company comparisons for you right from their website. When we had to change insurance companies, Grace called almost all the places and finally narrowed down to between All State and AAA — both very reputable companies. We ended up going with AAA because of the extra perks we get for being AAA members.

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!