Monthly ArchiveNovember 2007



Uncategorized 28 Nov 2007 06:10 pm

Property Files, CakePHP, and Agile Development

I have a personal goal to make my current cakephp project as agile as possible. With multiple developers and different dev/qa/production environments there are some challenges, especially when you want to automate builds and have each developer in control of their environment. Properties seemed like the natural solution and would eliminate database.php copying or having to worry about email and other specific settings. My goals here were:

1. All environment specific settings in one file
2. Let ant handle the deployment to dev/qa/production

The ant part was easy but I struggled to find the proper way of using “properties” with cake. I settled on the following:

There is a new directory at the top level called properties with these files:

/properties.php.dev
/properties.php.qa
/properties.php.prod
/properties.php.sample

These files contain all the specific values for each environment. During a deploy ant copies the correct one to the name properties.php. On your local machine you just rename properties.php.sample to properties.php and put in the values for your environment and never commit this to subversion.

This file is included in app/config/bootstrap.php so its available everywhere.

In the property file..I define the properties as constants so the naming convention is as follows

define(’PROPERTY_DBNAME’,'adatabase’);
define(’PROPERTY_DBUSER,’auser’);

This makes it easy to tell where these values are coming from. So far works a treat!

Uncategorized 14 Nov 2007 12:38 pm

ANT, Leopard and SCP

So i have been using ant to do lots of stuff related to builds. But twice I ran into a problem with the optional scp task. Turns out you can not use the latest version of jsch.jar, you need to use an earlier version.

If you run ant -diagnostics and get an error like : sshexec : Missing dependency com.jcraft.jsch.UserInfo

Try installing an earlier version of jsch.jar. On my leopard install (ant 1.7) I used version 0.1.29 from sourceforge. Worked a treat.

Uncategorized 07 Nov 2007 10:07 am

Daily Reading at a Startup

So after a month or so of working at a startup I noticed my google reader subscriptions were drastically different. No more perezhilton and gawker…its all lawyers! Anyway I thought this might be helpful to anyone that wants to start delving into this world:

The best podcasts ever:
http://edcorner.stanford.edu/podcasts.html

Daily VC Stuff
http://www.askthevc.com/
http://ricksegal.typepad.com/

And heres the rest:
google-reader-134_1194444057100.png

Uncategorized 04 Nov 2007 06:53 pm

fishing in really really rural west virginia

library-250.jpg

library-251.jpg

library-252.jpg

library-253.jpg

library-255.jpg

library-256.jpg

library-257.jpg

Uncategorized 04 Nov 2007 06:48 pm

morgantown halloween

zimg_0002.jpg

zimg_0005.jpg

zimg_0004.jpg

zimg_0006.jpg

zimg_0009.jpg

zimg_0012.jpg

zimg_0013.jpg

Uncategorized 04 Nov 2007 06:31 pm

wvu homecoming

img_0002.jpg

img_0003.jpg

img_0006.jpg

img_0004.jpg