Watching The Oscars, Almost an Xbox 360

While I am sure Steve is disappointed in me, we am watching, like tons of other movie fanatics out there, the Academy Awards. This year Deb and I have seen almost all of the nominated movies (except the shorts and foreign films). We finished getting caught up over the last couple days by watching North Country, Cinderella Man, Corpse Bride, Transamerica, Hustle and Flow, and Pride and Prejudice (well, Deb watched that last one without me). They were all really good movies. We missed Junebug, Howl’s Moving Castle, The New World, and The Squid and the Whale, but, hopefully we will catch those soon.

I was out today looking at webcams and stopped into Circuit City. They had 5 or 6 Xbox 360 “core systems” in stock, but, sadly, no “premium” systems. I considered buying one… I would like to have one, but, I decided to stick to my guns. Buying a “core system” is just a waste – I want the hard drive, I want the wireless controller, I want the DVD remote (if they are still packing that in there) and I need the HD-video cable. I would end up spending more than the price difference if I got the core system. If there was a game on the 360 I was dieing to play, I might have changed my mind, but, right now there are only games I would “like” to play (no “must buys”). Oh well, maybe in a few weeks or a month.

Logging from Javascript

Recently, I have been thinking about how to handle logging events from Javascript. I have done with with an HTML TextArea on the page, I have seen things that pop up a floating window or frame and write messages to that, but, it occurred to me that one could, pretty easily, write a servlet to accept log messages via HTML “get” (or “post”) and then use log4j (or any logger) to log them in whatever whatever way you normally log events with your application. To get the log messages to this servlet just use AJAX (XMLHttpRequest) (you can just ignore the response). I will have to write something like this.

Spore

I’ve just seen a video demonstrating the Maxis game Spore. This game is sort of a sim-life-evolution game. Looks really interesting and promising.

Personally, I am all but finished with the game Psychonauts on the Xbox. This was a stellar game. If you have a platform it runs on and like quirky & bizarre platformers, this game is a must play. It is a pity it didn’t get more notice.

Valentines, just later…

We decided to avoid the mess and crowds of doing Valentines on Valentines day. Instead, we celebrated on February 20th. To celebrate we went into the city and spent the day going to the New York American Museum of Natural History (AMNH), had dinner at a nice Italian restaurant, Mediterraneo, and went to see the movie Syriana.

If you you like natural history museums but haven’t been to the AMNH, you owe it to yourself to visit. Like the Met, it is absolutely huge. You can easily spend several days there. We spent a good part of the afternoon there and only saw a few of the exhibits. There is also a planetarium and IMAX there. Very nice museum.
Syriana was a good movie with several interesting plots, but, I expected them to come together more than they did. It didn’t feel like it fit together as well as it should have. But, that said, it was interesting.

How To: Editing PHP Sites With Eclipse

While most people consider Eclipse an IDE for Java (I use it every day as my Java IDE), many probably don’t know it also makes a great IDE for PHP development. I will walk you through setting up a new Eclipse installation for use with PHP against a MySQL database. My installation will assume that the source for your site is (1) accessible via FTP (2) you want to edit the source files directly directly on the server and (3) your MySQL database is accessible on the PC you want to install Eclipse onto.

The software mentioned in this guide is either free, open source, or is licensed to be freely available. Nothing for you to buy.

0. Install the most recent version of the Java Development Kit (JDK 5.0 Update 6 at the time of this writing). I know, you don’t want to develop Java code, but, Eclipse is written in Java. Despite what you may think about Java, Eclipse performs pretty well and has the look and feel of a native application.

1. Get NetDrive. NetDrive is a nifty program that makes an FTP site available as a drive letter on a Windows machine. Install NetDrive. Run NetDrive and and mount the site in question to a drive letter, such as T:. You may have to use the Advanced options to set the initial directory where you want it.

2. Download Eclipse (version 3.1.2 was the current version at the time of this writing). Save the Eclipse ZIP to C:\

3. Expand the Eclipse ZIP C:\ (it will make its directory, “eclipse”).

4. Make a shortcut (Icon) on your desktop to start Eclipse, but, specify the directory for your workspace. The target of the shortcut should be something like “C:\eclipse\eclipse.exe -data C:\save\eclipse\workspacephp”. This way you can always get a new version of Eclipse and not worry about your workspace. (Make sure the directories you specified exist).

5. Start Eclipse with your shortcut. The first time you run Eclipse you will be presented with the Welcome to Eclipse 3.1 screen. In the top right you will see an Arrow (when you hover over the arrow it will say Workbench). Click the arrow.

6. You are now in the “Java Perspective”. As a PHP person, this perspective is of little use to use. From the Window menu, select Open Perspective | Other… Now click on the Resource perspective and click OK. This is the perspective I use most. As you probably won’t use the Java perspective much in the future, look in the toolbar at the top right of the Eclipse window where it says both Resource and Java, right click on Java and select Close. For future reference, these are buttons to quickly switch between Eclipse Perspectives.

6a. Next, we want to install the PHPEclipse plugin. From the Help menu select Software Updates | Find and Install… Make sure Search for new features to install is selected then click Next.

6b. Click New Remote Site. Set

Name: PHPEclipe
URL: http://download.pipestone.com/eclipse/updates/
Click OK

6c. Making sure only PHPEclipse is checked, click Finish. Eclipse will now go see what is available in the PHPEclipse distribution site. Check the PHPEclipse top level, which will select all of the plug-ins that are contained within PHPEclipse. Click Next. Note: The extra plug-ins include Quantum DB (a very nice Database browser) and Subclipse (the Subversion plug-in for eclipse).

6d. Click that you accept the license. Click Next.

6e. Click Finish to start the installation of PHPEclipse.

6f. PHPEclipse will be downloaded. This will take a few minutes (or more) depending on how faster your internet connection is. Once the download is complete you will be asked to verify the installation. Click Install All. Once all of the plug-ins are installed you will be prompted to restart Eclipse, click Yes.

7. Once Eclipse has restarted, you are ready to create your PHP project. As you were in the Resource perspective when you last quit Eclipse, you should still be in that perspective. If not, switch to it. From the File menu click New | Project… The project type you want to create is a PHP | PHP Project then click Next.

8. Name the project to your liking, but, where it says Project Contents UNCHECK Use Default and click Browse to find the directory of your site that you now have from NetDrive, as result of step 1 of this gude. Click Finish.

9. Eclipse will now scan through the contents of the project (the directories and the files offered by your FTP server). This can take a little time, so be patient.

10. The Navigator pane (on the left) should now show a single project, PHP. If you add other projects they will be show here, you can have any number of projects. Browser through the directory structure and double click to open files, edit them, when you save, the files will be saved, via FTP, directly to the server (thanks to NetDrive).

11. The last thing to do is to setup Quantum DB so you can browse your remote MySQL database. Before you can do this, you will need to make sure your PC has the privileges to access the MySQL database.

12. Before Quantum DB can access a MySQL database you will need the MySQL JDBC driver JAR file. You can get this from MySQL.com’s Connector/J site. I would suggest the 3.1 “production” version. Download the source and binaries ZIP file. From this ZIP file you will need to extract the JAR file, which is probably named “mysql-connector-java-3.1.12-bin.jar”. Place this file somewhere on your hard drive (making a note where you put it).

13. Now, we need to open the Quamtum DB perspective. Go to the Window menu and select Open Perspective | Other… select Quantum DB and click OK. The Quantum DB perspective is now open. It is worth noting that you can now switch between the Perspectives you will commonly use from the toolbar, upper right hand side, Resource, Quantum DB, PHP, etc. Don’t forget these buttons as you will probably use them quite a bit.
14. We need to configure your database connection. Make sure you are in the Quantum DB perspective. From the Database Bookmarks pane (on the left) right click and select New Bookmark.

15. We need to add the MySQL JDBC driver. Click Add Driver. Click Add External Jar… then find the MySQL jar file you downloaded in step 12. Next, we need to specify the Class name. Click the Browse… button and select the com.mysql.jdbc.Driver entry. The Type should automatically change to MySQL. Click Finish.

16. We are now ready to add a Bookmark to your actual database. Select the MySQL driver and click Next. Now, fill in the connection information for your database and click Next. Name the bookmark (this is a descriptive name for you). Click Finish.

17. If you double click the new Bookmark, you can now browse the database. If you get a connection error you can right click on the bookmark and select Properties to change the connection properties of the bookmark. If you double click a table you can browse the contents of the table in the lower right in the Quantum Table View. In the upper right is the Quantum SQL Query Editor view where you can enter SQL commands and then click the arrow (on the right of this view) to execute the commands against your database. It should be noted when you are viewing a table (in the Quantum Table View) you can right click to Insert, Delete, Update the rows in the table.

18. You probably already know, but, to get back to editing your PHP code, in the top right, click Resource or PHP button to switch to one of those perspectives.

Future directions… You already have the Eclipse Subclipse plug-in (for Subversion) and Eclipse comes standard with CVS functionality. If you want to change from using FTP via NetDrive, you can use either Subversion or CVS using Eclipse’s Team functionality. What I have shown you is currently, to my knowledge, the best want to handle FTP with Eclipse. There is an FTP and Webdav plug-in for Eclipse, but, I didn’t find it to be terribly helpful.

Good luck. I hope you enjoy Eclipse as much as I do.

Vendor Apathy?

I am working on some PHP code. I discovered what appears to be a nice IDE for PHP, PhpEd. I downloaded their evaluation version, which seems to work relatively well in many respects — although I have had some issues with ftp file synchronization. Anyway, I noticed on their web site that they offer discounts for folks who work at universities. As I am a full time staff member at a university, I followed their instructions and sent TWO emails (in the span of about 10 days) to their sales department inquiring about the education discount. They haven’t bothered to respond to either email. This is just sad. They had what was almost undoubtedly a sure sale, which would probably have lead to several other sales due to word of mouth, but, they don’t seem to care enough to respond to email inquiries. Amazing. I cannot say I am all that surprised… so many companies just don’t respond to sales, support, whatever via email. If a company is going to publish an email address, they should have somebody who monitors incoming email daily.
I have since discovered PHP Eclipse. This will probably meet my needs, as I use Eclipse for Java work, anyway. That said, I am deeply saddened that Eclipse doesn’t appear to have “Team” functionality oriented around FTP (just CVS and SVN via a plugin). There is a plugin for “FTP and Webdav” support, but, it is just sad — it doesn’t do anything near what is needed. I did discover that using NetDrive I can just work directly will files on the FTP server, so, good enough for now.

Oscars and Rejection…

Yesterday, we decided to do a Oscar nominations marathon. On the menu was Good Night and Good Luck, Capote, Walk the Line, and Brokeback Mountain. They were all good movies, worth of their various nominations. Of the four, my personal favorite was probably Walk the Line. The best “movie” was probably Brokeback Mountain. Capote and Good Night were both interesting with interesting stories.

If you have been following national weather, you know that the NYC area got hit with a major snowstorm that started yesterday afternoon. Just as we were going into the first movie at, 2pm, the first of the snowflakes was starting to fall. Between every movie we looked and saw definite progression. After getting out of the last movie, at 12:30am, there was quite a lot of snow on the ground. There was at least 5 or 6 inches of snow on the hood of the car. We got the car cleaned up and drove the 15 or 20 miles home, which took most of an hour. The drive was slow and most of it was behind snow plows, but, there weren’t very many cars on the road so the drive was slow, but, not terribly difficult or treacherous.
The funniest thing of the day occurred when  buying the tickets for the fourth movie… I had been buying tickets at the automatic ticket kiosk all day. When I went to pay for the tickets for the fourth movie it told me my debit card had exceeded its limit for purchases. We were undoubtedly the theater’s best customers of the day, who probably should have been comped a ticket at this point, and we were being told we couldn’t buy tickets. Sheesh! We had to go to the box office to buy tickets. Had there been a line, they would have completely lost the ticket sales, probably.

My last observation is that movie theaters, especially in the smaller auditoriums, need to go digital… in part this is due to the vastly improved picture quality, the removal of the scratches, etc., but, I was just astonished at how loud the projector was in three of the four movies we saw. I could hear the projector through the entire movie, which was really a bummer.

All in all, it was a fun day of catching up on movies. We still need to see Syriana, North Country, and probably a couple others, but, we feel much more caught up.

Storm, Movies, Books

Supposedly, we have a big snow storm coming this weekend, starting mid-afternoon tomorrow. I am not necessarily holding my breath, but, I am hopeful. They are predicting up to something like 9 inches. We can hope 🙂

This weekend we have plans to get out and see several of the Oscar noms. Looking forward to this. Will let you know what I think.
I just finished the audiobook for Dean Koontz’s newest: Forever Odd. This is the sequel to Odd Thomas. I read Odd Thomas quite a while back and I feel that Forever Odd is a fine addition. Koontz continues to be a favorite author of mine. Good stuff.

Psychonauts

I started playing the platformer Psychonauts for the Xbox this last weekend. I had seen it around but dismissed it as just another game. I prefer to only play the really standout games. After seeing the X-Play named it the platformer of 2005 I decided it was worth a try. I am happy to say I agree, it is really a spectacular game. The graphics are great, the sound is great, the platforming is tons of fun. The game is psychedelic and trippy, but, it enhances the game, doesn’t take away from it. This is a fun game. I think it is out on other systems (Xbox, PS2, and PC, I think). The boss battles aren’t unmanageably difficult. The game tends to notice when you are stuck doing something and will give you hints, which is really nice. You can always ask the game for hints (which are generally helpful). Good for almost any age, not too hard and not too easy.

Watching Commercials…

I am spending my time right now watching commercials… this must mean the Superbowl is on. Like an undoubtedly growing number of folks, this is the one show I don’t watch (I am not a sports-on-tv fan, but, I do watch the commercials. The funny thing is that my instincts are now so honed that I reach for the fast forward button, probably, at least once per commercial break. So far, my favorites are an AmeriQuest and the Bud Light commercials, but, we’re still in the first quarter. I am unlikely to watch the half-time show as any sort of wardrobe malfunctions Mick Jagger is likely to have won’t anything but scare me.

Running commentary…

The “Addicted to Lost” commercial made me laugh. If you don’t watch the show you wouldn’t get it, though.

The Spring commercials have been pretty good.

Sorry, I did watch some of the half-time show. Mick needs to put on a few pounds. They all look pretty scary.  Ouch, it is a bunch of grandpas on stage. They really cannot say “You made a grown man cry,” should be “… and old man cry” now.

The commercials for Desperate Housewives don’t do anything for me, but, I don’t watch the show.

New ABC show The Evidence looks kind of interesting. Mostly CSI, but, we’ll see.

They have these “mini-commercials” during the game to fake us out. Doh.

The AmeriQuest Don’t Judge Too Quickly commercials continue to amuse me.

It Budweiser baby Clydesdale commercial was nice.

Haha the Fabio commercial… I was about to gag until…

The movie Shaggie Dog looks terrible, V is for Vendetta looks interesting.

Well, the game is now over. Amazingly, they only went over by about 26 minutes. Thecommercials werea probably about par. Some fun, some stupid, none were absolutely amazing, but…