Friday, January 30, 2009

Speaking on Groovy again

I'll be repeating my talk on Groovy at noon on February 3rd at noon in Salem, Oregon. From the email notice:

This presentation will be in Information Systems Division conference room on the first floor, suite 103, of the State Public Service Building. Here is a Google Map link for the location.

Parking on Court and Capitol streets is the closest to the Public Service Building. The spots are metered.

Maybe I'll see you there,
Charles.

P.S. My slide deck will be almost identical to the last Groovy talk, so I won't be posting a new one.

Converting a WordPress blog to a 'One-Click Install' on DreamHost

We set up a WordPress blog on DreamHost a while ago for a client. It was a custom install due to a bunch of craziness related to him getting booted from his old hosting setup. It all worked fine, and then DreamHost sent me a "nag email" (their term) asking me to upgrade because the old version had security issues. Fair enough.

I had another site to upgrade, but it had been installed as a one-click install. The upgrade for that was one click (plus some backing up). I could have manually upgraded this custom install, but if I did that, I knew I'd have to continue doing manual upgrades. Therefore, I wanted to convert this custom WP install to a one-click install.

DreamHost didn't seem to have any instructions, but how hard could it be? Basically, the procedure was pretty similar to what you'd go through to move a WP from one server to another.

  1. Backup the database and the old site: I backed up the old DB using mysqldump, and I tarred up the old site.
  2. Export the old site: from the WP admin page, select Export and dump all authors.
  3. Create a new database in the DreamHost control panel. In theory, you could drop all the tables in the old DB and re-use it, but I was being paranoid, which paided off later.
  4. Move old site out of the way: just move the old site directory to a new name - e.g., mv site.com save.site.com.
  5. Create a new 'One-Click Install' WordPress site using Advanced Mode, since we had a custom theme and a bunch of other content (pictures). This was put in the new database. After DreamHost emailed me to tell me that was done, I logged in and changed the admin password.
  6. Import the old content from the Admin Import function. Actually, DreamHost's email included the URL for that page. One issue I ran into was the "user name" for the old posts: WP thought the old posts by admin were from some other user because in the old blog, the admin user had a different display name.
  7. Copy in the custom theme and other content from the old saved directory into the new blog site. Enable the theme. Set up Akismet - this is where having the old DB around was useful; I just looked in the wp_options table to find the API key instead of having to dig around for it.

enjoy,
Charles.

Thursday, January 22, 2009

Jython talk at SJUG

Here are the slides of a talk I gave last February at the Salem Java Users Group - SJUG. Although it looks like it's primarily about Python and Jython, my bigger emphasis was on extension programming - scripting existing Java code. In other words, a form of polyglot programming.



Enjoy,
Charles.

Wednesday, January 21, 2009

Book: Java Power Tools

Java Power Tools by John Ferguson Smart
ISBN: 978-0-596-52793-8

Java Power Tools provides a fairly detailed introduction to a number of tools for Java programmers. It fits nicely between the O'Reilly Hacks series and having a dozen books like Ant: The Definitive Guide, 2nd Edition. Like the Hacks books, Java Power Tools provides an introduction to a bunch of tools. The Hacks books are great for answering the question "I've heard of that tool, but where does it fit?" But whereas the Hacks books provide just an appetizer, this book provides a main course, enough to get seriously started with the tool being discussed. And then, if you want all the gory details, a Definitive Guide could provide the full five-course meal.

The selection of tools presented was really good, at least for me. For example, I know about continuous integrations servers, but I haven't set one up. At one client site, they were using Hudson, which I had some exposure to, but didn't know much about the others like Cruise Control, Continuum, and LuntBuild. Similarly, I've been using JUnit 3.x for years, but I didn't really know what was different in JUnit 4 or how that compares to TestNG. This book provided me with a great overview of these and other tools. Java Power Tools provides a great way to get up to speed with a general area of tooling (e.g., continuous integration servers) or a good cross-section of the majority of the Java tools in use today.

If I had to pick something to complain about, it would be Part II - Version Control Tools. These aren't really Java tools, although every programmer (Java or otherwise) should be using them. Or given the decision to include version control tools, I'd suggest excluding CVS because it's old and including at least one distributed version control tool like Mercurial (used by the Open JDK project and NetBeans) or git (used by the Linux kernel).

So, in conclusion, unless you have no free will about tool selection or you already know all of these tools backwards and forwards, I highly recommend this book to almost any Java programmer.

enjoy,
Charles.

Wednesday, January 07, 2009

Groovy at SJUG

On January 6th, I spoke at the Salem Java Users Group on Groovy. The premise was not to replace Java, but rather to show how it can be used in addition to Java. Here are the slides.




Enjoy,
Charles.