SUBSCRIBE VIA RSS


Subscribe to our feed

Status Updates

  • First iPhone app nearly complete! I've been waiting for 3 weeks for Apple to finish "conducting company identity verification."
    1 day ago
  • Rainy day! Staying indoors. Creating computerized players in a simulation game that models cooperation in the work place.
    73 days ago
  • Up at 8AM, with a hot cup of coffee brought back from Cafe Lola in Ann Arbor. Will I succeed in putting in 8 billable hours in one day?
    99 days ago
  • full scale irish band outside my window playing the pipes for the past 20 minutes. pretty fun.
    107 days ago
  • listening to Kristin on Maxim Radio!
    113 days ago
  • back from an amazing meal at ouest with even more amazing company.
    114 days ago
  • wondering how so many online tshirt companies stay in business--ones that sell shirts with funny messages, i never see them in real life
    120 days ago

Topics

TWITTER

The old fashioned way

RECENT TUNES

  Archive for January, 2008

January 24, 2008 – 4:48pm Propel Criteria Left Join: using addJoin() and addAlias() to join a table twice

Here is a way to do left join on two columns in a table that both were foreign keys in the same table using Propel. This might happen if for example you have a table with a parent_id and a child_id in a nested set that both refer to the same table, or as an example you have a table “documentation” and each documentation can be categorized into a main category and a sub category.

What happens when you want to do a left join in your documentation query, so that if present both the related category and sub_category objects get included in the results?

$c->addJoin(DocumentationPeer::CATEGORY, CategoryPeer::ID, Criteria::LEFT_JOIN);
$c->addJoin(DocumentationPeer::SUB_CATEGORY, CategoryPeer::alias('c2', CategoryPeer::ID), Criteria::LEFT_JOIN);
$c->addAlias('c2', CategoryPeer::TABLE_NAME);

Done and done!

Posted in  Web Development   |     |  4 Comments »   |  delicious  Digg

January 24, 2008 – 4:37pm Installing Symfony on Leopard

I’ve found the best way to install symfony on Leopard is to use the version from SVN. I find this is easy to do, and easy to update in the future. Here is a cheat sheet for those looking to get up and running with symfony on their Mac running 10.5 Leopard. More…

Posted in  OS X Web Development   |     |  2 Comments »   |  delicious  Digg

January 21, 2008 – 9:50am svn, apache2, os x leopard 10.5

Mac OS 10.5 Leopard ships with Apache2 and SVN. However, if you want to keep a local svn repository and not use an external svn server (only really useful if you have projects which you will be the only developer), you have to set up the repository yourself. Here is a quick cheat-sheet to help you do just that. More…

Posted in  OS X Web Development   |     |  8 Comments »   |  delicious  Digg

January 14, 2008 – 2:55pm symfony propel-load-data

Loading data from fixtures can be extremely useful to pre-populate your database so you have something to test and code with. I frequently use the propel-load-data task in two ways, the first when altering the schema, and the second to add some new data on top of whats in the database.

This will rebuild your db and model from schema.yml, insert the new structure into your db, and load data from the fixtures in /data/fixtures:

./symfony propel-build-all-load frontend

To load in additional data from a specific fixture file, you can use this command:

./symfony propel-load-data frontend dev data/fixtures/[filename].yml append
Posted in  Web Development   |     |  3 Comments »   |  delicious  Digg

January 11, 2008 – 7:04pm Resize a Boot Camp Partition for Use with VMware Fusion

I’m sure this happened to a lot of us, but I started out with my Windows Boot Camp partition about 5GB. My only intention was to use it to test out our web sites in multiple windows browsers. However, after installing all of the Windows XP updates, service packs, VMware tools, multiple IEs, and Firefox, I only had about 400 MB of free space available. I finally hit the tipping point where to install new software (SPSS) I would need more space. No way did I want to go through starting from scratch. Downloading all of those windows updates took FOREVER. So, here is how I managed to resize the Boot Camp partition and still get it to work in Fusion. These steps were performed on a MacBook Pro running Leopard and a Windows XP Boot Camp partition formatted as FAT32. More…

Posted in  OS X   |  22 Comments »   |  delicious  Digg