Speeding up a Cocoa Project Repository Setup with Git

I just finished working my way through a chapter of a new iPhone dev book. I had a working copy of the example of the book and felt like mucking around with it to learn more on my own. I still want to keep the original state of the code, but I am too lazy to setup a repository for such "disposable" code.

Years of using Subversion have made me lazy like that. I am really lazy. I always forget what the steps are to create a repo, mostly because it is usually such an infrequent task for me. But now that Git makes it so easy to create a repo right there in the project directory I'm working on without littering the whole thing with junk... hmmm... Maybe I should be using it even for "disposable" code.

So to facilitate this new behavior I wrote a little script. It expects the root of the project to be the current working directory, so make sure you "cd" into the right place before invoking it. Here is what it does:

  1. Creates a new new git repository at the CWD

  2. Creates a new .gitignore file to ignore:
    • the build directory

    • user.pbxuser file inside the project

    • user.perspectivev3 file inside the project

  3. Adds all the files in the CWD to the index, staging them for inclusion in the next commit

  4. finally commit everything with the default message "- initial commit to Repository"

I think this will be useful to me, and so I post it here in case it is useful to others. It is really very simple. Please let me know if you have any suggestions to improve it.


git init

cat > .gitignore <<EOF

git add .

git commit -a -m "- initial commit to Repository"


The Cross-Platform Drobo Conundrum

I have just received a nice Firewire Drobo with 4x1TB drives at work. In addition I got a pair of 500 GB LaCie external drives with USB & FireWire interfaces.

I asked on Twitter what was the best way to format these devices such that they could be accessible from both Windows and Macintosh machines. Due to the 140 character limitations of twitter I did not give more details about my environment. None the less I got some fabulous responses. Basically they fall under two options:

- Format the drive for one platform and network share it with the other platform. This can be done either using a drobo share unit, or have one computer sharing it to the others.

- Format the drive for one platform and use a special driver to read it on the other platform. Specifically, I hear good things about using MacDrive to access Mac drives from Windows machines.

I failed to give some background info about my situation, so here it goes. I am working with large proprietary audio files. I have weeks worth of recordings. (currently a little over 100 GB) Each individual file consits of 4 channels of data and is roughly half a gigabyte in size. Due to the large volume of data I would rather process it as fast as possible. In the past I have used a NetGear ReadyNAS NV+ unit over the network. Working off from a USB LaCie drive has proven to be several times faster than over the network. Even though I do have a drobo share device I would rather not use it in a day to day basis.

Here are some of my constraints:

a) The overwhelming majority of the computers at work are WinXP PCs, with only a handful of Macs. (this makes me very sad, and so I try to put on a good fight with the powers that be)

b) The majority of the PCs are managed (not by me), which means most of my users can not install any software on their machines. It also means, these machines can only be on the official network (which goes to the internet). Non-managed machines (i.e. the ones where I can install stuff) have no direct access to the internet (sneaker net only...<sigh>)

Most of our work is (also sadly) done in Matlab.

If this were my call and I had control of all machines, I would probably install MacDrive (after some testing) on all WinXP machines that needed access to the data. So the drives would all be formated in HFS+. Since I can not install software in a large number of PCs, This is not an option. Because of networking policies, I can not share the drobo (or the LaCie drives) to the managed PCs (are you getting a sense that I hate managed PCs? because I do, you know)

So I will try the following setup. I will format all drives as NTFS partitions. This means most machines (both managed and non-managed PCs) will be able to access the data natively. The question is what to do with Macs (and Linux boxes). The main purpose of the drobo is to be the central repository of stuff... I think I will not work on it day to day per se. So if I need to use it on a mac I can put is on a non-mananged network and share ir via drobo share. It will not be as fast I would like but it should work much like the ReadyNAS NV+ has in the past. For regular operations I will try connecting the LaCie Drives via MacFUSE & NTFS-3G which claims to be stable now. It is a little risky, but the LaCies should have reduntant data, they are merely a carrying convenience. If I blowup all the data (hopefully not) I still have the data on the drobo.

I welcome any ideas and/or suggestions. This is by no means written in stone yet, and the data sets have not yet grown to unmanageble size (which I'm sure they will eventually). Please drop me comments here or tweet me at @josevazquez.

Now... off to do some crossplatform git revision controlling! Ahh... the fun never ends!

Investing Time in iPhone Development

Much has been said about Apple's policies on the App Store. John Gruber rightly states that there is something broken with the App Store today. Paul Kafasis denounces Apple of being anti-competitive in his latest post for O'Reilly. Fraser Speirs has written a great piece explaining why he will not longer devote time to writing new apps on the iPhone (He will continue to support his current apps). These are all people I respect and admire quite a bit, and I agree with them to a great extent.

I am a relative newcomer to the Apple development scene.  I have never written an opinion blog before this. So I will admit to being *VERY* nervous to go against some of what has been said. I do not wish to be a contrarian, but I do want to express my personal opinion.

All the above articles seem to imply that good developers will shy away from developing for the iPhone. Essentially, there is no way of knowing whether Apple will reject you app or not until you finish it and submit for approval. The reasoning is that most developer will not want to risk their investment of time and money to develop in such an uncertain environment. I agree, and yet, risk has not changed that much in my mind.

To me the biggest threat to my personal success is not Apple's approval. Yes, it is a threat, but only one of many that I will not be able to confront until I am done with my app. Personally, I am interested in developing apps for music creation on the iPhone. It has been really hard for me. I have to contend with Core Audio (a nasty foe, to say the least), synthesizer design (of which I had no clue), and all the other things new iPhone developers have to deal with. I have always known there is big risk in what I do.

There is a none zero chance that I will infringe on somebody's patent without knowing it. I fear the day, a lawyer comes to me with a cease and desist notice because of XYZ patent or technology.

A much bigger risk is of course competition. I have already seen more and more apps come to market with similar ideas to mine (my idea is of course *FAR* superior, so I'm not worried. <gulp/>). I have no idea what will be out there when my app finally comes out. It is very likely after I spent so much time and effort on this, some competitor will come along and eat my lunch.

The iPhone being an Apple platform, there is a good chance I might get crushed by the press because my icon is not pleasing enough, or my typographical choices suck. (Does this ampersand make my app look fat?)

The economy could crash, musicians might never care for the iPhone, Apple might decide to release Logic Touch, whatever... In the end, it is quite possible that just nobody plain cares about my app. I am aware of these risks. I also know that they probably won't rear their ugly head until the end. On the other hand, I know that the App Store is an incredible opportunity. While there is much controversy, there is still a look of business going on out there, and you know what? I want in. And so does everybody else.

My time is precious to me. Every hour that I spend on iPhone development is time I could have spent with my lovely family. Doing this constitutes a great sacrifice, not only for me but for them as well. I would be distraught if my app doesn't work out in the end. But I love, doing it and not for the money per say, but for the dream of being a full time indie. To be able to craft beautiful apps that I passionately care about. To be able to stay at home and have lunch with my kids. These are the things I care about.

Let me be clear, I think Apple is making a mess of things and they really owe us much better guidelines on their policies. I *HATE* the NDA as much as the next developer. I want much better documentation! (Core Audio, anyone?) I could always use a CorePonies Framework while I'm at it. Seriously, I am not saying we should let Apple off the hook even for a second. What I am trying to say is this new added risk should not scare us away from doing what we love to do. Even if said risk is arbitrary, silly, and completely unnecessary.

I apologize for any crimes I might have committed against the English language in this post. No ponies were harmed in the writing of this entry. My opinions are mine and most likely no one else's (really no one else with me on this one??)

C4[2] and Iron Coder

I am back from the C4[2] conference and I can't help but smile. None of my co-workers have any clue what I just went through this last few days. But as go back to work on this clunky PC and I stare at IE7 once again, I can't help but smile. I smile because I am now aware that I do belong to such a wonderful community. It is so inspiring to meet all the incredible people at the conference, to listen to the talks, to reconnect with friends, and yes, to hack away for the Iron Coder. I am truly blessed to belong to such a community and I wear my smile with pride.

As for the Iron Coder competition: What a blast that was! I was so nervous giving my presentation. I still can't believe that it was so well received. My jokes actually worked! (Who knew!?) A bunch of people came to me later to congratulate me and I want to thank them all. It is such an otherworldly experience, I am truly not worthy. I am still at awe at all the entries. I mean, nu on an iPhone! Wii controllers picking up an iPhone and drawing accidental mustaches! I know that Joe banged out his entry in the two day at the conference! I am truly humbled by the amount of talent these people bring to the table. And the prizes! Somehow my jokes managed to get my little "tip calculator" into second place, and what a place it is! The generosity of the prize donor is baffling. I really find that not getting the MacBook Air is almost inconsequential; the software loot is really THAT good already!

I want to thank Rob Rhyme. He is a fellow DC area NSCoder Night regular and we shared a room at the conference. When he heard of my little entry, he jumped in and took over the whole server portion of the app. During the conference he hacked up a Ruby on Rails app to track all the agents and villains. He went out of his way to make it into a totally slick iPhone app looking site. He even went nuts creating all the villains and acquiring all the avatars and what not. I was only aspiring to have a little list of text coming from the server; he turned it into a whole app onto itself. Thank you Capt. Taco! I salute you!

Finally thanks to Wolf. He is definitely THE Man!!! The conference rocked and it was totally smooth. It will take a couple of weeks of diet to compensate for all the delicious food. The Pizza blew my mind. Wow, what can I say that has not been said already about him? In my mind, he has taken the very best aspects of the WWDC conferences and concentrated them into a perfect experience. Everything, from the size of the conference, the nature of the talks, the bashes, the food, everything is conducive to fostering the community and making us all feel like we belong. Being the weird Mac guy at work, this feeling of belonging is invaluable. I now know what the ugly duckling felt like when he discovered he was a swan.

I do not mean to impose on you personal beliefs, but I do feel compelled to thank the Lord for such plentiful blessings.

Thanks all for a great time and keep on smiling!

Pictures of WWDC2008

Cult of Mac, originally uploaded by tombolav.

I finally posted all my photos of WWDC2008 in flickr. This has got to be my favorite shot.

I also have some pictures of the CocoaHeads meeting at the Apple Store. Including this one of Gus Mueller


Gus Mueller, originally uploaded by tombolav.

I still need a lot more practice before I can get as good as Gruber or BagelTurf, but I think I still manged to add some value.