Saturday, November 13, 2010

Consolidated VMware VMDKs

I just consolidated a 25GB VMware virtual machine into 10GB by consolidating unused snapshot virtual disks. This vmware faq explains how to do it extremely well.

Tuesday, May 18, 2010

Edited value not of required format!

I'm using the xcode predicate editor to create a core data fetched property, and Apple's developer tools have proved inherently unusable yet again.

For a little back-story, I have some reference data, and my user can mark certain pieces of the reference data as favorites. I cannot store my favorites data in the same NSPersistentStore as my reference data. If I did, I couldn't updated my reference data file without migrating my favorites data out. Thus, I'm splitting my favorites data and reference data into separate NSPersistentStores. According to Apple's CoreData Programming Guide Cross-Store Relationships section I cannot have a relationship that spans two persistent stores. I need to use a fetched property.

Now you're caught up. When you create a fetched property, you have to create a predicate to use to find the entity the fetched property represents. This seems straightforward enough, but I kept getting this cryptic message "Edited value not of required format!" After some googling, I found the answer.

Basically, the editor defaults to expecting a constant value rather than a variable value. To switch to a variable, right-click in the empty space between the text field and the plus/minus buttons. Of course, a drop-down menu would be much better, but I never accused apple of having good tools.

Monday, April 26, 2010

Bootstrapping Buckminster & Subclipse with P2 Director

On my current project at work, we are changing from using PDE-Build to create our Eclipse RCP product to using Buckminster. I found a very valuable tutorial to get me started, but I kept getting exceptions like these:

ERROR: Could not instantiate provider org.tigris.subversion.subclipse.core.svnnature for project Could not instantiate provider org.tigris.subversion.subclipse.core.svnnature for project
at org.eclipse.core.internal.resources.Rules.factoryFor(
at org.eclipse.core.internal.resources.Rules.modifyRule(
at org.eclipse.core.internal.resources.Project.touch(
at org.eclipse.jdt.internal.core.SetContainerOperation.executeOperation(
at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(
at org.eclipse.jdt.core.JavaCore.setClasspathContainer(
at org.eclipse.pde.internal.core.PluginModelManager$

The solution is to install subclipse, but doing so within Buckminster is painful because you can only specify a single repository location from the command line. Subclipse has a lot of dependencies that already exist in a default eclipse install, but are missing from buckminster-headless, so I needed to specify multiple repositories.

p2 director to the rescue!

In the tutorial, there is a section on bootstrapping buckminster with p2 director. The tutorial loads just the buckminster command-line application from p2 and then uses the buckminster command-line application to load more features into itself. This is convenient when all features and dependencies exist within a single repository, but as I said above, this is not my situation.

Assuming you are using bash and have p2 director installed, here is the command:

-d `pwd`/buckminster-headless-3.6/\
-p Buckminster\
-i org.eclipse.buckminster.cmdline.product\

Thursday, February 4, 2010

5 Questions Response

In response to Ben Lee's Five Questions:

  1. What are you currently hacking on?
  2. What are you currently getting better at?
  3. What do you do when your computer is asleep?
  4. Describe that ‘big fish’ project that’s been stewing in your brain.
  5. What are you gonna post about this coming week?
  1. JAXB, JAX-RS, Google App Engine for a real-time rating app I'm building with Mike Gaffney.
  2. C/Objective-C. At work, I'm building a locator iPhone app for a fortune 500 company, and I'm running into all kinds of low-level issues that Java abstracts away from me. I can't help but feel like a badass when I see registers in my debugger.
  3. Hurling, play with my wife and son.
  4. In conjunction with #1, I'm building a real-time rating web service in preparation for a hackfest for my local mobile development group.
  5. Probably nothing. I usually just use this blog as a public place to store answers to annoying technical problems. Entries should probably be cross-posted on stackoverflow as questions/answers.