2008
04.10
So after posting about wanting to work for Google I was contacted by Pat Donahue at [Structural Wealth Managment](http://www.structuralwealth.com/), a financial management start-up in [San Francisco, CA](http://maps.google.com/maps?f=q&hl=en&geocode=&q=530+Jackson+St,+San+Francisco,+CA+94133&sll=37.77916,-122.42007&sspn=0.175295,0.252342&ie=UTF8&ll=37.796492,-122.403831&spn=0.175254,0.252342&z=12&iwloc=addr). While Google would have provided a great learning environment with many bright people to learn from, they have done much of their growing.
Structural Wealth has a small but bright staff and lot more room to grow so I’ll be learning and involved in architecting a revolutionary product. Sounds like a [win-win-win](http://www.tv.com/the-office/conflict-resolution/episode/631894/recap.html).
Not sure where I’m going to be living yet but I’ll figure that out later.
2008
04.09

Liz and I went to see the movie [21](http://www.apple.com/trailers/sony_pictures/21/) based on the book [Bringing Down the House](http://en.wikipedia.org/wiki/Bringing_Down_the_House_%28book%29) about some MIT students who went to Vegas and won a ton of money playing blackjack using card counting and signaling. While the movie way over dramatized the story, Kevin Spacey does an amazing job as always. One of his most memorable moments as an MIT professor is his description of variable change using the [Monty Hall problem](http://en.wikipedia.org/wiki/Monty_Hall_problem) named after the host on the game show [Let's Make a Deal](http://en.wikipedia.org/wiki/Let%27s_Make_a_Deal).
The Monty Hall Problem Explained
Suppose you’re on a game show, and you’re given the choice of three doors: Behind one door is a car; behind the others, goats. You pick a door, say No. 1, and the host, who knows what’s behind the doors, opens another door, say No. 3, which has a goat. He then says to you, “Do you want to pick door No. 2?” Is it to your advantage to switch your choice?
– Marilyn vos Savant
If you don’t know the answer yet I suggest you give it some thought and then try out [this experiment by the New York Times](http://www.nytimes.com/2008/04/08/science/08monty.html) or if you like to be treated like a little kid of feel lazy here’s a [youtube explanation](http://www.youtube.com/watch?v=mhlc7peGlGg).
Got the answer? Cool. Once you’ve got you mind wrapped around this problem it’s pretty simple but apparently it wasn’t till just recently that psychologists understood it’s [implications on cognitive dissonance](http://tierneylab.blogs.nytimes.com/2008/04/07/monty-hall-meets-cognitive-dissonance/).
If you dig that problem the NYT has a [few other related problems too](http://tierneylab.blogs.nytimes.com/2008/04/09/monty-halls-other-problems/).
2008
01.21
If you are looking to remove duplicate lines from an alphabetized list this code will do the trick:
**Find the duplicate lines**
**Replace with a single line**
2007
11.19
After chatting with [ my buddy Dave ](http://mortysworld.blogspot.com)
about how awesome it is to show off using terminal to !1337 computer
users I realized how often I’m sitting at command-line listening to music
in iTunes and wondered how to control iTunes with a shell script.
I searched around an found [ this ](http://www.macosxhints.com/article.php?story=20011108211802830)
article on the topic but of course wanted many tweaks of my own so I’ve
wrote the following script that should allow anyone to control iTunes in terminal
or via SSH remotely.
### Possible Uses ###
The implications are pretty neat if you think about it.
- DJ a party from a laptop, iPhone, or mobile with SSH
- Control your home or office music server remotely
- Scare the heck out of your roommates
Read More >>
2007
11.08
This article will show you an example of how to download multiple files concurrently using the curl_multi commands in PHP 5.While php itself doesn’t support multi threading and concurrency, libcurl does and php allows us to download multiple filesat the same time from php.
Read More >>
2007
09.16
Recently many people in the symfony community have been wondering if the sfThumbnailPlugin and my sfThumbnailCachePlugin should be combined and the merits of thumbnail caching have been questioned so I have posted my response.To be honest, I haven’t run tests to see what the performance gains are exactly for my plugin but I think we could both agree that the process of generating a thumbnails is CPU intense, even if only for a half second. To test, on my machine I generated a thumbnail using Imagemaick which my plugin also uses:
Read More >>