Movie Review: Avatar
James Cameron has made some pretty incredible movies over the past 25 years, and Avatar will end up doing for movies what the iPod did for digital music.
Most of the 3D movies I’ve seen in years-past have been very gimmicky. The 3D is overbearing, and the directors seem to think it’s funny to break “The 4th wall.” Avatar is an entirely new approach to bringing 3D into films. Not only did they have to invent new technology to do the 3D film work, but the way that 3D was used in this film did a lot to enrich the experience. No gimmicks, no games.
The only way to see this film is in IMAX 3D. The use of 3D made the entire world of Pandora so much deeper and richer than anything I’ve seen before. It almost made you feel as though you were right there with the soldiers, the Na’vi, flying on the backs of the dragons, and trying not to get crushed by the construction equipment. It’s been quite a while since I’ve felt that immersed in a movie.
That being said, the story itself was fairly mediocre and predictable. If you compare the story of Avatar to the stories of Terminator (I & II), Aliens, The Abyss, Strange Days and Titanic, it just doesn’t compare. All of the other movies he’s written have either had deeper, richer story lines (Terminator, Titanic), have had better action (Aliens, The Abyss), or have been darker (Strange Days).
At one point, the film’s political message got so heavy-handed that my B.S. meter jumped the tracks and it actually pulled me back out of the movie. James, I didn’t come to see this movie so that you could preach to me, m’kay? But really, this is the same political message that was at the end of the special edition of The Abyss.
On the other hand, the story line is still better that most Hollywood blockbusters or summer action flicks — I had just expected something better from James Cameron. Bottom Line: A-minus.
WebKit 3D CSS Transforms
I came across the following demos of the new 3D CSS Transform functionality in the latest WebKit builds. These will be making their way into Safari, Google Chrome, iPhone, and Android sometime soon.
Snow Stacks
(Can’t see the video? Watch it directly.)
Image Fly
(Can’t see the video? Watch it directly.)
Installing PHP 5.3 with mysqlnd on Mac OS X with MacPorts
Historically, I’ve always preferred to use Apple’s built-in Apache 2.2 and PHP 5.x that comes with Leopard. However, after trying to compile PHP 5.3 from scratch and connect it with Apache, I decided to just use the MacPorts installer instead. That did mean giving up control of a finely-tuned Apache installation, but in the end, I think I’ve ended up with a better localhost system.
Prerequisites
- Install MacPorts
Also, make sure that your MacPorts install is completely up-to-date with:
sudo port -d selfupdate
Installation
Now, I’ve never used MacPorts to install PHP or Apache before, so I’m starting with a clean slate. If you’ve already installed PHP or Apache with MacPorts, your steps may be different. As always, your mileage may vary. For me, I develop several open-source projects, so I need things that others may not. Adjust these steps as necessary.
- Using “Web Sharing” in your Sharing Preferences should be turned off. Currently this points to the (old) Apple Apache installation, although we’ll change that later.
- From Terminal, install PHP 5.3 + Apache, and some other stuff. This will likely take quite a while. I’m installing SQLite, MySQL, and PostgreSQL because of my work on CacheCore, so you may or may not need those.
mysqlndis the new PHP Native Driver for MySQL and is supposed to be better, so we’ll use that. We also need to enable non-default settings for cURL.sudo port install curl +ssl+ipv6+ares+idn+gss+openldap+sftp_scp \ php5 +apache2+fastcgi+pear
You can see all available options by running
port variants php5 - The new Apache configuration file is stored at
/opt/local/apache2/conf/httpd.confwhile the old one was at/etc/apache2/conf/httpd.conf. Take a moment to copy over any settings you’ll want to maintain into the new Apache installation. - You’ll also want to include your extra settings. Toward the bottom of your
httpd.conffile, add the following line:# All settings Include conf/extra/*.conf
- If you don’t have an SSL certificate, rename your SSL configuration:
cd /opt/local/apache2; sudo mv conf/extra/httpd-ssl.conf conf/extra/httpd-ssl.conf-disabled
- You’ll also want to enable PHP in Apache:
sudo mv conf/extras-conf/mod_php.conf conf/extra/mod_php.conf
- The new PHP configuration file is stored at
/opt/local/etc/php5/php.iniwhile the old one was at/etc/php.ini. Take a moment to copy over any settings you’ll want to maintain into the new PHP installation. - Restart Apache. If you were using
apachectlbefore, it still points to the old Apache, so we’ll want to point specifically to the new one.sudo /opt/local/apache2/bin/apachectl restart
At this point, PHP 5.3 with Apache 2.2 and the new mysqlnd extension are all installed.
Extra stuff
- I generally prefer to have lots more stuff installed locally so that I can worry more about developing and less about installing. Because of this, I also install a few other things.
sudo port install memcached \ php5-apc \ php5-curl \ php5-http \ php5-iconv \ php5-imagick \ php5-mbstring \ php5-memcache \ php5-mysql \ php5-postgresql \ php5-sockets \ php5-sqlite \ php5-tidy \ php5-xdebug - Restart Apache with:
sudo /opt/local/apache2/bin/apachectl restart
Replacing older versions
Now, we want to continue using our command-line PHP scripts and the “Web Sharing” checkbox in the Sharing Preference Pane, so let’s make sure that those are all pointing to the new locations instead. We’ll be backing up and redirecting php, apachectl, and httpd.
- Open up your Sharing Preference Pane, and disable Web Sharing
- Run the following command on the Terminal:
sudo mv /usr/bin/php /usr/bin/php.bak && sudo ln -s /opt/local/bin/php /usr/bin/php; \ sudo mv /usr/sbin/apachectl /usr/sbin/apachectl.bak && sudo ln -s /opt/local/apache2/bin/apachectl /usr/sbin/apachectl; \ sudo mv /usr/sbin/httpd /usr/sbin/httpd.bak && sudo ln -s /opt/local/apache2/bin/httpd /usr/sbin/httpd; \
- Re-enable Web Sharing in the preference pane.
Shortcuts
Lastly, I like to set up some shortcuts so that I can access all of my important localhost stuff from one place. I’ll create a new directory called www-config and then I’ll place symlinks into it for quick access to Apache and PHP configuration files.
sudo mkdir /www-config && \ cd /www-config && \ sudo ln -s /opt/local/apache2/bin/apachectl /www-config/apachectl && \ sudo ln -s /opt/local/apache2/conf/ /www-config/httpd-conf && \ sudo ln -s /opt/local/var/db/php5/ /www-config/php-ini && \ sudo ln -s /opt/local/etc/php5/php.ini /www-config/php.ini
