Forgot your password?

typodupeerror
OS X

Journal: Is your company new to the Mac or the iPhone? 1

Journal by jcr

1) Mac users are highly sensitive to the quality of your products' user experience. What this means is, go native or don't bother. Even though Google Earth and Photoshop are rife with UI atrocities, don't imagine that you can get away with ignoring the rules like they can. They're 500-pound Gorillas, and you're not. If you are Google or Adobe, get with the program and write a Cocoa UI, already. It's about time.

2) The native language for the Mac and the iPhone is Objective-C. Get used to it; it's not hard to learn. Any developer familiar with C should be able to learn Objective-C in a day, and be an Objective-C language lawyer within a week if he cares to. Yes, there are Ruby, Python, and other bridges you can use, and they work just fine, but limit this to integrating existing libraries with your apps. DO NOT try to use the bridges as a way to avoid learning the environment you're working with.

3) A cross-platform GUI is neither feasible nor desirable. You can't #ifdef the difference between Cocoa, xlib, and Win32. Don't believe me? Look at OpenOffice. (If OpenOffice looks OK to you, then please, forget about offering your products on the Mac. You'll only cause us pain.)

4) Don't bother with third-party cross-platform GUI libraries like Qt. Yeah, you can make it sort of work, but you'll get a lot of complaints from your Mac customers, and it will be more expensive than properly factoring your code and writing a native GUI for each platform. For every Mac customer who complains about a bad UI, there are many more who took one look at it and decided never to do business with the vendor in question. I just learned from a friend that Qt is far worse than I'd realized: if you use Qt, you wont' get any hardware acceleration , and you won't be able to deliver ADA compliance.

5) If you're shopping for people with years of experience in Cocoa and Objective-C, you should know that they're pretty scarce due to the flood of iPhone projects going on these days. I'm hearing about people getting $200 to 250/hr for iPhone projects. Keep in mind that you're also competing with Apple for those developers, and chances are your project isn't as interesting as Apple's. If you're a start-up and you can offer equity, then it's not too hard to find people who are willing to gamble with you if they believe in your business plan. Mac and iPhone developer tend to be somewhat less risk-averse than the average engineer, in my experience.

6) If you can't afford experienced Mac developers, you'll have to make your own. Save yourself a lot of time and money by sending your people to a class. I recommend Big Nerd Ranch, that's where Apple sent their own people when they quit doing Cocoa training in-house. Keep in mind though, that once your newly-minted Cocoa developers have a year or so of experience under their belts, you'd better be prepared to offer them market rates, or you'll lose them. Back in the NeXTSTEP days, Fannie Mae insisted on low salaries, and they lost people steadily to other NeXTSTEP shops. Attrition is expensive; it will cost you more than you think when your institutional knowledge of your product scatters to the winds.

7) Send your people to the Apple developer conference every year. I can't emphasize this enough. Time is money, and the connections you can make there with the Apple engineers you need to know can save you weeks or months of trial and error.

That should do for starters.

Addition 8/24/09:

8) When interviewing an Objective-C expert, DO NOT try the "Microsoft style interview". (See #5 above.) We are not entry-level, fresh-out-of-DeVry kids who have the time for solving the little brain teasers that someone looked up on the web last night. Talk about the actual work at hand, how the candidate's previous experience is relevant to what you need to do, and ask for some examples of creative solutions they've come up with before.

9) Probably the best place to advertise for iPhone or Mac developers is the cocoa-dev mailing list at lists.apple.com. You have to be a subscriber to the list, and you have to send your ad to the moderator for approval first. In any ad on Cocoa-dev, be very specific about what kind of developer you're looking for, and what the job entails. This is not the place to just list buzzwords or try to lowball anyone.

10) When advertising for candidates, don't hide behind a webform or an e-mail address. Put a phone number in your ad that reaches a human being. People with skills that are in high demand aren't going to mail their resume to recruiter@companyNobodyEverHeardOf, because that kind of thing gets you spammed.

-jcr

User Journal

Journal: A Rant

Journal by jcr

This goes out to every left- or right-wing power seeker, who believes that everything will be just dandy if only they get the right bunch of little tyrants in office.

Ok, time for a bucket of cold water in the face, kids.

First, income is not "distributed", it's earned, and it belongs to those who earn it.
Second, you have no moral right to take someone else's earnings, even if they have more than you do. It doesn't become moral if you hire a thug to do it for you, and it doesn't become moral if you have a group of hundreds of thousands of thugs and bureaucrats to do the dirty work.

The legitimate power of the state can ONLY derive from a delegation of the rights of the people. Free people institute governments to secure our rights, not to interfere with them.

We have a written constitution in this country, and despite its having been routinely ignored whenever government found it inconvenient, it is nevertheless the entirety of the legal basis for the government's existence. If the government doesn't want to follow the constitution, then the government has no legitimate authority, at all.

Maybe you can make a compelling utilitarian argument for some of the currently unconstitutional activities that the federal government engages in, and if so, then propose an amendment, let's have that national debate, and maybe you can get your amendment ratified. Until and unless that happens, the federal government has no legitimate basis to harass sick people for using marijuana, to take our hard-earned wealth and give it to failed banks, to "redistribute" our earnings, to interfere with the choices we make for our health care, to prevent us from traveling to any country we care to visit, or to draft us into "national service."

We are not the property of the state. Get that through your power-hungry little minds.

-jcr

User Journal

Journal: Parsing our National Anthem.

Journal by jcr

I happened to hear a recording of a fine performance of our national anthem a short while ago, and the question posed at the end of the song suddenly caught my attention.

"O, say does that star-spangled banner yet wave, over the land of the free, and the home of the brave?"

That's really the most profound thing that Francis Scott Key ever wrote. The question isn't whether the symbol of freedom still exists, we can see that it does. The question is: are we still free? Are we still brave enough to demand and defend our liberty?

A year ago, I would probably have said no. Today though, with Ron Paul's book at #1 on the New York Times' bestseller list, I'm rather more hopeful than I have been in a very long time.

-jcr

User Journal

Journal: A rather sad story.

Journal by jcr

Like many other Libertarians, I generally regard self-declared "liberals" as well-meaning, but hopelessly deluded on matters of economics. In the last few days though, in the aftermath of the hurricane, as they scramble to blame the Bush administration for failing to take the precautions that were also ignored by every other administration back to Abraham Lincoln, I began to wonder whether they were actually interested in helping the people of New Orleans, or simply reveling in the opportunity to work up a lather blaming George Bush for a natural disaster.

Then, I came across this discussion.

Now, knowing just how rare it is for a mugger to lure a victim by pretending to have a disabled vehicle, it has been my policy for as long as I've been driving to stop and help anyone whose car has broken down, since I'd like to have the same common decency applied for my benefit should I need the same help. I've stopped to pick up a young couple at 3:00am on a completely deserted road, and been told that a dozen other people had passed them by already, including more than one highway patrol car. Nearly every time I've helped someone on the road, they were surprised that I did so without fear.

That being said, the story that this "demgurl" at democraticUnderground.com tells about zooming away from a woman and a child who needed help, because the mother had performed the unpardonable sin of having a George Bush sticker on the bumper of her van, made me wonder what it might take for me to behave similarly. Perhaps if I spotted a sticker that promoted a racist agenda, I might drive on by. But wouldn't I do better to pick up a person in such a circumstance, and let the Klansman or Nation of Islam adherent know that they had been helped by a Jew?

Let me also offer a suggestion for a "liberal" who might find himself in such a situation. Perhaps the young mother was not the owner of the van she was driving. What then? Should she be left stranded because her brother or grandmother may have supported George Bush? What if she is indeed a Bush supporter? Does that mean that she's not a human being deserving of compassion? Isn't it the Liberals who are always excoriating the Conservatives for callously ignoring people in need?

I'm reminded of a story of a Rabbi a few years ago who was getting hateful phone calls from a neo-Nazi. The Rabbi found out who this man was, learned that he was disabled (wheelchair-bound), and offered him help. He ran errands for him. He patiently listened to all the evils of the "Worldwide Jewish Conspiracy" that the man spewed at him, and pointed out where the man contradicted himself. Sometimes they argued, but the Rabbi consistently helped the man. The Nazi eventually converted to Judaism, and celebrated his Bar Mitzvah in that Rabbi's synagogue.

I'm not a religious person, but there are some very profound sayings in the Torah and the Christian scriptures. One of them that I pay attention to in particular, is "by their fruits shall ye know them." When I look at "demgurl"'s behavior, I see a vicious little misanthrope. I see the other people in the discussion chiming in and telling her that what she did was acceptable. I see a stunted, infantile, and utterly narcissistic world view. The fruits of this woman's world-view are hatred and division. I hope she snaps out of it some day.

-jcr

PC Games (Games)

Journal: Comments on some of my Obsolete Sample Code

Journal by jcr

I wrote a number of Sample Code projects when I was at Apple, and we didn't have a way to mark them as superseded or obsolete, so let me just give you a few notes on them here. As far as I know, all of these samples work just fine on Mac OS X 10.4 (Tiger), but in many cases, the code in these samples is no longer necessary, or can be greatly reduced by using new features of Tiger.

Animated Slider
Back when I first wrote this sample, iTunes had just added a graphic equalizer, which does a spiffy trick of animating the motion of the sliders from one preset configuration to another. This sample demonstrated how simple it was to add this animation capability to all NSSliders in your app, but today, with the NSAnimation and NSViewAnimation classes it's even easier.

RGB Image
The purpose of this sample was to demonstrate how to use compositing to separate any image into its Red, Green and Blue components. This was superseded by...

RGB Value Transformers
In this program I refactored the compositing code into an NSValueTransformer subclass, called RGBTransformer. It's a much better way to organize the code than its predecessor, but today I would do this kind of thing with no code at all, using the Color Matrix patch in a Quartz Composer composition.

Polygons
This sample is mostly about how to add methods to NSBezierPath for shapes that you might want to draw often. If I were writing this example today, I'd use Bindings, and there would be a lot less glue code. In fact, I'd probably delete the Controller class altogether.

Tinted Image: this app is still handy for testing various combinations of colors and compositing modes. But, if you want to apply coloration to an image in your app, you should look into the much richer capabilities of CoreImage.

Transformed Image:
  Not much to say about this one. I added a category to NSAffineTransform to make shearing a little more obvious.

Monochrome Image:
This is completely obsolete in Tiger. Use the CoreImage monochrome filter, "CIColorMonochrome" instead.

Image Difference:
I was rather proud of this one at the time I wrote it. I was curious what the error was in JPEG images with various levels of compression, so I figured out how to subtract one image from another by compositing. I still had to do some manual bit-twiddling of the image data in the NSBitmapImageRep instances to generate the negative images, which I definitely would not do today. This is another of those things that Quartz Composer can do with no code at all.

Cropped Image
In the Cropped Image sample, I show how to use compositing to extract a portion of an image, and also a few ways to draw a selection indicator. If you have something like this to do today, consider putting the selection marker in its own layer, instead of drawing it over the source image as I did here. It would be far more efficient that way.

Color Sampler
Totally obsolete in Leopard and later. See the WWDC 2009 session on NSImage for how this kind of thing should be done today.

and, on any Mac with Xcode installed, at /Developer/Examples/CoreData/Stickies, you will find the first Core Data app I ever wrote. The Core Data team liked it enough to put it on the Developer Tools DMG.

There's a bug that appeared sometime before Leopard that prevents the sticky windows from resizing. The solution is to explicitly turn on mouseMoved events when there's a mouseDown in the resizing corner. To remedy this, add the following code to "StickyResizeCornerView.m", inside the implementation context:

// Fix for Leopard. Turning on MouseMoved events wasn't necessary before Leopard, but now it is for some reason. -jcr
- (void) mouseDown:(NSEvent *) theEvent { [[self window] setAcceptsMouseMovedEvents:YES]; }
- (void) mouseUp:(NSEvent *) theEvent { [[self window] setAcceptsMouseMovedEvents:NO]; }

User Journal

Journal: JCR's first CoreData app..

Journal by jcr

Those of you who have the Xcode tools installed on your Mac, can find my first CoreData app in /Developer/Examples/CoreData/Stickies/.

I wrote it mostly to learn how to use CoreData in a non-document-based app. Once I showed it to the CoreData team though, they liked it enough to include it in the Developer Tools examples.

There's a lot of code in that app, but nearly all of it is just to implement the bizarre little mutant windows that people expect to see in a Stickies application.

The real work of the app, that is, storing rich text notes in a per-user database, requires no code. After more than a decade of NeXTSTEP and Cocoa development, that still amazes me.

When you run CoreData Stickies, open the debug window for a different view of the database.

  If you have any questions about this sample, go ahead and post them in a comment here. I'll check this page from time to time.

Note: on Leopard, there's a bug prevents the windows from resizing. To fix it, add these two lines of code to StickyResizeCornerView.m: // Fix for Leopard. Turning on MouseMoved events wasn't necessary before Leopard, but now it is for some reason. -jcr
- (void) mouseDown:(NSEvent *) theEvent { [[self window] setAcceptsMouseMovedEvents:YES]; }
- (void) mouseUp:(NSEvent *) theEvent { [[self window] setAcceptsMouseMovedEvents:NO]; }

User Journal

Journal: Leaving Apple.. 2

Journal by jcr

Posted to the Apple Cocoa Developer's list, on May 18, 2005:


Ladies and Gentlemen,

After about three and a half years at Apple, I'll be departing to pursue new opportunities following the 2005 World Wide Developer Conference. I've enjoyed my time here, and expect to remain an Apple developer and be active in the Cocoa developer community for the foreseeable future.

I'd like to thank many people, chief among them being my fellow moderators, Malcolm, Scott, and Matt, for the great work they've done with the list, and also all of the Apple engineers who've helped us out so much with answers to developers' questions.

To Ali Ozer and all of the Cocoa team, Bill Bumgarner and the CoreData group, Matt Firlik and the Xcode team, John Geleynse and the Apple Evangelists, my colleagues on the WWDR SWAT team, my fellow DTS engineers, and all of my colleagues in Apple Worldwide Developer Relations: thanks for all the help! You're some of the best people I've ever worked with, and I do intend to keep in touch ;-)

As I move on from being an Apple engineer to once again being a customer and developer, I look forward to the business opportunities that Tiger makes possible, and I can't wait to see what Apple comes up with next!

-jcr

Ok then, that being said.. One of the things I'm really going to enjoy about being outside of Apple, is that I no longer have to toe the party line about the relative merits of Carbon Vs. Cocoa. More on this in the near future ;-)

The Courts

Journal: I lost a court case :(

Journal by geeklawyer
I lost a case. OK all lawyers do and it was only a tiny insignificant one.

It depresses me because it was one that should have been won; even had I gone into court drunk, swearing at the judge and without any preparation at all, bugger it, even if I'd gone to the wrong court!! It was an open goal.
What went wrong? The judge. The lower courts are stuffed to the brim with inept ones. Some lawyers have ambitions of being judges and the role of county court judge is often the first step on that path. Too many crappy lawyers get the role of district judge. In part this is due to the shortage of lower court judges, in the UK at least, and I think standards are not all they should be. The Lord Chancellor appoints anyone just to cover the shortage.
In my case glaring errors in my opponents case were glossed over as mere technical defects, in defiance of precedence. Supporting case law was ignored or misunderstood and the basis of statutory interepretation completely misunderstood.
Of course you can make the case that I have this view since I lost and I'm biased. That's true to a degree but I have had and seen many other similar cases where these flaws have not arisen where I've won and lost on a well based judgement. It's not merely losing that's pissed me off, it really is about the quality of judges.
To compound it my client is too poor to appeal, which is the only hope of him getting the right decision. Litigation really is expensive. Justice is open to all? yea, jut like the doors of the Ritz.

I sincerely hope the judge in the SCO case is better and they arent starting off in the equivalent of a district court!!

User Journal

Journal: Bush in London

Journal by geeklawyer
Just came back from the London anti Bush protest. Great fun. I doubt if it will make the slightest difference, but it is great to feel you have a voice and can use it.
Of course this is what Bush & Blair like to rehearse as a justification: the Iraqi's can now do what we do. Well, yes, precisely: they can shout and have their voices ignored by their overlords just like us.
Patents

Journal: European Software patents

Journal by geeklawyer
I'm really in despair. this is going to happen and I suspect it is going to be bad. Either in the long or short term. And its really going to be a pain in the ass for Free software for at least two reasons: Free software writers are often more innovative and many ideas will pose a threat to solvent companies. these ay well choose to spend money crushing the Free competitor. Secondly, and relatedly, virtually all Free software authors are penniless, complaining on /. wont help much either, so in most cases they will just have to fold. There's a lot more to it than that and in truth it doesnt seem to happen too much in the US so I may be talking rubbish - I certainly hope so.

It's not like patents have much use: copyright and trademarks are genuinely useful but patents are a commercial legacy from a protectionist era. They should exist and all the arguments for them are at best unproven and mostly rubbish.

Of course I'm a hypocrite since many of my non-Free sftware clients are hoping to get them and I may be forced to draft them. Yech .
oh well life goes on, got to earn a living.

Slashdot.org

Journal: spooky banner ads

Journal by geeklawyer
is it safe?
is it safe?
is it safe?

why is it there are always legal banner ads whenever I use slashdot? is everyone getting these or is it some wierd cookie tracking stuff/nick fu?

wheres the hells my tin-foil hat?

The Courts

Journal: damn American IP holders

Journal by geeklawyer
Yet again Im asked by someone to help out because a US trademark holder is getting punchy. These guys seems to be the commercial equivalent of AIDs. I know hy have to police their marks but really they so overso it.

Once a US company sees you doing something similar you can be asurred they will scream 'unfair competition' 'lanham act' so the poor suckers have to shell out on fees to me. Good for me crap for them.US IP law needs a shake up. Badly.

ooh Im in a bad mood. Whats the smiley for frown? >:

The Courts

Journal: the SCO circus

Journal by geeklawyer
It is so frustrating to be on the outside of litigation. I'd love to get my hands on the case file for this. All we get are snippets of this and that; 'he said she said'. People expect me to have a view but all I can do is talk in generalities.
As for the SCO paralegal finding the copyright contract amendment - weeeellll wasnt that convenient! forgery. nah, doubt it no resoponsible company would be that dumb. But sometimes you cant believe how unlucky you'll get. Its not pivotal to this case at all at the moment - but it could become so.
What pisses me off is that so many people fuss about ripped of code. Yes I'd bet big bucks there is infringing code in linux somewhere regardless of the SCO stuff but it happens all over the place in commercial code. There the absence of source makes it hard to find and if anyone gets ripped off it is FOSS.

Thufir's a Harkonnen now.

Working...