17
Nov 09

XCode Project Template bug on Snow Leopard

After a gap of almost six years I’ve been grabbed by the sudden urge to start doing some Cocoa development again.

Rather than get my old battered copy of Hillegass’ seminal Cocoa Programming for Mac OS X out of some long forgotten cupboard I’ve been refreshing my fading memory by reading the new Cocoa Programming title from the Pragmatic bookshelf, which, although still in Beta, is so far a nice breezy ride (back) into the world of Mac development, and more importantly for me these days, is available as a downloadable PDF – unlike the Hillegass title (sort it out, man!)

Everything was going well until I hit a chapter that claimed that I should have an application delegate class automatically created when starting a new vanilla ‘Cocoa Application’ project.

I didn’t.

Fighting my ‘this is obviously a Beta book problem’ mentality, I slowly discovered that my XCode installation is doing very strange things, even after totally wiping out my current installation and replacing it with the latest download from the Apple site (v3.2.1) creating a new basic ‘Cocoa Application’ would not give me the delegate files (and instead of the newer Xib Interface Builder format, I had the older style Nib format).

Very strange indeed.

Digging deeper into the mysterious world of XCode templates (i.e. poking randomly around the contents of /Developer/Library/Xcode/Project Templates) I discovered that yes, my Cocoa Application template folder, which is used as the basis of new projects, looked a bit suspect :

drwxrwxr-x   9 root   admin         306 May 18  2009 Cocoa Application
drwxrwxr-x   9 root   admin         306 May 18  2009 Cocoa Document-based Application
drwxrwxr-x   4 root   admin         136 Sep 24  2007 CocoaApp.xcodeproj
-rw-rw-r--   1 root   admin         157 Sep 24  2007 CocoaApp_Prefix.pch
drwxrwxr-x  10 root   admin         340 May 18  2009 Core Data Application
drwxrwxr-x  11 root   admin         374 May 18  2009 Core Data Application with Spotlight Importer
drwxrwxr-x  10 root   admin         340 May 18  2009 Core Data Document-based Application
drwxrwxr-x  11 root   admin         374 May 18  2009 Core Data Document-based Application with Spotlight Importer
drwxrwxr-x   4 root   admin         136 Sep 24  2007 English.lproj
-rw-rw-r--   1 root   admin         849 Sep 24  2007 Info.plist
-rw-rw-r--   1 root   admin         596 May 18  2009 TemplateChooser.plist
-rw-rw-r--   1 root   admin         263 Sep 24  2007 main.m

i.e. what the blazes are those “Core Data…” folders doing there? They are Project Templates in their own right and shouldn’t be within this folder.

Throwing caution to the wind (well, backing up the folder first) I pruned out these folders, plus the “Cocoa Document-based Application one” and the “TemplateChoose.plist” for good measure. Leaving it looking like :

drwxrwxr-x   9 root     admin         306 May 18  2009 Cocoa Application
drwxrwxr-x   4 root     admin         136 Sep 24  2007 CocoaApp.xcodeproj
-rw-rw-r--   1 root     admin         157 Sep 24  2007 CocoaApp_Prefix.pch
drwxrwxr-x   4 root     admin         136 Sep 24  2007 English.lproj
-rw-rw-r--   1 root     admin         849 Sep 24  2007 Info.plist
-rw-rw-r--   1 root     admin         263 Sep 24  2007 main.m

and all seems well within the XCode world again.

I’m afraid I have no idea what could have caused this, and the only other reference I can find to the problem is here which ties up exactly to what I was seeing, and proves it’s not an isolated incident.

Interested to learn if anybody has had a similar problem, and what the possible cause(s) are as I’m sure if it affected all Snow Leopard / XCode developers it would be more widely known about.


09
Feb 09

Old App Traffic Spike

ss_mainscreen.jpg

Many moons ago (well, late 2006) I wrote my first Rails application, a dinky little GTD app named ZenLists.

Now, I haven’t given the app much though for the last eighteen months, and the shocking confession is I don’t even us it myself anymore (I’m currently using a dazzling array of Stickies.app windows instead which I may cover in a future post) so I was surprised when casually browsing my site stats to see that there’s been a large traffic spike and a surprising number of registration e-mails coming my way.

That got me thinking either I’ve been spammed or some web design guru has put me on a list of ‘when CSS designs go bad’ type list as the interface is pretty crude, even by 2006 standards, but no, it looks like the app has been briefly mentioned in a list from Mashable of GTD apps.

That got me thinking, I really should do what the Cool Kids do and stick the code up on GitHub or something, as there’s the kernel of a half-decent application there, even if the code is a bit crufty by modern Rails standards.

Hmm…maybe I should also open-source the ‘DigiGuide for Mac’ clone I developed whilst watching the Superbowl about 5 (!) years ago. I just dusted it down in XCode and I’m amazed to see it actually still works! OK, it doesn’t do much apart from download TV data and allow you see select a channel and see what’s on, but again, it could be the basis of a very useful app without too much effort.

Crumbs, makes me wonder how many unreleased apps are lying dormant on geek hard drives around the world, that with a little brush of the TLC wand, might be of use to someone.


27
May 08

Ioncube for Rails?

Having just completed my first mISV product, I’m already starting to think about potential new projects.

Despite Datafeed Studio being written in PHP, it is fair to say it is not my programming language of choice.

Datafeed Studio is a web application that is installed by the end user on their server, thus it made sense to go for for the language that has the biggest support amongst web hosting services.

Of course, now that mod_rails / Passenger has been released, hopefully it wont be too long before Ruby does some catching up in the widespread availability and ease of deployment stakes. I understand that major web hosting providers such as Dreamhost are already offering support.

The second reason I chose PHP is to do with script protection. There are several PHP solutions out there to encode scripts to prevent piracy such as Zend Guard, Code Lock and IonCube (I opted for the latter) but seemingly none for the Ruby world?

My previous Rails projects have been SAAS based so I’ve never had to worry about this – but I have a mISV idea that like Datafeed Studio, would require the customer to install the software on their server, but the lack of script encoding / protection does unfortunately put me off using Rails in this instance.

Has anybody else been in this position? What did you do? Am I worrying too much about piracy concerns?


01
Oct 07

Rails 2.0 application checker

Now that the first release candidate of Rails 2.0 has been announced, what better time to check if your existing Rails app might need some TLC before the upgrade?

Enter r2check, a small tool which does some regular expression searches against your codebase for things that we know are changing.


30
Dec 05

Functional testing of a Rails app with Selenium

How to use the Selenium test tool for functional testing of a Ruby on Rails and Ajax application.

Link : Automate acceptance tests with Selenium

Definitely one to add to every web developers toolbox in 2006.


30
Dec 05

Rails Deployment: Lessons Learned from James Duncan Davidson

James Duncan Davidson has published an excellent essary detailing Rails deployment issues. Jam-packed with practical tips.

* Should I use CGI or FastCGI?
* Should I use lighty or Apache httpd?
* If Apache, which freaking version?
* And how do I configure mod_fastcgi with Apache?
* Should I let the webserver manage fcgi processes or spawn them externally?
* And what’s this SCGI thing?
* And what’s this SwitchTower thing?
* What version of MySQL is the server running?

Link : Real Lessons for Rails Deployment


19
Dec 05

Hyper Enthusiasts – Java = Ruby?

Excellent article from Bruce Eckel covering the dangers of “language-love”, a sure sign of an amateur programmer.

The Java hyper-enthusiasts have left the building, leaving a significant contingent of Java programmers behind, blinking in the bright lights without the constant drumbeat of boosterism.

Link : The departure of the hyper-enthusiasts