Archive for June, 2009
The Search For My Great-Grandfather.
Posted by PhazeonPhoenix in Personal on June 19th, 2009
So the other day my mother emails me a link to this document. At first glance It looks like a boring old work men’s handbook from 1918. But as my mother explained to me, this was written by my great-grandfather, Clarence Westgate Cook, from my mother’s side of the family. I honestly don’t know my mother’s side so well. We lived in the mid-west they lived in California. My Uncles and my Aunt would visit from time to time but hardly often enough to be able to sit and talk about such things.
I must say when I found this link I was flabbergasted. Not only was it a revelation to me to see what my great grandfather did, it was also astonishing to me that anyone would scan in such a book, and make it available online in such a portable format. I quickly started searching for other references of my grandfather’s name and found these few links and he’s named here, here, here and here. I even found his name listed in a 1920 USC Year Book as a professor of social engineering.
It’s simply amazing that such rather mundane objects from that era would be scanned and digitally archived. Who would have figured anyone would want to see these books let alone want to digitize them. I also found it quite astonishing to find such a person in my ancestry of whom I had rather little information about. I think I need to find out more information about this.
New Symfony Project Woes
Posted by PhazeonPhoenix in Symfony on June 16th, 2009
Generating a new Symfony framework project is as simple as a single command. But as with many things it rarely works the way you want out of the box. I’ve documented every step and every command that I end up running on a new project to ensure that it behaves the way it should and I ended up with a 30 point list! I have to initialize the project, modify several files to enable things such as the Doctrine ORM plugin, install several plugins such as the sfDoctrineGuard authentication plugin, SVN version control taking careful steps to avoid placing the cache, logs, and the base model classes under revision, and set up my development environment for the new project.
I need to work on a way to automate as much as I can of the process. The tricky thing is that certain commands need to be executed as root (inlcuding rebooting the web server) and that throws a monkey wrench in the gears of that idea. Certainly one could create a script and SUID root, but that is going to require extensive care to ensure that the process is handled gracefully if it fails for whatever reason. It’s a large undertaking to say the least. I guess I have to weigh the time spent each new project vs. coding such a script.
Data Weaving
Posted by PhazeonPhoenix in Programming on June 13th, 2009
Today I am working diligently on a new project. I was busily moving textual data from various applications I use in my development and into an excel spreadsheet for quick reference later. From three different files opened in two different (and both very large) applications and Excel 2007 all at the same time. If computers were ever revolt mine’s going to go straight for the jugular.
Then after I finished building the table in Excel I realized I had to create multiple (24 to be exact) template files for all the pages this new project required. I didn’t feel like typing the command out (I used touch on my Linux devel box) so I copied the text I needed for the base of the file name, tacked on the remainder of the file name and removed the carriage returns with a quick recorded macro in UltraEdit 32, and pasted it into my shell window. BAM!
OK for most of you that will probably be complete gibberish. And that’s OK. It just suddenly dawned on me what exactly I was doing to accomplish my goal. Such a contrived, inefficient but effective way of doing it. Also as suddenly, the phrase “Data Weaving” popped into mind.
Setting up Subversion and Trac on CentOS 5
Posted by PhazeonPhoenix in Programming on June 12th, 2009
I stumbled upon this article and I must say it’s a great guide for getting both of these applications up and running correctly. I now use a slightly modified process to create new projects on my dev server. This in conjunction with a quick and dirty WordPress blog installed on my dev server’s root for posting links to the various parts of my new project and it’s an impromptu development environment!
Also on a side note, I switched away from Gentoo to CentOS for my dev server. Not that I do not enjoy Gentoo (I’m a geek, give it a break) but I needed a turn-key enviroment for development. So far I’ve been satisfied with CentOS. Since it’s based on Red Hat Enterprise Linux it’s solid as a rock and help is easy to find.
Internet Explorer, the bane of all web developers.
Posted by PhazeonPhoenix in Miscellanea on June 11th, 2009
I really wish Internet Explorer would just die and go away. IE has been the bane of all web developers since the hay-days of the Internet. Be it quirky CSS behaviour to Javascript Incompatibilities. Today I wrestled with the latter. What sounded like such an easy idea of a rotating image on the front page became a debugging nightmare because only IE goofs the script up. I still haven’t found the solution either and it’s beginning to get frustrating. All of you still using IE GET FIREFOX! Use a browser that’s not gimped or hobbled by poor implementations of open standards.
Ultaviolet Light
Posted by PhazeonPhoenix in Miscellanea on June 9th, 2009
Much to my chagrin it was an overcast day with the sun poking through the could layer ever so little. These days are hard on me. Just a bit ago I drove down to get the mail from our post office box and it was near torture. I was fighting back a headache the whole trip just from the intensity of the light. Not the visible light, the ultraviolet light. It felt like a headache with the odd feeling just before you sneeze after you know it’s coming. It was only when I was indoors for the briefest moment at my destinations that I felt relief. It was very brief relief.
I believe I’m sensetive to high levels of UV light. I’ve tried using sunglasses to surprising results. They seemed to help keep things managable. The only problem is I either need to get contacts AND a pair of shades or buy a pair of prescription sunglasses. I’m not going to get one of those lame ass clip-on/slip-over/under/whatever sunglasses.
actAs: Accountable Doctrine Behaviour
Posted by PhazeonPhoenix in Symfony on June 8th, 2009
It was fairly easy to create a Signable behaviour and it was done within a couple days. I soon realized though that the behavior of the SoftDelete behaviour wasn’t quite what I wanted. It only adds a “deleted” boolean field to the DB. I also wanted to know who deleted it and what time it was deleted. I decided to expand SoftDelete and make it use a timestamp instead of a boolean. That part worked too.
The problem I soon ran into was with when I combined SoftDelete and Signable with it’s new preDelete hook. Seems since SoftDelete stops the preDelete event it doesn’t let the Signable code execute properly. I decided that the correct answer to the problem was to create a whole new behaviour which would combine not only SoftDelete and Signable but also Timestampable. I called it Accountable since it’s primary function is to keep record of who touched an object.
I did a manual test and so far it’s worked as planned. I’m not yet sure of the SoftDelete filters… I made a change to preDqlDelete and preDqlSelect and I’m not quite sure if it still works. Time will tell I’m sure. Once I’m more certain this code is solid I’ll give more information on it.
Doctrine Behaviours
Posted by PhazeonPhoenix in Symfony on June 6th, 2009
I’m finding that I need to write a couple behaviors that for some reason are not in the default distribution. The features I’m needing in particular are “Signable” to add created_by, updated_by and deleted_by to each table, and “Commentable” to handle the comments that you’re going to be able to post on almost every single object.
Thankfully the best way for me to learn is to find an example. I’m going to modify the code for “Timestampable” for “Signable” and I think I’m going to look at csDoctrineActAsAttachablePlugin for how it behaves and build from it to make “Commentable”. I might even release it to the community.
Doctrine Behaviours are fairly new to me but I understand what’s going on for sure. Behaviours allow you to modularize your reusable database code. In my examples, I need to be able to keep track of who created, updated, and/or deleted an item. Instead of adding that bit of code to each model by hand, I can cut it out and make a Behaviour that I then attach to each model.
Database Schema and Doctrine Model planning
Posted by PhazeonPhoenix in Symfony on June 3rd, 2009
Today I did some major database planning for a major project I’m working on and it’s quite an interesting process. You have to take such a large concept as every bit of information your application might need to store and slicing that into smaller pieces to create the tables and models needed to access and process them.
I’m finding the best way to plan them out is to grab a piece of paper and something to write with and start scribbling. Maybe it is low tech but whatever works you know. I found myself creating what could have easily have been a flow chart spanning several pages. I started in one small area and quickly expanded to other less obvious and obscure tables I’d need. All while relaxing on my bed.
I started writing my schema file. This being my first real application of the Doctrine ORM it was a bit slow going. The syntax for the schema.yml is a bit new to me. It took me a couple tries to get the correct relationships to form exactly the way I wanted. But so far so good.
Adding Google Analytics to your Wordpress Blog
Posted by PhazeonPhoenix in Wordpress on June 1st, 2009

My friend Ryan over at GoldenComm Posted a nice article about adding Google Analytics to your Wordpress Blog. While his method works just fine, not everyone is comfortible editing the raw files in your Wordpress Theme.
There is a plugin that you can install located here that can do this for you. After installing the plugin you’ll see “Google Analytics” under ”Plugins” like in the image on the right. The plugin is pretty self explanitory, you simply paste your in the appropiate field and hit Update Settings. The important thing to remember if you are using any form of Wordpress Caching you will have to clear your Cache before the plugin can take effect.
