The Right Tool For the Job
January 10th, 2007
I was working on something tonight that I thought would be fun to post on. It was, How I used Automator to extract addresses from Mail.
But I didn’t. Then I thought it was going to be, How I used Applescript to extract addresses from Mail.
But it wasn’t. Want to know what I used? PHP. Yep, no kidding.
Let me back up and explain my situation. My company has a client who is interested in details about his users as (naturally) most clients are (especially those spending a nice amount on ad campaigns). Anyhow, one key piece of information was overlooked while developing his database - user registration time. For those who might not realize the implications immediately, without this bit of information, certain queries would be impossible. Say your client wanted to know how successful his last ad campaign went and how many more users than average signed up. You’d be screwed.
In comes Providence. (Some people demand proof that there is a God, I just take a look at my life and know the answer.) For some silly reason, I set it up so that I should get a copy of each confirmation of registration message that the site generates. I didn’t think it would be too much, but over the past few days, I’ve been getting one every couple of minutes. That’s a lot of data that’s missing. And when I realized that all the data was there, I tried to think of the best way to get to it.
But the best way is not always the way you expect. I tried the apple solutions, and I’m sure I could’ve made one of them work, but I would probably be up for a couple more hours just to learn how to make them work. I even thought of trying Ruby or Python ’cause I really don’t like PHP, but in the end, it was the best solution. It was the best solution because:
- It did what I needed it to (directory listing, file reading, document creation)
- I knew how to use it
This is new to me. When I tackle a job, I’m ready to start all over from scratch. Relearn everything if necessary. This whole using the bottom of your shoe to hammer a nail thing is weird.
But it works, and I like that.
December 11th, 2007 at 2:53 pm
[...] know I’ve let my feelings be known on PHP before, but I just thought of something that made me laugh. PHP is the slut of the internet. No really, [...]