How to find your resources and how to generally find the directory layout

To find the main download directory for when you are receiving files, put this snippet of code in a test project or your main project at the point of opening:

 NSArray *pathsForDownloadedFiles = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
 NSString *pathMain = [pathsForDownloadedFiles objectAtIndex:0];
 NSLog(@"main download directory is [%s]", [pathMain UTF8String]);

The first line lets you allow Apple to put the application download directory anywhere it likes. It will also be able to change it at will, without breaking your program.
The second line means that there is only one directory you need to access and its the first one. Remember in C arrays are zero based which means the first element of the array is at index number zero not at index number one.
NSLog will let you run the app in the simulator OR on your device and send logging information back to the debug console in XCode. Nice and integrated.

An alternative method:

 NSString *mainPath = [self getDataPath];

Uhhhhh yeah a bit shorter. Its not deprecated from what I see so one can use this method also.

Finally lets see where our resource is. Again, if you use this method, then XCode will be able to re-layout the resource directory structure anyway it wants without breaking your program. You KNOW they’re going to do this someday and they won’t tell you until its been done. So lets Program Defensively. Just like you drive defensively.
To find a specific resource that was compiled into your application:

 NSString *resourcePath = [[NSBundle mainBundle] pathForResource:@"mission1" ofType:@"jmf"];
 NSLog(@"Path for mission file is [%s]", [resourcePath UTF8String]);

The AT (@) sign is the NSString constructor without declaring an NSString. In case you’re wondering.

Good Luck and God’s Speed to ya mates.

XCode FAIL Cannot Browse an SMB Windows Share

XCode cannot browse an SMB Windows Share. This has worked in the previous versions of XCode. Current version is 4.02 (4A2002a). Apple Test Engineers you suck. Ummm Yeah I know you hate Windows, but the JOB you took on is to help your customers, i.e. Us lowly programmer serfs. OK???
DUH yeah don’t test that.
The share is active, Finder had it open already.
I opened XCode after Finder had it open. I closed all the Finder windows.
Just a plain old bug.

Steve Jobs, best of health. Tim Cook its time to man-up.

As you all know Steve Jobs has taken a medical leave. While we know he will stay informed of the new features and products at Apple, he needs to concentrate his energy on his health and his family. The only way for him to do that with a clear head is for Tim Cook to step up and control all aspects of Apple in a way that Steve can accept that its being taken care of as if Steve himself were doing it.

If Steve steps down in a more permanent manner, Tim can take the company in whatever direction he and the board feel it should go. But until then, everyone needs to pull in the same direction that they know Steve would go. Steve is important just because he is Steve, and not because he runs Apple and is the genius behind all of these industries he has dominated. The money, the Apple stock price, the products be damned. They don’t mean anything.

Our best to you Steve, and we wish strength and wisdom to Tim.

Dave Ramsey had a guy on that made a full time living from You Tube

Dave Ramsey is a financial guy with a radio show. He’s hard hitting, and very logical in the financial plan that he wants you to invoke. Mainly its get out of short term debt so you can make financial and life decisions from a position of strength.

Anyway, this guy calls up last week (Jan 10-14, but I can’t find the audio clip), and it sounds like he was making more than enough money for a full time job from You Tube videos. The gist of it was that You Tube (i.e. Google) revenue shares when your video goes viral. They monitor this and are proactive by sending you an email when it hits one of their thresholds. Then they put ads on your video and share the revenue with you. Cool.

Here are a couple of links about how to get started:
You Tube
Frank Furness
Making Hot Ice – Look at the number of views. People want to know how to do things.


I quit

I just read an interesting article about it being ok for go-getters and talented individuals to quit. Hmmmm. “Its ok Dave, continue”. . . “Ok I quit. Its not you its me”.
I’ve had these discussions with more people than I can count. I HATE mediocres. I won’t work with them. At least I “don’t want to” work with them. Sometimes one MUST work with them. I’m not talking about inexperienced people. I’m talking about people who come to work to pick up a check (anyone in this company know whom I am talking about?). Those people need to be fired. They are a drag on the high-fliers.
You know what you do for the high fliers? Everything. That’s right. You remove EVERY excuse they have for not working as efficiently as they can. And when you do that you tell them to prove it. Prove they are better than 10 mediocre programmers/workers. If you’ve never worked with this type of person, you’ll be amazed because they will absolutely, hands down, prove that they are worth 10 mediocres.
I liked the above article. It is one of those always relevant pieces of expository that is timeless and succinct.
So, everyone, fire ONE mediocre person in your organization and let’s get on the path to productivity again. You know who I’m talking about. That person who goes to compile a program that takes 5 minutes to compile, and sits there and waits for it to compile. Doesn’t timeslice to anything else, like documentation, regressions, pick his nose, ANYTHING. That person needs to be fired now. The rest of the employees need to be TOLD why that person was fired. Once the scapegoat is gone, productivity improves. If not start the beatings.

Mwhahahahhahaaaaaaaaa I LOVE world domination.

The Dead Sea Effect article is funny because its true. Read that also. Most of us live that article every day. This guy is a good observer. Here’s another observation for you to read. Bruce posted this link to the slashdot thread.

Management 901 – Why you want to become a manager

I’ve come to some realizations while watching some, ummm managers at another company. Yes that’s it.
One ponders the question “Why do you want to be a manager”.
1) I’m stupid so I can be a great manager and lead the company to nowhere.
2) I know how to spend money at home, what’s the difference?
3) I can budget money, Continue reading

Mars needs women

Yeah another startup with no babes. Great. We’re geeks and we must be gay.
Can someone please recruit some hot intelligent women please?
Eye candy while we wile away our lives working for DA MAN.
30 hour programming sessions are too long.
Why is our blog “from the guys”? Cause there aren’t any chicks here. Isn’t that against the law?
Help me . . . . Spock.